1 2 %if 0 3 4 lDebug - libre 86-DOS debugger 5 6 Copyright (C) 1995-2003 Paul Vojta 7 Copyright (C) 2008-2021 C. Masloch 8 9 Usage of the works is permitted provided that this 10 instrument is retained with the works, so that any entity 11 that uses the works is notified of this instrument. 12 13 DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 14 15 %endif 16 17 [list -] 14 <3> [list -] 14 <2> [list -] 24 <1> [list -] 26 <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 %if _DEVICE 125 addsection DEVICESHIM, align=16 follows=INIT vstart=0 126 %endif 127 128 129 usesection lDEBUG_DATA_ENTRY 130 131 %define DATASECTIONFIXUP -data_entry_start+100h 132 %define CODESECTIONFIXUP -code_start+0 133 %define CODESECTIONOFFSET (100h+ldebug_data_entry_size+asmtable1_size+asmtable2_size) 134 %define INITSECTIONOFFSET (CODESECTIONOFFSET+ldebug_code_size) 135 136 %define CODETARGET1 (CODESECTIONOFFSET+datastack_size) 137 %define CODETARGET2 (CODETARGET1+auxbuff_size) 138 139 %define AUXTARGET1 (CODETARGET1+ldebug_code_size) 140 %define AUXTARGET2 CODETARGET1 141 %define AUXTARGET3 AUXTARGET1+auxbuff_size 142 143 %define NONBOOTINITTARGET (INITSECTIONOFFSET + datastack_size + auxbuff_size * 2 + historysegment_size) 147 %define NONBOOTINITSTACK_START (NONBOOTINITTARGET+init_size) 148 NONBOOTINITSTACK_SIZE equ 512 ; must be even 149 %define NONBOOTINITSTACK_END (NONBOOTINITSTACK_START+NONBOOTINITSTACK_SIZE) 150 151 BOOTINITSTACK_SIZE equ 512 ; must be divisible by 16 152 %define BOOTDELTA (fromkib(kib(auxbuff_size * 2 + historysegment_size + datastack_size + INITSECTIONOFFSET + 16))) 156 157 %if _DEVICE 158 %define DEVICEADJUST (deviceshim_size + 110h) 159 %define DEVICEINITTARGET (INITSECTIONOFFSET + DEVICEADJUST + datastack_size + auxbuff_size * 2 + historysegment_size + 10h) 165 %define DEVICEINITSIZE (DEVICEINITTARGET - 100h + init_size + deviceshim_size) 168 %define DATAENTRYTABLESIZE (ldebug_data_entry_size + asmtable1_size + asmtable2_size) 171 172 173 ; Note: Once this is implemented, the final 174 ; copy of this device header should live 175 ; in front of our PSP. Therefore, this space 176 ; after the PSP can be re-used for the newly 177 ; expanded N buffer. (Refer to N_BUFFER_END.) 178 179 ; The device header is of a fixed format. 180 ; For our purposes, the 4-byte code for 181 ; each the strategy entry and the 182 ; interrupt entry is part of this format. 183 ; (DOS may read the attributes or entrypoint 184 ; offsets before calling either, so the 185 ; inicomp stage needs to recreate in its 186 ; entrypoints part exactly what we have here.) 187 %macro writedeviceheader 3 188 usesection %1 189 %2: 190 .next: 191 %ifidni %1, DEVICESHIM 192 dd -1 193 %else 194 fill 2, -1, jmp strict short j_zero_entrypoint 195 dw -1 196 %endif 197 .attributes: 198 dw 8000h ; character device 199 .strategy: 200 dw .strategy_entry %3 ; -> strategy entry 201 .interrupt: 202 dw .interrupt_entry %3 ; -> interrupt entry 203 .name: 204 fill 8, 32, db "LDEBUG$$" ; character device name 205 .strategy_entry: 206 fill 4, 90h, jmp %2 %+ .device_entrypoint 207 .interrupt_entry: 208 fill 4, 90h, retf 209 %endmacro 210 211 writedeviceheader lDEBUG_DATA_ENTRY, device_header, - 100h 188 <1> usesection %1 189 <1> %2: 190 <1> .next: 191 <1> %ifidni %1, DEVICESHIM 192 <1> dd -1 193 <1> %else 194 00000000 EB3E <1> fill 2, -1, jmp strict short j_zero_entrypoint 195 00000002 FFFF <1> dw -1 196 <1> %endif 197 <1> .attributes: 198 00000004 0080 <1> dw 8000h 199 <1> .strategy: 200 00000006 [12FF] <1> dw .strategy_entry %3 201 <1> .interrupt: 202 00000008 [16FF] <1> dw .interrupt_entry %3 203 <1> .name: 204 0000000A 4C44454255472424 <1> fill 8, 32, db "LDEBUG$$" 205 <1> .strategy_entry: 206 00000012 EB3690 <1> fill 4, 90h, jmp %2 %+ .device_entrypoint 207 <1> .interrupt_entry: 208 00000016 CB90 <1> fill 4, 90h, retf 212 %else 213 jmp initcode_j 214 %endif 215 216 ; Startup codes can be discarded after one of 217 ; them is used to enter the initialisation part. 218 ; Therefore the N buffer is now extended past 219 ; these codes, refer to N_BUFFER_END. 220 %if _BOOTLDR 221 0000001A 00 align 32, db 0 222 %if ($ - $$) != 32 223 %error Wrong kernel iniload entrypoint 224 %endif 225 00000020 BB[0601] mov bx, boot_initcode 226 %endif 227 228 %if _BOOTLDR || _DEVICE 229 device_boot_common_entrypoint: 230 00000023 8CC8 mov ax, cs 231 00000025 83E810 sub ax, 10h 232 00000028 8ED8 mov ds, ax 233 0000002A EB18 jmp @F 234 %endif 235 0000002C 00 align 64, db 0 236 %if ($ - $$) != 64 237 %error Wrong application entrypoint 238 %endif 239 j_zero_entrypoint: 240 initcode_j: 241 00000040 8CC8 mov ax, cs 242 00000042 31DB xor bx, bx 243 @@: 244 00000044 050718 add ax, paras(INITSECTIONOFFSET) 245 00000047 50 push ax 246 00000048 53 push bx 247 00000049 CB retf 248 249 250 %if _DEVICE 251 ; INP: es:bx -> device request header 252 ; ss:sp -> a DOS stack, far return address to DOS 253 ; cs:0 -> our start image 254 ; OUT: bx = offset of init function in INIT segment 255 ; ss:sp -> bx, fl, ds, ax, far return address 256 device_header.device_entrypoint: 257 0000004A 26807F0200 cmp byte [es:bx + 2], 0 ; command code 0 (init) ? 258 0000004F 7407 je @F 259 260 00000051 26C747030381 mov word [es:bx + 3], 8103h ; error, done, code: unknown command 261 00000057 CB retf 262 263 @@: 264 00000058 50 push ax 265 00000059 1E push ds 266 0000005A 9C pushf 267 0000005B 53 push bx 268 0000005C BB[C104] mov bx, device_initcode 269 0000005F EBC2 jmp device_boot_common_entrypoint 270 271 272 writedeviceheader DEVICESHIM, shim_device_header, - 0 188 <1> usesection %1 189 <1> %2: 190 <1> .next: 191 <1> %ifidni %1, DEVICESHIM 192 00000000 FFFFFFFF <1> dd -1 193 <1> %else 194 <1> fill 2, -1, jmp strict short j_zero_entrypoint 195 <1> dw -1 196 <1> %endif 197 <1> .attributes: 198 00000004 0080 <1> dw 8000h 199 <1> .strategy: 200 00000006 [1200] <1> dw .strategy_entry %3 201 <1> .interrupt: 202 00000008 [1600] <1> dw .interrupt_entry %3 203 <1> .name: 204 0000000A 4C44454255472424 <1> fill 8, 32, db "LDEBUG$$" 205 <1> .strategy_entry: 206 00000012 EB0690 <1> fill 4, 90h, jmp %2 %+ .device_entrypoint 207 <1> .interrupt_entry: 208 00000016 CB90 <1> fill 4, 90h, retf 273 shim_device_header.device_entrypoint: 274 0000001A 26C747030381 mov word [es:bx + 3], 8103h ; error, done, code: unknown command 275 00000020 CB retf 276 277 00000021 90 align 16 278 deviceshim_size equ $ - section.DEVICESHIM.vstart 279 endarea deviceshim, 1 280 281 282 usesection lDEBUG_DATA_ENTRY 283 %endif 284 285 286 00000061 00 align 2, db 0 287 N_BUFFER_END equ $ ; end of N buffer (starts in PSP at 80h) 288 289 00000062 [FD05][EF79][D054]- cmdlist: dw aa,bb,cc,ddd,ee,ff,gg,hh,ii,error,error,ll,mm,nn,oo 289 00000068 [D312][C881][2383]- 289 0000006E [6F2C][A683][D185]- 289 00000074 [BC98][BC98][6187]- 289 0000007A [8B89][AD8A][4085] 290 00000080 [1D3A][6B8C][C71D]- dw pp,qq,rr,sss,tt,uu,vv,ww,xx,yy 290 00000086 [6293][B035][7C42]- 290 0000008C [4299][4495][AD96]- 290 00000092 [5BBD] 291 %if _SYMBOLIC 292 dw zz 293 %endif 294 295 align 4, db 0 296 ; options, startoptions and internalflags 297 ; have to be consecutive 298 00000094 00000000 options: dd DEFAULTOPTIONS ; run-time options 299 dispregs32 equ 1 ; RX: 32-bit register display (R, T/P/G) 300 traceints equ 2 ; TM: trace into interrupts (T) 301 cpdepchars equ 4 ; allow dumping of CP-dependant characters (D, DX) 302 fakeindos equ 8 ; always assume InDOS flag non-zero (all) 303 nonpagingdevice equ 10h ; disallow paged output with [more] prompt (all exc. P, T) 304 pagingdevice equ 20h ; allow paged output with [more] prompt (all exc. P, T) 305 ; paged output is by default on if the output device is StdOut, else off 306 hexrn equ 40h ; display raw hexadecimal content of FPU registers (RN) 307 ;novdd equ 80h ; don't use a registered NTVDM VDD (L, W) 308 nondospaging equ 100h ; paging: don't use DOS for input when waiting for a key 309 nohlt equ 200h ; HLT doesn't work, don't use it 310 biosidles equ 400h ; don't idle with HLT or Int2F.1680, only call BIOS Int16.00 311 opt_userawinput equ 800h ; use rawinput for int 21h interactive input 312 use_si_units equ 1000h ; in disp_*_size use SI units (kB = 1000, etc) 313 use_jedec_units equ 2000h ; in disp_*_size use JEDEC units (kB = 1024) 314 enable_serial equ 4000h ; enable serial I/O (preferred over DOS or BIOS terminal) 315 int8_disable_serial equ 8000h ; disable serial I/O when breaking due to intr8 316 gg_do_not_skip_bp equ 1_0000h ; gg: do not skip a breakpoint (bb or gg) 317 gg_no_autorepeat equ 2_0000h ; gg: do not auto-repeat 318 tp_do_not_skip_bp equ 4_0000h ; T/TP/P: do not skip a (bb) breakpoint 319 gg_bb_hit_no_repeat equ 8_0000h ; gg: do not auto-repeat after bb hit 320 tp_bb_hit_no_repeat equ 10_0000h ; T/TP/P: do not auto-repeat after bb hit 321 gg_unexpected_no_repeat equ 20_0000h ; gg: do not auto-repeat after unexpectedinterrupt 322 tp_unexpected_no_repeat equ 40_0000h ; T/TP/P 323 ss_no_dump: equ 80_0000h 324 %if _SYMBOLIC 325 dd_no_blanks_sym: equ 100_0000h 326 zz_no_pm_xms: equ 200_0000h 327 %endif 328 rr_disasm_no_rept: equ 1000_0000h 329 rr_disasm_no_show: equ 2000_0000h 330 opt_cmdline_quiet_input:equ 4000_0000h 331 opt_cmdline_quiet_output:equ 8000_0000h 332 DEFAULTOPTIONS equ 0 333 334 00000098 10410000 options2: dd DEFAULTOPTIONS2 335 opt2_db_header: equ 1 336 opt2_db_trailer: equ 2 337 opt2_dw_header: equ 10h 338 opt2_dw_trailer: equ 20h 339 opt2_dd_header: equ 100h 340 opt2_dd_trailer: equ 200h 341 opt2_rawinput_dpmi: equ 800h 342 opt2_hh_compat: equ 1000h 343 opt2_getc_idle: equ 2000h 344 opt2_getc_idle_dpmi: equ 4000h 345 opt2_re_cancel_tpg: equ 8000h 346 DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi 347 348 0000009C 0F000060 options3: dd DEFAULTOPTIONS3 349 opt3_tt_no_paging: equ 1 350 opt3_tp_no_paging: equ 2 351 opt3_pp_no_paging: equ 4 352 opt3_gg_no_paging: equ 8 353 opt3_silence_paging_set:equ 100h 354 opt3_silence_paging_on: equ 200h 355 opt3_r_highlight_diff: equ 10000h 356 opt3_r_highlight_dumb: equ 20000h 357 opt3_r_highlight_full: equ 40000h 358 opt3_r_highlight_eip: equ 80000h 359 %if _PM 360 opt3_ss_b_bit_set: equ 10_0000h 361 %if _BREAK_INSTALLDPMI 362 opt3_break_installdpmi: equ 20_0000h 363 %endif 364 %endif 365 opt3_no_idle_2F: equ 200_0000h 366 %if _DELAY_BEFORE_BP 367 opt3_delay_before_bp: equ 400_0000h 368 %endif 369 opt3_no_call_update: equ 800_0000h 370 opt3_disable_autorepeat:equ 1000_0000h 371 opt3_check_ctrlc_keyb: equ 2000_0000h 372 opt3_check_ctrlc_0bh: equ 4000_0000h 373 opt3_tsr_quit_leave_tf: equ 8000_0000h 374 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 377 378 000000A0 02000000 options4: dd DEFAULTOPTIONS4 379 opt4_int_2F_hook: equ 2 380 opt4_int_08_hook: equ 4 381 opt4_int_2D_hook: equ 8 382 opt4_int_serial_force: equ 1_0000h 383 opt4_int_2F_force: equ 2_0000h 384 opt4_int_08_force: equ 4_0000h 385 opt4_int_2D_force: equ 8_0000h 386 opt4_int_00_force: equ 100_0000h 387 opt4_int_01_force: equ 200_0000h 388 opt4_int_03_force: equ 400_0000h 389 opt4_int_06_force: equ 800_0000h 390 opt4_int_18_force: equ 1000_0000h 391 opt4_int_19_force: equ 2000_0000h 392 DEFAULTOPTIONS4 equ opt4_int_2F_hook 393 394 000000A4 00000000 options5: dd 0 395 000000A8 00000000 options6: dd DEFAULTOPTIONS6 396 %if _VXCHG 397 opt6_vv_mode: equ 1 398 opt6_vv_keep: equ 2 399 opt6_vv_int16: equ 10h 400 %if _VXCHG_DEFAULT_ON 401 DEFAULTOPTIONS6 equ opt6_vv_mode 402 %else 403 DEFAULTOPTIONS6 equ 0 404 %endif 405 %else 406 DEFAULTOPTIONS6 equ 0 407 %endif 408 %if _DEBUG && _DEBUG_COND 409 opt6_debug_mode: equ 100h 410 %endif 411 ; options, options2, options3, options4, options5, options6 412 ; are each assumed to be dwords 413 ; and all consecutive in expr.asm isvariable? 414 415 000000AC 00000000 startoptions: dd DEFAULTOPTIONS ; options as determined during startup; read-only for user 416 000000B0 10410000 startoptions2: dd DEFAULTOPTIONS2 417 000000B4 0F000060 startoptions3: dd DEFAULTOPTIONS3 418 000000B8 02000000 startoptions4: dd DEFAULTOPTIONS4 419 000000BC 00000000 startoptions5: dd 0 420 000000C0 00000000 startoptions6: dd DEFAULTOPTIONS6 421 ; startoptions, startoptions2, startoptions3, startoptions4, 422 ; startoptions5, startoptions6 423 ; are each assumed 424 ; to be dwords and all consecutive in expr.asm isvariable? 425 426 000000C4 F8308000 internalflags: dd attachedterm|pagedcommand|notstdinput|inputfile|notstdoutput|outputfile|(!!_PM*dpminohlt)|debuggeeA20|debuggerA20 427 ; flags only modified by DEBUG itself 428 oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 429 newpacket equ 2 ; Int21.7305 packet method available (L, W) 430 ntpacket equ 4 ; VDD registered and usable (L, W) 431 pagedcommand equ 8 ; allows paging in puts 432 notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 433 inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 434 notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 435 outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 436 hooked2F equ 100h ; Int2F hooked 437 nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 438 dpminohlt equ 400h ; DPMI doesn't like hlt 439 protectedmode equ 800h ; in (DPMI) protected mode 440 debuggeeA20 equ 1000h ; state of debuggee's A20 441 debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 442 nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 443 has386 equ 8000h ; CPU is a 386 444 usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 445 runningnt equ 2_0000h ; running in NTVDM 446 canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 447 modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 448 promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 449 switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 450 tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 451 attachedterm equ 80_0000h ; the attached process terminated 452 runningdosemu equ 100_0000h ; running in dosemu 453 ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 454 tt_while: equ 400_0000h ; tt: while condition specified 455 tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 456 tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 457 tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 458 tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 459 tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 460 461 internalflags2: 462 %if _SYMBOLIC 463 dd dif2_sym_req_xms | dif2_sym_req_86mm 464 %else 465 000000C8 00000000 dd 0 466 %endif 467 dif2_gg_is_first: equ 1 468 dif2_gg_skip_non_cseip: equ 2 469 dif2_gg_skip_cseip: equ 4 470 dif2_gg_is_gg: equ 8 471 dif2_gg_first_detected: equ 10h 472 dif2_gg_again: equ 20h 473 dif2_tpg_proceed_bp_set:equ 40h 474 dif2_tpg_keep_proceed_bp: equ 80h 475 dif2_tpg_have_bp: equ 100h 476 dif2_tpg_adjusted_cseip:equ 200h 477 dif2_tpg_do_not_adjust: equ 400h 478 dif2_bp_failure: equ 800h 479 dif2_is_pp: equ 1000h 480 %if _SYMBOLIC 481 dif2_createdprocess: equ 800_0000h ; created empty debuggee process 482 dif2_sym_req_xms: equ 2000h 483 dif2_sym_req_86mm: equ 4000h 484 dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 485 dif2_no_pm_xms: equ 1_0000h 486 dif2_xms_detection_done:equ 2_0000h 487 %endif 488 %if _INPUT_FILE_HANDLES 489 dif2_input_file: equ 10_0000h 490 dif2_closed_input_file: equ 20_0000h 491 %endif 492 dif2_did_getline_file: equ 40_0000h 493 %if _SYMBOLIC 494 dif2_poison: equ 80_0000h 495 %endif 496 dif2_boot_loaded_kernel:equ 100_0000h 497 %if _INPUT_FILE_BOOT 498 dif2_input_file_boot: equ 200_0000h 499 dif2_closed_input_file_boot: equ 400_0000h 500 %endif 501 dif2_in_silence_dump: equ 1000_0000h 502 dif2_int31_segment: equ 2000_0000h 503 504 000000CC 80040000 internalflags3: dd dif3_partition_changed | dif3_at_line_end 505 dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 506 dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 507 dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 508 dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 511 dif3_load_dir_dir: equ 8 512 dif3_input_terminal_override: equ 10h 513 dif3_input_serial_override: equ 20h 514 dif3_if_not: equ 40h 515 dif3_partition_changed: equ 80h 516 ; 517 dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 518 dif3_input_cmdline_closed: equ 200h 519 dif3_at_line_end: equ 400h 520 dif3_quiet_input_single:equ 800h 521 dif3_quiet_output: equ 1000h 522 dif3_unquiet_error: equ 2000h 523 dif3_unquiet_prompt: equ 4000h 524 dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 525 dif3_return_eof: equ 8000h 526 dif3_highlighting: equ 1_0000h 527 dif3_do_not_highlight: equ 2_0000h 528 dif3_int10_highlight: equ 2_0000h 529 %if _PM 530 dif3_ss_b_bit_set: equ 10_0000h 531 %endif 532 dif3_gotint19: equ 20_0000h 533 %if _DELAY_BEFORE_BP 534 dif3_delayed equ 80_0000h 535 %endif 536 dif3_input_re: equ 100_0000h ; input reading from re_buffer 537 dif3_input_re_closed: equ 200_0000h 538 dif3_accept_getrange_0: equ 400_0000h 539 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 540 dif3_in_if: equ 800_0000h 541 %endif 542 dif3_auxbuff_guarded_1: equ 1000_0000h 543 dif3_auxbuff_guarded_2: equ 2000_0000h 544 dif3_prior_pm: equ 4000_0000h 545 dif3_sss_is_reverse: equ 8000_0000h 546 547 000000D0 00000000 internalflags4: dd 0 548 dif4_int_serial_hooked: equ 1 549 dif4_int_2F_hooked: equ 2 550 dif4_int_08_hooked: equ 4 551 dif4_int_2D_hooked: equ 8 552 553 000000D4 00000000 internalflags5: dd 0 554 000000D8 00000000 internalflags6: dd 0 555 %if _VXCHG 556 dif6_vv_mode: equ 1 557 %endif 558 %if _DEBUG && _DEBUG_COND 559 dif6_debug_mode: equ 100h 560 %endif 561 dif6_device_mode: equ 40_0000h 562 ; internalflags, internalflags2, internalflags3, internalflags4, 563 ; internalflags5, internalflags6 564 ; are each assumed 565 ; to be dwords and all consecutive in expr.asm isvariable? 566 567 000000DC 07000000 asm_options: dd DEFAULTASMOPTIONS 568 disasm_lowercase equ 1 569 disasm_commablank equ 2 570 disasm_nasm equ 4 571 disasm_lowercase_refmem:equ 8 572 disasm_show_short: equ 10h 573 disasm_show_near: equ 20h 574 disasm_show_far: equ 40h 575 DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm 576 577 asm_startoptions: 578 000000E0 07000000 dd DEFAULTASMOPTIONS 579 580 000000E4 00000000 gg_first_cseip_linear: dd 0 581 000000E8 00000000 gg_next_cseip_linear: dd 0 582 000000EC 00000000 tpg_possible_breakpoint:dd 0 583 000000F0 [3873] gg_deferred_message: dw msg.empty_message 584 bb_deferred_message_in_lineout_behind: 585 000000F2 0000 dw 0 586 align 4, db 0 587 000000F4 00 tpg_proceed_bp: times BPSIZE db 0 588 %if _DEBUG1 589 align 2, db 0 590 test_records_Readmem: times 6 * 16 db 0 591 test_records_Writemem: times 6 * 16 db 0 592 test_records_getLinear: times 6 * 16 db 0 593 test_records_getSegmented: times 6 * 16 db 0 594 595 test_readmem_value: db 0 596 %endif 597 000000FA 00 pp_instruction: db 0 598 000000FB 00 align 4, db 0 599 000000FC 00000000 pp_operand: dd 0 600 align 2, db 0 601 00000100 0000 code_seg: dw 0 602 %if _PM 603 code_sel: dw 0 604 %endif 605 606 00000102 0D db 13 607 00000103 0D align 16, db 13 ; insure the cmdline_buffer is prefixed by CR 608 cmdline_buffer: 609 .size: equ _RC_BUFFER_SIZE 610 00000110 00 times .size db 0 611 .end: 612 00000210 [1001] .position: dw cmdline_buffer 613 614 00000212 0D db 13 615 00000213 0D align 2, db 13 ; insure the re_buffer is prefixed by CR 616 re_buffer: 617 .size: equ _RE_BUFFER_SIZE 618 00000214 405200 fill .size,0,db "@R" 619 .end: 620 00000A14 [1402] .position: dw re_buffer 621 622 00000A16 00 align 4, db 0 623 00000A18 00000000 re_count: dd 0 624 00000A1C 00010000 re_limit: dd 256 625 00000A20 00000000 rc_count: dd 0 626 00000A24 00100000 rc_limit: dd 4096 627 628 align 2, db 0 629 00000A28 0000 cmd3_set_options: dw 0 630 %if _PM 631 auxbuff_switchbuffer_size: dw 0 632 %endif 633 00000A2A 00 auxbuff_segorsel:segonlyaddress 634 auxbuff_behind_while_condition: 635 00000A2C 0000 dw 0 ; -> behind while condition stored in auxbuff 636 ; (this is also the first silent buffer entry) 637 auxbuff_behind_last_silent: 638 00000A2E 0000 dw 0 ; -> behind last silent buffer entry 639 tt_silent_mode_number: 640 00000A30 0000 dw 0 ; if non-zero: maximum amount of dumps 641 ; displayed after T/TP/P while silent 642 %if _SYMBOLIC 643 created_psp: dw 0 644 created_size: dw 0 645 %endif 646 647 %if _INPUT_FILE_HANDLES 648 00000A32 90 align INPUTFILEHANDLE_size 649 input_file_handles: 650 00000A38 FF times _INPUT_FILE_HANDLES * INPUTFILEHANDLE_size db -1 651 00000AB8 0000 .active: dw 0 652 00000ABA 0000 .to_close: dw 0 653 %endif 654 align 2, db 0 655 00000ABC 0142 indos_remember_seek_function: dw 4201h 656 00000ABE FFFF indos_remember_seek_handle: dw -1 657 align 4, db 0 658 00000AC0 00000000 indos_remember_seek_offset: dd 0 659 %if _INPUT_FILE_BOOT 660 align 4, db 0 661 00000AC4 00000000 boot_remember_seek_offset: dd 0 662 align 2, db 0 663 00000AC8 FFFF boot_remember_seek_handle: dw -1 664 %endif 665 666 00000ACA 00 charcounter: db 0 ; used by raw output to handle tab 667 00000ACB 00 linecounter: db 0 ; used by paging in puts 668 align 4, db 0 669 00000ACC 0000 savesp: dw 0 ; saved stack pointer 670 00000ACE 0000 dw 0 ; 0 to set high word of esp 671 00000AD0 0000 re_sp: dw 0 672 00000AD2 [0000] errret: dw cmd3 ; return here if error 673 00000AD4 [DB98] throwret: dw errhandler ; return here if error - priority, no display 674 00000AD6 [DE0B] throwsp: dw stack_end - 2; stack pointer set before jumping to throwret 675 00000AD8 0000 run_sp: dw 0 ; stack pointer when running 676 00000ADA 0000 dw 0 ; (zero for esph) 677 00000ADC 4000 spadjust: dw 40h ; adjust sp by this amount for save 678 %if _SYMBOLIC 679 stack_low_address: 680 dw str_buffer ; low end of stack, default = str_buffer 681 %endif 682 683 00000ADE 0000 pspdbe: dw 0 ; debuggee's PSP (unless DIF&attachedterm) 684 00000AE0 0000 pspdbg: dw 0 ; debugger's PSP (RM segment) 685 00000AE2 00 align 4, db 0 686 00000AE4 0000000000000000 run2324: dd 0,0 ; debuggee's interrupt vectors 23h and 24h (both modes) 687 %if _PM 688 dd 0 689 dbg2324: dw i23pm, i24pm 690 %endif 691 %if _VDD 692 00000AEC FFFF hVdd: dw -1 ; NTVDM VDD handle 693 %endif 694 00000AEE 00 align 4, db 0 695 00000AF0 0000000000000000 sav2324: dd 0,0 ; debugger's interrupt vectors 23h and 24h (real-mode only) 696 00000AF8 00 hakstat: db 0 ; whether we have hacked the vectors or not 697 00000AF9 00 align 4, db 0 698 00000AFC 00000000 psp22: dd 0 ; original terminate address from our PSP 699 00000B00 0000 parent: dw 0 ; original parent process from our PSP (must follow psp22) 700 %if _MCB || _INT 701 00000B02 FFFF firstmcb: dw -1 ; start of MCB chain (always segment) 702 00000B04 FFFF firstumcb: dw -1 703 %endif 704 00000B06 00 pInDOS: segofs16address ; far16 address of InDOS flag (bimodal) 705 %if _USESDA 706 00000B0A FFFFFFFF pSDA: segofs16address minusone 707 ; far16 address of SDA (bimodal) 708 %endif 709 00000B0E 00 machine: db 0 ; type of processor for assembler and disassembler (1..6) 710 00000B0F 00 has_87: db 0 ; if there is a math coprocessor present 711 00000B10 00 mach_87: db 0 ; type of coprocessor present 712 00000B11 00 encodedmach87: db 0 ; C0 = no coproceasor, C = coprocessor present, 713 ; C2 = 287 present on a 386 714 %if _MMXSUPP 715 00000B12 00 has_mmx: db 0 716 %endif 717 %if _VXCHG 718 00000B13 00 align 4, db 0 719 00000B14 00000000 xmsdrv: dd 0 ; XMM driver address, obtained thru int 2F, ax=4310h 720 xmsmove:istruc XMSM ; XMS block move struct, used to save/restore screens 721 00000B18 00 iend 722 00000B28 0000 csrpos: dw 0 ; cursor position of currently inactive screen 723 00000B2A 00 vrows: db 0 ; current rows; to see if debuggee changed video mode 724 %endif 725 00000B2B 01 bInDbg: db 1 ; 1=debugger is running 726 00000B2C 0A notatty: db 10 ; if standard input is from a file 727 ; this is also used for a linebreak processing hack 728 00000B2D 00 switchar: db 0 ; switch character 729 00000B2E 20 swch1: db ' ' ; switch character if it's a slash 730 00000B2F 00 align 2, db 0 731 00000B30 0000 promptlen: dw 0 ; length of prompt 732 00000B32 [0200] bufnext: dw line_in+2 ; address of next available character 733 00000B34 [0200] bufend: dw line_in+2 ; address + 1 of last valid character 734 00000B36 0000 rc: dw 0 735 00000B38 0000 priorrc: dw 0 736 00000B3A 0000 erc: dw 0 737 %if _HISTORY 738 history: 739 %if _HISTORY_SEPARATE_FIXED 740 00000B3C 00 .segorsel: segonlyaddress 741 00000B3E FE1F .first: dw _HISTORY_SIZE - 2 742 00000B40 FE1F .last: dw _HISTORY_SIZE - 2 743 %else 744 .first: dw historybuffer.end - 2 745 .last: dw historybuffer.end - 2 746 %endif 747 %endif 748 749 var_addr_entries: 750 00000B42 00 a_addr: segmentedaddress; address for next A command 751 00000B48 00 d_addr: segmentedaddress; address for next D command; must follow a_addr 752 00000B4E 00 behind_r_u_addr:segmentedaddress; address behind R's disassembly 753 00000B54 00 u_addr: segmentedaddress; address for next U command; must follow d_addr 754 00000B5A 00 e_addr: segmentedaddress; address for current/next E command 755 %if _DSTRINGS 756 00000B60 00 dz_addr: segmentedaddress; address for next ASCIZ string 757 00000B66 00 dcpm_addr: segmentedaddress; address for next $-terminated string 758 00000B6C 00 dcount_addr: segmentedaddress; address for next byte-counted string 759 00000B72 00 dwcount_addr: segmentedaddress; address for next word-counted string 760 %endif 761 var_addr_entries.amount equ ($ - var_addr_entries) / SEGADR_size 762 %if _PM 763 x_addr: dd 0 ; (phys) address for next DX command 764 %endif 765 %if _DSTRINGS 766 00000B78 00 dstringtype: db 0 ; FFh byte-counted, FEh word-counted, else terminator byte 767 00000B79 00 align 2, db 0 768 00000B7A [600B] dstringaddr: dw dz_addr ; -> address of last string 769 %endif 770 %if _INT 771 align 4, db 0 772 00000B7C 00000000 intaddress: dd 0 773 lastint_is_86m_and_mcb: 774 00000B80 0000 dw 0 775 00000B82 00 lastint: db 0 776 %endif 777 00000B83 00 align 4, db 0 778 search_results: 779 %if _PM 780 times 6 * 16 db 0 781 %else 782 00000B84 00 times 4 * 16 db 0 783 %endif 784 align 4, db 0 785 00000BC4 00000000 sscounter: dd 0 786 00000BC8 00 eqflag: db 0 ; flag indicating presence of `=' operand 787 00000BC9 00 align 2, db 0 788 00000BCA 000000000000 eqladdr: dw 0,0,0 ; address of `=' operand in G, P and T command 789 align 2, db 0 790 00000BD0 0000 run_int: dw 0 ; interrupt type that stopped the running 791 00000BD2 [4A04] lastcmd: dw dmycmd 792 00000BD4 00 fileext: db 0 ; file extension (0 if no file name) 793 EXT_OTHER equ 1 794 EXT_COM equ 2 795 EXT_EXE equ 4 796 EXT_HEX equ 8 797 798 00000BD5 00 align 4, db 0 799 00000BD8 00000000 mmxbuff: dd 0 ; buffer with a (read-only) part of MMX register 800 ; for access from within expressions 801 %if _CATCHINT08 802 00000BDC 0000 intr8_counter: dw 0 803 00000BDE 5A00 intr8_limit: dw 18 * 5 ; ca 5 seconds 804 %endif 805 00000BE0 00 maxmachinetype: db 0 806 serial_rows: 807 00000BE1 18 db 24 808 serial_columns: 809 00000BE2 50 db 80 810 serial_keep_timeout: 811 00000BE3 0F db 15 812 %if _USE_TX_FIFO 813 serial_fifo_size: 814 00000BE4 10 db _BI_TX_FIFO_SIZE 815 ; size of built-in TX fifo (1 is as if no FIFO) 816 %endif 817 serial_flags: 818 00000BE5 00 db 0 819 sf_init_done: equ 1 820 sf_ctrl_c: equ 2 821 sf_double_ctrl_c: equ 4 822 sf_built_in_fifo: equ 8 823 824 00000BE6 0B serial_var_intnum: db _INTNUM 825 00000BE7 03 serial_var_params: db _UART_PARAMS 826 00000BE8 00 serial_var_fifo: db _UART_FIFO 827 00000BE9 00 align 2, db 0 828 00000BEA F802 serial_var_baseport: dw _UART_BASE 829 00000BEC 0C00 serial_var_dl: dw _UART_RATE 830 00000BEE 0800 serial_var_irqmask: dw _OFFMASK 831 832 00000BF0 01 io_rows: db 1 833 00000BF1 01 io_columns: db 1 834 align 2, db 0 835 00000BF2 0000 io_start_buffer: dw 0 836 00000BF4 0000 io_end_buffer: dw 0 837 00000BF6 FF00 io_levels: dw 255 838 00000BF8 0300 io_flags: dw DEFAULTIOFLAGS 839 iof_extra_iol_for_tpg_re: equ 1 840 iof_extra_iol_for_rc: equ 2 841 DEFAULTIOFLAGS equ iof_extra_iol_for_tpg_re | iof_extra_iol_for_rc 842 843 align 2, db 0 844 00000BFA 0000 getline_timer_count: dw 0 845 00000BFC 0000 getline_timer_last: dw 0 846 00000BFE [4A04] getline_timer_func: dw dmycmd 847 848 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 849 align 2, db 0 850 00000C00 0000 if_exists_then_address: dw 0 851 00000C02 0000 if_exists_si: dw 0 852 00000C04 0000 if_exists_sp: dw 0 853 00000C06 0000 if_exists_length: dw 0 854 %endif 855 856 align 2, db 0 857 terminator_in_line_in: 858 00000C08 0000 .offset: dw 0 859 00000C0A 00 .value: db 0 860 861 00000C0B 00 qqtermcode: db 0 862 align 2, db 0 863 00000C0C 0000 device_mcb_paragraphs: dw 0 864 00000C0E 00000000 device_header_address: dd 0 865 866 align 2, db 0 867 inttab_optional: 868 .: 869 serial_installed_intnum: equ $ 870 00000C12 0000 dw 0 871 00000C14 [AC96] dw serial_interrupt_handler 872 00000C16 0100 dw dif4_int_serial_hooked 873 %if _PM 874 dw 2Fh 875 dw debug2F 876 dw dif4_int_2F_hooked 877 %endif 878 %if _CATCHINT08 879 00000C18 0800 dw 8 880 00000C1A [B686] dw intr8 881 00000C1C 0400 dw dif4_int_08_hooked 882 %endif 883 .amount: equ ($ - .) / 6 884 00000C1E FFFF dw -1 885 886 887 amisintr_offset: 888 00000C20 [280C] dw inttab 889 890 inttab_pre: 891 00000C22 00 times 3 * inttab_optional.amount db 0 892 893 inttab: 894 %if _CATCHINT00 895 00000C28 00 db 0 896 00000C29 [9087] dw intr0 ; table of interrupt initialization stuff 897 %endif 898 %if _CATCHINT01 899 00000C2B 01 db 1 900 00000C2C [5487] dw intr1 901 %endif 902 %if _CATCHINT03 903 00000C2E 03 db 3 904 00000C2F [AC87] dw intr3 905 %endif 906 %if _CATCHINT06 907 00000C31 06 db 6 908 00000C32 [C887] dw intr6 909 %endif 910 %if _CATCHINT18 911 00000C34 18 db 18h 912 00000C35 [E487] dw intr18 913 %endif 914 %if _CATCHINT19 915 00000C37 19 db 19h 916 00000C38 [0088] dw intr19 917 %endif 918 endarea inttab 919 inttab_number equ inttab_size / 3 920 %if _CATCHINT2D 921 00000C3A 2D .i2D: db 2Dh 922 00000C3B [B682] dw int2D 923 %endif 924 925 926 intforcetab: 927 %if _CATCHINT00 928 00000C3D 01 db opt4_int_00_force >> 24 929 %endif 930 %if _CATCHINT01 931 00000C3E 02 db opt4_int_01_force >> 24 932 %endif 933 %if _CATCHINT03 934 00000C3F 04 db opt4_int_03_force >> 24 935 %endif 936 %if _CATCHINT06 937 00000C40 08 db opt4_int_06_force >> 24 938 %endif 939 %if _CATCHINT18 940 00000C41 10 db opt4_int_18_force >> 24 941 %endif 942 %if _CATCHINT19 943 00000C42 20 db opt4_int_19_force >> 24 944 %endif 945 946 947 00000C43 00 align 2, db 0 948 ; Parameter block for EXEC call 949 execblk: 950 00000C44 0000 dw 0 ;(00) zero: copy the parent's environment 951 00000C46 00000000 .cmdline: dw 0,0 ;(02) address of command tail to copy 952 00000C4A 5C000000 .fcb1: dw 5Ch,0 ;(06) address of first FCB to copy 953 00000C4E 6C000000 .fcb2: dw 6Ch,0 ;(10) address of second FCB to copy 954 00000C52 00000000 .sssp: dw 0,0 ;(14) initial SS:SP 955 00000C56 00000000 .csip: dw 0,0 ;(18) initial CS:IP 956 957 958 ; Register save area (32 words). 959 ; must be DWORD aligned, used as stack 960 00000C5A 00 align 4, db 0 961 regs: 962 00000C5C 00000000 reg_eax: dd 0 ;+00 eax 963 00000C60 00000000 reg_ebx: dd 0 ;+04 ebx 964 00000C64 00000000 reg_ecx: dd 0 ;+08 ecx 965 00000C68 00000000 reg_edx: dd 0 ;+12 edx 966 00000C6C 00000000 reg_esp: dd 0 ;+16 esp 967 00000C70 00000000 reg_ebp: dd 0 ;+20 ebp 968 00000C74 00000000 reg_esi: dd 0 ;+24 esi 969 00000C78 00000000 reg_edi: dd 0 ;+28 edi 970 00000C7C 00000000 reg_ds: dd 0 ;+32 ds (high word unused) 971 00000C80 00000000 reg_es: dd 0 ;+36 es (high word unused) 972 00000C84 00000000 reg_ss: dd 0 ;+40 ss (high word unused) 973 00000C88 00000000 reg_cs: dd 0 ;+44 cs (high word unused) 974 00000C8C 00000000 reg_fs: dd 0 ;+48 fs (high word unused) 975 00000C90 00000000 reg_gs: dd 0 ;+52 gs (high word unused) 976 00000C94 00000000 reg_eip: dd 0 ;+56 eip 977 00000C98 00000000 reg_efl: dd 0 ;+60 efl(ags) 978 regs.end: 979 regs.size: equ regs.end - regs 980 981 regs_prior: 982 .: 983 00000C9C 00000000 times 16 dd 0 984 .end: 985 .size: equ .end - . 986 987 %if .size != regs.size 988 %error regs prior save area size mismatch 989 %endif 990 991 %if _DEVICE 992 device_quittable_regs: 993 .: 994 00000CDC 00000000 times 16 dd 0 995 .end: 996 .size: equ .end - . 997 998 %if .size != regs.size 999 %error regs prior save area size mismatch 1000 %endif 1001 %endif 1002 1003 %if _VARIABLES 1004 00000D1C 00000000 vregs: times 256 dd 0 ; internal v0..vff 1005 %endif 1006 1007 ; possible byte encoding of lDebug variables for dynamic computations: 1008 ; xxxxyyyy 1009 ; 10: register 1010 ; xx: size (0 = 1, 1 = 2, 2 = 4) 1011 ; yyyy: 0..15: register as stored in the register save area 1012 ; as SIL, DIL, BPL, SPL aren't supported these map to xH 1013 ; xSL, IPL and FLL are invalid, ExS are invalid 1014 ; 1011: variable 1015 ; yyyy: which variable. variables are always dword-sized 1016 ; 11000000: 32-bit compound, next byte stores: xxxxyyyy first, second 16-bit reg 1017 ; 11000001..11111111: available for encoding other compound regs, vars, indirection, 1018 ; symbols, types etc 1019 ; 0xxxxxxx: operators 1020 1021 1022 ; Instruction set information needed for the 'p' command. 1023 ; ppbytes and ppinfo needs to be consecutive. 1024 0000111C 6667262E363E6465F2- ppbytes:db 66h,67h,26h,2Eh,36h,3Eh,64h,65h,0F2h,0F3h,0F0h ; prefixes 1024 00001125 F3F0 1025 PPLEN_ONLY_PREFIXES equ $-ppbytes 1026 .string: 1027 00001127 ACADAAABA4A5 db 0ACh,0ADh,0AAh,0ABh,0A4h,0A5h ; lods,stos,movs 1028 0000112D 6C6D6E6F db 6Ch,6Dh,6Eh,6Fh ; ins,outs 1029 00001131 A6A7AEAF db 0A6h,0A7h,0AEh,0AFh ; cmps,scas 1030 PPLEN_ONLY_STRING equ $-ppbytes 1031 .string_amount: equ $ - .string 1032 00001135 CCCD db 0CCh,0CDh ; int instructions 1033 00001137 E0E1E2 db 0E0h,0E1h,0E2h ; loop instructions 1034 0000113A E8 db 0E8h ; call rel16/32 1035 0000113B 9A db 09Ah ; call far seg16:16/32 1036 ; (This last one is done explicitly by the code.) 1037 ; db 0FFh ; FF/2 or FF/3: indirect call 1038 1039 PPLEN equ $-ppbytes ; size of the above table 1040 1041 ; Info for the above, respectively. This MUST follow 1042 ; immediately after ppbytes, as we add + PPLEN - 1 to 1043 ; di after repne scasb to index into this (ppinfo). 1044 ; 80h = prefix; 82h = operand size prefix; 81h = address size prefix. 1045 ; If the high bit is not set, the next highest bit (40h) indicates 1046 ; that the instruction size depends on whether there is an operand 1047 ; size prefix; if set, under o32 two bytes are added to the size. 1048 ; (This is only used for direct near and far call.) 1049 ; If both the two highest bits are clear, then PP_STRDEST, 1050 ; PP_STRSRC, or PP_STRSRC2 may be set. This only happens for 1051 ; string instructions, which always are neither prefixes nor 1052 ; use additional bytes. 1053 ; The remaining bits tell the number of additional bytes in the 1054 ; instruction. This is at most 4. It must be below-or-equal to 1055 ; 7, or if PP_VARSIZ is used, 5 (so the sum stays below 8). 1056 1057 PP_ADRSIZ equ 01h 1058 PP_OPSIZ equ 02h 1059 PP_PREFIX equ 80h 1060 PP_VARSIZ equ 40h 1061 PP_STRDEST equ 20h 1062 PP_STRSRC equ 10h 1063 PP_STRSRC2 equ 08h 1064 PP_SIZ_MASK equ 07h 1065 1066 0000113C 8281 ppinfo: db PP_PREFIX | PP_OPSIZ, PP_PREFIX | PP_ADRSIZ 1067 0000113E 80 times 9 db PP_PREFIX ; prefixes 1068 00001147 1010 db PP_STRSRC, PP_STRSRC ; lods 1069 00001149 2020 db PP_STRDEST, PP_STRDEST ; stos 1070 0000114B 3030 db PP_STRDEST | PP_STRSRC, PP_STRDEST | PP_STRSRC 1071 ; movs 1072 0000114D 2020 db PP_STRDEST, PP_STRDEST ; ins 1073 0000114F 1010 db PP_STRSRC, PP_STRSRC ; outs 1074 00001151 1818 db PP_STRSRC2 | PP_STRSRC, PP_STRSRC2 | PP_STRSRC 1075 ; cmps 1076 00001153 0808 db PP_STRSRC2, PP_STRSRC2 ; scas 1077 00001155 0001 db 0,1 ; int 1078 00001157 010101 db 1,1,1 ; loop 1079 0000115A 42 db PP_VARSIZ | 2 ; call rel16/32 with displacement 1080 0000115B 44 db PP_VARSIZ | 4 ; call far 16:16 or 16:32 immediate 1081 1082 %if PPLEN != $-ppinfo 1083 %error "ppinfo table has wrong size" 1084 %endif 1085 1086 1087 ; Equates for instruction operands. 1088 ; First the sizes. 1089 1090 OP_ALL equ 40h ; byte/word/dword operand (could be 30h but ...) 1091 OP_1632 equ 50h ; word or dword operand 1092 OP_8 equ 60h ; byte operand 1093 OP_16 equ 70h ; word operand 1094 OP_32 equ 80h ; dword operand 1095 OP_64 equ 90h ; qword operand 1096 OP_1632_DEFAULT equ 0A0h ; word or dword or default opsize 1097 1098 OP_SIZE equ OP_ALL ; the lowest of these 1099 1100 ; These operand types need to be combined with a size. 1101 ; Bits 0 to 3 give one of these types (maximum 15), 1102 ; and bits 4 to 7 specify the size. Table entries 1103 ; for these are identified by detecting that they 1104 ; are above-or-equal OP_SIZE. 1105 ; The first parameter to the opsizeditem macro is the 1106 ; name of the item. It has to match the names used in 1107 ; the instr.key and debugtbl.inc files. 1108 ; The second parameter is the entry for bittab that 1109 ; is used by aa.asm (the assembler). 1110 ; The third parameter is the suffix used to create the 1111 ; entry for asmjmp (prefix aop_) and disjmp2 (dop_). 1112 1113 %macro opsizeditem 3.nolist 1114 %1 equ nextindex 1115 %xdefine BITTAB_OPSIZEDITEMS BITTAB_OPSIZEDITEMS,%2 1116 %xdefine ASMJMP_OPSIZEDITEMS ASMJMP_OPSIZEDITEMS,aop_%3 1117 %xdefine DISJMP2_OPSIZEDITEMS DISJMP2_OPSIZEDITEMS,dop_%3 1118 %assign nextindex nextindex + 1 1119 %endmacro 1120 %assign nextindex 0 1121 %define BITTAB_OPSIZEDITEMS "" 1122 %define ASMJMP_OPSIZEDITEMS "" 1123 %define DISJMP2_OPSIZEDITEMS "" 1124 opsizeditem OP_IMM, ARG_IMMED, imm ; immediate 1125 opsizeditem OP_RM,ARG_DEREF+ARG_JUSTREG,rm ; reg/mem 1126 opsizeditem OP_M, ARG_DEREF, m ; mem (but not reg) 1127 opsizeditem OP_R_MOD, ARG_JUSTREG, r_mod ; register, determined from MOD R/M part 1128 opsizeditem OP_MOFFS, ARG_DEREF, moffs ; memory offset; e.g., [1234] 1129 opsizeditem OP_R, ARG_JUSTREG, r ; reg part of reg/mem byte 1130 opsizeditem OP_R_ADD, ARG_JUSTREG, r_add ; register, determined from instruction byte 1131 opsizeditem OP_AX, ARG_JUSTREG, ax ; al or ax or eax 1132 %if nextindex > 16 1133 %error Too many op sized items 1134 %endif 1135 1136 ; These don't need a size. 1137 ; Because the size needs to be clear to indicate 1138 ; that one of these is to be used, the maximum 1139 ; value for these is 63 (as 64 is OP_SIZE). 1140 ; The minimum value for these is 1 because a 0 1141 ; without size means the end of an op list (OP_END). 1142 ; The first parameter to the opitem macro is the name 1143 ; of the item. It has to match the names used in the 1144 ; instr.key and debugtbl.inc files. 1145 ; The second parameter is the entry for bittab that 1146 ; is used by aa.asm (the assembler). The third 1147 ; parameter is the entry for asmjmp. 1148 ; The fourth parameter is the entry for optab as used 1149 ; by uu.asm (the disassembler). 1150 ; 1151 ; asm_siznum contains entries for OP_M64 to OP_MXX. 1152 ; (The order has to match their opitem order.) 1153 ; asm_regnum contains entries for OP_DX to OP_GS. 1154 ; (The order has to match their opitem order.) 1155 1156 %macro opitem 4.nolist 1157 %1 equ nextindex 1158 %xdefine BITTAB_OPITEMS BITTAB_OPITEMS,%2 1159 %xdefine ASMJMP_OPITEMS ASMJMP_OPITEMS,%3 1160 %xdefine OPTAB_OPITEMS OPTAB_OPITEMS,%4 1161 %assign nextindex nextindex + 1 1162 %endmacro 1163 OP_END equ 0 1164 %assign nextindex 1 1165 %define BITTAB_OPITEMS "" 1166 %define ASMJMP_OPITEMS "" 1167 %define OPTAB_OPITEMS "" 1168 ; order of the following (ao17 entries) must match asm_siznum in aa.asm 1169 OP_FIRST_ASM_SIZNUM equ nextindex ; corresponding to asm_siznum start 1170 opitem OP_M64, ARG_DEREF, ao17,dop_m64 ; qword memory (obsolete?) 1171 opitem OP_MFLOAT, ARG_DEREF, ao17,dop_mfloat ; float memory 1172 opitem OP_MDOUBLE, ARG_DEREF, ao17,dop_mdouble; double-precision floating memory 1173 opitem OP_M80, ARG_DEREF, ao17,dop_m80 ; tbyte memory 1174 opitem OP_MXX, ARG_DEREF, ao17,dop_mxx ; memory (size unknown) 1175 opitem OP_FARIMM, ARG_FARADDR, ao21,dop_farimm ; far16/far32 immediate 1176 opitem OP_REL8, ARG_IMMED, ao23,dop_rel8 ; byte address relative to IP 1177 opitem OP_REL1632, ARG_IMMED, ao25,dop_rel1632; word or dword address relative to IP 1178 opitem OP_1CHK, ARG_WEIRDREG, ao29,dop49 ; check for ST(1) 1179 opitem OP_STI, ARG_WEIRDREG, aop_sti,dop_sti ; ST(I) 1180 opitem OP_CR, ARG_WEIRDREG, aop_cr,dop_cr ; CRx 1181 opitem OP_DR, ARG_WEIRDREG, ao34,dop_dr ; DRx 1182 opitem OP_TR, ARG_WEIRDREG, ao35,dop_tr ; TRx 1183 opitem OP_SEGREG, ARG_WEIRDREG, ao39,dop_segreg ; segment register 1184 opitem OP_IMMS8, ARG_IMMED, ao41,dop_imms8 ; sign extended immediate byte 1185 opitem OP_IMMS8_EXTEND, ARG_IMMED, ao41_extend,dop_imms8 ; add etc word/dword r/m, imms8 1186 opitem OP_IMM8, ARG_IMMED, ao42,dop_imm8 ; immediate byte (other args may be (d)word) 1187 opitem OP_IMM8_OPTIONAL,ARG_IMMED, ao42,dop_imm8_optional 1188 opitem OP_IMM8_INT, ARG_IMMED, ao42,dop_imm8_int ; immediate byte for int 1189 opitem OP_MMX, ARG_WEIRDREG, aop_mmx,dop_mmx ; MMx 1190 opitem OP_MMX_MOD, ARG_WEIRDREG, aop_mmx_mod,dop_mmx_mod ; MMx, but in ModR/M part 1191 opitem OP_SHOSIZ, 0FFh, ao44, dop_shosiz ; set flag to always show the size 1192 opitem OP_SHORT, 0FFh, ao_short,dop_short ; allow short keyword 1193 opitem OP_NEAR, 0FFh, ao_near,dop_near ; allow near keyword 1194 opitem OP_FAR, 0FFh, ao_far, dop_far ; allow far keyword 1195 opitem OP_FAR_REQUIRED, 0FFh, ao_far_required,dop_far_required ; require far keyword 1196 opitem OP_FAR_M, 0FFh, ao_modifier_continue,dop_far_m ; les, lds, lss, lfs, lgs, or jmp/call far mem 1197 opitem OP_DOUBLE_M, 0FFh, ao_modifier_continue,dop_double_m ; bound 1198 opitem OP_M_SRC, 0FFh, ao_modifier_continue,dop_m_src 1199 opitem OP_M_DST, 0FFh, ao_modifier_continue,dop_m_dst 1200 opitem OP_M_SRC_DST, 0FFh, ao_modifier_continue,dop_m_src_dst 1201 opitem OP_STACK_PUSH, 0FFh, ac09_internal_error,dop_stack_push 1202 opitem OP_STACK_POP, 0FFh, ac09_internal_error,dop_stack_pop 1203 opitem OP_STACK_SPECIAL,0FFh, ac09_internal_error,dop_stack_special 1204 opitem OP_E_CX, ARG_JUSTREG, aop_e_cx, da_internal_error ; (E)CX 1205 OP_FIRST_STRING equ nextindex 1206 opitem OP_1, ARG_IMMED, ao46, "1" ; 1 (simple "string" ops from here on) 1207 opitem OP_3, ARG_IMMED, ao47, "3" ; 3 1208 ; order of the following (ao48 entries) must match asm_regnum in aa.asm 1209 OP_FIRST_ASM_REGNUM equ nextindex ; corresponding to asm_regnum start 1210 opitem OP_DX, ARG_JUSTREG, ao48, "DX" ; DX 1211 opitem OP_CL, ARG_JUSTREG, ao48, "CL" ; CL 1212 opitem OP_ST, ARG_WEIRDREG, ao48, "ST" ; ST (top of coprocessor stack) 1213 opitem OP_CS, ARG_WEIRDREG, ao48, "CS" ; CS 1214 opitem OP_DS, ARG_WEIRDREG, ao48, "DS" ; DS 1215 opitem OP_ES, ARG_WEIRDREG, ao48, "ES" ; ES 1216 opitem OP_FS, ARG_WEIRDREG, ao48, "FS" ; FS 1217 opitem OP_GS, ARG_WEIRDREG, ao48, "GS" ; GS 1218 opitem OP_SS, ARG_WEIRDREG, ao48, "SS" ; SS 1219 OP_AFTER_LAST equ nextindex 1220 %if nextindex > OP_SIZE 1221 %error Too many op items 1222 %endif 1223 OP_AMOUNT_TABLE equ nextindex + 16 - 1 1224 ; nextindex: amount sizeless types 1225 ; 16: OP_SIZE combined types 1226 ; -1: OP_END does not occur in tables 1227 1228 ; Instructions that have an implicit operand subject to a segment prefix. 1229 ; This means a prefixed segment is allowed by the strict assembler, and 1230 ; the disassembler treats a segment prefix as part of the instruction and 1231 ; displays it in front of the instruction's mnemonic. 1232 ; (outs, movs, cmps, lods, xlat). 1233 segprfxtab: 1234 0000115C 6E6FA4A5A6A7ACAD db 06Eh,06Fh,0A4h,0A5h,0A6h,0A7h,0ACh,0ADh 1235 a32prfxtab: 1236 00001164 D7 db 0D7h ; xlat, last in segprfxtab, first in a32prfxtab 1237 SEGP_LEN equ $-segprfxtab 1238 1239 ; Instructions that can be used with REPE/REPNE. 1240 ; (ins, outs, movs, stos, lods; cmps, scas) 1241 00001165 6C6EA4AAAC replist:db 06Ch,06Eh,0A4h,0AAh,0ACh ; REP (no difference) 1242 REP_SAME_LEN equ $-replist ; number of indifferent replist entries 1243 0000116A A6AE db 0A6h,0AEh ; REPE/REPNE 1244 REP_LEN equ $-replist 1245 REP_DIFF_LEN equ REP_LEN-REP_SAME_LEN ; number of replist entries with difference 1246 1247 A32P_LEN equ $-a32prfxtab 1248 1249 ; prfxtab P_LEN REP_LEN REPE_REPNE_LEN 1250 1251 ; All the instructions in replist also have an implicit operand 1252 ; subject to ASIZE (similar to segprfxtab). Additionally, the 1253 ; xlat instruction (0D7h) has such an implicit operand too. 1254 ; maskmovq too. 1255 1256 1257 %include "asmtabs.asm" 1 <1> [list -] 356 <1> usesection ASMTABLE2 357 <1> asmtab: 358 <1> usesection ASMTABLE1 359 <1> %include "debugtbl.inc" 1 <2> 2 <2> ;--- This file was generated by mktables.exe. 3 <2> 4 <2> OPTYPES_BASE EQU 0Ch 5 <2> 6 <2> ;--- Operand type lists. 7 <2> ;--- They were read from file INSTR.KEY. 8 <2> 9 <2> oplists label byte 10 00000000 00 <2> opl OP_END ; idx=0, ofs=Ch, used=99 11 00000001 474000 <2> opl OP_ALL+OP_AX, OP_ALL+OP_IMM, OP_END ; idx=1, ofs=Dh, used=18 12 00000004 1F414000 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_ALL+OP_IMM, OP_END ; idx=2, ofs=10h, used=7 13 00000008 1D414000 <2> opl OP_M_SRC, OP_ALL+OP_RM, OP_ALL+OP_IMM, OP_END ; idx=3, ofs=14h, used=3 14 0000000C 1E414000 <2> opl OP_M_DST, OP_ALL+OP_RM, OP_ALL+OP_IMM, OP_END ; idx=4, ofs=18h, used=1 15 00000010 1F511000 <2> opl OP_M_SRC_DST, OP_1632+OP_RM, OP_IMMS8_EXTEND, OP_END ; idx=5, ofs=1Ch, used=7 16 00000014 1D511000 <2> opl OP_M_SRC, OP_1632+OP_RM, OP_IMMS8_EXTEND, OP_END ; idx=6, ofs=20h, used=1 17 00000018 1F414500 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_ALL+OP_R, OP_END ; idx=7, ofs=24h, used=19 18 0000001C 1D414500 <2> opl OP_M_SRC, OP_ALL+OP_RM, OP_ALL+OP_R, OP_END ; idx=8, ofs=28h, used=4 19 00000020 1E414500 <2> opl OP_M_DST, OP_ALL+OP_RM, OP_ALL+OP_R, OP_END ; idx=9, ofs=2Ch, used=2 20 00000024 45 <2> opl OP_ALL+OP_R ; idx=10, ofs=30h, used=19 21 00000025 1D4100 <2> opl OP_M_SRC, OP_ALL+OP_RM, OP_END ; idx=11, ofs=31h, used=4 + 19 22 00000028 45 <2> opl OP_ALL+OP_R ; idx=12, ofs=34h, used=2 23 00000029 1F4100 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_END ; idx=13, ofs=35h, used=6 + 2 24 0000002C 1F717500 <2> opl OP_M_SRC_DST, OP_16+OP_RM, OP_16+OP_R, OP_END ; idx=14, ofs=38h, used=1 25 00000030 551D1B5200 <2> opl OP_1632+OP_R, OP_M_SRC, OP_FAR_M, OP_1632+OP_M, OP_END ; idx=15, ofs=3Ch, used=5 26 00000035 551D5100 <2> opl OP_1632+OP_R, OP_M_SRC, OP_1632+OP_RM, OP_END ; idx=16, ofs=41h, used=35 27 00000039 8600 <2> opl OP_32+OP_R_ADD, OP_END ; idx=17, ofs=45h, used=8 28 0000003B 1F515500 <2> opl OP_M_SRC_DST, OP_1632+OP_RM, OP_1632+OP_R, OP_END ; idx=18, ofs=47h, used=3 29 0000003F 1D515500 <2> opl OP_M_SRC, OP_1632+OP_RM, OP_1632+OP_R, OP_END ; idx=19, ofs=4Bh, used=1 30 00000043 1F51 <2> opl OP_M_SRC_DST, OP_1632+OP_RM ; idx=20, ofs=4Fh, used=3 31 00000045 1100 <2> opl OP_IMM8, OP_END ; idx=21, ofs=51h, used=0 + 3 32 00000047 1D511100 <2> opl OP_M_SRC, OP_1632+OP_RM, OP_IMM8, OP_END ; idx=22, ofs=53h, used=1 33 0000004B 20 <2> opl OP_STACK_PUSH ; idx=23, ofs=57h, used=1 34 0000004C 180800 <2> opl OP_NEAR, OP_REL1632, OP_END ; idx=24, ofs=58h, used=31 + 1 35 0000004F 22 <2> opl OP_STACK_SPECIAL ; idx=25, ofs=5Bh, used=1 36 00000050 190600 <2> opl OP_FAR, OP_FARIMM, OP_END ; idx=26, ofs=5Ch, used=1 + 1 37 00000053 22 <2> opl OP_STACK_SPECIAL ; idx=27, ofs=5Fh, used=1 38 00000054 1A1D1BA200 <2> opl OP_FAR_REQUIRED, OP_M_SRC, OP_FAR_M, OP_1632_DEFAULT+OP_M, OP_END ; idx=28, ofs=60h, used=1 + 1 39 00000059 1F0100 <2> opl OP_M_SRC_DST, OP_M64, OP_END ; idx=29, ofs=65h, used=1 40 0000005C 1D0100 <2> opl OP_M_SRC, OP_M64, OP_END ; idx=30, ofs=68h, used=1 41 0000005F 1E0100 <2> opl OP_M_DST, OP_M64, OP_END ; idx=31, ofs=6Bh, used=1 42 00000062 20 <2> opl OP_STACK_PUSH ; idx=32, ofs=6Eh, used=8 43 00000063 5600 <2> opl OP_1632+OP_R_ADD, OP_END ; idx=33, ofs=6Fh, used=16 + 8 44 00000065 215600 <2> opl OP_STACK_POP, OP_1632+OP_R_ADD, OP_END ; idx=34, ofs=71h, used=8 45 00000068 20701100 <2> opl OP_STACK_PUSH, OP_16+OP_IMM, OP_IMM8, OP_END ; idx=35, ofs=74h, used=1 46 0000006C 1D0200 <2> opl OP_M_SRC, OP_MFLOAT, OP_END ; idx=36, ofs=78h, used=9 47 0000006F 1E0200 <2> opl OP_M_DST, OP_MFLOAT, OP_END ; idx=37, ofs=7Bh, used=2 48 00000072 1D0300 <2> opl OP_M_SRC, OP_MDOUBLE, OP_END ; idx=38, ofs=7Eh, used=9 49 00000075 1E0300 <2> opl OP_M_DST, OP_MDOUBLE, OP_END ; idx=39, ofs=81h, used=2 50 00000078 28 <2> opl OP_ST ; idx=40, ofs=84h, used=20 51 00000079 0A00 <2> opl OP_STI, OP_END ; idx=41, ofs=85h, used=4 + 20 52 0000007B 09 <2> opl OP_1CHK ; idx=42, ofs=87h, used=6 53 0000007C 0A2800 <2> opl OP_STI, OP_ST, OP_END ; idx=43, ofs=88h, used=6 + 6 54 0000007F 1D8200 <2> opl OP_M_SRC, OP_32+OP_M, OP_END ; idx=44, ofs=8Bh, used=9 55 00000082 1E8200 <2> opl OP_M_DST, OP_32+OP_M, OP_END ; idx=45, ofs=8Eh, used=2 56 00000085 1D7200 <2> opl OP_M_SRC, OP_16+OP_M, OP_END ; idx=46, ofs=91h, used=10 57 00000088 1E7200 <2> opl OP_M_DST, OP_16+OP_M, OP_END ; idx=47, ofs=94h, used=4 58 0000008B 1D0400 <2> opl OP_M_SRC, OP_M80, OP_END ; idx=48, ofs=97h, used=2 59 0000008E 1E0400 <2> opl OP_M_DST, OP_M80, OP_END ; idx=49, ofs=9Ah, used=2 60 00000091 090A00 <2> opl OP_1CHK, OP_STI, OP_END ; idx=50, ofs=9Dh, used=9 61 00000094 1D <2> opl OP_M_SRC ; idx=51, ofs=A0h, used=4 62 00000095 0500 <2> opl OP_MXX, OP_END ; idx=52, ofs=A1h, used=1 + 4 63 00000097 1E0500 <2> opl OP_M_DST, OP_MXX, OP_END ; idx=53, ofs=A3h, used=4 64 0000009A 7700 <2> opl OP_16+OP_AX, OP_END ; idx=54, ofs=A6h, used=1 65 0000009C 551D510F00 <2> opl OP_1632+OP_R, OP_M_SRC, OP_1632+OP_RM, OP_IMMS8, OP_END ; idx=55, ofs=A8h, used=1 66 000000A1 53550F00 <2> opl OP_1632+OP_R_MOD, OP_1632+OP_R, OP_IMMS8, OP_END ; idx=56, ofs=ADh, used=1 67 000000A5 551D515000 <2> opl OP_1632+OP_R, OP_M_SRC, OP_1632+OP_RM, OP_1632+OP_IMM, OP_END ; idx=57, ofs=B1h, used=1 68 000000AA 53555000 <2> opl OP_1632+OP_R_MOD, OP_1632+OP_R, OP_1632+OP_IMM, OP_END ; idx=58, ofs=B6h, used=1 69 000000AE 471100 <2> opl OP_ALL+OP_AX, OP_IMM8, OP_END ; idx=59, ofs=BAh, used=2 70 000000B1 472600 <2> opl OP_ALL+OP_AX, OP_DX, OP_END ; idx=60, ofs=BDh, used=2 71 000000B4 222500 <2> opl OP_STACK_SPECIAL, OP_3, OP_END ; idx=61, ofs=C0h, used=1 72 000000B7 1200 <2> opl OP_IMM8_OPTIONAL, OP_END ; idx=62, ofs=C3h, used=2 73 000000B9 170700 <2> opl OP_SHORT, OP_REL8, OP_END ; idx=63, ofs=C5h, used=42 74 000000BC 201D5100 <2> opl OP_STACK_PUSH, OP_M_SRC, OP_1632+OP_RM, OP_END ; idx=64, ofs=C8h, used=1 75 000000C0 1E7100 <2> opl OP_M_DST, OP_16+OP_RM, OP_END ; idx=65, ofs=CCh, used=1 76 000000C3 1E510E00 <2> opl OP_M_DST, OP_1632+OP_RM, OP_SEGREG, OP_END ; idx=66, ofs=CFh, used=1 77 000000C7 0E1D5100 <2> opl OP_SEGREG, OP_M_SRC, OP_1632+OP_RM, OP_END ; idx=67, ofs=D3h, used=1 78 000000CB 471D4400 <2> opl OP_ALL+OP_AX, OP_M_SRC, OP_ALL+OP_MOFFS, OP_END ; idx=68, ofs=D7h, used=2 79 000000CF 1E444700 <2> opl OP_M_DST, OP_ALL+OP_MOFFS, OP_ALL+OP_AX, OP_END ; idx=69, ofs=DBh, used=2 80 000000D3 666000 <2> opl OP_8+OP_R_ADD, OP_8+OP_IMM, OP_END ; idx=70, ofs=DFh, used=8 81 000000D6 565000 <2> opl OP_1632+OP_R_ADD, OP_1632+OP_IMM, OP_END ; idx=71, ofs=E2h, used=8 82 000000D9 55161D6100 <2> opl OP_1632+OP_R, OP_SHOSIZ, OP_M_SRC, OP_8+OP_RM, OP_END ; idx=72, ofs=E5h, used=2 83 000000DE 5516 <2> opl OP_1632+OP_R, OP_SHOSIZ ; idx=73, ofs=EAh, used=2 84 000000E0 1D7100 <2> opl OP_M_SRC, OP_16+OP_RM, OP_END ; idx=74, ofs=ECh, used=5 + 2 85 000000E3 114700 <2> opl OP_IMM8, OP_ALL+OP_AX, OP_END ; idx=75, ofs=EFh, used=2 86 000000E6 264700 <2> opl OP_DX, OP_ALL+OP_AX, OP_END ; idx=76, ofs=F2h, used=2 87 000000E9 21 <2> opl OP_STACK_POP ; idx=77, ofs=F5h, used=1 88 000000EA 1E5100 <2> opl OP_M_DST, OP_1632+OP_RM, OP_END ; idx=78, ofs=F6h, used=2 + 1 89 000000ED 2016A000 <2> opl OP_STACK_PUSH, OP_SHOSIZ, OP_1632_DEFAULT+OP_IMM, OP_END ; idx=79, ofs=F9h, used=2 90 000000F1 20160F00 <2> opl OP_STACK_PUSH, OP_SHOSIZ, OP_IMMS8, OP_END ; idx=80, ofs=FDh, used=2 91 000000F5 1F412400 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_1, OP_END ; idx=81, ofs=101h, used=9 92 000000F9 1F412700 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_CL, OP_END ; idx=82, ofs=105h, used=9 93 000000FD 1F411100 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_IMM8, OP_END ; idx=83, ofs=109h, used=9 94 00000101 21 <2> opl OP_STACK_POP ; idx=84, ofs=10Dh, used=2 95 00000102 7000 <2> opl OP_16+OP_IMM, OP_END ; idx=85, ofs=10Eh, used=1 + 2 96 00000104 227000 <2> opl OP_STACK_SPECIAL, OP_16+OP_IMM, OP_END ; idx=86, ofs=110h, used=1 97 00000107 1E6100 <2> opl OP_M_DST, OP_8+OP_RM, OP_END ; idx=87, ofs=113h, used=30 98 0000010A 1F51551100 <2> opl OP_M_SRC_DST, OP_1632+OP_RM, OP_1632+OP_R, OP_IMM8, OP_END ; idx=88, ofs=116h, used=2 99 0000010F 1F51552700 <2> opl OP_M_SRC_DST, OP_1632+OP_RM, OP_1632+OP_R, OP_CL, OP_END ; idx=89, ofs=11Bh, used=2 100 00000114 575600 <2> opl OP_1632+OP_AX, OP_1632+OP_R_ADD, OP_END ; idx=90, ofs=120h, used=7 101 00000117 565700 <2> opl OP_1632+OP_R_ADD, OP_1632+OP_AX, OP_END ; idx=91, ofs=123h, used=1 102 0000011A 20 <2> opl OP_STACK_PUSH ; idx=92, ofs=126h, used=1 103 0000011B 2B00 <2> opl OP_ES, OP_END ; idx=93, ofs=127h, used=1 + 1 104 0000011D 20 <2> opl OP_STACK_PUSH ; idx=94, ofs=129h, used=1 105 0000011E 2900 <2> opl OP_CS, OP_END ; idx=95, ofs=12Ah, used=1 + 1 106 00000120 20 <2> opl OP_STACK_PUSH ; idx=96, ofs=12Ch, used=1 107 00000121 2E00 <2> opl OP_SS, OP_END ; idx=97, ofs=12Dh, used=1 + 1 108 00000123 20 <2> opl OP_STACK_PUSH ; idx=98, ofs=12Fh, used=1 109 00000124 2A00 <2> opl OP_DS, OP_END ; idx=99, ofs=130h, used=1 + 1 110 00000126 20 <2> opl OP_STACK_PUSH ; idx=100, ofs=132h, used=1 111 00000127 2C00 <2> opl OP_FS, OP_END ; idx=101, ofs=133h, used=1 + 1 112 00000129 20 <2> opl OP_STACK_PUSH ; idx=102, ofs=135h, used=1 113 0000012A 2D00 <2> opl OP_GS, OP_END ; idx=103, ofs=136h, used=1 + 1 114 0000012C 212B00 <2> opl OP_STACK_POP, OP_ES, OP_END ; idx=104, ofs=138h, used=1 115 0000012F 212E00 <2> opl OP_STACK_POP, OP_SS, OP_END ; idx=105, ofs=13Bh, used=1 116 00000132 212A00 <2> opl OP_STACK_POP, OP_DS, OP_END ; idx=106, ofs=13Eh, used=1 117 00000135 212C00 <2> opl OP_STACK_POP, OP_FS, OP_END ; idx=107, ofs=141h, used=1 118 00000138 212D00 <2> opl OP_STACK_POP, OP_GS, OP_END ; idx=108, ofs=144h, used=1 119 0000013B 830B00 <2> opl OP_32+OP_R_MOD, OP_CR, OP_END ; idx=109, ofs=147h, used=1 120 0000013E 0B8300 <2> opl OP_CR, OP_32+OP_R_MOD, OP_END ; idx=110, ofs=14Ah, used=1 121 00000141 830C00 <2> opl OP_32+OP_R_MOD, OP_DR, OP_END ; idx=111, ofs=14Dh, used=1 122 00000144 0C8300 <2> opl OP_DR, OP_32+OP_R_MOD, OP_END ; idx=112, ofs=150h, used=1 123 00000147 830D00 <2> opl OP_32+OP_R_MOD, OP_TR, OP_END ; idx=113, ofs=153h, used=1 124 0000014A 0D8300 <2> opl OP_TR, OP_32+OP_R_MOD, OP_END ; idx=114, ofs=156h, used=1 125 0000014D 141D8100 <2> opl OP_MMX, OP_M_SRC, OP_32+OP_RM, OP_END ; idx=115, ofs=159h, used=1 126 00000151 1E811400 <2> opl OP_M_DST, OP_32+OP_RM, OP_MMX, OP_END ; idx=116, ofs=15Dh, used=1 127 00000155 141D9100 <2> opl OP_MMX, OP_M_SRC, OP_64+OP_RM, OP_END ; idx=117, ofs=161h, used=45 128 00000159 1E911400 <2> opl OP_M_DST, OP_64+OP_RM, OP_MMX, OP_END ; idx=118, ofs=165h, used=1 129 0000015D 151100 <2> opl OP_MMX_MOD, OP_IMM8, OP_END ; idx=119, ofs=169h, used=8 130 00000160 550500 <2> opl OP_1632+OP_R, OP_MXX, OP_END ; idx=120, ofs=16Ch, used=1 131 00000163 20 <2> opl OP_STACK_PUSH ; idx=121, ofs=16Fh, used=1 132 00000164 181DA100 <2> opl OP_NEAR, OP_M_SRC, OP_1632_DEFAULT+OP_RM, OP_END ; idx=122, ofs=170h, used=1 + 1 133 00000168 551D1C5200 <2> opl OP_1632+OP_R, OP_M_SRC, OP_DOUBLE_M, OP_1632+OP_M, OP_END ; idx=123, ofs=174h, used=1 134 0000016D 221300 <2> opl OP_STACK_SPECIAL, OP_IMM8_INT, OP_END ; idx=124, ofs=179h, used=1 135 00000170 17072300 <2> opl OP_SHORT, OP_REL8, OP_E_CX, OP_END ; idx=125, ofs=17Ch, used=5 136 00000174 2100 <2> opl OP_STACK_POP, OP_END ; idx=126, ofs=180h, used=3 137 00000176 2000 <2> opl OP_STACK_PUSH, OP_END ; idx=127, ofs=182h, used=1 138 00000178 2200 <2> opl OP_STACK_SPECIAL, OP_END ; idx=128, ofs=184h, used=11 139 <2> 140 <2> ASMMOD EQU opidx 141 <2> 142 <2> ;--- Assembler: data on groups. 143 <2> ;--- If > 100h, it's a "0F-prefix" group. 144 <2> 145 <2> align 2, db 0 146 <2> agroups label word 147 0000017A FE00 <2> dw 0FEh ; 0 148 0000017C 8300 <2> dw 083h ; 1 149 0000017E 8000 <2> dw 080h ; 2 150 00000180 BA01 <2> dw 1BAh ; 3 151 00000182 FF00 <2> dw 0FFh ; 4 152 00000184 C701 <2> dw 1C7h ; 5 153 00000186 F600 <2> dw 0F6h ; 6 154 00000188 0101 <2> dw 101h ; 7 155 0000018A 0001 <2> dw 100h ; 8 156 0000018C C600 <2> dw 0C6h ; 9 157 0000018E 7101 <2> dw 171h ; 10 158 00000190 7201 <2> dw 172h ; 11 159 00000192 7301 <2> dw 173h ; 12 160 00000194 8F00 <2> dw 08Fh ; 13 161 00000196 D000 <2> dw 0D0h ; 14 162 00000198 D200 <2> dw 0D2h ; 15 163 0000019A C000 <2> dw 0C0h ; 16 164 <2> 165 <2> ;--- List of assembler mnemonics and data. 166 <2> ;--- variant's 1. argument (=a): 167 <2> ;--- if a < 0x100: one byte opcode. 168 <2> ;--- if a >= 0x100 && a < 0x200: two byte "0F"-opcode. 169 <2> ;--- if a >= 0x200 && a < 0x240: fp instruction. 170 <2> ;--- if a >= 0x240: refers to agroups [macro AGRP() is used]. 171 <2> ;--- variant's 2. argument is index into array opindex. 172 <2> 173 <2> mnlist label near 174 <2> mnsuffix 175 <2> 176 <2> mne A32, ASM_SPECIAL ; ofs=0h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000000 FF <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000019C 0300 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000019E 413332 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 177 <2> mne A16, ASM_SPECIAL ; ofs=2h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000001 FF <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001A1 1300 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001A3 413136 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 178 <2> mne O32, ASM_SPECIAL ; ofs=4h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000002 FF <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001A6 2300 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001A8 4F3332 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 179 <2> mne O16, ASM_SPECIAL ; ofs=6h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000003 FF <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001AB 3300 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001AD 4F3136 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 180 <2> mne BOXCB ; ofs=8h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001B0 4500 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001B2 424F584342 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 181 00000004 F4321C <2> variant AGRP(0,7), 85 182 00000007 FF <2> endvariant 183 <2> mne AAA ; ofs=Ch 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001B7 8300 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001B9 414141 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 184 00000008 1BB7 <2> variant 037h, 0 185 0000000A FF <2> endvariant 186 <2> mne AAD, ASM_SPECIAL ; ofs=Fh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 0000000B FF <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001BC B300 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001BE 414144 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 187 0000000C 6B93 <2> variant 0D5h, 62 188 0000000E FF <2> endvariant 189 <2> mne AAM, ASM_SPECIAL ; ofs=13h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 0000000F FF <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001C1 F300 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001C3 41414D <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 190 00000010 6B12 <2> variant 0D4h, 62 191 00000012 FF <2> endvariant 192 <2> mne AAS ; ofs=17h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001C6 3301 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001C8 414153 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 193 00000013 1FBF <2> variant 03Fh, 0 194 00000015 FF <2> endvariant 195 <2> mne ADC ; ofs=1Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001CB 6301 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001CD 414443 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 196 00000016 FBF4334F <2> variant AGRP(1,2), 5, ASM_LOCKABLE 197 0000001A 0A15 <2> variant 014h, 1 198 0000001C FBF43754 <2> variant AGRP(2,2), 2, ASM_LOCKABLE 199 00000020 FB0817 <2> variant 010h, 7, ASM_LOCKABLE 200 00000023 091C <2> variant 012h, 10 201 00000025 FF <2> endvariant 202 <2> mne ADD ; ofs=2Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001D0 6302 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001D2 414444 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 203 00000026 FBF4324D <2> variant AGRP(1,0), 5, ASM_LOCKABLE 204 0000002A 0205 <2> variant 004h, 1 205 0000002C FBF43652 <2> variant AGRP(2,0), 2, ASM_LOCKABLE 206 00000030 FB0007 <2> variant 000h, 7, ASM_LOCKABLE 207 00000033 010C <2> variant 002h, 10 208 00000035 FF <2> endvariant 209 <2> mne AND ; ofs=3Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001D5 6303 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001D7 414E44 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 210 00000036 FBF43451 <2> variant AGRP(1,4), 5, ASM_LOCKABLE 211 0000003A 1225 <2> variant 024h, 1 212 0000003C FBF43856 <2> variant AGRP(2,4), 2, ASM_LOCKABLE 213 00000040 FB1027 <2> variant 020h, 7, ASM_LOCKABLE 214 00000043 112C <2> variant 022h, 10 215 00000045 FF <2> endvariant 216 <2> mne ARPL ; ofs=4Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001DA 6404 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001DC 4152504C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 217 00000046 F631F1 <2> variant 063h, 14, ASM_MACH2 218 00000049 FF <2> endvariant 219 <2> mne BOUND ; ofs=4Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001E0 A504 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001E2 424F554E44 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 220 0000004A F531DD <2> variant 062h, 123, ASM_MACH1 221 0000004D FF <2> endvariant 222 <2> mne BSF ; ofs=52h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001E7 E304 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001E9 425346 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 223 0000004E F7DFCC <2> variant 1BCh, 16, ASM_MACH3 224 00000051 FF <2> endvariant 225 <2> mne BSR ; ofs=56h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001EC 2305 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001EE 425352 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 226 00000052 F7E04D <2> variant 1BDh, 16, ASM_MACH3 227 00000055 FF <2> endvariant 228 <2> mne BSWAP, ASM_D32 ; ofs=5Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000056 FD <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001F1 6505 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001F3 4253574150 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 229 00000057 F8E5D9 <2> variant 1C8h, 17, ASM_MACH4 230 0000005A FF <2> endvariant 231 <2> mne BT ; ofs=5Fh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001F8 B205 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001FA 4254 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 232 0000005B F7D336 <2> variant 1A3h, 19, ASM_MACH3 233 0000005E F7F43C72 <2> variant AGRP(3,4), 22, ASM_MACH3 234 00000062 FF <2> endvariant 235 <2> mne BTC ; ofs=67h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001FC 3306 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001FE 425443 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 236 00000063 FBF7DF4D <2> variant 1BBh, 18, ASM_LOCKABLE, ASM_MACH3 237 00000067 FBF7F43DF3 <2> variant AGRP(3,7), 20, ASM_LOCKABLE, ASM_MACH3 238 0000006C FF <2> endvariant 239 <2> mne BTR ; ofs=71h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000201 D306 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000203 425452 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 240 0000006D FBF7DB45 <2> variant 1B3h, 18, ASM_LOCKABLE, ASM_MACH3 241 00000071 FBF7F43D72 <2> variant AGRP(3,6), 20, ASM_LOCKABLE, ASM_MACH3 242 00000076 FF <2> endvariant 243 <2> mne BTS ; ofs=7Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000206 7307 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000208 425453 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 244 00000077 FBF7D73D <2> variant 1ABh, 18, ASM_LOCKABLE, ASM_MACH3 245 0000007B FBF7F43CF1 <2> variant AGRP(3,5), 20, ASM_LOCKABLE, ASM_MACH3 246 00000080 FF <2> endvariant 247 <2> mne CALL ; ofs=85h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000020B 1408 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000020D 43414C4C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 248 00000081 74FF <2> variant 0E8h, 23 249 00000083 F43FDB <2> variant AGRP(4,2), 121 250 00000086 F43FFE <2> variant AGRP(4,3), 27 251 00000089 4DB3 <2> variant 09Ah, 25 252 0000008B FF <2> endvariant 253 <2> mne CBW, ASM_D16 ; ofs=90h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 0000008C FC <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000211 C308 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000213 434257 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 254 <2> mne CWDE, ASM_D32 ; ofs=91h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 0000008D FD <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000216 D408 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000218 43574445 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 255 0000008E 4C98 <2> variant 098h, 0 256 00000090 FF <2> endvariant 257 <2> mne CLC ; ofs=95h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000021C 1309 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000021E 434C43 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 258 00000091 7CF8 <2> variant 0F8h, 0 259 00000093 FF <2> endvariant 260 <2> mne CLD ; ofs=98h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000221 4309 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000223 434C44 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 261 00000094 7EFC <2> variant 0FCh, 0 262 00000096 FF <2> endvariant 263 <2> mne CLI ; ofs=9Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000226 7309 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000228 434C49 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 264 00000097 7DFA <2> variant 0FAh, 0 265 00000099 FF <2> endvariant 266 <2> mne CLTS ; ofs=9Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000022B A409 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000022D 434C5453 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 267 0000009A F68406 <2> variant 106h, 0, ASM_MACH2 268 0000009D FF <2> endvariant 269 <2> mne CMC ; ofs=A2h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000231 E309 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000233 434D43 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 270 0000009E 7B75 <2> variant 0F5h, 0 271 000000A0 FF <2> endvariant 272 <2> mne CMOVA ; ofs=A5h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000236 150A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000238 434D4F5641 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 273 000000A1 FAA4D7 <2> variant 147h, 16, ASM_MACH6 274 000000A4 FF <2> endvariant 275 <2> mne CMOVAE ; ofs=A9h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000023D 560A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000023F 434D4F564145 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 276 000000A5 FAA2D3 <2> variant 143h, 16, ASM_MACH6 277 000000A8 FF <2> endvariant 278 <2> mne CMOVB ; ofs=ADh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000245 950A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000247 434D4F5642 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 279 000000A9 FAA252 <2> variant 142h, 16, ASM_MACH6 280 000000AC FF <2> endvariant 281 <2> mne CMOVBE ; ofs=B1h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000024C D60A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000024E 434D4F564245 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 282 000000AD FAA456 <2> variant 146h, 16, ASM_MACH6 283 000000B0 FF <2> endvariant 284 <2> mne CMOVC ; ofs=B5h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000254 150B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000256 434D4F5643 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 285 000000B1 FAA252 <2> variant 142h, 16, ASM_MACH6 286 000000B4 FF <2> endvariant 287 <2> mne CMOVE ; ofs=B9h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000025B 550B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000025D 434D4F5645 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 288 000000B5 FAA354 <2> variant 144h, 16, ASM_MACH6 289 000000B8 FF <2> endvariant 290 <2> mne CMOVG ; ofs=BDh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000262 950B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000264 434D4F5647 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 291 000000B9 FAA8DF <2> variant 14Fh, 16, ASM_MACH6 292 000000BC FF <2> endvariant 293 <2> mne CMOVGE ; ofs=C1h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000269 D60B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000026B 434D4F564745 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 294 000000BD FAA7DD <2> variant 14Dh, 16, ASM_MACH6 295 000000C0 FF <2> endvariant 296 <2> mne CMOVL ; ofs=C5h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000271 150C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000273 434D4F564C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 297 000000C1 FAA75C <2> variant 14Ch, 16, ASM_MACH6 298 000000C4 FF <2> endvariant 299 <2> mne CMOVLE ; ofs=C9h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000278 560C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000027A 434D4F564C45 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 300 000000C5 FAA85E <2> variant 14Eh, 16, ASM_MACH6 301 000000C8 FF <2> endvariant 302 <2> mne CMOVNA ; ofs=CDh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000280 960C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000282 434D4F564E41 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 303 000000C9 FAA456 <2> variant 146h, 16, ASM_MACH6 304 000000CC FF <2> endvariant 305 <2> mne CMOVNAE ; ofs=D1h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000288 D70C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000028A 434D4F564E4145 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 306 000000CD FAA252 <2> variant 142h, 16, ASM_MACH6 307 000000D0 FF <2> endvariant 308 <2> mne CMOVNB ; ofs=D5h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000291 160D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000293 434D4F564E42 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 309 000000D1 FAA2D3 <2> variant 143h, 16, ASM_MACH6 310 000000D4 FF <2> endvariant 311 <2> mne CMOVNBE ; ofs=D9h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000299 570D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000029B 434D4F564E4245 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 312 000000D5 FAA4D7 <2> variant 147h, 16, ASM_MACH6 313 000000D8 FF <2> endvariant 314 <2> mne CMOVNC ; ofs=DDh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000002A2 960D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000002A4 434D4F564E43 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 315 000000D9 FAA2D3 <2> variant 143h, 16, ASM_MACH6 316 000000DC FF <2> endvariant 317 <2> mne CMOVNE ; ofs=E1h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000002AA D60D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000002AC 434D4F564E45 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 318 000000DD FAA3D5 <2> variant 145h, 16, ASM_MACH6 319 000000E0 FF <2> endvariant 320 <2> mne CMOVNG ; ofs=E5h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000002B2 160E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000002B4 434D4F564E47 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 321 000000E1 FAA85E <2> variant 14Eh, 16, ASM_MACH6 322 000000E4 FF <2> endvariant 323 <2> mne CMOVNGE ; ofs=E9h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000002BA 570E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000002BC 434D4F564E4745 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 324 000000E5 FAA75C <2> variant 14Ch, 16, ASM_MACH6 325 000000E8 FF <2> endvariant 326 <2> mne CMOVNL ; ofs=EDh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000002C3 960E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000002C5 434D4F564E4C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 327 000000E9 FAA7DD <2> variant 14Dh, 16, ASM_MACH6 328 000000EC FF <2> endvariant 329 <2> mne CMOVNLE ; ofs=F1h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000002CB D70E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000002CD 434D4F564E4C45 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 330 000000ED FAA8DF <2> variant 14Fh, 16, ASM_MACH6 331 000000F0 FF <2> endvariant 332 <2> mne CMOVNO ; ofs=F5h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000002D4 160F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000002D6 434D4F564E4F <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 333 000000F1 FAA1D1 <2> variant 141h, 16, ASM_MACH6 334 000000F4 FF <2> endvariant 335 <2> mne CMOVNP ; ofs=F9h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000002DC 560F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000002DE 434D4F564E50 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 336 000000F5 FAA6DB <2> variant 14Bh, 16, ASM_MACH6 337 000000F8 FF <2> endvariant 338 <2> mne CMOVNS ; ofs=FDh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000002E4 960F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000002E6 434D4F564E53 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 339 000000F9 FAA5D9 <2> variant 149h, 16, ASM_MACH6 340 000000FC FF <2> endvariant 341 <2> mne CMOVNZ ; ofs=101h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000002EC D60F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000002EE 434D4F564E5A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 342 000000FD FAA3D5 <2> variant 145h, 16, ASM_MACH6 343 00000100 FF <2> endvariant 344 <2> mne CMOVO ; ofs=105h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000002F4 1510 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000002F6 434D4F564F <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 345 00000101 FAA150 <2> variant 140h, 16, ASM_MACH6 346 00000104 FF <2> endvariant 347 <2> mne CMOVP ; ofs=109h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000002FB 5510 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000002FD 434D4F5650 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 348 00000105 FAA65A <2> variant 14Ah, 16, ASM_MACH6 349 00000108 FF <2> endvariant 350 <2> mne CMOVPE ; ofs=10Dh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000302 9610 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000304 434D4F565045 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 351 00000109 FAA65A <2> variant 14Ah, 16, ASM_MACH6 352 0000010C FF <2> endvariant 353 <2> mne CMOVPO ; ofs=111h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000030A D610 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000030C 434D4F56504F <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 354 0000010D FAA6DB <2> variant 14Bh, 16, ASM_MACH6 355 00000110 FF <2> endvariant 356 <2> mne CMOVS ; ofs=115h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000312 1511 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000314 434D4F5653 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 357 00000111 FAA558 <2> variant 148h, 16, ASM_MACH6 358 00000114 FF <2> endvariant 359 <2> mne CMOVZ ; ofs=119h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000319 5511 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000031B 434D4F565A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 360 00000115 FAA354 <2> variant 144h, 16, ASM_MACH6 361 00000118 FF <2> endvariant 362 <2> mne CMP ; ofs=11Dh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000320 9311 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000322 434D50 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 363 00000119 F435D5 <2> variant AGRP(1,7), 6 364 0000011C 1E3D <2> variant 03Ch, 1 365 0000011E F439DA <2> variant AGRP(2,7), 3 366 00000121 1C40 <2> variant 038h, 8 367 00000123 1D44 <2> variant 03Ah, 10 368 00000125 FF <2> endvariant 369 <2> mne CMPSB ; ofs=12Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000325 6512 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000327 434D505342 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 370 00000126 53A6 <2> variant 0A6h, 0 371 00000128 FF <2> endvariant 372 <2> mne CMPXCHG ; ofs=130h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000032C 9712 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000032E 434D5058434847 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 373 00000129 FBF8D9B7 <2> variant 1B0h, 7, ASM_LOCKABLE, ASM_MACH4 374 0000012D FF <2> endvariant 375 <2> mne CMPXCHG8B ; ofs=135h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000335 E912 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000337 434D50584348473842 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 376 0000012E F9F44306 <2> variant AGRP(5,1), 29, ASM_MACH5 377 00000132 FF <2> endvariant 378 <2> mne CPUID ; ofs=13Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000340 3513 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000342 4350554944 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 379 00000133 F9D2A2 <2> variant 1A2h, 0, ASM_MACH5 380 00000136 FF <2> endvariant 381 <2> mne CWD, ASM_D16 ; ofs=13Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000137 FC <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000347 7313 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000349 435744 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 382 <2> mne CDQ, ASM_D32 ; ofs=13Fh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000138 FD <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000034C 8313 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000034E 434451 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 383 00000139 4D19 <2> variant 099h, 0 384 0000013B FF <2> endvariant 385 <2> mne DAA ; ofs=143h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000351 C313 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000353 444141 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 386 0000013C 13A7 <2> variant 027h, 0 387 0000013E FF <2> endvariant 388 <2> mne DAS ; ofs=146h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000356 F313 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000358 444153 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 389 0000013F 17AF <2> variant 02Fh, 0 390 00000141 FF <2> endvariant 391 <2> mne DB, ASM_SPECIAL ; ofs=149h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000142 FF <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000035B 2214 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000035D 4442 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 392 <2> mne DD, ASM_SPECIAL ; ofs=14Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000143 FF <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000035F 3214 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000361 4444 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 393 <2> mne DEC ; ofs=14Dh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000363 4314 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000365 444543 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 394 00000144 2469 <2> variant 048h, 33 395 00000146 FBF42ECE <2> variant AGRP(0,1), 13, ASM_LOCKABLE 396 0000014A FF <2> endvariant 397 <2> mne DIV ; ofs=154h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000368 B314 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000036A 444956 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 398 0000014B F44981 <2> variant AGRP(6,6), 11 399 0000014E FF <2> endvariant 400 <2> mne DW, ASM_SPECIAL ; ofs=158h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 0000014F FF <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000036D F214 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000036F 4457 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 401 <2> mne EMMS ; ofs=15Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000371 0415 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000373 454D4D53 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 402 00000150 F9BCF7 <2> variant 177h, 0, ASM_MACH5 403 00000153 FF <2> endvariant 404 <2> mne F2XM1 ; ofs=162h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000377 4515 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000379 4632584D31 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 405 00000154 6D59F0 <2> fpvariant 0D9h, 0, 0F0h 406 00000157 FF <2> endvariant 407 <2> mne FABS ; ofs=166h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000037E 8415 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000380 46414253 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 408 00000158 6D59E1 <2> fpvariant 0D9h, 0, 0E1h 409 0000015B FF <2> endvariant 410 <2> mne FADD ; ofs=16Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000384 C415 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000386 46414444 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 411 0000015C F40E24 <2> variant 200h, 36 412 0000015F F4102A <2> variant 204h, 38 413 00000162 6D00C0 <2> fpvariant 0D8h, 40, 0C0h 414 00000165 6F07C0 <2> fpvariant 0DCh, 43, 0C0h 415 00000168 FF <2> endvariant 416 <2> mne FADDP ; ofs=177h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000038A 9516 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000038C 4641444450 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 417 00000169 7008C0 <2> fpvariant 0DEh, 42, 0C0h 418 0000016C 6FDEC1 <2> fpvariant 0DEh, 0, 0C1h 419 0000016F FF <2> endvariant 420 <2> mne FIADD ; ofs=17Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000391 0517 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000393 4649414444 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 421 00000170 F40F2E <2> variant 202h, 44 422 00000173 F41134 <2> variant 206h, 46 423 00000176 FF <2> endvariant 424 <2> mne FBLD ; ofs=185h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000398 7417 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000039A 46424C44 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 425 00000177 F421D7 <2> variant 227h, 48 426 0000017A FF <2> endvariant 427 <2> mne FBSTP ; ofs=189h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000039E B517 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000003A0 4642535450 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 428 0000017B F429E8 <2> variant 237h, 49 429 0000017E FF <2> endvariant 430 <2> mne FCHS ; ofs=18Dh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000003A5 F417 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000003A7 46434853 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 431 0000017F 6D59E0 <2> fpvariant 0D9h, 0, 0E0h 432 00000182 FF <2> endvariant 433 <2> mne FCLEX, ASM_WAIT ; ofs=191h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000183 FE <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000003AB 3518 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000003AD 46434C4558 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 434 <2> mne FNCLEX ; ofs=192h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000003B2 4618 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000003B4 464E434C4558 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 435 00000184 6E5BE2 <2> fpvariant 0DBh, 0, 0E2h 436 00000187 FF <2> endvariant 437 <2> mne FCMOVA ; ofs=196h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000003BA 8618 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000003BC 46434D4F5641 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 438 00000188 FA6E83D0 <2> fpvariant 0DBh, 40, 0D0h, ASM_MACH6 439 0000018C FF <2> endvariant 440 <2> mne FCMOVAE ; ofs=19Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000003C2 D718 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000003C4 46434D4F564145 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 441 0000018D FA6E83C0 <2> fpvariant 0DBh, 40, 0C0h, ASM_MACH6 442 00000191 FF <2> endvariant 443 <2> mne FCMOVB ; ofs=1A0h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000003CB 2619 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000003CD 46434D4F5642 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 444 00000192 FA6E02C0 <2> fpvariant 0DAh, 40, 0C0h, ASM_MACH6 445 00000196 FF <2> endvariant 446 <2> mne FCMOVBE ; ofs=1A5h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000003D3 7719 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000003D5 46434D4F564245 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 447 00000197 FA6E02D0 <2> fpvariant 0DAh, 40, 0D0h, ASM_MACH6 448 0000019B FF <2> endvariant 449 <2> mne FCMOVE ; ofs=1AAh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000003DC C619 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000003DE 46434D4F5645 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 450 0000019C FA6E02C8 <2> fpvariant 0DAh, 40, 0C8h, ASM_MACH6 451 000001A0 FF <2> endvariant 452 <2> mne FCMOVNA ; ofs=1AFh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000003E4 171A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000003E6 46434D4F564E41 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 453 000001A1 FA6E02D0 <2> fpvariant 0DAh, 40, 0D0h, ASM_MACH6 454 000001A5 FF <2> endvariant 455 <2> mne FCMOVNAE ; ofs=1B4h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000003ED 681A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000003EF 46434D4F564E4145 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 456 000001A6 FA6E02C0 <2> fpvariant 0DAh, 40, 0C0h, ASM_MACH6 457 000001AA FF <2> endvariant 458 <2> mne FCMOVNB ; ofs=1B9h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000003F7 B71A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000003F9 46434D4F564E42 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 459 000001AB FA6E83C0 <2> fpvariant 0DBh, 40, 0C0h, ASM_MACH6 460 000001AF FF <2> endvariant 461 <2> mne FCMOVNBE ; ofs=1BEh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000400 081B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000402 46434D4F564E4245 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 462 000001B0 FA6E83D0 <2> fpvariant 0DBh, 40, 0D0h, ASM_MACH6 463 000001B4 FF <2> endvariant 464 <2> mne FCMOVNE ; ofs=1C3h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000040A 571B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000040C 46434D4F564E45 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 465 000001B5 FA6E83C8 <2> fpvariant 0DBh, 40, 0C8h, ASM_MACH6 466 000001B9 FF <2> endvariant 467 <2> mne FCMOVNU ; ofs=1C8h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000413 A71B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000415 46434D4F564E55 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 468 000001BA FA6E83D8 <2> fpvariant 0DBh, 40, 0D8h, ASM_MACH6 469 000001BE FF <2> endvariant 470 <2> mne FCMOVNZ ; ofs=1CDh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000041C F71B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000041E 46434D4F564E5A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 471 000001BF FA6E83C8 <2> fpvariant 0DBh, 40, 0C8h, ASM_MACH6 472 000001C3 FF <2> endvariant 473 <2> mne FCMOVU ; ofs=1D2h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000425 461C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000427 46434D4F5655 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 474 000001C4 FA6E02D8 <2> fpvariant 0DAh, 40, 0D8h, ASM_MACH6 475 000001C8 FF <2> endvariant 476 <2> mne FCMOVZ ; ofs=1D7h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000042D 961C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000042F 46434D4F565A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 477 000001C9 FA6E02C8 <2> fpvariant 0DAh, 40, 0C8h, ASM_MACH6 478 000001CD FF <2> endvariant 479 <2> mne FCOM ; ofs=1DCh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000435 E41C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000437 46434F4D <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 480 000001CE F41634 <2> variant 210h, 36 481 000001D1 F4183A <2> variant 214h, 38 482 000001D4 6D0AD0 <2> fpvariant 0D8h, 50, 0D0h 483 000001D7 6CD8D1 <2> fpvariant 0D8h, 0, 0D1h 484 000001DA FF <2> endvariant 485 <2> mne FCOMI ; ofs=1E9h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000043B B51D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000043D 46434F4D49 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 486 000001DB FA6E8DF0 <2> fpvariant 0DBh, 50, 0F0h, ASM_MACH6 487 000001DF FA6E5BF1 <2> fpvariant 0DBh, 0, 0F1h, ASM_MACH6 488 000001E3 FF <2> endvariant 489 <2> mne FCOMIP ; ofs=1F2h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000442 461E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000444 46434F4D4950 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 490 000001E4 FA7091F0 <2> fpvariant 0DFh, 50, 0F0h, ASM_MACH6 491 000001E8 FA705FF1 <2> fpvariant 0DFh, 0, 0F1h, ASM_MACH6 492 000001EC FF <2> endvariant 493 <2> mne FCOMP ; ofs=1FBh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000044A D51E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000044C 46434F4D50 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 494 000001ED F41A3C <2> variant 218h, 36 495 000001F0 F41C42 <2> variant 21Ch, 38 496 000001F3 6D0AD8 <2> fpvariant 0D8h, 50, 0D8h 497 000001F6 6CD8D9 <2> fpvariant 0D8h, 0, 0D9h 498 000001F9 FF <2> endvariant 499 <2> mne FCOMPP ; ofs=208h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000451 A61F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000453 46434F4D5050 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 500 000001FA 6FDED9 <2> fpvariant 0DEh, 0, 0D9h 501 000001FD FF <2> endvariant 502 <2> mne FCOS ; ofs=20Ch 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000459 E41F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000045B 46434F53 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 503 000001FE F76D59FF <2> fpvariant 0D9h, 0, 0FFh, ASM_MACH3 504 00000202 FF <2> endvariant 505 <2> mne FDECSTP ; ofs=211h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000045F 3720 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000461 46444543535450 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 506 00000203 6D59F6 <2> fpvariant 0D9h, 0, 0F6h 507 00000206 FF <2> endvariant 508 <2> mne FDISI, ASM_WAIT ; ofs=215h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000207 FE <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000468 7520 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000046A 4644495349 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 509 <2> mne FNDISI ; ofs=216h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000046F 8620 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000471 464E44495349 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 510 00000208 6E5BE1 <2> fpvariant 0DBh, 0, 0E1h 511 0000020B FF <2> endvariant 512 <2> mne FDIV ; ofs=21Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000477 C420 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000479 46444956 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 513 0000020C F42654 <2> variant 230h, 36 514 0000020F F4285A <2> variant 234h, 38 515 00000212 6D00F0 <2> fpvariant 0D8h, 40, 0F0h 516 00000215 6F07F8 <2> fpvariant 0DCh, 43, 0F8h 517 00000218 FF <2> endvariant 518 <2> mne FDIVP ; ofs=227h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000047D 9521 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000047F 4644495650 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 519 00000219 7008F8 <2> fpvariant 0DEh, 42, 0F8h 520 0000021C 6FDEF9 <2> fpvariant 0DEh, 0, 0F9h 521 0000021F FF <2> endvariant 522 <2> mne FIDIV ; ofs=22Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000484 0522 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000486 4649444956 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 523 00000220 F4275E <2> variant 232h, 44 524 00000223 F42964 <2> variant 236h, 46 525 00000226 FF <2> endvariant 526 <2> mne FDIVR ; ofs=235h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000048B 7522 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000048D 4644495652 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 527 00000227 F42A5C <2> variant 238h, 36 528 0000022A F42C62 <2> variant 23Ch, 38 529 0000022D 6D00F8 <2> fpvariant 0D8h, 40, 0F8h 530 00000230 6F07F0 <2> fpvariant 0DCh, 43, 0F0h 531 00000233 FF <2> endvariant 532 <2> mne FDIVRP ; ofs=242h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000492 4623 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000494 464449565250 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 533 00000234 7008F0 <2> fpvariant 0DEh, 42, 0F0h 534 00000237 6FDEF1 <2> fpvariant 0DEh, 0, 0F1h 535 0000023A FF <2> endvariant 536 <2> mne FIDIVR ; ofs=249h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000049A B623 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000049C 464944495652 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 537 0000023B F42B66 <2> variant 23Ah, 44 538 0000023E F42D6C <2> variant 23Eh, 46 539 00000241 FF <2> endvariant 540 <2> mne FENI, ASM_WAIT ; ofs=250h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000242 FE <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000004A2 2424 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000004A4 46454E49 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 541 <2> mne FNENI ; ofs=251h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000004A8 3524 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000004AA 464E454E49 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 542 00000243 6E5BE0 <2> fpvariant 0DBh, 0, 0E0h 543 00000246 FF <2> endvariant 544 <2> mne FFREE ; ofs=255h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000004AF 7524 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000004B1 4646524545 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 545 00000247 6F86C0 <2> fpvariant 0DDh, 41, 0C0h 546 0000024A FF <2> endvariant 547 <2> mne FICOM ; ofs=259h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000004B6 B524 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000004B8 4649434F4D <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 548 0000024B F4173E <2> variant 212h, 44 549 0000024E F41944 <2> variant 216h, 46 550 00000251 FF <2> endvariant 551 <2> mne FICOMP ; ofs=260h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000004BD 2625 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000004BF 4649434F4D50 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 552 00000252 F41B46 <2> variant 21Ah, 44 553 00000255 F41D4C <2> variant 21Eh, 46 554 00000258 FF <2> endvariant 555 <2> mne FILD ; ofs=267h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000004C5 9425 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000004C7 46494C44 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 556 00000259 F40FAF <2> variant 203h, 44 557 0000025C F411B5 <2> variant 207h, 46 558 0000025F F425CD <2> variant 22Fh, 30 559 00000262 FF <2> endvariant 560 <2> mne FINCSTP ; ofs=271h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000004CB 3726 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000004CD 46494E43535450 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 561 00000263 6D59F7 <2> fpvariant 0D9h, 0, 0F7h 562 00000266 FF <2> endvariant 563 <2> mne FINIT, ASM_WAIT ; ofs=275h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000267 FE <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000004D4 7526 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000004D6 46494E4954 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 564 <2> mne FNINIT ; ofs=276h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000004DB 8626 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000004DD 464E494E4954 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 565 00000268 6E5BE3 <2> fpvariant 0DBh, 0, 0E3h 566 0000026B FF <2> endvariant 567 <2> mne FIST ; ofs=27Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000004E3 C426 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000004E5 46495354 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 568 0000026C F417C0 <2> variant 213h, 45 569 0000026F F419C6 <2> variant 217h, 47 570 00000272 FF <2> endvariant 571 <2> mne FISTP ; ofs=281h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000004E9 3527 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000004EB 4649535450 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 572 00000273 F41BC8 <2> variant 21Bh, 45 573 00000276 F41DCE <2> variant 21Fh, 47 574 00000279 F42DDE <2> variant 23Fh, 31 575 0000027C FF <2> endvariant 576 <2> mne FLD ; ofs=28Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000004F0 D327 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000004F2 464C44 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 577 0000027D F40EA5 <2> variant 201h, 36 578 00000280 F410AB <2> variant 205h, 38 579 00000283 F423DB <2> variant 22Bh, 48 580 00000286 6D82C0 <2> fpvariant 0D9h, 41, 0C0h 581 00000289 FF <2> endvariant 582 <2> mne FLD1 ; ofs=298h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000004F5 A428 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000004F7 464C4431 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 583 0000028A 6D59E8 <2> fpvariant 0D9h, 0, 0E8h 584 0000028D FF <2> endvariant 585 <2> mne FLDL2T ; ofs=29Ch 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000004FB E628 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000004FD 464C444C3254 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 586 0000028E 6D59E9 <2> fpvariant 0D9h, 0, 0E9h 587 00000291 FF <2> endvariant 588 <2> mne FLDL2E ; ofs=2A0h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000503 2629 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000505 464C444C3245 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 589 00000292 6D59EA <2> fpvariant 0D9h, 0, 0EAh 590 00000295 FF <2> endvariant 591 <2> mne FLDPI ; ofs=2A4h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000050B 6529 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000050D 464C445049 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 592 00000296 6D59EB <2> fpvariant 0D9h, 0, 0EBh 593 00000299 FF <2> endvariant 594 <2> mne FLDLG2 ; ofs=2A8h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000512 A629 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000514 464C444C4732 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 595 0000029A 6D59EC <2> fpvariant 0D9h, 0, 0ECh 596 0000029D FF <2> endvariant 597 <2> mne FLDLN2 ; ofs=2ACh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000051A E629 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000051C 464C444C4E32 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 598 0000029E 6D59ED <2> fpvariant 0D9h, 0, 0EDh 599 000002A1 FF <2> endvariant 600 <2> mne FLDZ ; ofs=2B0h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000522 242A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000524 464C445A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 601 000002A2 6D59EE <2> fpvariant 0D9h, 0, 0EEh 602 000002A5 FF <2> endvariant 603 <2> mne FLDCW, ASM_WAIT ; ofs=2B4h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 000002A6 FE <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000528 652A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000052A 464C444357 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 604 <2> mne FNLDCW ; ofs=2B5h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000052F 762A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000531 464E4C444357 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 605 000002A7 F422D7 <2> variant 229h, 46 606 000002AA FF <2> endvariant 607 <2> mne FMUL ; ofs=2BDh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000537 B42A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000539 464D554C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 608 000002AB F4122C <2> variant 208h, 36 609 000002AE F41432 <2> variant 20Ch, 38 610 000002B1 6D00C8 <2> fpvariant 0D8h, 40, 0C8h 611 000002B4 6F07C8 <2> fpvariant 0DCh, 43, 0C8h 612 000002B7 FF <2> endvariant 613 <2> mne FMULP ; ofs=2CAh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000053D 852B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000053F 464D554C50 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 614 000002B8 7008C8 <2> fpvariant 0DEh, 42, 0C8h 615 000002BB 6FDEC9 <2> fpvariant 0DEh, 0, 0C9h 616 000002BE FF <2> endvariant 617 <2> mne FIMUL ; ofs=2D1h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000544 F52B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000546 46494D554C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 618 000002BF F41336 <2> variant 20Ah, 44 619 000002C2 F4153C <2> variant 20Eh, 46 620 000002C5 FF <2> endvariant 621 <2> mne FNOP ; ofs=2D8h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000054B 642C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000054D 464E4F50 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 622 000002C6 6D59D0 <2> fpvariant 0D9h, 0, 0D0h 623 000002C9 FF <2> endvariant 624 <2> mne FPATAN ; ofs=2DCh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000551 A62C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000553 46504154414E <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 625 000002CA 6D59F3 <2> fpvariant 0D9h, 0, 0F3h 626 000002CD FF <2> endvariant 627 <2> mne FPREM ; ofs=2E0h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000559 E52C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000055B 465052454D <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 628 000002CE 6D59F8 <2> fpvariant 0D9h, 0, 0F8h 629 000002D1 FF <2> endvariant 630 <2> mne FPREM1 ; ofs=2E4h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000560 262D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000562 465052454D31 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 631 000002D2 F76D59F5 <2> fpvariant 0D9h, 0, 0F5h, ASM_MACH3 632 000002D6 FF <2> endvariant 633 <2> mne FPTAN ; ofs=2E9h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000568 752D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000056A 465054414E <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 634 000002D7 6D59F2 <2> fpvariant 0D9h, 0, 0F2h 635 000002DA FF <2> endvariant 636 <2> mne FRNDINT ; ofs=2EDh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000056F B72D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000571 46524E44494E54 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 637 000002DB 6D59FC <2> fpvariant 0D9h, 0, 0FCh 638 000002DE FF <2> endvariant 639 <2> mne FSCALE ; ofs=2FAh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000578 F62D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000057A 465343414C45 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 640 000002DF 6D59FD <2> fpvariant 0D9h, 0, 0FDh 641 000002E2 FF <2> endvariant 642 <2> mne FSETPM, ASM_WAIT ; ofs=2FEh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 000002E3 FE <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000580 362E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000582 46534554504D <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 643 <2> mne FNSETPM ; ofs=2FFh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000588 472E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000058A 464E534554504D <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 644 000002E4 F66E5BE4 <2> fpvariant 0DBh, 0, 0E4h, ASM_MACH2 645 000002E8 FF <2> endvariant 646 <2> mne FSIN ; ofs=304h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000591 942E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000593 4653494E <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 647 000002E9 F76D59FE <2> fpvariant 0D9h, 0, 0FEh, ASM_MACH3 648 000002ED FF <2> endvariant 649 <2> mne FSINCOS ; ofs=309h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000597 E72E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000599 4653494E434F53 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 650 000002EE F76D59FB <2> fpvariant 0D9h, 0, 0FBh, ASM_MACH3 651 000002F2 FF <2> endvariant 652 <2> mne FSQRT ; ofs=30Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000005A0 352F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000005A2 4653515254 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 653 000002F3 6D59FA <2> fpvariant 0D9h, 0, 0FAh 654 000002F6 FF <2> endvariant 655 <2> mne FST ; ofs=312h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000005A7 732F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000005A9 465354 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 656 000002F7 F416B6 <2> variant 211h, 37 657 000002FA F418BC <2> variant 215h, 39 658 000002FD 6F86D0 <2> fpvariant 0DDh, 41, 0D0h 659 00000300 FF <2> endvariant 660 <2> mne FSTP ; ofs=31Ch 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000005AC 1430 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000005AE 46535450 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 661 00000301 F41ABE <2> variant 219h, 37 662 00000304 F41CC4 <2> variant 21Dh, 39 663 00000307 F42BEC <2> variant 23Bh, 49 664 0000030A 6F86D8 <2> fpvariant 0DDh, 41, 0D8h 665 0000030D FF <2> endvariant 666 <2> mne FSTCW, ASM_WAIT ; ofs=329h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 0000030E FE <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000005B2 E530 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000005B4 4653544357 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 667 <2> mne FNSTCW ; ofs=32Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000005B9 F630 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000005BB 464E53544357 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 668 0000030F F42AE8 <2> variant 239h, 47 669 00000312 FF <2> endvariant 670 <2> mne FSTSW, ASM_WAIT ; ofs=333h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000313 FE <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000005C1 3531 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000005C3 4653545357 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 671 <2> mne FNSTSW ; ofs=334h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000005C8 4631 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000005CA 464E53545357 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 672 00000314 7095E0 <2> fpvariant 0DFh, 54, 0E0h 673 00000317 F42CEC <2> variant 23Dh, 47 674 0000031A FF <2> endvariant 675 <2> mne FSUB ; ofs=33Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000005D0 B431 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000005D2 46535542 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 676 0000031B F41E44 <2> variant 220h, 36 677 0000031E F4204A <2> variant 224h, 38 678 00000321 6D00E0 <2> fpvariant 0D8h, 40, 0E0h 679 00000324 6F07E8 <2> fpvariant 0DCh, 43, 0E8h 680 00000327 FF <2> endvariant 681 <2> mne FSUBP ; ofs=348h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000005D6 8532 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000005D8 4653554250 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 682 00000328 7008E8 <2> fpvariant 0DEh, 42, 0E8h 683 0000032B 6FDEE9 <2> fpvariant 0DEh, 0, 0E9h 684 0000032E FF <2> endvariant 685 <2> mne FISUB ; ofs=34Fh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000005DD F532 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000005DF 4649535542 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 686 0000032F F41F4E <2> variant 222h, 44 687 00000332 F42154 <2> variant 226h, 46 688 00000335 FF <2> endvariant 689 <2> mne FSUBR ; ofs=356h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000005E4 6533 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000005E6 4653554252 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 690 00000336 F4224C <2> variant 228h, 36 691 00000339 F42452 <2> variant 22Ch, 38 692 0000033C 6D00E8 <2> fpvariant 0D8h, 40, 0E8h 693 0000033F 6F07E0 <2> fpvariant 0DCh, 43, 0E0h 694 00000342 FF <2> endvariant 695 <2> mne FSUBRP ; ofs=363h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000005EB 3634 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000005ED 465355425250 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 696 00000343 7008E0 <2> fpvariant 0DEh, 42, 0E0h 697 00000346 6FDEE1 <2> fpvariant 0DEh, 0, 0E1h 698 00000349 FF <2> endvariant 699 <2> mne FISUBR ; ofs=36Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000005F3 A634 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000005F5 464953554252 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 700 0000034A F42356 <2> variant 22Ah, 44 701 0000034D F4255C <2> variant 22Eh, 46 702 00000350 FF <2> endvariant 703 <2> mne FTST ; ofs=371h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000005FB 1435 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000005FD 46545354 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 704 00000351 6D59E4 <2> fpvariant 0D9h, 0, 0E4h 705 00000354 FF <2> endvariant 706 <2> mne FUCOM ; ofs=375h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000601 5535 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000603 4655434F4D <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 707 00000355 F76F8FE0 <2> fpvariant 0DDh, 50, 0E0h, ASM_MACH3 708 00000359 F76F5DE1 <2> fpvariant 0DDh, 0, 0E1h, ASM_MACH3 709 0000035D FF <2> endvariant 710 <2> mne FUCOMI ; ofs=37Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000608 E635 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000060A 4655434F4D49 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 711 0000035E FA6E8DE8 <2> fpvariant 0DBh, 50, 0E8h, ASM_MACH6 712 00000362 FA6E5BE9 <2> fpvariant 0DBh, 0, 0E9h, ASM_MACH6 713 00000366 FF <2> endvariant 714 <2> mne FUCOMIP ; ofs=387h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000610 7736 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000612 4655434F4D4950 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 715 00000367 FA7091E8 <2> fpvariant 0DFh, 50, 0E8h, ASM_MACH6 716 0000036B FA705FE9 <2> fpvariant 0DFh, 0, 0E9h, ASM_MACH6 717 0000036F FF <2> endvariant 718 <2> mne FUCOMP ; ofs=390h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000619 0637 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000061B 4655434F4D50 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 719 00000370 F76F8FE8 <2> fpvariant 0DDh, 50, 0E8h, ASM_MACH3 720 00000374 F76F5DE9 <2> fpvariant 0DDh, 0, 0E9h, ASM_MACH3 721 00000378 FF <2> endvariant 722 <2> mne FUCOMPP ; ofs=399h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000621 9737 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000623 4655434F4D5050 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 723 00000379 F76DDAE9 <2> fpvariant 0DAh, 0, 0E9h, ASM_MACH3 724 0000037D FF <2> endvariant 725 <2> mne FWAIT ; ofs=39Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000062A E537 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000062C 4657414954 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 726 0000037E 4E1B <2> variant 09Bh, 0 727 00000380 FF <2> endvariant 728 <2> mne FXAM ; ofs=3A1h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000631 1438 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000633 4658414D <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 729 00000381 6D59E5 <2> fpvariant 0D9h, 0, 0E5h 730 00000384 FF <2> endvariant 731 <2> mne FXCH ; ofs=3A5h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000637 5438 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000639 46584348 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 732 00000385 6D8BC8 <2> fpvariant 0D9h, 50, 0C8h 733 00000388 6D59C9 <2> fpvariant 0D9h, 0, 0C9h 734 0000038B FF <2> endvariant 735 <2> mne FXTRACT ; ofs=3ACh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000063D C738 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000063F 46585452414354 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 736 0000038C 6D59F4 <2> fpvariant 0D9h, 0, 0F4h 737 0000038F FF <2> endvariant 738 <2> mne FYL2X ; ofs=3B0h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000646 0539 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000648 46594C3258 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 739 00000390 6D59F1 <2> fpvariant 0D9h, 0, 0F1h 740 00000393 FF <2> endvariant 741 <2> mne FYL2XP1 ; ofs=3B4h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000064D 4739 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000064F 46594C32585031 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 742 00000394 6D59F9 <2> fpvariant 0D9h, 0, 0F9h 743 00000397 FF <2> endvariant 744 <2> mne HLT ; ofs=3B8h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000656 8339 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000658 484C54 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 745 00000398 7AF4 <2> variant 0F4h, 0 746 0000039A FF <2> endvariant 747 <2> mne IDIV ; ofs=3BBh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000065B B439 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000065D 49444956 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 748 0000039B F44A02 <2> variant AGRP(6,7), 11 749 0000039E FF <2> endvariant 750 <2> mne IMUL ; ofs=3BFh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000661 F439 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000663 494D554C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 751 0000039F F44900 <2> variant AGRP(6,5), 11 752 000003A2 F7D93F <2> variant 1AFh, 16, ASM_MACH3 753 000003A5 F53622 <2> variant 06Bh, 55, ASM_MACH1 754 000003A8 F53623 <2> variant 06Bh, 56, ASM_MACH1 755 000003AB F53522 <2> variant 069h, 57, ASM_MACH1 756 000003AE F53523 <2> variant 069h, 58, ASM_MACH1 757 000003B1 FF <2> endvariant 758 <2> mne IN ; ofs=3D2h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000667 223B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000669 494E <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 759 000003B2 731F <2> variant 0E4h, 59 760 000003B4 7728 <2> variant 0ECh, 60 761 000003B6 FF <2> endvariant 762 <2> mne INC ; ofs=3D7h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000066B 733B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000066D 494E43 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 763 000003B7 2061 <2> variant 040h, 33 764 000003B9 FBF42E4D <2> variant AGRP(0,0), 13, ASM_LOCKABLE 765 000003BD FF <2> endvariant 766 <2> mne INSB ; ofs=3DEh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000670 E43B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000672 494E5342 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 767 000003BE F5366C <2> variant 06Ch, 0, ASM_MACH1 768 000003C1 FF <2> endvariant 769 <2> mne INT ; ofs=3E6h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000676 233C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000678 494E54 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 770 000003C2 6709 <2> variant 0CCh, 61 771 000003C4 67C9 <2> variant 0CDh, 124 772 000003C6 FF <2> endvariant 773 <2> mne INT1 ; ofs=3EBh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000067B 743C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000067D 494E5431 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 774 000003C7 FA79F1 <2> variant 0F1h, 128, ASM_MACH6 775 000003CA FF <2> endvariant 776 <2> mne INT01 ; ofs=3EFh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000681 B53C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000683 494E543031 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 777 000003CB FA79F1 <2> variant 0F1h, 128, ASM_MACH6 778 000003CE FF <2> endvariant 779 <2> mne ICEBP ; ofs=3F3h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000688 F53C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000068A 4943454250 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 780 000003CF FA79F1 <2> variant 0F1h, 128, ASM_MACH6 781 000003D2 FF <2> endvariant 782 <2> mne INT3 ; ofs=3F7h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000068F 343D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000691 494E5433 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 783 000003D3 674C <2> variant 0CCh, 128 784 000003D5 FF <2> endvariant 785 <2> mne INT03 ; ofs=3FAh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000695 653D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000697 494E543033 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 786 000003D6 674C <2> variant 0CCh, 128 787 000003D8 FF <2> endvariant 788 <2> mne INTO ; ofs=3FDh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000069C 943D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000069E 494E544F <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 789 000003D9 684E <2> variant 0CEh, 128 790 000003DB FF <2> endvariant 791 <2> mne INVD ; ofs=400h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006A2 C43D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006A4 494E5644 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 792 000003DC F88508 <2> variant 108h, 0, ASM_MACH4 793 000003DF FF <2> endvariant 794 <2> mne INVLPG ; ofs=404h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006A8 063E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006AA 494E564C5047 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 795 000003E0 F8F44E33 <2> variant AGRP(7,7), 52, ASM_MACH4 796 000003E4 FF <2> endvariant 797 <2> mne JA ; ofs=40Ch 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006B0 523E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006B2 4A41 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 798 000003E5 3C36 <2> variant 077h, 63 799 000003E7 F7C51F <2> variant 187h, 24, ASM_MACH3 800 000003EA FF <2> endvariant 801 <2> mne JAE ; ofs=412h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006B4 B33E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006B6 4A4145 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 802 000003EB 3A32 <2> variant 073h, 63 803 000003ED F7C31B <2> variant 183h, 24, ASM_MACH3 804 000003F0 FF <2> endvariant 805 <2> mne JB ; ofs=418h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006B9 123F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006BB 4A42 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 806 000003F1 39B1 <2> variant 072h, 63 807 000003F3 F7C29A <2> variant 182h, 24, ASM_MACH3 808 000003F6 FF <2> endvariant 809 <2> mne JBE ; ofs=41Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006BD 733F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006BF 4A4245 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 810 000003F7 3BB5 <2> variant 076h, 63 811 000003F9 F7C49E <2> variant 186h, 24, ASM_MACH3 812 000003FC FF <2> endvariant 813 <2> mne JC ; ofs=424h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006C2 D23F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006C4 4A43 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 814 000003FD 39B1 <2> variant 072h, 63 815 000003FF F7C29A <2> variant 182h, 24, ASM_MACH3 816 00000402 FF <2> endvariant 817 <2> mne JCXZ, ASM_D16 ; ofs=42Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000403 FC <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006C6 3440 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006C8 4A43585A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 818 <2> mne JECXZ, ASM_D32 ; ofs=42Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000404 FD <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006CC 4540 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006CE 4A4543585A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 819 00000405 72A2 <2> variant 0E3h, 63 820 00000407 FF <2> endvariant 821 <2> mne JE ; ofs=42Fh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006D3 8240 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006D5 4A45 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 822 00000408 3AB3 <2> variant 074h, 63 823 0000040A F7C39C <2> variant 184h, 24, ASM_MACH3 824 0000040D FF <2> endvariant 825 <2> mne JG ; ofs=435h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006D7 E240 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006D9 4A47 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 826 0000040E 403E <2> variant 07Fh, 63 827 00000410 F7C927 <2> variant 18Fh, 24, ASM_MACH3 828 00000413 FF <2> endvariant 829 <2> mne JGE ; ofs=43Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006DB 4341 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006DD 4A4745 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 830 00000414 3F3C <2> variant 07Dh, 63 831 00000416 F7C825 <2> variant 18Dh, 24, ASM_MACH3 832 00000419 FF <2> endvariant 833 <2> mne JL ; ofs=441h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006E0 A241 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006E2 4A4C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 834 0000041A 3EBB <2> variant 07Ch, 63 835 0000041C F7C7A4 <2> variant 18Ch, 24, ASM_MACH3 836 0000041F FF <2> endvariant 837 <2> mne JLE ; ofs=447h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006E4 0342 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006E6 4A4C45 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 838 00000420 3FBD <2> variant 07Eh, 63 839 00000422 F7C8A6 <2> variant 18Eh, 24, ASM_MACH3 840 00000425 FF <2> endvariant 841 <2> mne JNA ; ofs=44Dh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006E9 6342 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006EB 4A4E41 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 842 00000426 3BB5 <2> variant 076h, 63 843 00000428 F7C49E <2> variant 186h, 24, ASM_MACH3 844 0000042B FF <2> endvariant 845 <2> mne JNAE ; ofs=453h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006EE C442 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006F0 4A4E4145 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 846 0000042C 39B1 <2> variant 072h, 63 847 0000042E F7C29A <2> variant 182h, 24, ASM_MACH3 848 00000431 FF <2> endvariant 849 <2> mne JNB ; ofs=459h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006F4 2343 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006F6 4A4E42 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 850 00000432 3A32 <2> variant 073h, 63 851 00000434 F7C31B <2> variant 183h, 24, ASM_MACH3 852 00000437 FF <2> endvariant 853 <2> mne JNBE ; ofs=45Fh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006F9 8443 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006FB 4A4E4245 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 854 00000438 3C36 <2> variant 077h, 63 855 0000043A F7C51F <2> variant 187h, 24, ASM_MACH3 856 0000043D FF <2> endvariant 857 <2> mne JNC ; ofs=465h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006FF E343 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000701 4A4E43 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 858 0000043E 3A32 <2> variant 073h, 63 859 00000440 F7C31B <2> variant 183h, 24, ASM_MACH3 860 00000443 FF <2> endvariant 861 <2> mne JNE ; ofs=46Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000704 4344 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000706 4A4E45 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 862 00000444 3B34 <2> variant 075h, 63 863 00000446 F7C41D <2> variant 185h, 24, ASM_MACH3 864 00000449 FF <2> endvariant 865 <2> mne JNG ; ofs=471h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000709 A344 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000070B 4A4E47 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 866 0000044A 3FBD <2> variant 07Eh, 63 867 0000044C F7C8A6 <2> variant 18Eh, 24, ASM_MACH3 868 0000044F FF <2> endvariant 869 <2> mne JNGE ; ofs=477h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000070E 0445 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000710 4A4E4745 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 870 00000450 3EBB <2> variant 07Ch, 63 871 00000452 F7C7A4 <2> variant 18Ch, 24, ASM_MACH3 872 00000455 FF <2> endvariant 873 <2> mne JNL ; ofs=47Dh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000714 6345 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000716 4A4E4C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 874 00000456 3F3C <2> variant 07Dh, 63 875 00000458 F7C825 <2> variant 18Dh, 24, ASM_MACH3 876 0000045B FF <2> endvariant 877 <2> mne JNLE ; ofs=483h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000719 C445 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000071B 4A4E4C45 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 878 0000045C 403E <2> variant 07Fh, 63 879 0000045E F7C927 <2> variant 18Fh, 24, ASM_MACH3 880 00000461 FF <2> endvariant 881 <2> mne JNO ; ofs=489h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000071F 2346 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000721 4A4E4F <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 882 00000462 3930 <2> variant 071h, 63 883 00000464 F7C219 <2> variant 181h, 24, ASM_MACH3 884 00000467 FF <2> endvariant 885 <2> mne JNP ; ofs=48Fh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000724 8346 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000726 4A4E50 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 886 00000468 3E3A <2> variant 07Bh, 63 887 0000046A F7C723 <2> variant 18Bh, 24, ASM_MACH3 888 0000046D FF <2> endvariant 889 <2> mne JNS ; ofs=495h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000729 E346 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000072B 4A4E53 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 890 0000046E 3D38 <2> variant 079h, 63 891 00000470 F7C621 <2> variant 189h, 24, ASM_MACH3 892 00000473 FF <2> endvariant 893 <2> mne JNZ ; ofs=49Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000072E 4347 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000730 4A4E5A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 894 00000474 3B34 <2> variant 075h, 63 895 00000476 F7C41D <2> variant 185h, 24, ASM_MACH3 896 00000479 FF <2> endvariant 897 <2> mne JO ; ofs=4A1h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000733 A247 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000735 4A4F <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 898 0000047A 38AF <2> variant 070h, 63 899 0000047C F7C198 <2> variant 180h, 24, ASM_MACH3 900 0000047F FF <2> endvariant 901 <2> mne JP ; ofs=4A7h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000737 0248 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000739 4A50 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 902 00000480 3DB9 <2> variant 07Ah, 63 903 00000482 F7C6A2 <2> variant 18Ah, 24, ASM_MACH3 904 00000485 FF <2> endvariant 905 <2> mne JPE ; ofs=4ADh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000073B 6348 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000073D 4A5045 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 906 00000486 3DB9 <2> variant 07Ah, 63 907 00000488 F7C6A2 <2> variant 18Ah, 24, ASM_MACH3 908 0000048B FF <2> endvariant 909 <2> mne JPO ; ofs=4B3h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000740 C348 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000742 4A504F <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 910 0000048C 3E3A <2> variant 07Bh, 63 911 0000048E F7C723 <2> variant 18Bh, 24, ASM_MACH3 912 00000491 FF <2> endvariant 913 <2> mne JS ; ofs=4B9h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000745 2249 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000747 4A53 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 914 00000492 3CB7 <2> variant 078h, 63 915 00000494 F7C5A0 <2> variant 188h, 24, ASM_MACH3 916 00000497 FF <2> endvariant 917 <2> mne JZ ; ofs=4BFh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000749 8249 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000074B 4A5A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 918 00000498 3AB3 <2> variant 074h, 63 919 0000049A F7C39C <2> variant 184h, 24, ASM_MACH3 920 0000049D FF <2> endvariant 921 <2> mne JMP ; ofs=4C5h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000074D E349 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000074F 4A4D50 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 922 0000049E 76AA <2> variant 0EBh, 63 923 000004A0 7581 <2> variant 0E9h, 24 924 000004A2 F440DE <2> variant AGRP(4,4), 122 925 000004A5 F44101 <2> variant AGRP(4,5), 28 926 000004A8 7604 <2> variant 0EAh, 26 927 000004AA FF <2> endvariant 928 <2> mne LAHF ; ofs=4D2h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000752 B44A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000754 4C414846 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 929 000004AB 501F <2> variant 09Fh, 0 930 000004AD FF <2> endvariant 931 <2> mne LAR ; ofs=4D5h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000758 E34A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000075A 4C4152 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 932 000004AE F68212 <2> variant 102h, 16, ASM_MACH2 933 000004B1 FF <2> endvariant 934 <2> mne LDS ; ofs=4D9h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000075D 234B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000075F 4C4453 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 935 000004B2 6354 <2> variant 0C5h, 15 936 000004B4 FF <2> endvariant 937 <2> mne LSS ; ofs=4DCh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000762 534B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000764 4C5353 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 938 000004B5 F7DAC1 <2> variant 1B2h, 15, ASM_MACH3 939 000004B8 FF <2> endvariant 940 <2> mne LES ; ofs=4E0h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000767 934B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000769 4C4553 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 941 000004B9 62D3 <2> variant 0C4h, 15 942 000004BB FF <2> endvariant 943 <2> mne LFS ; ofs=4E3h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000076C C34B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000076E 4C4653 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 944 000004BC F7DBC3 <2> variant 1B4h, 15, ASM_MACH3 945 000004BF FF <2> endvariant 946 <2> mne LGS ; ofs=4E7h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000771 034C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000773 4C4753 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 947 000004C0 F7DC44 <2> variant 1B5h, 15, ASM_MACH3 948 000004C3 FF <2> endvariant 949 <2> mne LEA ; ofs=4EBh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000776 434C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000778 4C4541 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 950 000004C4 4785 <2> variant 08Dh, 120 951 000004C6 FF <2> endvariant 952 <2> mne LGDT ; ofs=4F2h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000077B 744C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000077D 4C474454 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 953 000004C7 F6F44BAD <2> variant AGRP(7,2), 51, ASM_MACH2 954 000004CB FF <2> endvariant 955 <2> mne LIDT ; ofs=4F7h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000781 C44C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000783 4C494454 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 956 000004CC F6F44C2E <2> variant AGRP(7,3), 51, ASM_MACH2 957 000004D0 FF <2> endvariant 958 <2> mne LLDT ; ofs=4FCh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000787 144D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000789 4C4C4454 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 959 000004D1 F6F44FCC <2> variant AGRP(8,2), 74, ASM_MACH2 960 000004D5 FF <2> endvariant 961 <2> mne LMSW ; ofs=501h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000078D 644D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000078F 4C4D5357 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 962 000004D6 F6F44DC8 <2> variant AGRP(7,6), 74, ASM_MACH2 963 000004DA FF <2> endvariant 964 <2> mne LOCK, ASM_SPECIAL, 0F0h ; ofs=506h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 000004DB FFF0 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000793 B44D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000795 4C4F434B <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 965 <2> mne LODSB ; ofs=508h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000799 D54D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000079B 4C4F445342 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 966 000004DD 56AC <2> variant 0ACh, 0 967 000004DF FF <2> endvariant 968 <2> mne LOOP ; ofs=51Dh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000007A0 044E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000007A2 4C4F4F50 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 969 000004E0 725F <2> variant 0E2h, 125 970 000004E2 7221 <2> variant 0E2h, 63 971 000004E4 FF <2> endvariant 972 <2> mne LOOPZ ; ofs=522h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000007A6 554E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000007A8 4C4F4F505A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 973 000004E5 71DE <2> variant 0E1h, 125 974 000004E7 71A0 <2> variant 0E1h, 63 975 000004E9 FF <2> endvariant 976 <2> mne LOOPE ; ofs=527h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000007AD A54E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000007AF 4C4F4F5045 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 977 000004EA 71DE <2> variant 0E1h, 125 978 000004EC 71A0 <2> variant 0E1h, 63 979 000004EE FF <2> endvariant 980 <2> mne LOOPNZ ; ofs=52Ch 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000007B4 F64E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000007B6 4C4F4F504E5A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 981 000004EF 715D <2> variant 0E0h, 125 982 000004F1 711F <2> variant 0E0h, 63 983 000004F3 FF <2> endvariant 984 <2> mne LOOPNE ; ofs=531h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000007BC 464F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000007BE 4C4F4F504E45 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 985 000004F4 715D <2> variant 0E0h, 125 986 000004F6 711F <2> variant 0E0h, 63 987 000004F8 FF <2> endvariant 988 <2> mne LSL ; ofs=536h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000007C4 934F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000007C6 4C534C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 989 000004F9 F68293 <2> variant 103h, 16, ASM_MACH2 990 000004FC FF <2> endvariant 991 <2> mne LTR ; ofs=53Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000007C9 D34F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000007CB 4C5452 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 992 000004FD F6F4504D <2> variant AGRP(8,3), 74, ASM_MACH2 993 00000501 FF <2> endvariant 994 <2> mne MOV ; ofs=53Fh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000007CE 2350 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000007D0 4D4F56 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 995 00000502 50E4 <2> variant 0A0h, 68 996 00000504 51E7 <2> variant 0A2h, 69 997 00000506 4491 <2> variant 088h, 9 998 00000508 4594 <2> variant 08Ah, 10 999 0000050A 46CE <2> variant 08Ch, 66 1000 0000050C 47D1 <2> variant 08Eh, 67 1001 0000050E 58F6 <2> variant 0B0h, 70 1002 00000510 5CFF <2> variant 0B8h, 71 1003 00000512 F4528C <2> variant AGRP(9,0), 4 1004 00000515 F7918D <2> variant 120h, 109, ASM_MACH3 1005 00000518 F79290 <2> variant 122h, 110, ASM_MACH3 1006 0000051B F79210 <2> variant 121h, 111, ASM_MACH3 1007 0000051E F79313 <2> variant 123h, 112, ASM_MACH3 1008 00000521 F79395 <2> variant 124h, 113, ASM_MACH3 1009 00000524 F79498 <2> variant 126h, 114, ASM_MACH3 1010 00000527 FF <2> endvariant 1011 <2> mne MOVD ; ofs=565h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000007D3 8452 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000007D5 4D4F5644 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1012 00000528 F9B8E1 <2> variant 16Eh, 115, ASM_MACH5 1013 0000052B F9C0F2 <2> variant 17Eh, 116, ASM_MACH5 1014 0000052E FF <2> endvariant 1015 <2> mne MOVQ ; ofs=56Ch 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000007D9 F452 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000007DB 4D4F5651 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1016 0000052F F9B964 <2> variant 16Fh, 117, ASM_MACH5 1017 00000532 F9C175 <2> variant 17Fh, 118, ASM_MACH5 1018 00000535 FF <2> endvariant 1019 <2> mne PACKSSDW ; ofs=573h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000007DF 6853 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000007E1 5041434B53534457 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1020 00000536 F9B760 <2> variant 16Bh, 117, ASM_MACH5 1021 00000539 FF <2> endvariant 1022 <2> mne PACKSSWB ; ofs=577h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000007E9 A853 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000007EB 5041434B53535742 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1023 0000053A F9B358 <2> variant 163h, 117, ASM_MACH5 1024 0000053D FF <2> endvariant 1025 <2> mne PACKUSWB ; ofs=57Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000007F3 E853 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000007F5 5041434B55535742 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1026 0000053E F9B55C <2> variant 167h, 117, ASM_MACH5 1027 00000541 FF <2> endvariant 1028 <2> mne PADDB ; ofs=57Fh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000007FD 2554 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000007FF 5041444442 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1029 00000542 F9F40C71 <2> variant 1FCh, 117, ASM_MACH5 1030 00000546 FF <2> endvariant 1031 <2> mne PADDW ; ofs=584h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000804 7554 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000806 5041444457 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1032 00000547 F9F40CF2 <2> variant 1FDh, 117, ASM_MACH5 1033 0000054B FF <2> endvariant 1034 <2> mne PADDD ; ofs=589h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000080B C554 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000080D 5041444444 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1035 0000054C F9F40D73 <2> variant 1FEh, 117, ASM_MACH5 1036 00000550 FF <2> endvariant 1037 <2> mne PADDSB ; ofs=58Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000812 1655 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000814 504144445342 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1038 00000551 F9F40461 <2> variant 1ECh, 117, ASM_MACH5 1039 00000555 FF <2> endvariant 1040 <2> mne PADDSW ; ofs=593h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000081A 6655 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000081C 504144445357 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1041 00000556 F9F404E2 <2> variant 1EDh, 117, ASM_MACH5 1042 0000055A FF <2> endvariant 1043 <2> mne PADDUSB ; ofs=598h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000822 B755 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000824 50414444555342 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1044 0000055B F9F051 <2> variant 1DCh, 117, ASM_MACH5 1045 0000055E FF <2> endvariant 1046 <2> mne PADDUSW ; ofs=59Ch 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000082B F755 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000082D 50414444555357 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1047 0000055F F9F0D2 <2> variant 1DDh, 117, ASM_MACH5 1048 00000562 FF <2> endvariant 1049 <2> mne PAND ; ofs=5A0h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000834 3456 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000836 50414E44 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1050 00000563 F9EFD0 <2> variant 1DBh, 117, ASM_MACH5 1051 00000566 FF <2> endvariant 1052 <2> mne PANDN ; ofs=5A4h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000083A 7556 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000083C 50414E444E <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1053 00000567 F9F1D4 <2> variant 1DFh, 117, ASM_MACH5 1054 0000056A FF <2> endvariant 1055 <2> mne PCMPEQB ; ofs=5A8h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000841 B756 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000843 50434D50455142 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1056 0000056B F9BBE9 <2> variant 174h, 117, ASM_MACH5 1057 0000056E FF <2> endvariant 1058 <2> mne PCMPEQW ; ofs=5ACh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000084A F756 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000084C 50434D50455157 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1059 0000056F F9BC6A <2> variant 175h, 117, ASM_MACH5 1060 00000572 FF <2> endvariant 1061 <2> mne PCMPEQD ; ofs=5B0h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000853 3757 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000855 50434D50455144 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1062 00000573 F9BCEB <2> variant 176h, 117, ASM_MACH5 1063 00000576 FF <2> endvariant 1064 <2> mne PCMPGTB ; ofs=5B4h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000085C 7757 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000085E 50434D50475442 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1065 00000577 F9B3D9 <2> variant 164h, 117, ASM_MACH5 1066 0000057A FF <2> endvariant 1067 <2> mne PCMPGTW ; ofs=5B8h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000865 B757 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000867 50434D50475457 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1068 0000057B F9B45A <2> variant 165h, 117, ASM_MACH5 1069 0000057E FF <2> endvariant 1070 <2> mne PCMPGTD ; ofs=5BCh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000086E F757 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000870 50434D50475444 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1071 0000057F F9B4DB <2> variant 166h, 117, ASM_MACH5 1072 00000582 FF <2> endvariant 1073 <2> mne PMADDWD ; ofs=5C0h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000877 3758 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000879 504D4144445744 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1074 00000583 F9F408EA <2> variant 1F5h, 117, ASM_MACH5 1075 00000587 FF <2> endvariant 1076 <2> mne PMULHW ; ofs=5C5h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000880 8658 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000882 504D554C4857 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1077 00000588 F9F400DA <2> variant 1E5h, 117, ASM_MACH5 1078 0000058C FF <2> endvariant 1079 <2> mne PMULLW ; ofs=5CAh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000888 D658 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000088A 504D554C4C57 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1080 0000058D F9ECCA <2> variant 1D5h, 117, ASM_MACH5 1081 00000590 FF <2> endvariant 1082 <2> mne POR ; ofs=5CEh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000890 1359 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000892 504F52 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1083 00000591 F9F403E0 <2> variant 1EBh, 117, ASM_MACH5 1084 00000595 FF <2> endvariant 1085 <2> mne PSLLW ; ofs=5D3h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000895 6559 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000897 50534C4C57 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1086 00000596 F9F406E6 <2> variant 1F1h, 117, ASM_MACH5 1087 0000059A F9F45A0D <2> variant AGRP(10,6), 119, ASM_MACH5 1088 0000059E FF <2> endvariant 1089 <2> mne PSLLD ; ofs=5DCh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000089C F559 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000089E 50534C4C44 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1090 0000059F F9F40767 <2> variant 1F2h, 117, ASM_MACH5 1091 000005A3 F9F45E15 <2> variant AGRP(11,6), 119, ASM_MACH5 1092 000005A7 FF <2> endvariant 1093 <2> mne PSLLQ ; ofs=5E5h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000008A3 855A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000008A5 50534C4C51 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1094 000005A8 F9F407E8 <2> variant 1F3h, 117, ASM_MACH5 1095 000005AC F9F4621D <2> variant AGRP(12,6), 119, ASM_MACH5 1096 000005B0 FF <2> endvariant 1097 <2> mne PSRAW ; ofs=5EEh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000008AA 155B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000008AC 5053524157 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1098 000005B1 F9F2D6 <2> variant 1E1h, 117, ASM_MACH5 1099 000005B4 F9F4590B <2> variant AGRP(10,4), 119, ASM_MACH5 1100 000005B8 FF <2> endvariant 1101 <2> mne PSRAD ; ofs=5F6h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000008B1 955B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000008B3 5053524144 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1102 000005B9 F9F357 <2> variant 1E2h, 117, ASM_MACH5 1103 000005BC F9F45D13 <2> variant AGRP(11,4), 119, ASM_MACH5 1104 000005C0 FF <2> endvariant 1105 <2> mne PSRLW ; ofs=5FEh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000008B8 155C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000008BA 5053524C57 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1106 000005C1 F9EAC6 <2> variant 1D1h, 117, ASM_MACH5 1107 000005C4 F9F45809 <2> variant AGRP(10,2), 119, ASM_MACH5 1108 000005C8 FF <2> endvariant 1109 <2> mne PSRLD ; ofs=606h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000008BF 955C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000008C1 5053524C44 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1110 000005C9 F9EB47 <2> variant 1D2h, 117, ASM_MACH5 1111 000005CC F9F45C11 <2> variant AGRP(11,2), 119, ASM_MACH5 1112 000005D0 FF <2> endvariant 1113 <2> mne PSRLQ ; ofs=60Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000008C6 155D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000008C8 5053524C51 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1114 000005D1 F9EBC8 <2> variant 1D3h, 117, ASM_MACH5 1115 000005D4 F9F46019 <2> variant AGRP(12,2), 119, ASM_MACH5 1116 000005D8 FF <2> endvariant 1117 <2> mne PSUBB ; ofs=616h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000008CD 955D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000008CF 5053554242 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1118 000005D9 F9F40A6D <2> variant 1F8h, 117, ASM_MACH5 1119 000005DD FF <2> endvariant 1120 <2> mne PSUBW ; ofs=61Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000008D4 E55D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000008D6 5053554257 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1121 000005DE F9F40AEE <2> variant 1F9h, 117, ASM_MACH5 1122 000005E2 FF <2> endvariant 1123 <2> mne PSUBD ; ofs=620h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000008DB 355E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000008DD 5053554244 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1124 000005E3 F9F40B6F <2> variant 1FAh, 117, ASM_MACH5 1125 000005E7 FF <2> endvariant 1126 <2> mne PSUBSB ; ofs=625h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000008E2 865E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000008E4 505355425342 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1127 000005E8 F9F4025D <2> variant 1E8h, 117, ASM_MACH5 1128 000005EC FF <2> endvariant 1129 <2> mne PSUBSW ; ofs=62Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000008EA D65E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000008EC 505355425357 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1130 000005ED F9F402DE <2> variant 1E9h, 117, ASM_MACH5 1131 000005F1 FF <2> endvariant 1132 <2> mne PSUBUSB ; ofs=62Fh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000008F2 275F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000008F4 50535542555342 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1133 000005F2 F9EE4D <2> variant 1D8h, 117, ASM_MACH5 1134 000005F5 FF <2> endvariant 1135 <2> mne PSUBUSW ; ofs=633h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000008FB 675F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000008FD 50535542555357 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1136 000005F6 F9EECE <2> variant 1D9h, 117, ASM_MACH5 1137 000005F9 FF <2> endvariant 1138 <2> mne PUNPCKHBW ; ofs=637h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000904 A95F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000906 50554E50434B484257 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1139 000005FA F9B5DD <2> variant 168h, 117, ASM_MACH5 1140 000005FD FF <2> endvariant 1141 <2> mne PUNPCKHWD ; ofs=63Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000090F E95F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000911 50554E50434B485744 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1142 000005FE F9B65E <2> variant 169h, 117, ASM_MACH5 1143 00000601 FF <2> endvariant 1144 <2> mne PUNPCKHDQ ; ofs=63Fh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000091A 2960 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000091C 50554E50434B484451 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1145 00000602 F9B6DF <2> variant 16Ah, 117, ASM_MACH5 1146 00000605 FF <2> endvariant 1147 <2> mne PUNPCKLBW ; ofs=643h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000925 6960 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000927 50554E50434B4C4257 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1148 00000606 F9B1D5 <2> variant 160h, 117, ASM_MACH5 1149 00000609 FF <2> endvariant 1150 <2> mne PUNPCKLWD ; ofs=647h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000930 A960 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000932 50554E50434B4C5744 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1151 0000060A F9B256 <2> variant 161h, 117, ASM_MACH5 1152 0000060D FF <2> endvariant 1153 <2> mne PUNPCKLDQ ; ofs=64Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000093B E960 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000093D 50554E50434B4C4451 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1154 0000060E F9B2D7 <2> variant 162h, 117, ASM_MACH5 1155 00000611 FF <2> endvariant 1156 <2> mne PXOR ; ofs=64Fh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000946 2461 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000948 50584F52 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1157 00000612 F9F405E4 <2> variant 1EFh, 117, ASM_MACH5 1158 00000616 FF <2> endvariant 1159 <2> mne MOVSB ; ofs=654h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000094C 7561 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000094E 4D4F565342 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1160 00000617 52A4 <2> variant 0A4h, 0 1161 00000619 FF <2> endvariant 1162 <2> mne MOVSX ; ofs=65Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000953 A561 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000955 4D4F565358 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1163 0000061A F7E106 <2> variant 1BEh, 72, ASM_MACH3 1164 0000061D F7E188 <2> variant 1BFh, 73, ASM_MACH3 1165 00000620 FF <2> endvariant 1166 <2> mne MOVZX ; ofs=661h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000095A 1562 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000095C 4D4F565A58 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1167 00000621 F7DCFE <2> variant 1B6h, 72, ASM_MACH3 1168 00000624 F7DD80 <2> variant 1B7h, 73, ASM_MACH3 1169 00000627 FF <2> endvariant 1170 <2> mne MUL ; ofs=668h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000961 8362 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000963 4D554C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1171 00000628 F4487F <2> variant AGRP(6,4), 11 1172 0000062B FF <2> endvariant 1173 <2> mne NEG ; ofs=66Ch 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000966 C362 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000968 4E4547 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1174 0000062C FBF44800 <2> variant AGRP(6,3), 13, ASM_LOCKABLE 1175 00000630 FF <2> endvariant 1176 <2> mne NOP ; ofs=671h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000096B 1363 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000096D 4E4F50 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1177 00000631 4890 <2> variant 090h, 0 1178 00000633 FF <2> endvariant 1179 <2> mne NOT ; ofs=674h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000970 4363 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000972 4E4F54 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1180 00000634 FBF4477F <2> variant AGRP(6,2), 13, ASM_LOCKABLE 1181 00000638 FF <2> endvariant 1182 <2> mne OR ; ofs=679h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000975 9263 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000977 4F52 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1183 00000639 FBF432CE <2> variant AGRP(1,1), 5, ASM_LOCKABLE 1184 0000063D 060D <2> variant 00Ch, 1 1185 0000063F FBF436D3 <2> variant AGRP(2,1), 2, ASM_LOCKABLE 1186 00000643 FB040F <2> variant 008h, 7, ASM_LOCKABLE 1187 00000646 0514 <2> variant 00Ah, 10 1188 00000648 FF <2> endvariant 1189 <2> mne ORG, ASM_SPECIAL ; ofs=689h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000649 FF <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000979 9364 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000097B 4F5247 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1190 <2> mne OUT ; ofs=68Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000097E A364 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000980 4F5554 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1191 0000064A 7431 <2> variant 0E6h, 75 1192 0000064C 783A <2> variant 0EEh, 76 1193 0000064E FF <2> endvariant 1194 <2> mne OUTSB ; ofs=690h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000983 F564 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000985 4F55545342 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1195 0000064F F5376E <2> variant 06Eh, 0, ASM_MACH1 1196 00000652 FF <2> endvariant 1197 <2> mne POP ; ofs=698h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000098A 3365 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000098C 504F50 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1198 00000653 2C7A <2> variant 058h, 34 1199 00000655 F462F5 <2> variant AGRP(13,0), 77 1200 00000658 1009 <2> variant 01Fh, 106 1201 0000065A 03EF <2> variant 007h, 104 1202 0000065C 0C00 <2> variant 017h, 105 1203 0000065E F7D28C <2> variant 1A1h, 107, ASM_MACH3 1204 00000661 F7D695 <2> variant 1A9h, 108, ASM_MACH3 1205 00000664 FF <2> endvariant 1206 <2> mne PUSH ; ofs=6B1h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000098F 5466 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000991 50555348 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1207 00000665 2870 <2> variant 050h, 32 1208 00000667 F441A6 <2> variant AGRP(4,6), 64 1209 0000066A F535BA <2> variant 06Ah, 80, ASM_MACH1 1210 0000066D F534B7 <2> variant 068h, 79, ASM_MACH1 1211 00000670 076C <2> variant 00Eh, 94 1212 00000672 0B76 <2> variant 016h, 96 1213 00000674 0F80 <2> variant 01Eh, 98 1214 00000676 0362 <2> variant 006h, 92 1215 00000678 F7D204 <2> variant 1A0h, 100, ASM_MACH3 1216 0000067B F7D60E <2> variant 1A8h, 102, ASM_MACH3 1217 0000067E FF <2> endvariant 1218 <2> mne RCL ; ofs=6D9h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000995 F367 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000997 52434C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1219 0000067F F46803 <2> variant AGRP(14,2), 81 1220 00000682 F46C0C <2> variant AGRP(15,2), 82 1221 00000685 F5F47015 <2> variant AGRP(16,2), 83, ASM_MACH1 1222 00000689 FF <2> endvariant 1223 <2> mne RCR ; ofs=6E4h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000099A A368 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000099C 524352 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1224 0000068A F46884 <2> variant AGRP(14,3), 81 1225 0000068D F46C8D <2> variant AGRP(15,3), 82 1226 00000690 F5F47096 <2> variant AGRP(16,3), 83, ASM_MACH1 1227 00000694 FF <2> endvariant 1228 <2> mne ROL ; ofs=6EFh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000099F 5369 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009A1 524F4C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1229 00000695 F46701 <2> variant AGRP(14,0), 81 1230 00000698 F46B0A <2> variant AGRP(15,0), 82 1231 0000069B F5F46F13 <2> variant AGRP(16,0), 83, ASM_MACH1 1232 0000069F FF <2> endvariant 1233 <2> mne ROR ; ofs=6FAh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009A4 036A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009A6 524F52 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1234 000006A0 F46782 <2> variant AGRP(14,1), 81 1235 000006A3 F46B8B <2> variant AGRP(15,1), 82 1236 000006A6 F5F46F94 <2> variant AGRP(16,1), 83, ASM_MACH1 1237 000006AA FF <2> endvariant 1238 <2> mne RDMSR ; ofs=705h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009A9 B56A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009AB 52444D5352 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1239 000006AB F99A32 <2> variant 132h, 0, ASM_MACH5 1240 000006AE FF <2> endvariant 1241 <2> mne RDTSC ; ofs=709h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009B0 F56A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009B2 5244545343 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1242 000006AF F999B1 <2> variant 131h, 0, ASM_MACH5 1243 000006B2 FF <2> endvariant 1244 <2> mne REP, ASM_SPECIAL, 0F3h ; ofs=70Dh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 000006B3 FFF3 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009B7 336B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009B9 524550 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1245 <2> mne REPZ, ASM_SPECIAL, 0F3h ; ofs=70Fh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 000006B5 FFF3 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009BC 546B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009BE 5245505A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1246 <2> mne REPNZ, ASM_SPECIAL, 0F2h ; ofs=711h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 000006B7 FFF2 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009C2 756B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009C4 5245504E5A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1247 <2> mne REPE, ASM_SPECIAL, 0F3h ; ofs=713h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 000006B9 FFF3 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009C9 946B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009CB 52455045 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1248 <2> mne REPNE, ASM_SPECIAL, 0F2h ; ofs=715h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 000006BB FFF2 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009CF B56B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009D1 5245504E45 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1249 <2> mne RSM ; ofs=726h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009D6 D36B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009D8 52534D <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1250 000006BD F9D6AA <2> variant 1AAh, 0, ASM_MACH5 1251 000006C0 FF <2> endvariant 1252 <2> mne SAHF ; ofs=72Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009DB 146C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009DD 53414846 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1253 000006C1 4F9E <2> variant 09Eh, 0 1254 000006C3 FF <2> endvariant 1255 <2> mne SAL ; ofs=72Dh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009E1 436C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009E3 53414C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1256 000006C4 F46905 <2> variant AGRP(14,4), 81 1257 000006C7 F46D0E <2> variant AGRP(15,4), 82 1258 000006CA F5F47117 <2> variant AGRP(16,4), 83, ASM_MACH1 1259 000006CE FF <2> endvariant 1260 <2> mne SAR ; ofs=738h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009E6 F36C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009E8 534152 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1261 000006CF F46A88 <2> variant AGRP(14,7), 81 1262 000006D2 F46E91 <2> variant AGRP(15,7), 82 1263 000006D5 F5F4729A <2> variant AGRP(16,7), 83, ASM_MACH1 1264 000006D9 FF <2> endvariant 1265 <2> mne SEG ; ofs=743h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009EB A36D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009ED 534547 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1266 000006DA 1383 <2> variant 026h, 93 1267 000006DC 178D <2> variant 02Eh, 95 1268 000006DE 1B97 <2> variant 036h, 97 1269 000006E0 1FA1 <2> variant 03Eh, 99 1270 000006E2 32C9 <2> variant 064h, 101 1271 000006E4 334C <2> variant 065h, 103 1272 000006E6 FF <2> endvariant 1273 <2> mne ES, ASM_SPECIAL, 026h ; ofs=750h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 000006E7 FF26 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009F0 726E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009F2 4553 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1274 <2> mne CS, ASM_SPECIAL, 02Eh ; ofs=752h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 000006E9 FF2E <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009F4 926E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009F6 4353 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1275 <2> mne SS, ASM_SPECIAL, 036h ; ofs=754h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 000006EB FF36 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009F8 B26E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009FA 5353 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1276 <2> mne DS, ASM_SPECIAL, 03Eh ; ofs=756h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 000006ED FF3E <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009FC D26E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009FE 4453 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1277 <2> mne FS, ASM_SPECIAL, 064h ; ofs=758h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 000006EF FF64 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A00 F26E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A02 4653 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1278 <2> mne GS, ASM_SPECIAL, 065h ; ofs=75Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 000006F1 FF65 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A04 126F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A06 4753 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1279 <2> mne SHL ; ofs=75Ch 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A08 336F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A0A 53484C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1280 000006F3 F46905 <2> variant AGRP(14,4), 81 1281 000006F6 F46D0E <2> variant AGRP(15,4), 82 1282 000006F9 F5F47117 <2> variant AGRP(16,4), 83, ASM_MACH1 1283 000006FD FF <2> endvariant 1284 <2> mne SHR ; ofs=767h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A0D E36F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A0F 534852 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1285 000006FE F46986 <2> variant AGRP(14,5), 81 1286 00000701 F46D8F <2> variant AGRP(15,5), 82 1287 00000704 F5F47198 <2> variant AGRP(16,5), 83, ASM_MACH1 1288 00000708 FF <2> endvariant 1289 <2> mne SBB ; ofs=772h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A12 9370 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A14 534242 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1290 00000709 FBF433D0 <2> variant AGRP(1,3), 5, ASM_LOCKABLE 1291 0000070D 0E1D <2> variant 01Ch, 1 1292 0000070F FBF437D5 <2> variant AGRP(2,3), 2, ASM_LOCKABLE 1293 00000713 FB0C1F <2> variant 018h, 7, ASM_LOCKABLE 1294 00000716 0D24 <2> variant 01Ah, 10 1295 00000718 FF <2> endvariant 1296 <2> mne SCASB ; ofs=782h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A17 9571 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A19 5343415342 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1297 00000719 57AE <2> variant 0AEh, 0 1298 0000071B FF <2> endvariant 1299 <2> mne SETA ; ofs=788h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A1E C471 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A20 53455441 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1300 0000071C F7CD6E <2> variant 197h, 87, ASM_MACH3 1301 0000071F FF <2> endvariant 1302 <2> mne SETAE ; ofs=78Ch 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A24 0572 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A26 5345544145 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1303 00000720 F7CB6A <2> variant 193h, 87, ASM_MACH3 1304 00000723 FF <2> endvariant 1305 <2> mne SETB ; ofs=790h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A2B 4472 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A2D 53455442 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1306 00000724 F7CAE9 <2> variant 192h, 87, ASM_MACH3 1307 00000727 FF <2> endvariant 1308 <2> mne SETBE ; ofs=794h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A31 8572 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A33 5345544245 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1309 00000728 F7CCED <2> variant 196h, 87, ASM_MACH3 1310 0000072B FF <2> endvariant 1311 <2> mne SETC ; ofs=798h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A38 C472 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A3A 53455443 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1312 0000072C F7CAE9 <2> variant 192h, 87, ASM_MACH3 1313 0000072F FF <2> endvariant 1314 <2> mne SETE ; ofs=79Ch 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A3E 0473 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A40 53455445 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1315 00000730 F7CBEB <2> variant 194h, 87, ASM_MACH3 1316 00000733 FF <2> endvariant 1317 <2> mne SETG ; ofs=7A0h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A44 4473 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A46 53455447 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1318 00000734 F7D176 <2> variant 19Fh, 87, ASM_MACH3 1319 00000737 FF <2> endvariant 1320 <2> mne SETGE ; ofs=7A4h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A4A 8573 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A4C 5345544745 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1321 00000738 F7D074 <2> variant 19Dh, 87, ASM_MACH3 1322 0000073B FF <2> endvariant 1323 <2> mne SETL ; ofs=7A8h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A51 C473 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A53 5345544C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1324 0000073C F7CFF3 <2> variant 19Ch, 87, ASM_MACH3 1325 0000073F FF <2> endvariant 1326 <2> mne SETLE ; ofs=7ACh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A57 0574 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A59 5345544C45 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1327 00000740 F7D0F5 <2> variant 19Eh, 87, ASM_MACH3 1328 00000743 FF <2> endvariant 1329 <2> mne SETNA ; ofs=7B0h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A5E 4574 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A60 5345544E41 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1330 00000744 F7CCED <2> variant 196h, 87, ASM_MACH3 1331 00000747 FF <2> endvariant 1332 <2> mne SETNAE ; ofs=7B4h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A65 8674 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A67 5345544E4145 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1333 00000748 F7CAE9 <2> variant 192h, 87, ASM_MACH3 1334 0000074B FF <2> endvariant 1335 <2> mne SETNB ; ofs=7B8h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A6D C574 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A6F 5345544E42 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1336 0000074C F7CB6A <2> variant 193h, 87, ASM_MACH3 1337 0000074F FF <2> endvariant 1338 <2> mne SETNBE ; ofs=7BCh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A74 0675 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A76 5345544E4245 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1339 00000750 F7CD6E <2> variant 197h, 87, ASM_MACH3 1340 00000753 FF <2> endvariant 1341 <2> mne SETNC ; ofs=7C0h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A7C 4575 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A7E 5345544E43 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1342 00000754 F7CB6A <2> variant 193h, 87, ASM_MACH3 1343 00000757 FF <2> endvariant 1344 <2> mne SETNE ; ofs=7C4h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A83 8575 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A85 5345544E45 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1345 00000758 F7CC6C <2> variant 195h, 87, ASM_MACH3 1346 0000075B FF <2> endvariant 1347 <2> mne SETNG ; ofs=7C8h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A8A C575 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A8C 5345544E47 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1348 0000075C F7D0F5 <2> variant 19Eh, 87, ASM_MACH3 1349 0000075F FF <2> endvariant 1350 <2> mne SETNGE ; ofs=7CCh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A91 0676 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A93 5345544E4745 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1351 00000760 F7CFF3 <2> variant 19Ch, 87, ASM_MACH3 1352 00000763 FF <2> endvariant 1353 <2> mne SETNL ; ofs=7D0h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A99 4576 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A9B 5345544E4C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1354 00000764 F7D074 <2> variant 19Dh, 87, ASM_MACH3 1355 00000767 FF <2> endvariant 1356 <2> mne SETNLE ; ofs=7D4h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000AA0 8676 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000AA2 5345544E4C45 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1357 00000768 F7D176 <2> variant 19Fh, 87, ASM_MACH3 1358 0000076B FF <2> endvariant 1359 <2> mne SETNO ; ofs=7D8h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000AA8 C576 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000AAA 5345544E4F <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1360 0000076C F7CA68 <2> variant 191h, 87, ASM_MACH3 1361 0000076F FF <2> endvariant 1362 <2> mne SETNP ; ofs=7DCh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000AAF 0577 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000AB1 5345544E50 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1363 00000770 F7CF72 <2> variant 19Bh, 87, ASM_MACH3 1364 00000773 FF <2> endvariant 1365 <2> mne SETNS ; ofs=7E0h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000AB6 4577 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000AB8 5345544E53 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1366 00000774 F7CE70 <2> variant 199h, 87, ASM_MACH3 1367 00000777 FF <2> endvariant 1368 <2> mne SETNZ ; ofs=7E4h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000ABD 8577 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000ABF 5345544E5A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1369 00000778 F7CC6C <2> variant 195h, 87, ASM_MACH3 1370 0000077B FF <2> endvariant 1371 <2> mne SETO ; ofs=7E8h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000AC4 C477 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000AC6 5345544F <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1372 0000077C F7C9E7 <2> variant 190h, 87, ASM_MACH3 1373 0000077F FF <2> endvariant 1374 <2> mne SETP ; ofs=7ECh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000ACA 0478 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000ACC 53455450 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1375 00000780 F7CEF1 <2> variant 19Ah, 87, ASM_MACH3 1376 00000783 FF <2> endvariant 1377 <2> mne SETPE ; ofs=7F0h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000AD0 4578 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000AD2 5345545045 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1378 00000784 F7CEF1 <2> variant 19Ah, 87, ASM_MACH3 1379 00000787 FF <2> endvariant 1380 <2> mne SETPO ; ofs=7F4h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000AD7 8578 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000AD9 534554504F <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1381 00000788 F7CF72 <2> variant 19Bh, 87, ASM_MACH3 1382 0000078B FF <2> endvariant 1383 <2> mne SETS ; ofs=7F8h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000ADE C478 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000AE0 53455453 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1384 0000078C F7CDEF <2> variant 198h, 87, ASM_MACH3 1385 0000078F FF <2> endvariant 1386 <2> mne SETZ ; ofs=7FCh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000AE4 0479 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000AE6 5345545A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1387 00000790 F7CBEB <2> variant 194h, 87, ASM_MACH3 1388 00000793 FF <2> endvariant 1389 <2> mne SGDT ; ofs=800h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000AEA 4479 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000AEC 53474454 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1390 00000794 F6F44AAD <2> variant AGRP(7,0), 53, ASM_MACH2 1391 00000798 FF <2> endvariant 1392 <2> mne SIDT ; ofs=805h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000AF0 9479 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000AF2 53494454 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1393 00000799 F6F44B2E <2> variant AGRP(7,1), 53, ASM_MACH2 1394 0000079D FF <2> endvariant 1395 <2> mne SHLD ; ofs=80Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000AF6 E479 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000AF8 53484C44 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1396 0000079E F7D3FC <2> variant 1A4h, 88, ASM_MACH3 1397 000007A1 F7D47E <2> variant 1A5h, 89, ASM_MACH3 1398 000007A4 FF <2> endvariant 1399 <2> mne SHRD ; ofs=811h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000AFC 547A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000AFE 53485244 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1400 000007A5 F7D804 <2> variant 1ACh, 88, ASM_MACH3 1401 000007A8 F7D886 <2> variant 1ADh, 89, ASM_MACH3 1402 000007AB FF <2> endvariant 1403 <2> mne SLDT ; ofs=818h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B02 C47A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B04 534C4454 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1404 000007AC F6F44ECE <2> variant AGRP(8,0), 78, ASM_MACH2 1405 000007B0 FF <2> endvariant 1406 <2> mne SMSW ; ofs=81Dh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B08 147B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B0A 534D5357 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1407 000007B1 F6F44CCA <2> variant AGRP(7,4), 78, ASM_MACH2 1408 000007B5 FF <2> endvariant 1409 <2> mne STC ; ofs=822h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B0E 637B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B10 535443 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1410 000007B6 7D79 <2> variant 0F9h, 0 1411 000007B8 FF <2> endvariant 1412 <2> mne STD ; ofs=825h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B13 937B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B15 535444 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1413 000007B9 7F7D <2> variant 0FDh, 0 1414 000007BB FF <2> endvariant 1415 <2> mne STI ; ofs=828h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B18 C37B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B1A 535449 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1416 000007BC 7E7B <2> variant 0FBh, 0 1417 000007BE FF <2> endvariant 1418 <2> mne STOSB ; ofs=82Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B1D F57B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B1F 53544F5342 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1419 000007BF 55AA <2> variant 0AAh, 0 1420 000007C1 FF <2> endvariant 1421 <2> mne STR ; ofs=831h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B24 237C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B26 535452 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1422 000007C2 F6F44F42 <2> variant AGRP(8,1), 65, ASM_MACH2 1423 000007C6 FF <2> endvariant 1424 <2> mne SUB ; ofs=836h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B29 737C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B2B 535542 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1425 000007C7 FBF434D2 <2> variant AGRP(1,5), 5, ASM_LOCKABLE 1426 000007CB 162D <2> variant 02Ch, 1 1427 000007CD FBF438D7 <2> variant AGRP(2,5), 2, ASM_LOCKABLE 1428 000007D1 FB142F <2> variant 028h, 7, ASM_LOCKABLE 1429 000007D4 1534 <2> variant 02Ah, 10 1430 000007D6 FF <2> endvariant 1431 <2> mne SALC ; ofs=846h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B2E 747D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B30 53414C43 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1432 000007D7 F66BD6 <2> variant 0D6h, 0, ASM_MACH2 1433 000007DA FF <2> endvariant 1434 <2> mne SETALC ; ofs=84Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B34 B67D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B36 534554414C43 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1435 000007DB F66BD6 <2> variant 0D6h, 0, ASM_MACH2 1436 000007DE FF <2> endvariant 1437 <2> mne TEST ; ofs=84Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B3C F47D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B3E 54455354 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1438 000007DF 54A9 <2> variant 0A8h, 1 1439 000007E1 F44673 <2> variant AGRP(6,0), 3 1440 000007E4 428C <2> variant 084h, 8 1441 000007E6 428E <2> variant 084h, 10 1442 000007E8 FF <2> endvariant 1443 <2> mne UD0 ; ofs=858h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B42 937E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B44 554430 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1444 000007E9 F5F40D7F <2> variant 1FFh, 0, ASM_MACH1 1445 000007ED FF <2> endvariant 1446 <2> mne UD1 ; ofs=85Dh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B47 E37E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B49 554431 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1447 000007EE F5DE39 <2> variant 1B9h, 0, ASM_MACH1 1448 000007F1 FF <2> endvariant 1449 <2> mne UD2 ; ofs=861h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B4C 237F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B4E 554432 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1450 000007F2 F5868B <2> variant 10Bh, 0, ASM_MACH1 1451 000007F5 FF <2> endvariant 1452 <2> mne VERR ; ofs=865h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B51 647F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B53 56455252 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1453 000007F6 F6F450CE <2> variant AGRP(8,4), 74, ASM_MACH2 1454 000007FA FF <2> endvariant 1455 <2> mne VERW ; ofs=86Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B57 B47F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B59 56455257 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1456 000007FB F6F4514F <2> variant AGRP(8,5), 74, ASM_MACH2 1457 000007FF FF <2> endvariant 1458 <2> mne WAIT ; ofs=86Fh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B5D 0480 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B5F 57414954 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1459 00000800 4E1B <2> variant 09Bh, 0 1460 00000802 FF <2> endvariant 1461 <2> mne WBINVD ; ofs=872h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B63 3680 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B65 5742494E5644 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1462 00000803 F88589 <2> variant 109h, 0, ASM_MACH4 1463 00000806 FF <2> endvariant 1464 <2> mne WRMSR ; ofs=876h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B6B 7580 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B6D 57524D5352 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1465 00000807 F99930 <2> variant 130h, 0, ASM_MACH5 1466 0000080A FF <2> endvariant 1467 <2> mne XADD ; ofs=87Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B72 B480 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B74 58414444 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1468 0000080B FBF8E1C7 <2> variant 1C0h, 7, ASM_LOCKABLE, ASM_MACH4 1469 0000080F FF <2> endvariant 1470 <2> mne XCHG ; ofs=87Fh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B78 0481 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B7A 58434847 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1471 00000810 48EA <2> variant 090h, 90 1472 00000812 48EB <2> variant 090h, 91 1473 00000814 FB438D <2> variant 086h, 7, ASM_LOCKABLE 1474 00000817 FB4392 <2> variant 086h, 12, ASM_LOCKABLE 1475 0000081A FF <2> endvariant 1476 <2> mne XLAT ; ofs=88Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B7E B481 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B80 584C4154 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1477 0000081B 6C57 <2> variant 0D7h, 0 1478 0000081D FF <2> endvariant 1479 <2> mne XLATB ; ofs=88Dh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B84 E581 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B86 584C415442 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1480 0000081E 6C57 <2> variant 0D7h, 0 1481 00000820 FF <2> endvariant 1482 <2> mne XOR ; ofs=890h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B8B 1382 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B8D 584F52 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1483 00000821 FBF43553 <2> variant AGRP(1,6), 5, ASM_LOCKABLE 1484 00000825 1A35 <2> variant 034h, 1 1485 00000827 FBF43958 <2> variant AGRP(2,6), 2, ASM_LOCKABLE 1486 0000082B FB1837 <2> variant 030h, 7, ASM_LOCKABLE 1487 0000082E 193C <2> variant 032h, 10 1488 00000830 FF <2> endvariant 1489 <2> 1490 <2> ; The following mnemonics allow an address size suffix 1491 <2> ; but do not require it. 1492 <2> 1493 <2> mnlist_a_suffix_allowed label near 1494 <2> mnsuffix _ASA 1495 <2> 1496 <2> mne LOOP ; ofs=50Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B90 1483 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B92 4C4F4F50 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1497 00000831 7221 <2> variant 0E2h, 63 1498 00000833 FF <2> endvariant 1499 <2> mne LOOPZ ; ofs=511h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B96 4583 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B98 4C4F4F505A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1500 00000834 71A0 <2> variant 0E1h, 63 1501 00000836 FF <2> endvariant 1502 <2> mne LOOPE ; ofs=514h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B9D 7583 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B9F 4C4F4F5045 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1503 00000837 71A0 <2> variant 0E1h, 63 1504 00000839 FF <2> endvariant 1505 <2> mne LOOPNZ ; ofs=517h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000BA4 A683 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000BA6 4C4F4F504E5A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1506 0000083A 711F <2> variant 0E0h, 63 1507 0000083C FF <2> endvariant 1508 <2> mne LOOPNE ; ofs=51Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000BAC D683 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000BAE 4C4F4F504E45 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1509 0000083D 711F <2> variant 0E0h, 63 1510 0000083F FF <2> endvariant 1511 <2> 1512 <2> ; The following mnemonics allow an operand size suffix 1513 <2> ; but do not require it. 1514 <2> 1515 <2> mnlist_o_suffix_allowed label near 1516 <2> mnsuffix _OSA 1517 <2> 1518 <2> mne ENTER ; ofs=15Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000BB4 0584 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000BB6 454E544552 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1519 00000840 F564EB <2> variant 0C8h, 35, ASM_MACH1 1520 00000843 FF <2> endvariant 1521 <2> mne FLDENV ; ofs=2B9h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000BBB 4684 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000BBD 464C44454E56 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1522 00000844 F41ED4 <2> variant 221h, 51 1523 00000847 FF <2> endvariant 1524 <2> mne FRSTOR ; ofs=2F1h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000BC3 8684 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000BC5 465253544F52 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1525 00000848 F420D8 <2> variant 225h, 51 1526 0000084B FF <2> endvariant 1527 <2> mne FSAVE, ASM_WAIT ; ofs=2F5h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 0000084C FE <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000BCB C584 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000BCD 4653415645 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1528 <2> mne FNSAVE ; ofs=2F6h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000BD2 D684 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000BD4 464E53415645 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1529 0000084D F428EA <2> variant 235h, 53 1530 00000850 FF <2> endvariant 1531 <2> mne FSTENV, ASM_WAIT ; ofs=32Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000851 FE <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000BDA 1685 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000BDC 465354454E56 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1532 <2> mne FNSTENV ; ofs=32Fh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000BE2 2785 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000BE4 464E5354454E56 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1533 00000852 F426E6 <2> variant 231h, 53 1534 00000855 FF <2> endvariant 1535 <2> mne IRET ; ofs=409h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000BEB 6485 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000BED 49524554 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1536 00000856 68CF <2> variant 0CFh, 128 1537 00000858 FF <2> endvariant 1538 <2> mne LEAVE ; ofs=4EEh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000BF1 9585 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000BF3 4C45415645 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1539 00000859 F565C9 <2> variant 0C9h, 128, ASM_MACH1 1540 0000085C FF <2> endvariant 1541 <2> mne POPA ; ofs=6AAh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000BF8 D485 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000BFA 504F5041 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1542 0000085D F53161 <2> variant 061h, 128, ASM_MACH1 1543 00000860 FF <2> endvariant 1544 <2> mne POPF ; ofs=6AEh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000BFE 1486 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000C00 504F5046 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1545 00000861 4F9B <2> variant 09Dh, 126 1546 00000863 FF <2> endvariant 1547 <2> mne PUSH ; ofs=6CBh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000C04 4486 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000C06 50555348 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1548 00000864 F535BA <2> variant 06Ah, 80, ASM_MACH1 1549 00000867 F534B7 <2> variant 068h, 79, ASM_MACH1 1550 0000086A FF <2> endvariant 1551 <2> mne PUSHA ; ofs=6D2h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000C0A B586 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000C0C 5055534841 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1552 0000086B F530E0 <2> variant 060h, 128, ASM_MACH1 1553 0000086E FF <2> endvariant 1554 <2> mne PUSHF ; ofs=6D6h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000C11 F586 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000C13 5055534846 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1555 0000086F 4F1B <2> variant 09Ch, 127 1556 00000871 FF <2> endvariant 1557 <2> mne RETN ; ofs=717h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000C18 2487 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000C1A 5245544E <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1558 00000872 62C1 <2> variant 0C3h, 126 1559 00000874 6216 <2> variant 0C2h, 84 1560 00000876 FF <2> endvariant 1561 <2> mne RET ; ofs=71Ch 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000C1E 7387 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000C20 524554 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1562 00000877 62C1 <2> variant 0C3h, 126 1563 00000879 6216 <2> variant 0C2h, 84 1564 0000087B FF <2> endvariant 1565 <2> mne RETF ; ofs=721h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000C23 C487 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000C25 52455446 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1566 0000087C 66CB <2> variant 0CBh, 128 1567 0000087E 6620 <2> variant 0CAh, 86 1568 00000880 FF <2> endvariant 1569 <2> 1570 <2> ; The following mnemonics require an operand size suffix. 1571 <2> 1572 <2> mnlist_o_suffix_required label near 1573 <2> mnsuffix _OSR 1574 <2> 1575 <2> mne CMPS ; ofs=12Dh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000C29 1488 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000C2B 434D5053 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1576 00000881 5427 <2> variant 0A7h, 0 1577 00000883 FF <2> endvariant 1578 <2> mne INS ; ofs=3E2h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000C2F 4388 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000C31 494E53 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1579 00000884 F536ED <2> variant 06Dh, 0, ASM_MACH1 1580 00000887 FF <2> endvariant 1581 <2> mne LODS ; ofs=50Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000C34 8488 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000C36 4C4F4453 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1582 00000888 572D <2> variant 0ADh, 0 1583 0000088A FF <2> endvariant 1584 <2> mne MOVS ; ofs=657h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000C3A B488 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000C3C 4D4F5653 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1585 0000088B 5325 <2> variant 0A5h, 0 1586 0000088D FF <2> endvariant 1587 <2> mne OUTS ; ofs=694h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000C40 E488 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000C42 4F555453 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1588 0000088E F537EF <2> variant 06Fh, 0, ASM_MACH1 1589 00000891 FF <2> endvariant 1590 <2> mne SCAS ; ofs=785h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000C46 2489 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000C48 53434153 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1591 00000892 582F <2> variant 0AFh, 0 1592 00000894 FF <2> endvariant 1593 <2> mne STOS ; ofs=82Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000C4C 5489 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000C4E 53544F53 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1594 00000895 562B <2> variant 0ABh, 0 1595 00000897 FF <2> endvariant 1596 <2> 1597 <2> end_mnlist label near 1598 <2> 1599 <2> ;--- Disassembler: compressed table of the opcode types. 1600 <2> ;--- If the item has the format OT(xx), it refers to table 'oplists'. 1601 <2> ;--- Otherwise it's an offset for internal table 'disjmp'. 1602 <2> 1603 00000C52 00 <2> align 8, db 0 1604 <2> optypes label byte 1605 00000C58 131316160D0D6874 <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01),OT(5C),OT(68) ; 00 - 07 (main opcode part) 1606 00000C60 131316160D0D6A02 <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01),OT(5E), 002h ; 08 - 0F 1607 00000C68 131316160D0D6C75 <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01),OT(60),OT(69) ; 10 - 17 1608 00000C70 131316160D0D6E76 <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01),OT(62),OT(6A) ; 18 - 1F 1609 00000C78 131316160D0D0A0C <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01), 00Ah,OT(00) ; 20 - 27 1610 00000C80 131316160D0D0A0C <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01), 00Ah,OT(00) ; 28 - 2F 1611 00000C88 131316160D0D0A0C <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01), 00Ah,OT(00) ; 30 - 37 1612 00000C90 141416160D0D0A0C <2> db OT(08),OT(08),OT(0A),OT(0A),OT(01),OT(01), 00Ah,OT(00) ; 38 - 3F 1613 00000C98 2D2D2D2D2D2D2D2D <2> db OT(21),OT(21),OT(21),OT(21),OT(21),OT(21),OT(21),OT(21) ; 40 - 47 1614 00000CA0 2D2D2D2D2D2D2D2D <2> db OT(21),OT(21),OT(21),OT(21),OT(21),OT(21),OT(21),OT(21) ; 48 - 4F 1615 00000CA8 2C2C2C2C2C2C2C2C <2> db OT(20),OT(20),OT(20),OT(20),OT(20),OT(20),OT(20),OT(20) ; 50 - 57 1616 00000CB0 2E2E2E2E2E2E2E2E <2> db OT(22),OT(22),OT(22),OT(22),OT(22),OT(22),OT(22),OT(22) ; 58 - 5F 1617 00000CB8 8C8C871A0A0A0A0A <2> db OT(80),OT(80),OT(7B),OT(0E), 00Ah, 00Ah, 00Ah, 00Ah ; 60 - 67 1618 00000CC0 5B455C430C0C0C0C <2> db OT(4F),OT(39),OT(50),OT(37),OT(00),OT(00),OT(00),OT(00) ; 68 - 6F 1619 00000CC8 4B4B4B4B4B4B4B4B <2> db OT(3F),OT(3F),OT(3F),OT(3F),OT(3F),OT(3F),OT(3F),OT(3F) ; 70 - 77 1620 00000CD0 4B4B4B4B4B4B4B4B <2> db OT(3F),OT(3F),OT(3F),OT(3F),OT(3F),OT(3F),OT(3F),OT(3F) ; 78 - 7F 1621 00000CD8 0404040414141818 <2> db 004h, 004h, 004h, 004h,OT(08),OT(08),OT(0C),OT(0C) ; 80 - 87 1622 00000CE0 151516164E844F04 <2> db OT(09),OT(09),OT(0A),OT(0A),OT(42),OT(78),OT(43), 004h ; 88 - 8F 1623 00000CE8 0C66666666666666 <2> db OT(00),OT(5A),OT(5A),OT(5A),OT(5A),OT(5A),OT(5A),OT(5A) ; 90 - 97 1624 00000CF0 0C0C250C8B8A0C0C <2> db OT(00),OT(00),OT(19),OT(00),OT(7F),OT(7E),OT(00),OT(00) ; 98 - 9F 1625 00000CF8 505051510C0C0C0C <2> db OT(44),OT(44),OT(45),OT(45),OT(00),OT(00),OT(00),OT(00) ; A0 - A7 1626 00000D00 0D0D0C0C0C0C0C0C <2> db OT(01),OT(01),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00) ; A8 - AF 1627 00000D08 5252525252525252 <2> db OT(46),OT(46),OT(46),OT(46),OT(46),OT(46),OT(46),OT(46) ; B0 - B7 1628 00000D10 5353535353535353 <2> db OT(47),OT(47),OT(47),OT(47),OT(47),OT(47),OT(47),OT(47) ; B8 - BF 1629 00000D18 0404608A1B1B0404 <2> db 004h, 004h,OT(54),OT(7E),OT(0F),OT(0F), 004h, 004h ; C0 - C7 1630 00000D20 2F8C628C8C888C8C <2> db OT(23),OT(80),OT(56),OT(80),OT(80),OT(7C),OT(80),OT(80) ; C8 - CF 1631 00000D28 040404044A4A0C0C <2> db 004h, 004h, 004h, 004h,OT(3E),OT(3E),OT(00),OT(00) ; D0 - D7 1632 00000D30 0606060606060606 <2> db 006h, 006h, 006h, 006h, 006h, 006h, 006h, 006h ; D8 - DF 1633 00000D38 4B4B4B4B47475757 <2> db OT(3F),OT(3F),OT(3F),OT(3F),OT(3B),OT(3B),OT(4B),OT(4B) ; E0 - E7 1634 00000D40 2324264B48485858 <2> db OT(17),OT(18),OT(1A),OT(3F),OT(3C),OT(3C),OT(4C),OT(4C) ; E8 - EF 1635 00000D48 0A8C0A0A0C0C0404 <2> db 00Ah,OT(80), 00Ah, 00Ah,OT(00),OT(00), 004h, 004h ; F0 - F7 1636 00000D50 0C0C0C0C0C0C0404 <2> db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00), 004h, 004h ; F8 - FF 1637 00000D58 0E0E0E0E0E0E0E0F <2> db OT(02),OT(02),OT(02),OT(02),OT(02),OT(02),OT(02),OT(03) ; 100 - 107 (Intel group 1) 1638 00000D60 1111111111111112 <2> db OT(05),OT(05),OT(05),OT(05),OT(05),OT(05),OT(05),OT(06) ; 108 - 10F 1639 00000D68 5D5D5D5D5D5D5D5D <2> db OT(51),OT(51),OT(51),OT(51),OT(51),OT(51),OT(51),OT(51) ; 110 - 117 (Intel group 2) 1640 00000D70 5E5E5E5E5E5E5E5E <2> db OT(52),OT(52),OT(52),OT(52),OT(52),OT(52),OT(52),OT(52) ; 118 - 11F 1641 00000D78 5F5F5F5F5F5F5F5F <2> db OT(53),OT(53),OT(53),OT(53),OT(53),OT(53),OT(53),OT(53) ; 120 - 127 (Intel group 2a) 1642 00000D80 0F0F191917171717 <2> db OT(03),OT(03),OT(0D),OT(0D),OT(0B),OT(0B),OT(0B),OT(0B) ; 128 - 12F (Intel group 3) 1643 00000D88 1919852786284C00 <2> db OT(0D),OT(0D),OT(79),OT(1B),OT(7A),OT(1C),OT(40), 000h ; 130 - 137 (Intel group 5) 1644 00000D90 5A4D565656560000 <2> db OT(4E),OT(41),OT(4A),OT(4A),OT(4A),OT(4A), 000h, 000h ; 138 - 13F (Intel group 6) 1645 00000D98 41413F3F5A005640 <2> db OT(35),OT(35),OT(33),OT(33),OT(4E), 000h,OT(4A),OT(34) ; 140 - 147 (Intel group 7) 1646 00000DA0 3030303030303030 <2> db OT(24),OT(24),OT(24),OT(24),OT(24),OT(24),OT(24),OT(24) ; 148 - 14F (Coprocessor d8) 1647 00000DA8 34343E3E34343434 <2> db OT(28),OT(28),OT(32),OT(32),OT(28),OT(28),OT(28),OT(28) ; 150 - 157 1648 00000DB0 300031313F3A413B <2> db OT(24), 000h,OT(25),OT(25),OT(33),OT(2E),OT(35),OT(2F) ; 158 - 15F (Coprocessor d9) 1649 00000DB8 353E080008080808 <2> db OT(29),OT(32), 008h, 000h, 008h, 008h, 008h, 008h ; 160 - 167 1650 00000DC0 3838383838383838 <2> db OT(2C),OT(2C),OT(2C),OT(2C),OT(2C),OT(2C),OT(2C),OT(2C) ; 168 - 16F (Coprocessor da) 1651 00000DC8 3434343400080000 <2> db OT(28),OT(28),OT(28),OT(28), 000h, 008h, 000h, 000h ; 170 - 177 1652 00000DD0 38003939003C003D <2> db OT(2C), 000h,OT(2D),OT(2D), 000h,OT(30), 000h,OT(31) ; 178 - 17F (Coprocessor db) 1653 00000DD8 34343434083E3E00 <2> db OT(28),OT(28),OT(28),OT(28), 008h,OT(32),OT(32), 000h ; 180 - 187 1654 00000DE0 3232323232323232 <2> db OT(26),OT(26),OT(26),OT(26),OT(26),OT(26),OT(26),OT(26) ; 188 - 18F (Coprocessor dc) 1655 00000DE8 3737000037373737 <2> db OT(2B),OT(2B), 000h, 000h,OT(2B),OT(2B),OT(2B),OT(2B) ; 190 - 197 1656 00000DF0 320033333F00413B <2> db OT(26), 000h,OT(27),OT(27),OT(33), 000h,OT(35),OT(2F) ; 198 - 19F (Coprocessor dd) 1657 00000DF8 350035353E3E0000 <2> db OT(29), 000h,OT(29),OT(29),OT(32),OT(32), 000h, 000h ; 1A0 - 1A7 1658 00000E00 3A3A3A3A3A3A3A3A <2> db OT(2E),OT(2E),OT(2E),OT(2E),OT(2E),OT(2E),OT(2E),OT(2E) ; 1A8 - 1AF (Coprocessor de) 1659 00000E08 3636000836363636 <2> db OT(2A),OT(2A), 000h, 008h,OT(2A),OT(2A),OT(2A),OT(2A) ; 1B0 - 1B7 1660 00000E10 3A003B3B3C2A3D2B <2> db OT(2E), 000h,OT(2F),OT(2F),OT(30),OT(1E),OT(31),OT(1F) ; 1B8 - 1BF (Coprocessor df) 1661 00000E18 00000000083E3E00 <2> db 000h, 000h, 000h, 000h, 008h,OT(32),OT(32), 000h ; 1C0 - 1C7 1662 00000E20 0C0C0C0C0C0C0C00 <2> db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00), 000h ; 1C8 - 1CF (Coprocessor groups) 1663 00000E28 0C0C0C0C0C0C0C0C <2> db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00) ; 1D0 - 1D7 1664 00000E30 0C0C0C0C0C0C0C0C <2> db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00) ; 1D8 - 1DF 1665 <2> ;--- The rest of these are squeezed. 1666 00000E38 0004041C1C0C0C0C <2> db 0, 004h, 004h,OT(10),OT(10),OT(00),OT(00),OT(00) ; 00 1667 00000E40 0C797B7A7C7D7E0C <2> db OT(00),OT(6D),OT(6F),OT(6E),OT(70),OT(71),OT(72),OT(00) ; 08 1668 00000E48 0C0C1C1C1C1C1C1C <2> db OT(00),OT(00),OT(10),OT(10),OT(10),OT(10),OT(10),OT(10) ; 10 1669 00000E50 1C1C1C1C1C1C1C1C <2> db OT(10),OT(10),OT(10),OT(10),OT(10),OT(10),OT(10),OT(10) ; 18 1670 00000E58 1C1C818181818181 <2> db OT(10),OT(10),OT(75),OT(75),OT(75),OT(75),OT(75),OT(75) ; 20 1671 00000E60 8181818181817F81 <2> db OT(75),OT(75),OT(75),OT(75),OT(75),OT(75),OT(73),OT(75) ; 28 1672 00000E68 0404048181810C80 <2> db 004h, 004h, 004h,OT(75),OT(75),OT(75),OT(00),OT(74) ; 30 1673 00000E70 8224242424242424 <2> db OT(76),OT(18),OT(18),OT(18),OT(18),OT(18),OT(18),OT(18) ; 38 1674 00000E78 2424242424242424 <2> db OT(18),OT(18),OT(18),OT(18),OT(18),OT(18),OT(18),OT(18) ; 40 1675 00000E80 2463636363636363 <2> db OT(18),OT(57),OT(57),OT(57),OT(57),OT(57),OT(57),OT(57) ; 48 1676 00000E88 6363636363636363 <2> db OT(57),OT(57),OT(57),OT(57),OT(57),OT(57),OT(57),OT(57) ; 50 1677 00000E90 6370770C1F646572 <2> db OT(57),OT(64),OT(6B),OT(00),OT(13),OT(58),OT(59),OT(66) ; 58 1678 00000E98 780C1E64651C1313 <2> db OT(6C),OT(00),OT(12),OT(58),OT(59),OT(10),OT(07),OT(07) ; 60 1679 00000EA0 1B1E1B1B54550C04 <2> db OT(0F),OT(12),OT(0F),OT(0F),OT(48),OT(49),OT(00), 004h ; 68 1680 00000EA8 1E1C1C5455131304 <2> db OT(12),OT(10),OT(10),OT(48),OT(49),OT(07),OT(07), 004h ; 70 1681 00000EB0 1D1D1D1D1D1D1D1D <2> db OT(11),OT(11),OT(11),OT(11),OT(11),OT(11),OT(11),OT(11) ; 78 1682 00000EB8 8181818181818181 <2> db OT(75),OT(75),OT(75),OT(75),OT(75),OT(75),OT(75),OT(75) ; 80 1683 00000EC0 8181818181818181 <2> db OT(75),OT(75),OT(75),OT(75),OT(75),OT(75),OT(75),OT(75) ; 88 1684 00000EC8 8181818181818181 <2> db OT(75),OT(75),OT(75),OT(75),OT(75),OT(75),OT(75),OT(75) ; 90 1685 00000ED0 81818181810C1919 <2> db OT(75),OT(75),OT(75),OT(75),OT(75),OT(00),OT(0D),OT(0D) ; 98 1686 00000ED8 6122202020295910 <2> db OT(55),OT(16),OT(14),OT(14),OT(14),OT(1D),OT(4D),OT(04) ; A0 1687 00000EE0 8383838383838383 <2> db OT(77),OT(77),OT(77),OT(77),OT(77),OT(77),OT(77),OT(77) ; A8 1688 00000EE8 0C0C0C0C0C0C0C0C <2> db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00) ; B0 1689 00000EF0 0C0C0C0C42 <2> db OT(00),OT(00),OT(00),OT(00),OT(36) 1690 <2> 1691 <2> P186 equ 1000h 1692 <2> P286 equ 2000h 1693 <2> P386 equ 3000h 1694 <2> P486 equ 4000h 1695 <2> P586 equ 5000h 1696 <2> P686 equ 6000h 1697 <2> 1698 <2> ;--- Disassembler: compressed table of additional information. 1699 <2> ;--- Bits 0-11 usually are the offset of the mnemonics table. 1700 <2> ;--- Bits 12-15 are the CPU which introduced this opcode. 1701 <2> 1702 00000EF5 00 <2> align 2, db 0 1703 <2> opinfo label word 1704 00000EF6 3600360036003600 <2> dw MN_ADD, MN_ADD, MN_ADD, MN_ADD ; 00 1705 00000EFE 36003600F507F007 <2> dw MN_ADD, MN_ADD, MN_PUSH, MN_POP ; 04 1706 00000F06 DB07DB07DB07DB07 <2> dw MN_OR, MN_OR, MN_OR, MN_OR ; 08 1707 00000F0E DB07DB07F507E001 <2> dw MN_OR, MN_OR, MN_PUSH, 01E0h ; 0C 1708 00000F16 3100310031003100 <2> dw MN_ADC, MN_ADC, MN_ADC, MN_ADC ; 10 1709 00000F1E 31003100F507F007 <2> dw MN_ADC, MN_ADC, MN_PUSH, MN_POP ; 14 1710 00000F26 7808780878087808 <2> dw MN_SBB, MN_SBB, MN_SBB, MN_SBB ; 18 1711 00000F2E 78087808F507F007 <2> dw MN_SBB, MN_SBB, MN_PUSH, MN_POP ; 1C 1712 00000F36 3B003B003B003B00 <2> dw MN_AND, MN_AND, MN_AND, MN_AND ; 20 1713 00000F3E 3B003B000100B701 <2> dw MN_AND, MN_AND, 0001h, MN_DAA ; 24 1714 00000F46 8F098F098F098F09 <2> dw MN_SUB, MN_SUB, MN_SUB, MN_SUB ; 28 1715 00000F4E 8F098F090101BC01 <2> dw MN_SUB, MN_SUB, 0101h, MN_DAS ; 2C 1716 00000F56 F109F109F109F109 <2> dw MN_XOR, MN_XOR, MN_XOR, MN_XOR ; 30 1717 00000F5E F109F10901021D00 <2> dw MN_XOR, MN_XOR, 0201h, MN_AAA ; 34 1718 00000F66 8601860186018601 <2> dw MN_CMP, MN_CMP, MN_CMP, MN_CMP ; 38 1719 00000F6E 8601860101032C00 <2> dw MN_CMP, MN_CMP, 0301h, MN_AAS ; 3C 1720 00000F76 D104D104D104D104 <2> dw MN_INC, MN_INC, MN_INC, MN_INC ; 40 1721 00000F7E D104D104D104D104 <2> dw MN_INC, MN_INC, MN_INC, MN_INC ; 44 1722 00000F86 C901C901C901C901 <2> dw MN_DEC, MN_DEC, MN_DEC, MN_DEC ; 48 1723 00000F8E C901C901C901C901 <2> dw MN_DEC, MN_DEC, MN_DEC, MN_DEC ; 4C 1724 00000F96 F507F507F507F507 <2> dw MN_PUSH, MN_PUSH, MN_PUSH, MN_PUSH ; 50 1725 00000F9E F507F507F507F507 <2> dw MN_PUSH, MN_PUSH, MN_PUSH, MN_PUSH ; 54 1726 00000FA6 F007F007F007F007 <2> dw MN_POP, MN_POP, MN_POP, MN_POP ; 58 1727 00000FAE F007F007F007F007 <2> dw MN_POP, MN_POP, MN_POP, MN_POP ; 5C 1728 00000FB6 701A5E1A46104020 <2> dw P186 + MN_PUSHA_OSA, P186 + MN_POPA_OSA, P186 + MN_BOUND, P286 + MN_ARPL ; 60 1729 00000FBE 0134013510302030 <2> dw P386 + 0401h, P386 + 0501h, P386 + 0010h, P386 + 0020h ; 64 1730 00000FC6 6A1AC7146A1AC714 <2> dw P186 + MN_PUSH_OSA, P186 + MN_IMUL, P186 + MN_PUSH_OSA, P186 + MN_IMUL ; 68 1731 00000FCE D614951AE917A61A <2> dw P186 + MN_INSB, P186 + MN_INS_OSR, P186 + MN_OUTSB, P186 + MN_OUTS_OSR ; 6C 1732 00000FD6 990585051F051A05 <2> dw MN_JO, MN_JNO, MN_JB, MN_JAE ; 70 1733 00000FDE AF05940523051605 <2> dw MN_JZ, MN_JNZ, MN_JBE, MN_JA ; 74 1734 00000FE6 AB058F05A105A605 <2> dw MN_JS, MN_JNS, MN_JPE, MN_JPO ; 78 1735 00000FEE 460541054A053D05 <2> dw MN_JL, MN_JGE, MN_JLE, MN_JG ; 7C 1736 00000FF6 0001000100010801 <2> dw 0100h, 0100h, 0100h, 0108h ; 80 1737 00000FFE A209A209DE09DE09 <2> dw MN_TEST, MN_TEST, MN_XCHG, MN_XCHG ; 84 1738 00001006 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; 88 1739 0000100E 3406DC053406F802 <2> dw MN_MOV, MN_LEA, MN_MOV, 02F8h ; 8C 1740 00001016 D107DE09DE09DE09 <2> dw MN_NOP, MN_XCHG, MN_XCHG, MN_XCHG ; 90 1741 0000101E DE09DE09DE09DE09 <2> dw MN_XCHG, MN_XCHG, MN_XCHG, MN_XCHG ; 94 1742 00001026 7700AD017100C309 <2> dw MN_CBW, MN_CWD, MN_CALL, MN_WAIT ; 98 1743 0000102E 770A640A4108B805 <2> dw MN_PUSHF_OSA, MN_POPF_OSA, MN_SAHF, MN_LAHF ; 9C 1744 00001036 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; A0 1745 0000103E B207A00A8B018F0A <2> dw MN_MOVSB, MN_MOVS_OSR, MN_CMPSB, MN_CMPS_OSR ; A4 1746 00001046 A209A2098309B20A <2> dw MN_TEST, MN_TEST, MN_STOSB, MN_STOS_OSR ; A8 1747 0000104E FF059A0A7D08AC0A <2> dw MN_LODSB, MN_LODS_OSR, MN_SCASB, MN_SCAS_OSR ; AC 1748 00001056 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; B0 1749 0000105E 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; B4 1750 00001066 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; B8 1751 0000106E 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; BC 1752 00001076 200120017E0A7E0A <2> dw 0120h, 0120h, MN_RETN_OSA, MN_RETN_OSA ; C0 1753 0000107E CD05C30500030003 <2> dw MN_LES, MN_LDS, 0300h, 0300h ; C4 1754 00001086 1A1A571A890A890A <2> dw P186 + MN_ENTER_OSA, P186 + MN_LEAVE_OSA, MN_RETF_OSA, MN_RETF_OSA ; C8 1755 0000108E F504DC040205510A <2> dw MN_INT3, MN_INT, MN_INTO, MN_IRET_OSA ; CC 1756 00001096 1001100118011801 <2> dw 0110h, 0110h, 0118h, 0118h ; D0 1757 0000109E 270022009A29EA09 <2> dw MN_AAM, MN_AAD, P286 + MN_SETALC, MN_XLATB ; D4 1758 000010A6 4801580168017801 <2> dw 0148h, 0158h, 0168h, 0178h ; D8 1759 000010AE 88019801A801B801 <2> dw 0188h, 0198h, 01A8h, 01B8h ; DC 1760 000010B6 0A0AFC09F6092C05 <2> dw MN_LOOPNZ_ASA, MN_LOOPZ_ASA, MN_LOOP_ASA, MN_JCXZ ; E0 1761 000010BE CD04CD04E407E407 <2> dw MN_IN, MN_IN, MN_OUT, MN_OUT ; E4 1762 000010C6 7100B305B305B305 <2> dw MN_CALL, MN_JMP, MN_JMP, MN_JMP ; E8 1763 000010CE CD04CD04E407E407 <2> dw MN_IN, MN_IN, MN_OUT, MN_OUT ; EC 1764 000010D6 0800E16402000600 <2> dw 0008h, P686 + MN_INT1, 0002h, 0006h ; F0 1765 000010DE BC04970028012801 <2> dw MN_HLT, MN_CMC, 0128h, 0128h ; F4 1766 000010E6 820074098C007E09 <2> dw MN_CLC, MN_STC, MN_CLI, MN_STI ; F8 1767 000010EE 87007909E0023001 <2> dw MN_CLD, MN_STD, 02E0h, 0130h ; FC 1768 000010F6 3600DB0731007808 <2> dw MN_ADD, MN_OR, MN_ADC, MN_SBB ; 100 1769 000010FE 3B008F09F1098601 <2> dw MN_AND, MN_SUB, MN_XOR, MN_CMP ; 104 1770 00001106 3600DB0731007808 <2> dw MN_ADD, MN_OR, MN_ADC, MN_SBB ; 108 1771 0000110E 3B008F09F1098601 <2> dw MN_AND, MN_SUB, MN_XOR, MN_CMP ; 10C 1772 00001116 05080A08FB070008 <2> dw MN_ROL, MN_ROR, MN_RCL, MN_RCR ; 110 1773 0000111E 6E0873086E084C08 <2> dw MN_SHL, MN_SHR, MN_SHL, MN_SAR ; 114 1774 00001126 05080A08FB070008 <2> dw MN_ROL, MN_ROR, MN_RCL, MN_RCR ; 118 1775 0000112E 6E0873086E084C08 <2> dw MN_SHL, MN_SHR, MN_SHL, MN_SAR ; 11C 1776 00001136 05180A18FB170018 <2> dw P186 + MN_ROL, P186 + MN_ROR, P186 + MN_RCL, P186 + MN_RCR ; 120 1777 0000113E 6E1873186E184C18 <2> dw P186 + MN_SHL, P186 + MN_SHR, P186 + MN_SHL, P186 + MN_SAR ; 124 1778 00001146 A209A209D607CC07 <2> dw MN_TEST, MN_TEST, MN_NOT, MN_NEG ; 128 1779 0000114E C707C704CE01C104 <2> dw MN_MUL, MN_IMUL, MN_DIV, MN_IDIV ; 12C 1780 00001156 D104C90171007100 <2> dw MN_INC, MN_DEC, MN_CALL, MN_CALL ; 130 1781 0000115E B305B305F5070000 <2> dw MN_JMP, MN_JMP, MN_PUSH, 0000h ; 134 1782 00001166 68298A29ED252F26 <2> dw P286 + MN_SLDT, P286 + MN_STR, P286 + MN_LLDT, P286 + MN_LTR ; 138 1783 0000116E B729BD2900000000 <2> dw P286 + MN_VERR, P286 + MN_VERW, 0000h, 0000h ; 13C 1784 00001176 50295629E125E725 <2> dw P286 + MN_SGDT, P286 + MN_SIDT, P286 + MN_LGDT, P286 + MN_LIDT ; 140 1785 0000117E 6E290000F3250E45 <2> dw P286 + MN_SMSW, 0000h, P286 + MN_LMSW, P486 + MN_INVLPG ; 144 1786 00001186 EA019D039B02B002 <2> dw MN_FADD, MN_FMUL, MN_FCOM, MN_FCOMP ; 148 1787 0000118E 36044A04DD02F102 <2> dw MN_FSUB, MN_FSUBR, MN_FDIV, MN_FDIVR ; 14C 1788 00001196 EA019D039B02B002 <2> dw MN_FADD, MN_FMUL, MN_FCOM, MN_FCOMP ; 150 1789 0000119E 36044A04DD02F102 <2> dw MN_FSUB, MN_FSUBR, MN_FDIV, MN_FDIVR ; 154 1790 000011A6 560300000D041204 <2> dw MN_FLD, 0000h, MN_FST, MN_FSTP ; 158 1791 000011AE 210A9503480A1F04 <2> dw MN_FLDENV_OSA, MN_FNLDCW, MN_FNSTENV_OSA, MN_FNSTCW ; 15C 1792 000011B6 56039D0420030000 <2> dw MN_FLD, MN_FXCH, 0320h, 0000h ; 160 1793 000011BE 2803C801D001D801 <2> dw 0328h, 01C8h, 01D0h, 01D8h ; 164 1794 000011C6 F701AA031C032303 <2> dw MN_FIADD, MN_FIMUL, MN_FICOM, MN_FICOMP ; 168 1795 000011CE 43045904EA020003 <2> dw MN_FISUB, MN_FISUBR, MN_FIDIV, MN_FIDIVR ; 16C 1796 000011D6 3162426239628B62 <2> dw P686 + MN_FCMOVB, P686 + MN_FCMOVE, P686 + MN_FCMOVBE, P686 + MN_FCMOVU ; 170 1797 000011DE 0000300300000000 <2> dw 0000h, 0330h, 0000h, 0000h ; 174 1798 000011E6 2B03000049034F03 <2> dw MN_FILD, 0000h, MN_FIST, MN_FISTP ; 178 1799 000011EE 0000560300001204 <2> dw 0000h, MN_FLD, 0000h, MN_FSTP ; 17C 1800 000011F6 5D62706266627962 <2> dw P686 + MN_FCMOVNB, P686 + MN_FCMOVNE, P686 + MN_FCMOVNBE, P686 + MN_FCMOVNU ; 180 1801 000011FE 38036E64A1620000 <2> dw 0338h, P686 + MN_FUCOMI, P686 + MN_FCOMI, 0000h ; 184 1802 00001206 EA019D039B02B002 <2> dw MN_FADD, MN_FMUL, MN_FCOM, MN_FCOMP ; 188 1803 0000120E 36044A04DD02F102 <2> dw MN_FSUB, MN_FSUBR, MN_FDIV, MN_FDIVR ; 18C 1804 00001216 EA019D0300000000 <2> dw MN_FADD, MN_FMUL, 0000h, 0000h ; 190 1805 0000121E 4A043604F102DD02 <2> dw MN_FSUBR, MN_FSUB, MN_FDIVR, MN_FDIV ; 194 1806 00001226 560300000D041204 <2> dw MN_FLD, 0000h, MN_FST, MN_FSTP ; 198 1807 0000122E 290A0000380A2E04 <2> dw MN_FRSTOR_OSA, 0000h, MN_FNSAVE_OSA, MN_FNSTSW ; 19C 1808 00001236 150300000D041204 <2> dw MN_FFREE, 0000h, MN_FST, MN_FSTP ; 1A0 1809 0000123E 67347F3400000000 <2> dw P386 + MN_FUCOM, P386 + MN_FUCOMP, 0000h, 0000h ; 1A4 1810 00001246 F701AA031C032303 <2> dw MN_FIADD, MN_FIMUL, MN_FICOM, MN_FICOMP ; 1A8 1811 0000124E 43045904EA020003 <2> dw MN_FISUB, MN_FISUBR, MN_FIDIV, MN_FIDIVR ; 1AC 1812 00001256 F001A30300004003 <2> dw MN_FADDP, MN_FMULP, 0000h, 0340h ; 1B0 1813 0000125E 51043C04F802E302 <2> dw MN_FSUBRP, MN_FSUBP, MN_FDIVRP, MN_FDIVP ; 1B4 1814 00001266 2B03000049034F03 <2> dw MN_FILD, 0000h, MN_FIST, MN_FISTP ; 1B8 1815 0000126E FE012B0304024F03 <2> dw MN_FBLD, MN_FILD, MN_FBSTP, MN_FISTP ; 1BC 1816 00001276 0000000000000000 <2> dw 0000h, 0000h, 0000h, 0000h ; 1C0 1817 0000127E 48037664A8620000 <2> dw 0348h, P686 + MN_FUCOMIP, P686 + MN_FCOMIP, 0000h ; 1C4 1818 00001286 5B03610369037103 <2> dw MN_FLD1, MN_FLDL2T, MN_FLDL2E, MN_FLDPI ; 1C8 1819 0000128E 7803800388030000 <2> dw MN_FLDLG2, MN_FLDLN2, MN_FLDZ, 0000h ; 1CC 1820 00001296 DD01AC04CE03B703 <2> dw MN_F2XM1, MN_FYL2X, MN_FPTAN, MN_FPATAN ; 1D0 1821 0000129E A304C633C5023103 <2> dw MN_FXTRACT, P386 + MN_FPREM1, MN_FDECSTP, MN_FINCSTP ; 1D4 1822 000012A6 BF03B3040604FD33 <2> dw MN_FPREM, MN_FYL2XP1, MN_FSQRT, P386 + MN_FSINCOS ; 1D8 1823 000012AE D503DE03F733BF32 <2> dw MN_FRNDINT, MN_FSCALE, P386 + MN_FSIN, P386 + MN_FCOS ; 1DC 1824 <2> ;--- The rest of these are squeezed. 1825 000012B6 000038014001BE25 <2> dw 0, 0138h, 0140h, P286 + MN_LAR ; 00 1826 000012BE 2A2691200845C949 <2> dw P286 + MN_LSL, P286 + MN_CLTS, P486 + MN_INVD, P486 + MN_WBINVD ; 04 1827 000012C6 B219343634363436 <2> dw P186 + MN_UD2, P386 + MN_MOV, P386 + MN_MOV, P386 + MN_MOV ; 08 1828 000012CE 343634363436D159 <2> dw P386 + MN_MOV, P386 + MN_MOV, P386 + MN_MOV, P586 + MN_WRMSR ; 0C 1829 000012D6 16580F585A613A61 <2> dw P586 + MN_RDTSC, P586 + MN_RDMSR, P686 + MN_CMOVO, P686 + MN_CMOVNO ; 10 1830 000012DE AB60A3607F615261 <2> dw P686 + MN_CMOVB, P686 + MN_CMOVAE, P686 + MN_CMOVZ, P686 + MN_CMOVNZ ; 14 1831 000012E6 B2609C6078614A61 <2> dw P686 + MN_CMOVBE, P686 + MN_CMOVA, P686 + MN_CMOVS, P686 + MN_CMOVNS ; 18 1832 000012EE 68617061D760CF60 <2> dw P686 + MN_CMOVPE, P686 + MN_CMOVPO, P686 + MN_CMOVL, P686 + MN_CMOVGE ; 1C 1833 000012F6 DE60C8608B579657 <2> dw P686 + MN_CMOVLE, P686 + MN_CMOVG, P586 + MN_PUNPCKLBW, P586 + MN_PUNPCKLWD ; 20 1834 000012FE A1574F56C256CB56 <2> dw P586 + MN_PUNPCKLDQ, P586 + MN_PACKSSWB, P586 + MN_PCMPGTB, P586 + MN_PCMPGTW ; 24 1835 00001306 D45659566A577557 <2> dw P586 + MN_PCMPGTD, P586 + MN_PACKUSWB, P586 + MN_PUNPCKHBW, P586 + MN_PUNPCKHWD ; 28 1836 0000130E 8057455639563F56 <2> dw P586 + MN_PUNPCKHDQ, P586 + MN_PACKSSDW, P586 + MN_MOVD, P586 + MN_MOVQ ; 2C 1837 00001316 080310031803A756 <2> dw 0308h, 0310h, 0318h, P586 + MN_PCMPEQB ; 30 1838 0000131E B056B956D7513956 <2> dw P586 + MN_PCMPEQW, P586 + MN_PCMPEQD, P586 + MN_EMMS, P586 + MN_MOVD ; 34 1839 00001326 3F56993585351F35 <2> dw P586 + MN_MOVQ, P386 + MN_JO, P386 + MN_JNO, P386 + MN_JB ; 38 1840 0000132E 1A35AF3594352335 <2> dw P386 + MN_JAE, P386 + MN_JZ, P386 + MN_JNZ, P386 + MN_JBE ; 3C 1841 00001336 1635AB358F35A135 <2> dw P386 + MN_JA, P386 + MN_JS, P386 + MN_JNS, P386 + MN_JPE ; 40 1842 0000133E A635463541354A35 <2> dw P386 + MN_JPO, P386 + MN_JL, P386 + MN_JGE, P386 + MN_JLE ; 44 1843 00001346 3D352A390E399138 <2> dw P386 + MN_JG, P386 + MN_SETO, P386 + MN_SETNO, P386 + MN_SETB ; 48 1844 0000134E 8A384A3923399738 <2> dw P386 + MN_SETAE, P386 + MN_SETZ, P386 + MN_SETNZ, P386 + MN_SETBE ; 4C 1845 00001356 843844391C393639 <2> dw P386 + MN_SETA, P386 + MN_SETS, P386 + MN_SETNS, P386 + MN_SETPE ; 50 1846 0000135E 3D39B738B038BD38 <2> dw P386 + MN_SETPO, P386 + MN_SETL, P386 + MN_SETGE, P386 + MN_SETLE ; 54 1847 00001366 AA38F537F037A651 <2> dw P386 + MN_SETG, P386 + MN_PUSH, P386 + MN_POP, P586 + MN_CPUID ; 58 1848 0000136E 5E305C395C39F537 <2> dw P386 + MN_BT, P386 + MN_SHLD, P386 + MN_SHLD, P386 + MN_PUSH ; 5C 1849 00001376 F0373C586C306239 <2> dw P386 + MN_POP, P586 + MN_RSM, P386 + MN_BTS, P386 + MN_SHRD ; 60 1850 0000137E 6239C73492419241 <2> dw P386 + MN_SHRD, P386 + MN_IMUL, P486 + MN_CMPXCHG, P486 + MN_CMPXCHG ; 64 1851 00001386 C8356730D235D735 <2> dw P386 + MN_LSS, P386 + MN_BTR, P386 + MN_LFS, P386 + MN_LGS ; 68 1852 0000138E C037C037AD19E802 <2> dw P386 + MN_MOVZX, P386 + MN_MOVZX, P186 + MN_UD1, 02E8h ; 6C 1853 00001396 62304D305230B937 <2> dw P386 + MN_BTC, P386 + MN_BSF, P386 + MN_BSR, P386 + MN_MOVSX ; 70 1854 0000139E B937D849D849F002 <2> dw P386 + MN_MOVSX, P486 + MN_XADD, P486 + MN_XADD, 02F0h ; 74 1855 000013A6 5740574057405740 <2> dw P486 + MN_BSWAP, P486 + MN_BSWAP, P486 + MN_BSWAP, P486 + MN_BSWAP ; 78 1856 000013AE 5740574057405740 <2> dw P486 + MN_BSWAP, P486 + MN_BSWAP, P486 + MN_BSWAP, P486 + MN_BSWAP ; 7C 1857 000013B6 1E5725572C57EE56 <2> dw P586 + MN_PSRLW, P586 + MN_PSRLD, P586 + MN_PSRLQ, P586 + MN_PMULLW ; 80 1858 000013BE 585761579A568856 <2> dw P586 + MN_PSUBUSB, P586 + MN_PSUBUSW, P586 + MN_PAND, P586 + MN_PADDUSB ; 84 1859 000013C6 9156A05610571757 <2> dw P586 + MN_PADDUSW, P586 + MN_PANDN, P586 + MN_PSRAW, P586 + MN_PSRAD ; 88 1860 000013CE E65648575057F656 <2> dw P586 + MN_PMULHW, P586 + MN_PSUBSB, P586 + MN_PSUBSW, P586 + MN_POR ; 8C 1861 000013D6 78568056AC57FB56 <2> dw P586 + MN_PADDSB, P586 + MN_PADDSW, P586 + MN_PXOR, P586 + MN_PSLLW ; 90 1862 000013DE 02570957DD563357 <2> dw P586 + MN_PSLLD, P586 + MN_PSLLQ, P586 + MN_PMADDWD, P586 + MN_PSUBB ; 94 1863 000013E6 3A57415763566A56 <2> dw P586 + MN_PSUBW, P586 + MN_PSUBD, P586 + MN_PADDB, P586 + MN_PADDW ; 98 1864 000013EE 7156A819D104C901 <2> dw P586 + MN_PADDD, P186 + MN_UD0, MN_INC, MN_DEC ; 9C 1865 000013F6 16005E306C306730 <2> dw MN_BOXCB, P386 + MN_BT, P386 + MN_BTS, P386 + MN_BTR ; A0 1866 000013FE 62309B51F0073406 <2> dw P386 + MN_BTC, P586 + MN_CMPXCHG8B, MN_POP, MN_MOV ; A4 1867 00001406 1E571057FB562557 <2> dw P586 + MN_PSRLW, P586 + MN_PSRAW, P586 + MN_PSLLW, P586 + MN_PSRLD ; A8 1868 0000140E 175702572C570957 <2> dw P586 + MN_PSRAD, P586 + MN_PSLLD, P586 + MN_PSRLQ, P586 + MN_PSLLQ ; AC 1869 00001416 B1030B02E4016104 <2> dw MN_FNOP, MN_FCHS, MN_FABS, MN_FTST ; B0 1870 0000141E 970487340E03D502 <2> dw MN_FXAM, P386 + MN_FUCOMPP, MN_FNENI, MN_FNDISI ; B4 1871 00001426 18024103EE23B702 <2> dw MN_FNCLEX, MN_FNINIT, P286 + MN_FNSETPM, MN_FCOMPP ; B8 1872 0000142E 2E04 <2> dw MN_FNSTSW 1873 <2> 1874 <2> ;--- Disassembler: table converts unsqueezed numbers to squeezed. 1875 <2> 1876 <2> align 8, db 0 1877 <2> sqztab label byte 1878 00001430 0102030400000500 <2> db 1, 2, 3, 4, 0, 0, 5, 0 ; 1E0 1879 00001438 0607000800000000 <2> db 6, 7, 0, 8, 0, 0, 0, 0 ; 1E8 1880 00001440 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 1F0 1881 00001448 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 1F8 1882 00001450 090A0B0C0D000E00 <2> db 9, 10, 11, 12, 13, 0, 14, 0 ; 200 1883 00001458 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 208 1884 00001460 0F10110000000000 <2> db 15, 16, 17, 0, 0, 0, 0, 0 ; 210 1885 00001468 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 218 1886 00001470 1213141516171819 <2> db 18, 19, 20, 21, 22, 23, 24, 25 ; 220 1887 00001478 1A1B1C1D1E1F2021 <2> db 26, 27, 28, 29, 30, 31, 32, 33 ; 228 1888 00001480 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 230 1889 00001488 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 238 1890 00001490 2223242526272829 <2> db 34, 35, 36, 37, 38, 39, 40, 41 ; 240 1891 00001498 2A2B2C2D00002E2F <2> db 42, 43, 44, 45, 0, 0, 46, 47 ; 248 1892 000014A0 0030313233343536 <2> db 0, 48, 49, 50, 51, 52, 53, 54 ; 250 1893 000014A8 0000000000003738 <2> db 0, 0, 0, 0, 0, 0, 55, 56 ; 258 1894 000014B0 393A3B3C3D3E3F40 <2> db 57, 58, 59, 60, 61, 62, 63, 64 ; 260 1895 000014B8 4142434445464748 <2> db 65, 66, 67, 68, 69, 70, 71, 72 ; 268 1896 000014C0 494A4B4C4D4E4F50 <2> db 73, 74, 75, 76, 77, 78, 79, 80 ; 270 1897 000014C8 5152535455565758 <2> db 81, 82, 83, 84, 85, 86, 87, 88 ; 278 1898 000014D0 595A5B5C5D5E0000 <2> db 89, 90, 91, 92, 93, 94, 0, 0 ; 280 1899 000014D8 5F60616263640065 <2> db 95, 96, 97, 98, 99,100, 0,101 ; 288 1900 000014E0 666768696A6B6C6D <2> db 102,103,104,105,106,107,108,109 ; 290 1901 000014E8 006E6F7071727374 <2> db 0,110,111,112,113,114,115,116 ; 298 1902 000014F0 7576000000000077 <2> db 117,118, 0, 0, 0, 0, 0,119 ; 2A0 1903 000014F8 78797A7B7C7D7E7F <2> db 120,121,122,123,124,125,126,127 ; 2A8 1904 00001500 0080818200830000 <2> db 0,128,129,130, 0,131, 0, 0 ; 2B0 1905 00001508 8485008687880089 <2> db 132,133, 0,134,135,136, 0,137 ; 2B8 1906 00001510 008A8B00008C0000 <2> db 0,138,139, 0, 0,140, 0, 0 ; 2C0 1907 00001518 8D8E008F90910092 <2> db 141,142, 0,143,144,145, 0,146 ; 2C8 1908 00001520 0093949500960000 <2> db 0,147,148,149, 0,150, 0, 0 ; 2D0 1909 00001528 979899009A9B9C9D <2> db 151,152,153, 0,154,155,156,157 ; 2D8 1910 00001530 9E9F0000000000A0 <2> db 158,159, 0, 0, 0, 0, 0,160 ; 2E0 1911 00001538 00000000A1A2A3A4 <2> db 0, 0, 0, 0,161,162,163,164 ; 2E8 1912 00001540 00A5000000000000 <2> db 0,165, 0, 0, 0, 0, 0, 0 ; 2F0 1913 00001548 A600000000000000 <2> db 166, 0, 0, 0, 0, 0, 0, 0 ; 2F8 1914 00001550 A700000000000000 <2> db 167, 0, 0, 0, 0, 0, 0, 0 ; 300 1915 00001558 0000A800A900AA00 <2> db 0, 0,168, 0,169, 0,170, 0 ; 308 1916 00001560 0000AB00AC00AD00 <2> db 0, 0,171, 0,172, 0,173, 0 ; 310 1917 00001568 0000AE000000AF00 <2> db 0, 0,174, 0, 0, 0,175, 0 ; 318 1918 00001570 B000000000000000 <2> db 176, 0, 0, 0, 0, 0, 0, 0 ; 320 1919 00001578 B1B20000B3B40000 <2> db 177,178, 0, 0,179,180, 0, 0 ; 328 1920 00001580 00B5000000000000 <2> db 0,181, 0, 0, 0, 0, 0, 0 ; 330 1921 00001588 B6B7B8B9BA000000 <2> db 182,183,184,185,186, 0, 0, 0 ; 338 1922 00001590 00BB000000000000 <2> db 0,187, 0, 0, 0, 0, 0, 0 ; 340 1923 00001598 BC00000000000000 <2> db 188, 0, 0, 0, 0, 0, 0, 0 ; 348 1924 <2> 1925 <2> ;--- Disassembler: table of mnemonics that change in the presence of a WAIT 1926 <2> ;--- instruction. 1927 <2> 1928 <2> align 2, db 0 1929 <2> wtab1 label word 1930 000015A0 3A03390338033B035D- <2> dw 033Ah,0339h,0338h,033Bh,015Dh,019Eh,033Ch,015Fh 1930 000015A9 019E013C035F01 <2> 1931 000015B0 5E0148039F01 <2> dw 015Eh,0348h,019Fh 1932 <2> wtab2 label word 1933 000015B6 1102 <2> dw MN_FCLEX 1934 000015B8 CE02 <2> dw MN_FDISI 1935 000015BA 0803 <2> dw MN_FENI 1936 000015BC 3A03 <2> dw MN_FINIT 1937 000015BE 8E03 <2> dw MN_FLDCW 1938 000015C0 310A <2> dw MN_FSAVE_OSA 1939 000015C2 E603 <2> dw MN_FSETPM 1940 000015C4 1804 <2> dw MN_FSTCW 1941 000015C6 400A <2> dw MN_FSTENV_OSA 1942 000015C8 2704 <2> dw MN_FSTSW 1943 000015CA 2704 <2> dw MN_FSTSW 1944 <2> N_WTAB equ ($ - wtab2) / 2 1945 <2> 1946 <2> ;--- Disassembler: table for operands which have a different mnemonic for 1947 <2> ;--- their 32 bit versions (66h prefix). 1948 <2> 1949 <2> align 2, db 0 1950 <2> ltabo1 label word 1951 000015CC 98009900 <2> dw 098h,099h 1952 <2> ltabo2 label word 1953 000015D0 7C00 <2> dw MN_CWDE 1954 000015D2 B201 <2> dw MN_CDQ 1955 <2> N_LTABO equ ($ - ltabo2) / 2 1956 <2> 1957 <2> ;--- Disassembler: table for operands which have a different mnemonic for 1958 <2> ;--- their 32 bit versions (67h prefix). 1959 <2> 1960 <2> align 2, db 0 1961 <2> ltaba1 label word 1962 000015D4 E300 <2> dw 0E3h 1963 <2> ltaba2 label word 1964 000015D6 3205 <2> dw MN_JECXZ 1965 <2> N_LTABA equ ($ - ltaba2) / 2 1966 <2> 1967 <2> ;--- Disassembler: table of lockable instructions 1968 <2> 1969 <2> align 2, db 0 1970 <2> locktab label word 1971 000015D8 0A0102011000110008- <2> dw 010Ah,0102h,010h,011h,0108h,0100h,00h,01h 1971 000015E1 01000100000100 <2> 1972 000015E8 0C010401200021009B- <2> dw 010Ch,0104h,020h,021h,029Bh,02EFh,0293h,02EEh 1972 000015F1 02EF029302EE02 <2> 1973 000015F8 8B02ED0290029102E1- <2> dw 028Bh,02EDh,0290h,0291h,02E1h,0131h,02E0h,0130h 1973 00001601 023101E0023001 <2> 1974 00001608 2B012A010901010108- <2> dw 012Bh,012Ah,0109h,0101h,08h,09h,010Bh,0103h 1974 00001611 0009000B010301 <2> 1975 00001618 180019000D01050128- <2> dw 018h,019h,010Dh,0105h,028h,029h,02A0h,02A1h 1975 00001621 002900A002A102 <2> 1976 00001628 860087000E01060130- <2> dw 086h,087h,010Eh,0106h,030h,031h 1976 00001631 003100 <2> 1977 <2> N_LOCK equ ($ - locktab) / 2 1978 <2> 1979 <2> ;--- Equates used in the assembly-language code. 1980 <2> 1981 <2> SPARSE_BASE equ 01E0h 1982 <2> SFPGROUP3 equ 0338h 1983 <2> GROUP7 equ 0130h 360 <1> [list +] 361 <1> opindex: 362 <1> [list -] 379 00001634 01 <2> db %$index 380 <2> [list -] 379 00001635 00 <2> db %$index 380 <2> [list -] 379 00001636 01 <2> db %$index 380 <2> [list -] 379 00001637 03 <2> db %$index 380 <2> [list -] 379 00001638 05 <2> db %$index 380 <2> [list -] 379 00001639 07 <2> db %$index 380 <2> [list -] 379 0000163A 09 <2> db %$index 380 <2> [list -] 379 0000163B 0B <2> db %$index 380 <2> [list -] 379 0000163C 0D <2> db %$index 380 <2> [list -] 379 0000163D 0F <2> db %$index 380 <2> [list -] 379 0000163E 11 <2> db %$index 380 <2> [list -] 379 0000163F 10 <2> db %$index 380 <2> [list -] 379 00001640 11 <2> db %$index 380 <2> [list -] 379 00001641 10 <2> db %$index 380 <2> [list -] 379 00001642 11 <2> db %$index 380 <2> [list -] 379 00001643 13 <2> db %$index 380 <2> [list -] 379 00001644 16 <2> db %$index 380 <2> [list -] 379 00001645 18 <2> db %$index 380 <2> [list -] 379 00001646 18 <2> db %$index 380 <2> [list -] 379 00001647 1A <2> db %$index 380 <2> [list -] 379 00001648 1C <2> db %$index 380 <2> [list -] 379 00001649 1C <2> db %$index 380 <2> [list -] 379 0000164A 1C <2> db %$index 380 <2> [list -] 379 0000164B 1E <2> db %$index 380 <2> [list -] 379 0000164C 1D <2> db %$index 380 <2> [list -] 379 0000164D 1E <2> db %$index 380 <2> [list -] 379 0000164E 1D <2> db %$index 380 <2> [list -] 379 0000164F 1E <2> db %$index 380 <2> [list -] 379 00001650 1D <2> db %$index 380 <2> [list -] 379 00001651 20 <2> db %$index 380 <2> [list -] 379 00001652 21 <2> db %$index 380 <2> [list -] 379 00001653 22 <2> db %$index 380 <2> [list -] 379 00001654 23 <2> db %$index 380 <2> [list -] 379 00001655 22 <2> db %$index 380 <2> [list -] 379 00001656 22 <2> db %$index 380 <2> [list -] 379 00001657 23 <2> db %$index 380 <2> [list -] 379 00001658 25 <2> db %$index 380 <2> [list -] 379 00001659 26 <2> db %$index 380 <2> [list -] 379 0000165A 27 <2> db %$index 380 <2> [list -] 379 0000165B 28 <2> db %$index 380 <2> [list -] 379 0000165C 29 <2> db %$index 380 <2> [list -] 379 0000165D 28 <2> db %$index 380 <2> [list -] 379 0000165E 28 <2> db %$index 380 <2> [list -] 379 0000165F 27 <2> db %$index 380 <2> [list -] 379 00001660 28 <2> db %$index 380 <2> [list -] 379 00001661 29 <2> db %$index 380 <2> [list -] 379 00001662 2A <2> db %$index 380 <2> [list -] 379 00001663 2B <2> db %$index 380 <2> [list -] 379 00001664 2C <2> db %$index 380 <2> [list -] 379 00001665 2D <2> db %$index 380 <2> [list -] 379 00001666 2E <2> db %$index 380 <2> [list -] 379 00001667 2F <2> db %$index 380 <2> [list -] 379 00001668 2E <2> db %$index 380 <2> [list -] 379 00001669 2E <2> db %$index 380 <2> [list -] 379 0000166A 2F <2> db %$index 380 <2> [list -] 379 0000166B 2F <2> db %$index 380 <2> [list -] 379 0000166C 32 <2> db %$index 380 <2> [list -] 379 0000166D 34 <2> db %$index 380 <2> [list -] 379 0000166E 37 <2> db %$index 380 <2> [list -] 379 0000166F 39 <2> db %$index 380 <2> [list -] 379 00001670 3A <2> db %$index 380 <2> [list -] 379 00001671 3B <2> db %$index 380 <2> [list -] 379 00001672 3C <2> db %$index 380 <2> [list -] 379 00001673 3C <2> db %$index 380 <2> [list -] 379 00001674 3D <2> db %$index 380 <2> [list -] 379 00001675 3F <2> db %$index 380 <2> [list -] 379 00001676 40 <2> db %$index 380 <2> [list -] 379 00001677 42 <2> db %$index 380 <2> [list -] 379 00001678 44 <2> db %$index 380 <2> [list -] 379 00001679 46 <2> db %$index 380 <2> [list -] 379 0000167A 48 <2> db %$index 380 <2> [list -] 379 0000167B 49 <2> db %$index 380 <2> [list -] 379 0000167C 4A <2> db %$index 380 <2> [list -] 379 0000167D 4D <2> db %$index 380 <2> [list -] 379 0000167E 4D <2> db %$index 380 <2> [list -] 379 0000167F 4E <2> db %$index 380 <2> [list -] 379 00001680 4F <2> db %$index 380 <2> [list -] 379 00001681 50 <2> db %$index 380 <2> [list -] 379 00001682 4F <2> db %$index 380 <2> [list -] 379 00001683 50 <2> db %$index 380 <2> [list -] 379 00001684 52 <2> db %$index 380 <2> [list -] 379 00001685 54 <2> db %$index 380 <2> [list -] 379 00001686 56 <2> db %$index 380 <2> [list -] 379 00001687 58 <2> db %$index 380 <2> [list -] 379 00001688 5A <2> db %$index 380 <2> [list -] 379 00001689 59 <2> db %$index 380 <2> [list -] 379 0000168A 59 <2> db %$index 380 <2> [list -] 379 0000168B 5A <2> db %$index 380 <2> [list -] 379 0000168C 5B <2> db %$index 380 <2> [list -] 379 0000168D 5E <2> db %$index 380 <2> [list -] 379 0000168E 61 <2> db %$index 380 <2> [list -] 379 0000168F 62 <2> db %$index 380 <2> [list -] 379 00001690 63 <2> db %$index 380 <2> [list -] 379 00001691 62 <2> db %$index 380 <2> [list -] 379 00001692 62 <2> db %$index 380 <2> [list -] 379 00001693 61 <2> db %$index 380 <2> [list -] 379 00001694 61 <2> db %$index 380 <2> [list -] 379 00001695 60 <2> db %$index 380 <2> [list -] 379 00001696 60 <2> db %$index 380 <2> [list -] 379 00001697 5F <2> db %$index 380 <2> [list -] 379 00001698 5F <2> db %$index 380 <2> [list -] 379 00001699 5E <2> db %$index 380 <2> [list -] 379 0000169A 5E <2> db %$index 380 <2> [list -] 379 0000169B 5D <2> db %$index 380 <2> [list -] 379 0000169C 5D <2> db %$index 380 <2> [list -] 379 0000169D 5E <2> db %$index 380 <2> [list -] 379 0000169E 5F <2> db %$index 380 <2> [list -] 379 0000169F 60 <2> db %$index 380 <2> [list -] 379 000016A0 61 <2> db %$index 380 <2> [list -] 379 000016A1 62 <2> db %$index 380 <2> [list -] 379 000016A2 63 <2> db %$index 380 <2> [list -] 379 000016A3 64 <2> db %$index 380 <2> [list -] 379 000016A4 65 <2> db %$index 380 <2> [list -] 379 000016A5 66 <2> db %$index 380 <2> [list -] 379 000016A6 67 <2> db %$index 380 <2> [list -] 379 000016A7 68 <2> db %$index 380 <2> [list -] 379 000016A8 6A <2> db %$index 380 <2> [list -] 379 000016A9 6C <2> db %$index 380 <2> [list -] 379 000016AA 6E <2> db %$index 380 <2> [list -] 379 000016AB 70 <2> db %$index 380 <2> [list -] 379 000016AC 71 <2> db %$index 380 <2> [list -] 379 000016AD 72 <2> db %$index 380 <2> [list -] 379 000016AE 71 <2> db %$index 380 <2> [list -] 379 000016AF 73 <2> db %$index 380 <2> [list -] 379 000016B0 76 <2> db %$index 380 <2> [list -] 379 000016B1 77 <2> db %$index 380 <2> [list -] 379 000016B2 79 <2> db %$index 380 <2> [list -] 379 000016B3 79 <2> db %$index 380 <2> [list -] 379 000016B4 79 <2> db %$index 380 <2> [list -] 380 ****************** <2> warning: Most assembler table prefix bytes: 1 (ofs 4h) mne BOXCB variant (240h + 0*8 + 7),85,, [-w+user] 444 <1> 445 <1> usesection lDEBUG_DATA_ENTRY 1258 1259 1260 usesection lDEBUG_DATA_ENTRY 1261 1262 msg_start: 1263 %include "msg.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug messages 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2012 C. Masloch 8 <1> 9 <1> Usage of the works is permitted provided that this 10 <1> instrument is retained with the works, so that any entity 11 <1> that uses the works is notified of this instrument. 12 <1> 13 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 14 <1> 15 <1> %endif 16 <1> 17 <1> 18 <1> usesection lDEBUG_DATA_ENTRY 19 <1> 20 <1> msg: 21 <1> .help: 22 0000116C 436F6E64746E6C2E20- <1> db _PROGNAME,_VERSION," help screen",13,10 22 00001175 44656275676761626C- <1> 22 0000117E 65206C446562756720- <1> 22 00001187 28323032322D30382D- <1> 22 00001190 3035292068656C7020- <1> 22 00001199 73637265656E0D0A <1> 23 000011A1 617373656D626C6509- <1> db "assemble",9, "A [address]",13,10 23 000011AA 41205B616464726573- <1> 23 000011B3 735D0D0A <1> 24 <1> %if _BREAKPOINTS 25 000011B7 73657420627265616B- <1> db "set breakpoint",9, "BP index|AT|NEW address [[NUMBER=]number] [WHEN=cond] [ID=id]",13,10 25 000011C0 706F696E7409425020- <1> 25 000011C9 696E6465787C41547C- <1> 25 000011D2 4E4557206164647265- <1> 25 000011DB 7373205B5B4E554D42- <1> 25 000011E4 45523D5D6E756D6265- <1> 25 000011ED 725D205B5748454E3D- <1> 25 000011F6 636F6E645D205B4944- <1> 25 000011FF 3D69645D0D0A <1> 26 00001205 207365742049440909- <1> db " set ID",9,9, "BI index|AT address [ID=]id",13,10 26 0000120E 424920696E6465787C- <1> 26 00001217 415420616464726573- <1> 26 00001220 73205B49443D5D6964- <1> 26 00001229 0D0A <1> 27 0000122B 2073657420636F6E64- <1> db " set condition",9, "BW index|AT address [WHEN=]cond",13,10 27 00001234 6974696F6E09425720- <1> 27 0000123D 696E6465787C415420- <1> 27 00001246 61646472657373205B- <1> 27 0000124F 5748454E3D5D636F6E- <1> 27 00001258 640D0A <1> 28 0000125B 20736574206F666673- <1> db " set offset",9, "BO index|AT address [OFFSET=]number",13,10 28 00001264 657409424F20696E64- <1> 28 0000126D 65787C415420616464- <1> 28 00001276 72657373205B4F4646- <1> 28 0000127F 5345543D5D6E756D62- <1> 28 00001288 65720D0A <1> 29 0000128C 20736574206E756D62- <1> db " set number",9, "BN index|AT address|ALL number",13,10 29 00001295 657209424E20696E64- <1> 29 0000129E 65787C415420616464- <1> 29 000012A7 726573737C414C4C20- <1> 29 000012B0 6E756D6265720D0A <1> 30 000012B8 20636C656172090942- <1> db " clear",9,9, "BC index|AT address|ALL",13,10 30 000012C1 4320696E6465787C41- <1> 30 000012CA 542061646472657373- <1> 30 000012D3 7C414C4C0D0A <1> 31 000012D9 2064697361626C6509- <1> db " disable",9, "BD index|AT address|ALL",13,10 31 000012E2 424420696E6465787C- <1> 31 000012EB 415420616464726573- <1> 31 000012F4 737C414C4C0D0A <1> 32 000012FB 20656E61626C650909- <1> db " enable",9,9, "BE index|AT address|ALL",13,10 32 00001304 424520696E6465787C- <1> 32 0000130D 415420616464726573- <1> 32 00001316 737C414C4C0D0A <1> 33 0000131D 20746F67676C650909- <1> db " toggle",9,9, "BT index|AT address|ALL",13,10 33 00001326 425420696E6465787C- <1> 33 0000132F 415420616464726573- <1> 33 00001338 737C414C4C0D0A <1> 34 0000133F 206C6973740909424C- <1> db " list",9,9, "BL [index|AT address|ALL]",13,10 34 00001348 205B696E6465787C41- <1> 34 00001351 542061646472657373- <1> 34 0000135A 7C414C4C5D0D0A <1> 35 <1> %endif 36 <1> %if _DEBUG 37 00001361 627265616B20757077- <1> db "break upwards",9, "BU",13,10 37 0000136A 617264730942550D0A <1> 38 <1> %endif 39 00001373 636F6D706172650909- <1> db "compare",9,9, "C range address",13,10 39 0000137C 432072616E67652061- <1> 39 00001385 6464726573730D0A <1> 40 0000138D 64756D70090944205B- <1> db "dump",9,9, "D [range]",13,10 40 00001396 72616E67655D0D0A <1> 41 0000139E 64756D702062797465- <1> db "dump bytes",9, "DB [range]",13,10 41 000013A7 73094442205B72616E- <1> 41 000013B0 67655D0D0A <1> 42 000013B5 64756D7020776F7264- <1> db "dump words",9, "DW [range]",13,10 42 000013BE 73094457205B72616E- <1> 42 000013C7 67655D0D0A <1> 43 000013CC 64756D702064776F72- <1> db "dump dwords",9, "DD [range]",13,10 43 000013D5 6473094444205B7261- <1> 43 000013DE 6E67655D0D0A <1> 44 <1> %if _INT 45 000013E4 64756D7020696E7465- <1> db "dump interrupts",9, "DI[R][M][L] interrupt [count]",13,10 45 000013ED 727275707473094449- <1> 45 000013F6 5B525D5B4D5D5B4C5D- <1> 45 000013FF 20696E746572727570- <1> 45 00001408 74205B636F756E745D- <1> 45 00001411 0D0A <1> 46 <1> %endif 47 <1> %if _PM 48 <1> db "dump LDT",9, "DL selector [count]",13,10 49 <1> %endif 50 <1> %if _MCB 51 00001413 64756D70204D434220- <1> db "dump MCB chain",9, "DM [segment]",13,10 51 0000141C 636861696E09444D20- <1> 51 00001425 5B7365676D656E745D- <1> 51 0000142E 0D0A <1> 52 <1> ;db "dump S/SD MCBs",9, "DS",13,10 53 <1> %endif 54 <1> %if _DSTRINGS 55 00001430 646973706C61792073- <1> db "display strings",9, "DZ/D$/D[W]# [address]",13,10 55 00001439 7472696E677309445A- <1> 55 00001442 2F44242F445B575D23- <1> 55 0000144B 205B61646472657373- <1> 55 00001454 5D0D0A <1> 56 <1> %endif 57 <1> %if _PM 58 <1> db "dump ext memory",9, "DX physical_address",13,10 59 <1> %endif 60 00001457 656E74657209094520- <1> db "enter",9,9, "E address [list]",13,10 60 00001460 61646472657373205B- <1> 60 00001469 6C6973745D0D0A <1> 61 00001470 66696C6C0909462072- <1> db "fill",9,9, "F range [RANGE range|list]",13,10 61 00001479 616E6765205B52414E- <1> 61 00001482 47452072616E67657C- <1> 61 0000148B 6C6973745D0D0A <1> 62 00001492 676F090947205B3D61- <1> db "go",9,9, "G [=address] [breakpts]",13,10 62 0000149B 6464726573735D205B- <1> 62 000014A4 627265616B7074735D- <1> 62 000014AD 0D0A <1> 63 000014AF 676F746F0909474F54- <1> db "goto",9,9, "GOTO :label",13,10 63 000014B8 4F203A6C6162656C0D- <1> 63 000014C1 0A <1> 64 000014C2 686578206164642F73- <1> db "hex add/sub",9, "H value1 [value2 [...]]",13,10 64 000014CB 756209482076616C75- <1> 64 000014D4 6531205B76616C7565- <1> 64 000014DD 32205B2E2E2E5D5D0D- <1> 64 000014E6 0A <1> 65 000014E7 626173652064697370- <1> db "base display",9, "H BASE=number [GROUP=number] [WIDTH=number] value",13,10 65 000014F0 6C6179094820424153- <1> 65 000014F9 453D6E756D62657220- <1> 65 00001502 5B47524F55503D6E75- <1> 65 0000150B 6D6265725D205B5749- <1> 65 00001514 4454483D6E756D6265- <1> 65 0000151D 725D2076616C75650D- <1> 65 00001526 0A <1> 66 00001527 696E7075740909495B- <1> db "input",9,9, "I[W|D] port",13,10 66 00001530 577C445D20706F7274- <1> 66 00001539 0D0A <1> 67 0000153B 6966206E756D657269- <1> db "if numeric",9, "IF [NOT] (cond) THEN cmd",13,10 67 00001544 63094946205B4E4F54- <1> 67 0000154D 5D2028636F6E642920- <1> 67 00001556 5448454E20636D640D- <1> 67 0000155F 0A <1> 68 00001560 696620736372697074- <1> db "if script file",9, "IF [NOT] EXISTS Y file [:label] THEN cmd",13,10 68 00001569 2066696C6509494620- <1> 68 00001572 5B4E4F545D20455849- <1> 68 0000157B 53545320592066696C- <1> 68 00001584 65205B3A6C6162656C- <1> 68 0000158D 5D205448454E20636D- <1> 68 00001596 640D0A <1> 69 00001599 6C6F61642070726F67- <1> db "load program",9, "L [address]",13,10 69 000015A2 72616D094C205B6164- <1> 69 000015AB 64726573735D0D0A <1> 70 000015B3 6C6F61642073656374- <1> db "load sectors",9, "L address drive sector count",13,10 70 000015BC 6F7273094C20616464- <1> 70 000015C5 726573732064726976- <1> 70 000015CE 6520736563746F7220- <1> 70 000015D7 636F756E740D0A <1> 71 000015DE 6D6F766509094D2072- <1> db "move",9,9, "M range address",13,10 71 000015E7 616E67652061646472- <1> 71 000015F0 6573730D0A <1> 72 000015F5 38307838362F783837- <1> db "80x86/x87 mode",9, "M [0..6|C|NC|C2|?]",13,10 72 000015FE 206D6F6465094D205B- <1> 72 00001607 302E2E367C437C4E43- <1> 72 00001610 7C43327C3F5D0D0A <1> 73 00001618 736574206E616D6509- <1> db "set name",9, "N [[drive:][path]progname.ext [parameters]]",13,10 73 00001621 4E205B5B6472697665- <1> 73 0000162A 3A5D5B706174685D70- <1> 73 00001633 726F676E616D652E65- <1> 73 0000163C 7874205B706172616D- <1> 73 00001645 65746572735D5D0D0A <1> 74 0000164E 6F757470757409094F- <1> db "output",9,9, "O[W|D] port value",13,10 74 00001657 5B577C445D20706F72- <1> 74 00001660 742076616C75650D0A <1> 75 00001669 70726F636565640909- <1> db "proceed",9,9, "P [=address] [count [WHILE cond] [SILENT [count]]]",13,10 75 00001672 50205B3D6164647265- <1> 75 0000167B 73735D205B636F756E- <1> 75 00001684 74205B5748494C4520- <1> 75 0000168D 636F6E645D205B5349- <1> 75 00001696 4C454E54205B636F75- <1> 75 0000169F 6E745D5D5D0D0A <1> 76 000016A6 717569740909510D0A <1> db "quit",9,9, "Q",13,10 77 000016AF 717569742070726F63- <1> db "quit process",9, "QA",13,10 77 000016B8 6573730951410D0A <1> 78 000016C0 7175697420616E6420- <1> db "quit and break",9, "QB",13,10 78 000016C9 627265616B0951420D- <1> 78 000016D2 0A <1> 79 000016D3 726567697374657209- <1> db "register",9, "R [register [value]]",13,10 79 000016DC 52205B726567697374- <1> 79 000016E5 6572205B76616C7565- <1> 79 000016EE 5D5D0D0A <1> 80 000016F2 52756E205220657874- <1> db "Run R extended",9, "RE",13,10 80 000016FB 656E6465640952450D- <1> 80 00001704 0A <1> 81 00001705 524520636F6D6D616E- <1> db "RE commands",9, "RE.LIST|APPEND|REPLACE [commands]",13,10 81 0000170E 64730952452E4C4953- <1> 81 00001717 547C415050454E447C- <1> 81 00001720 5245504C414345205B- <1> 81 00001729 636F6D6D616E64735D- <1> 81 00001732 0D0A <1> 82 00001734 52756E20436F6D6D61- <1> db "Run Commandline",9, "RC",13,10 82 0000173D 6E646C696E65095243- <1> 82 00001746 0D0A <1> 83 00001748 524320636F6D6D616E- <1> db "RC commands",9, "RC.LIST|APPEND|REPLACE [commands]",13,10 83 00001751 64730952432E4C4953- <1> 83 0000175A 547C415050454E447C- <1> 83 00001763 5245504C414345205B- <1> 83 0000176C 636F6D6D616E64735D- <1> 83 00001775 0D0A <1> 84 <1> %if _MMXSUPP 85 00001777 4D4D58207265676973- <1> db "MMX register",9, "RM",13,10 85 00001780 74657209524D0D0A <1> 86 <1> %endif 87 <1> %if _RN 88 00001788 465055207265676973- <1> db "FPU register",9, "RN",13,10 88 00001791 74657209524E0D0A <1> 89 <1> %endif 90 00001799 746F67676C65203338- <1> db "toggle 386 regs",9, "RX",13,10 90 000017A2 362072656773095258- <1> 90 000017AB 0D0A <1> 91 000017AD 736561726368090953- <1> db "search",9,9, "S range [REVERSE] [RANGE range|list]",13,10 91 000017B6 2072616E6765205B52- <1> 91 000017BF 4556455253455D205B- <1> 91 000017C8 52414E47452072616E- <1> 91 000017D1 67657C6C6973745D0D- <1> 91 000017DA 0A <1> 92 000017DB 736C6565700909534C- <1> db "sleep",9,9, "SLEEP count [SECONDS|TICKS]",13,10 92 000017E4 45455020636F756E74- <1> 92 000017ED 205B5345434F4E4453- <1> 92 000017F6 7C5449434B535D0D0A <1> 93 000017FF 747261636509095420- <1> db "trace",9,9, "T [=address] [count [WHILE cond] [SILENT [count]]]",13,10 93 00001808 5B3D61646472657373- <1> 93 00001811 5D205B636F756E7420- <1> 93 0000181A 5B5748494C4520636F- <1> 93 00001823 6E645D205B53494C45- <1> 93 0000182C 4E54205B636F756E74- <1> 93 00001835 5D5D5D0D0A <1> 94 0000183A 747261636520286578- <1> db "trace (exc str)",9 94 00001843 63207374722909 <1> 95 0000184A 5450205B3D61646472- <1> db "TP [=address] [count [WHILE cond] [SILENT [count]]]",13,10 95 00001853 6573735D205B636F75- <1> 95 0000185C 6E74205B5748494C45- <1> 95 00001865 20636F6E645D205B53- <1> 95 0000186E 494C454E54205B636F- <1> 95 00001877 756E745D5D5D0D0A <1> 96 0000187F 7472616365206D6F64- <1> db "trace mode",9, "TM [0|1]",13,10 96 00001888 6509544D205B307C31- <1> 96 00001891 5D0D0A <1> 97 <1> %if _TSR 98 00001894 656E74657220545352- <1> db "enter TSR mode",9, "TSR",13,10 98 0000189D 206D6F646509545352- <1> 98 000018A6 0D0A <1> 99 <1> %endif 100 000018A8 756E617373656D626C- <1> db "unassemble",9, "U [range]",13,10 100 000018B1 650955205B72616E67- <1> 100 000018BA 655D0D0A <1> 101 <1> %if _VXCHG 102 000018BE 766965772073637265- <1> db "view screen",9, "V [ON|OFF [KEEP|NOKEEP]]",13,10 102 000018C7 656E0956205B4F4E7C- <1> 102 000018D0 4F4646205B4B454550- <1> 102 000018D9 7C4E4F4B4545505D5D- <1> 102 000018E2 0D0A <1> 103 <1> %endif 104 000018E4 77726974652070726F- <1> db "write program",9, "W [address]",13,10 104 000018ED 6772616D0957205B61- <1> 104 000018F6 6464726573735D0D0A <1> 105 000018FF 777269746520736563- <1> db "write sectors",9, "W address drive sector count",13,10 105 00001908 746F72730957206164- <1> 105 00001911 647265737320647269- <1> 105 0000191A 766520736563746F72- <1> 105 00001923 20636F756E740D0A <1> 106 <1> %if _EMS 107 0000192B 657870616E64656420- <1> db "expanded mem",9, "XA/XD/XM/XR/XS, X? for help",13,10 107 00001934 6D656D0958412F5844- <1> 107 0000193D 2F584D2F58522F5853- <1> 107 00001946 2C20583F20666F7220- <1> 107 0000194F 68656C700D0A <1> 108 <1> %endif 109 00001955 72756E207363726970- <1> db "run script",9, "Y [partition/][scriptfile] [:label]",13,10 109 0000195E 740959205B70617274- <1> 109 00001967 6974696F6E2F5D5B73- <1> 109 00001970 637269707466696C65- <1> 109 00001979 5D205B3A6C6162656C- <1> 109 00001982 5D0D0A <1> 110 00001985 0D0A <1> db 13,10 111 00001987 4164646974696F6E61- <1> db "Additional help topics:",13,10 111 00001990 6C2068656C7020746F- <1> 111 00001999 706963733A0D0A <1> 112 <1> %if _EXTHELP 113 000019A0 205265676973746572- <1> db " Registers",9, "?R",13,10 113 000019A9 73093F520D0A <1> 114 000019AF 20466C61677309093F- <1> db " Flags",9,9, "?F",13,10 114 000019B8 460D0A <1> 115 <1> %if _COND 116 000019BB 20436F6E646974696F- <1> db " Conditionals",9, "?C",13,10 116 000019C4 6E616C73093F430D0A <1> 117 <1> %endif 118 <1> %if _EXPRESSIONS 119 000019CD 204578707265737369- <1> db " Expressions",9, "?E",13,10 119 000019D6 6F6E73093F450D0A <1> 120 <1> %endif 121 <1> %if _VARIABLES || _OPTIONS || _PSPVARIABLES 122 000019DE 205661726961626C65- <1> db " Variables",9, "?V",13,10 122 000019E7 73093F560D0A <1> 123 <1> %endif 124 000019ED 205220457874656E64- <1> db " R Extended",9, "?RE",13,10 124 000019F6 6564093F52450D0A <1> 125 000019FE 2052756E206B657977- <1> db " Run keywords",9, "?RUN",13,10 125 00001A07 6F726473093F52554E- <1> 125 00001A10 0D0A <1> 126 <1> %if _OPTIONS 127 00001A12 204F7074696F6E7320- <1> db " Options pages",9, "?OPTIONS",13,10 127 00001A1B 7061676573093F4F50- <1> 127 00001A24 54494F4E530D0A <1> 128 00001A2B 204F7074696F6E7309- <1> db " Options",9, "?O",13,10 128 00001A34 3F4F0D0A <1> 129 <1> %endif 130 <1> %if _BOOTLDR 131 00001A38 20426F6F74206C6F61- <1> db " Boot loading",9, "?BOOT",13,10 131 00001A41 64696E67093F424F4F- <1> 131 00001A4A 540D0A <1> 132 <1> %endif 133 <1> %endif 134 00001A4D 206C44656275672062- <1> db " lDebug build",9, "?BUILD",13,10 134 00001A56 75696C64093F425549- <1> 134 00001A5F 4C440D0A <1> 135 00001A63 206C44656275672062- <1> db " lDebug build",9, "?B",13,10 135 00001A6C 75696C64093F420D0A <1> 136 <1> %if _EXTHELP 137 00001A75 206C44656275672073- <1> db " lDebug sources",9, "?SOURCE",13,10 137 00001A7E 6F7572636573093F53- <1> 137 00001A87 4F555243450D0A <1> 138 00001A8E 206C4465627567206C- <1> db " lDebug license",9, "?L",13,10 138 00001A97 6963656E7365093F4C- <1> 138 00001AA0 0D0A <1> 139 <1> %endif 140 <1> %if _PM 141 <1> db 13,10 142 <1> db "Prompts: '-' = real or V86 mode; '#' = protected mode",13,10 143 <1> %endif 144 00001AA2 00 <1> asciz 145 <1> 146 <1> %if _EXTHELP 147 00001AA3 534F5552434500 <1> .source:asciz "SOURCE" 148 <1> .help_source: 149 00001AAA 546865206F72696769- <1> db "The original lDebug sources can be obtained from the repo located at",13,10 149 00001AB3 6E616C206C44656275- <1> 149 00001ABC 6720736F7572636573- <1> 149 00001AC5 2063616E206265206F- <1> 149 00001ACE 627461696E65642066- <1> 149 00001AD7 726F6D207468652072- <1> 149 00001AE0 65706F206C6F636174- <1> 149 00001AE9 65642061740D0A <1> 150 00001AF0 68747470733A2F2F68- <1> db "https://hg.pushbx.org/ecm/ldebug (E. C. Masloch's repo)",13,10 150 00001AF9 672E7075736862782E- <1> 150 00001B02 6F72672F65636D2F6C- <1> 150 00001B0B 64656275672028452E- <1> 150 00001B14 20432E204D61736C6F- <1> 150 00001B1D 63682773207265706F- <1> 150 00001B26 290D0A <1> 151 00001B29 0D0A <1> db 13,10 152 00001B2B 52656C656173657320- <1> db "Releases of lDebug are available via the website at",13,10 152 00001B34 6F66206C4465627567- <1> 152 00001B3D 206172652061766169- <1> 152 00001B46 6C61626C6520766961- <1> 152 00001B4F 207468652077656273- <1> 152 00001B58 6974652061740D0A <1> 153 00001B60 68747470733A2F2F70- <1> db "https://pushbx.org/ecm/web/#projects-ldebug",13,10 153 00001B69 75736862782E6F7267- <1> 153 00001B72 2F65636D2F7765622F- <1> 153 00001B7B 2370726F6A65637473- <1> 153 00001B84 2D6C64656275670D0A <1> 154 00001B8D 0D0A <1> db 13,10 155 00001B8F 546865206D6F737420- <1> db "The most recent manual is hosted at https://pushbx.org/ecm/doc/ in the",13,10 155 00001B98 726563656E74206D61- <1> 155 00001BA1 6E75616C2069732068- <1> 155 00001BAA 6F7374656420617420- <1> 155 00001BB3 68747470733A2F2F70- <1> 155 00001BBC 75736862782E6F7267- <1> 155 00001BC5 2F65636D2F646F632F- <1> 155 00001BCE 20696E207468650D0A <1> 156 00001BD7 66696C6573206C6465- <1> db "files ldebug.htm, ldebug.txt, and ldebug.pdf",13,10 156 00001BE0 6275672E68746D2C20- <1> 156 00001BE9 6C64656275672E7478- <1> 156 00001BF2 742C20616E64206C64- <1> 156 00001BFB 656275672E7064660D- <1> 156 00001C04 0A <1> 157 00001C05 00 <1> asciz 158 <1> %endif 159 <1> 160 <1> .re: 161 00001C06 524500 <1> asciz "RE" 162 <1> .help_re: 163 00001C09 5468652052554E2063- <1> db "The RUN commands (T, TP, P, G) and the RE command use the RE command",13,10 163 00001C12 6F6D6D616E64732028- <1> 163 00001C1B 542C2054502C20502C- <1> 163 00001C24 20472920616E642074- <1> 163 00001C2D 686520524520636F6D- <1> 163 00001C36 6D616E642075736520- <1> 163 00001C3F 74686520524520636F- <1> 163 00001C48 6D6D616E640D0A <1> 164 00001C4F 62756666657220746F- <1> db "buffer to run commands. Most commands are allowed to be run from the",13,10 164 00001C58 2072756E20636F6D6D- <1> 164 00001C61 616E64732E204D6F73- <1> 164 00001C6A 7420636F6D6D616E64- <1> 164 00001C73 732061726520616C6C- <1> 164 00001C7C 6F77656420746F2062- <1> 164 00001C85 652072756E2066726F- <1> 164 00001C8E 6D207468650D0A <1> 165 00001C95 524520627566666572- <1> db "RE buffer. Disallowed commands include program-loading L, A, E that",13,10 165 00001C9E 2E20446973616C6C6F- <1> 165 00001CA7 77656420636F6D6D61- <1> 165 00001CB0 6E647320696E636C75- <1> 165 00001CB9 64652070726F677261- <1> 165 00001CC2 6D2D6C6F6164696E67- <1> 165 00001CCB 204C2C20412C204520- <1> 165 00001CD4 746861740D0A <1> 166 00001CDA 737769746368657320- <1> db "switches the line input mode, TSR, Q, Y, RE, and further RUN commands.",13,10 166 00001CE3 746865206C696E6520- <1> 166 00001CEC 696E707574206D6F64- <1> 166 00001CF5 652C205453522C2051- <1> 166 00001CFE 2C20592C2052452C20- <1> 166 00001D07 616E64206675727468- <1> 166 00001D10 65722052554E20636F- <1> 166 00001D19 6D6D616E64732E0D0A <1> 167 00001D22 5768656E2074686520- <1> db "When the RE buffer is used as input during T, TP, or P with either",13,10 167 00001D2B 524520627566666572- <1> 167 00001D34 206973207573656420- <1> 167 00001D3D 617320696E70757420- <1> 167 00001D46 647572696E6720542C- <1> 167 00001D4F 2054502C206F722050- <1> 167 00001D58 207769746820656974- <1> 167 00001D61 6865720D0A <1> 168 00001D66 6F6620746865205748- <1> db "of the WHILE or SILENT keywords, commands that use the auxbuff are",13,10 168 00001D6F 494C45206F72205349- <1> 168 00001D78 4C454E54206B657977- <1> 168 00001D81 6F7264732C20636F6D- <1> 168 00001D8A 6D616E647320746861- <1> 168 00001D93 742075736520746865- <1> 168 00001D9C 206175786275666620- <1> 168 00001DA5 6172650D0A <1> 169 00001DAA 616C736F2064697361- <1> db "also disallowed and will emit an error noting the conflict.",13,10 169 00001DB3 6C6C6F77656420616E- <1> 169 00001DBC 642077696C6C20656D- <1> 169 00001DC5 697420616E20657272- <1> 169 00001DCE 6F72206E6F74696E67- <1> 169 00001DD7 2074686520636F6E66- <1> 169 00001DE0 6C6963742E0D0A <1> 170 00001DE7 0D0A <1> db 13,10 171 00001DE9 52452E4C4953542073- <1> db "RE.LIST shows the current RE buffer contents in a format usable by",13,10 171 00001DF2 686F77732074686520- <1> 171 00001DFB 63757272656E742052- <1> 171 00001E04 452062756666657220- <1> 171 00001E0D 636F6E74656E747320- <1> 171 00001E16 696E206120666F726D- <1> 171 00001E1F 617420757361626C65- <1> 171 00001E28 2062790D0A <1> 172 00001E2D 746865206F74686572- <1> db "the other RE commands. RE.APPEND appends the following commands to",13,10 172 00001E36 20524520636F6D6D61- <1> 172 00001E3F 6E64732E2052452E41- <1> 172 00001E48 5050454E4420617070- <1> 172 00001E51 656E64732074686520- <1> 172 00001E5A 666F6C6C6F77696E67- <1> 172 00001E63 20636F6D6D616E6473- <1> 172 00001E6C 20746F0D0A <1> 173 00001E71 746865206275666665- <1> db "the buffer, if they fit. RE.REPLACE appends to the start of the",13,10 173 00001E7A 722C20696620746865- <1> 173 00001E83 79206669742E205245- <1> 173 00001E8C 2E5245504C41434520- <1> 173 00001E95 617070656E64732074- <1> 173 00001E9E 6F2074686520737461- <1> 173 00001EA7 7274206F6620746865- <1> 173 00001EB0 0D0A <1> 174 00001EB2 6275666665722E2057- <1> db "buffer. When specifying commands, an unescaped semicolon is parsed",13,10 174 00001EBB 68656E207370656369- <1> 174 00001EC4 6679696E6720636F6D- <1> 174 00001ECD 6D616E64732C20616E- <1> 174 00001ED6 20756E657363617065- <1> 174 00001EDF 642073656D69636F6C- <1> 174 00001EE8 6F6E20697320706172- <1> 174 00001EF1 7365640D0A <1> 175 00001EF6 61732061206C696E65- <1> db "as a linebreak to break apart individual commands. Backslashes can",13,10 175 00001EFF 627265616B20746F20- <1> 175 00001F08 627265616B20617061- <1> 175 00001F11 727420696E64697669- <1> 175 00001F1A 6475616C20636F6D6D- <1> 175 00001F23 616E64732E20426163- <1> 175 00001F2C 6B736C617368657320- <1> 175 00001F35 63616E0D0A <1> 176 00001F3A 626520757365642074- <1> db "be used to escape semicolons and backslashes themselves.",13,10 176 00001F43 6F2065736361706520- <1> 176 00001F4C 73656D69636F6C6F6E- <1> 176 00001F55 7320616E6420626163- <1> 176 00001F5E 6B736C617368657320- <1> 176 00001F67 7468656D73656C7665- <1> 176 00001F70 732E0D0A <1> 177 00001F74 0D0A <1> db 13,10 178 00001F76 507265666978696E67- <1> db "Prefixing a line with an @ (AT sign) causes the command not to be",13,10 178 00001F7F 2061206C696E652077- <1> 178 00001F88 69746820616E204020- <1> 178 00001F91 284154207369676E29- <1> 178 00001F9A 206361757365732074- <1> 178 00001FA3 686520636F6D6D616E- <1> 178 00001FAC 64206E6F7420746F20- <1> 178 00001FB5 62650D0A <1> 179 00001FB9 73686F776E20746F20- <1> db "shown to the standard output of the debugger when run. Otherwise,",13,10 179 00001FC2 746865207374616E64- <1> 179 00001FCB 617264206F75747075- <1> 179 00001FD4 74206F662074686520- <1> 179 00001FDD 646562756767657220- <1> 179 00001FE6 7768656E2072756E2E- <1> 179 00001FEF 204F74686572776973- <1> 179 00001FF8 652C0D0A <1> 180 00001FFC 74686520636F6D6D61- <1> db "the command will be shown with a percent sign % or ~% prompt.",13,10 180 00002005 6E642077696C6C2062- <1> 180 0000200E 652073686F776E2077- <1> 180 00002017 697468206120706572- <1> 180 00002020 63656E74207369676E- <1> 180 00002029 2025206F72207E2520- <1> 180 00002032 70726F6D70742E0D0A <1> 181 0000203B 0D0A <1> db 13,10 182 0000203D 546865206465666175- <1> db "The default RE buffer content is @R. This content is also",13,10 182 00002046 6C7420524520627566- <1> 182 0000204F 66657220636F6E7465- <1> 182 00002058 6E742069732040522E- <1> 182 00002061 205468697320636F6E- <1> 182 0000206A 74656E742069732061- <1> 182 00002073 6C736F0D0A <1> 183 00002078 646574656374656420- <1> db "detected and handled specifically; if found as the only command",13,10 183 00002081 616E642068616E646C- <1> 183 0000208A 656420737065636966- <1> 183 00002093 6963616C6C793B2069- <1> 183 0000209C 6620666F756E642061- <1> 183 000020A5 7320746865206F6E6C- <1> 183 000020AE 7920636F6D6D616E64- <1> 183 000020B7 0D0A <1> 184 000020B9 7468652068616E646C- <1> db "the handler directly calls the register dump implementation",13,10 184 000020C2 657220646972656374- <1> 184 000020CB 6C792063616C6C7320- <1> 184 000020D4 746865207265676973- <1> 184 000020DD 7465722064756D7020- <1> 184 000020E6 696D706C656D656E74- <1> 184 000020EF 6174696F6E0D0A <1> 185 000020F6 776974686F75742073- <1> db "without setting up and tearing down the special execution",13,10 185 000020FF 657474696E67207570- <1> 185 00002108 20616E642074656172- <1> 185 00002111 696E6720646F776E20- <1> 185 0000211A 746865207370656369- <1> 185 00002123 616C20657865637574- <1> 185 0000212C 696F6E0D0A <1> 186 00002131 656E7669726F6E6D65- <1> db "environment used to run arbitrary commands from the RE buffer.",13,10 186 0000213A 6E7420757365642074- <1> 186 00002143 6F2072756E20617262- <1> 186 0000214C 69747261727920636F- <1> 186 00002155 6D6D616E6473206672- <1> 186 0000215E 6F6D20746865205245- <1> 186 00002167 206275666665722E0D- <1> 186 00002170 0A <1> 187 00002171 00 <1> asciz 188 <1> 189 <1> .run: 190 00002172 52554E00 <1> asciz "RUN" 191 <1> .help_run: 192 00002176 542028747261636529- <1> db "T (trace), TP (trace except proceed past string operations), and P (proceed)",13,10 192 0000217F 2C2054502028747261- <1> 192 00002188 636520657863657074- <1> 192 00002191 2070726F6365656420- <1> 192 0000219A 706173742073747269- <1> 192 000021A3 6E67206F7065726174- <1> 192 000021AC 696F6E73292C20616E- <1> 192 000021B5 642050202870726F63- <1> 192 000021BE 656564290D0A <1> 193 000021C4 63616E20626520666F- <1> db "can be followed by a number of repetitions and then the keyword WHILE,",13,10 193 000021CD 6C6C6F776564206279- <1> 193 000021D6 2061206E756D626572- <1> 193 000021DF 206F66207265706574- <1> 193 000021E8 6974696F6E7320616E- <1> 193 000021F1 64207468656E207468- <1> 193 000021FA 65206B6579776F7264- <1> 193 00002203 205748494C452C0D0A <1> 194 0000220C 7768696368206D7573- <1> db "which must be followed by a conditional expression.",13,10 194 00002215 7420626520666F6C6C- <1> 194 0000221E 6F7765642062792061- <1> 194 00002227 20636F6E646974696F- <1> 194 00002230 6E616C206578707265- <1> 194 00002239 7373696F6E2E0D0A <1> 195 00002241 0D0A <1> db 13,10 196 00002243 5468652073656C6563- <1> db "The selected run command is repeated as many times as specified by the",13,10 196 0000224C 7465642072756E2063- <1> 196 00002255 6F6D6D616E64206973- <1> 196 0000225E 207265706561746564- <1> 196 00002267 206173206D616E7920- <1> 196 00002270 74696D657320617320- <1> 196 00002279 737065636966696564- <1> 196 00002282 206279207468650D0A <1> 197 0000228B 6E756D6265722C206F- <1> db "number, or until the WHILE condition evaluates no longer to true.",13,10 197 00002294 7220756E74696C2074- <1> 197 0000229D 6865205748494C4520- <1> 197 000022A6 636F6E646974696F6E- <1> 197 000022AF 206576616C75617465- <1> 197 000022B8 73206E6F206C6F6E67- <1> 197 000022C1 657220746F20747275- <1> 197 000022CA 652E0D0A <1> 198 000022CE 0D0A <1> db 13,10 199 000022D0 416674657220746865- <1> db "After the number of repetitions or (if present) after the WHILE condition",13,10 199 000022D9 206E756D626572206F- <1> 199 000022E2 662072657065746974- <1> 199 000022EB 696F6E73206F722028- <1> 199 000022F4 69662070726573656E- <1> 199 000022FD 742920616674657220- <1> 199 00002306 746865205748494C45- <1> 199 0000230F 20636F6E646974696F- <1> 199 00002318 6E0D0A <1> 200 0000231B 746865206B6579776F- <1> db "the keyword SILENT may follow. If that is the case, all register dumps",13,10 200 00002324 72642053494C454E54- <1> 200 0000232D 206D617920666F6C6C- <1> 200 00002336 6F772E204966207468- <1> 200 0000233F 617420697320746865- <1> 200 00002348 20636173652C20616C- <1> 200 00002351 6C2072656769737465- <1> 200 0000235A 722064756D70730D0A <1> 201 00002363 646F6E652064757269- <1> db "done during the run are buffered by the debugger and the run remains",13,10 201 0000236C 6E6720746865207275- <1> 201 00002375 6E2061726520627566- <1> 201 0000237E 666572656420627920- <1> 201 00002387 746865206465627567- <1> 201 00002390 67657220616E642074- <1> 201 00002399 68652072756E207265- <1> 201 000023A2 6D61696E730D0A <1> 202 000023A9 73696C656E742E2041- <1> db "silent. After the run, the last dumps are replayed from the buffer",13,10 202 000023B2 667465722074686520- <1> 202 000023BB 72756E2C2074686520- <1> 202 000023C4 6C6173742064756D70- <1> 202 000023CD 732061726520726570- <1> 202 000023D6 6C617965642066726F- <1> 202 000023DF 6D2074686520627566- <1> 202 000023E8 6665720D0A <1> 203 000023ED 616E6420646973706C- <1> db "and displayed. At most as many dumps as fit into the buffer are",13,10 203 000023F6 617965642E20417420- <1> 203 000023FF 6D6F7374206173206D- <1> 203 00002408 616E792064756D7073- <1> 203 00002411 206173206669742069- <1> 203 0000241A 6E746F207468652062- <1> 203 00002423 756666657220617265- <1> 203 0000242C 0D0A <1> 204 0000242E 646973706C61796564- <1> db "displayed. (The buffer is currently up to 8 KiB sized.)",13,10 204 00002437 2E2028546865206275- <1> 204 00002440 666665722069732063- <1> 204 00002449 757272656E746C7920- <1> 204 00002452 757020746F2038204B- <1> 204 0000245B 69422073697A65642E- <1> 204 00002464 290D0A <1> 205 00002467 0D0A <1> db 13,10 206 00002469 49662061206E756D62- <1> db "If a number follows behind the SILENT keyword, only at most that many",13,10 206 00002472 657220666F6C6C6F77- <1> 206 0000247B 7320626568696E6420- <1> 206 00002484 7468652053494C454E- <1> 206 0000248D 54206B6579776F7264- <1> 206 00002496 2C206F6E6C79206174- <1> 206 0000249F 206D6F737420746861- <1> 206 000024A8 74206D616E790D0A <1> 207 000024B0 64756D707320617265- <1> db "dumps are displayed from the buffer. The dumps that are displayed",13,10 207 000024B9 20646973706C617965- <1> 207 000024C2 642066726F6D207468- <1> 207 000024CB 65206275666665722E- <1> 207 000024D4 205468652064756D70- <1> 207 000024DD 732074686174206172- <1> 207 000024E6 6520646973706C6179- <1> 207 000024EF 65640D0A <1> 208 000024F3 61726520616C776179- <1> db "are always those last written into the buffer, thus last occurred.",13,10 208 000024FC 732074686F7365206C- <1> 208 00002505 617374207772697474- <1> 208 0000250E 656E20696E746F2074- <1> 208 00002517 686520627566666572- <1> 208 00002520 2C2074687573206C61- <1> 208 00002529 7374206F6363757272- <1> 208 00002532 65642E0D0A <1> 209 00002537 00 <1> asciz 210 <1> 211 <1> align 2, db 0 212 <1> .build_array: 213 00002538 [7B26] <1> dw .build_nameversion 214 0000253A [FB26] <1> dw .build_lmacros 215 <1> %if _SYMBOLIC 216 <1> dw .build_symsnip 217 <1> %endif 218 0000253C [3B27] <1> dw .build_scanptab 219 0000253E [7B27] <1> dw .build_inicomp 220 <1> %if _CHECKSUM 221 <1> dw .build_inicheck 222 <1> %endif 223 00002540 [BB27] <1> dw .build_ldosboot 224 <1> .build_short_amount: equ ($ - .build_array) / 2 225 00002542 [FB27] <1> dw .build_long 226 <1> .build_long_amount: equ ($ - .build_array) / 2 227 <1> 228 <1> %if _OPTIONS 229 <1> align 2, db 0 230 <1> .options_array: 231 00002544 [A43D] <1> dw .options_1 232 00002546 [0043] <1> dw .options_2 233 00002548 [AB44] <1> dw .options_3 234 0000254A [1148] <1> dw .options_4 235 0000254C [DC49] <1> dw .options_5 236 0000254E [DD49] <1> dw .options_6 237 <1> .options_array_option_amount: equ ($ - .options_array) / 2 238 00002550 [C24A] <1> dw .flags_1 239 00002552 [594E] <1> dw .asmoptions_1 240 <1> .options_array_amount: equ ($ - .options_array) / 2 241 <1> 242 <1> .options_scan: 243 00002554 313233343536 <1> db "123456" 244 <1> .options_scan_amount: equ ($ - .options_scan) 245 <1> %if .options_array_option_amount != .options_scan_amount 246 <1> %error Array size mismatch 247 <1> %endif 248 <1> 249 <1> .string_options: 250 0000255A 4F5054494F4E5300 <1> asciz "OPTIONS" 251 <1> 252 <1> .options_pages: 253 00002562 456E746572206F6E65- <1> db "Enter one of the following commands to get a corresponding help page:",13,10 253 0000256B 206F66207468652066- <1> 253 00002574 6F6C6C6F77696E6720- <1> 253 0000257D 636F6D6D616E647320- <1> 253 00002586 746F20676574206120- <1> 253 0000258F 636F72726573706F6E- <1> 253 00002598 64696E672068656C70- <1> 253 000025A1 20706167653A0D0A <1> 254 000025A9 0D0A <1> db 13,10 255 000025AB 3F4F310944434F3120- <1> db "?O1",9,"DCO1 - Options",13,10 255 000025B4 2D204F7074696F6E73- <1> 255 000025BD 0D0A <1> 256 000025BF 3F4F320944434F3220- <1> db "?O2",9,"DCO2 - More Options",13,10 256 000025C8 2D204D6F7265204F70- <1> 256 000025D1 74696F6E730D0A <1> 257 000025D8 3F4F330944434F3320- <1> db "?O3",9,"DCO3 - More Options",13,10 257 000025E1 2D204D6F7265204F70- <1> 257 000025EA 74696F6E730D0A <1> 258 000025F1 3F4F340944434F3420- <1> db "?O4",9,"DCO4 - Interrupt Hooking Options",13,10 258 000025FA 2D20496E7465727275- <1> 258 00002603 707420486F6F6B696E- <1> 258 0000260C 67204F7074696F6E73- <1> 258 00002615 0D0A <1> 259 <1> %if _VXCHG || (_DEBUG && _DEBUG_COND) 260 00002617 3F4F360944434F3620- <1> db "?O6",9,"DCO6 - More Options",13,10 260 00002620 2D204D6F7265204F70- <1> 260 00002629 74696F6E730D0A <1> 261 <1> %endif 262 00002630 3F4F4909444946202D- <1> db "?OI",9,"DIF - Internal Flags",13,10 262 00002639 20496E7465726E616C- <1> 262 00002642 20466C6167730D0A <1> 263 0000264A 3F4F410944414F202D- <1> db "?OA",9,"DAO - Assembler/Disassembler Options",13,10 263 00002653 20417373656D626C65- <1> 263 0000265C 722F44697361737365- <1> 263 00002665 6D626C6572204F7074- <1> 263 0000266E 696F6E730D0A <1> 264 00002674 00 <1> asciz 265 <1> %endif 266 <1> 267 <1> .string_build: 268 00002675 4255494C4400 <1> asciz "BUILD" 269 <1> 270 <1> .build_nameversion: 271 0000267B 436F6E64746E6C2E20- <1> db _PROGNAME,_VERSION,13,10 271 00002684 44656275676761626C- <1> 271 0000268D 65206C446562756720- <1> 271 00002696 28323032322D30382D- <1> 271 0000269F 3035290D0A <1> 272 <1> %ifnidn _REVISIONID,"" 273 000026A4 536F7572636520436F- <1> db "Source Control Revision ID: ",_REVISIONID,13,10 273 000026AD 6E74726F6C20526576- <1> 273 000026B6 6973696F6E2049443A- <1> 273 000026BF 206867206432353535- <1> 273 000026C8 316562646566362028- <1> 273 000026D1 3333303920616E6365- <1> 273 000026DA 73746F7273290D0A <1> 274 <1> %endif 275 000026E2 00 <1> asciz 276 000026E3 00 <1> _fill 128, 0, .build_nameversion 277 <1> .build_lmacros: 278 000026FB 55736573206C6D6163- <1> fill 64, 0, asciz _REVISIONID_LMACROS 278 00002704 726F733A2020526576- <1> 278 0000270D 6973696F6E20494420- <1> 278 00002716 686720396661306536- <1> 278 0000271F 343033346364202831- <1> 278 00002728 353020616E63657374- <1> 278 00002731 6F7273290D0A0000- <1> 278 00002731 <1> 279 <1> %if _SYMBOLIC 280 <1> .build_symsnip: 281 <1> fill 64, 0, asciz _REVISIONID_SYMSNIP 282 <1> %endif 283 <1> .build_scanptab: 284 0000273B 55736573207363616E- <1> fill 64, 0, asciz _REVISIONID_SCANPTAB 284 00002744 707461623A20526576- <1> 284 0000274D 6973696F6E20494420- <1> 284 00002756 686720306535333038- <1> 284 0000275F 316331353331202831- <1> 284 00002768 3020616E636573746F- <1> 284 00002771 7273290D0A0000- <1> 284 00002771 <1> 285 <1> .build_inicomp: 286 0000277B 5573657320696E6963- <1> fill 64, 0, asciz _REVISIONID_INICOMP 286 00002784 6F6D703A2020526576- <1> 286 0000278D 6973696F6E20494420- <1> 286 00002796 686720616231346535- <1> 286 0000279F 323261643733202835- <1> 286 000027A8 333520616E63657374- <1> 286 000027B1 6F7273290D0A0000- <1> 286 000027B1 <1> 287 <1> %if _CHECKSUM 288 <1> .build_inicheck: 289 <1> fill 64, 0, asciz _REVISIONID_INICHECK 290 <1> %endif 291 <1> .build_ldosboot: 292 000027BB 55736573206C646F73- <1> fill 64, 0, asciz _REVISIONID_LDOSBOOT 292 000027C4 626F6F743A20526576- <1> 292 000027CD 6973696F6E20494420- <1> 292 000027D6 686720303934303431- <1> 292 000027DF 613631366635202835- <1> 292 000027E8 383620616E63657374- <1> 292 000027F1 6F7273290D0A0000- <1> 292 000027F1 <1> 293 <1> 294 <1> .build_long: 295 <1> %if _EXTHELP 296 000027FB 0D0A <1> db 13,10 297 <1> %if _PM 298 <1> db "DPMI-capable",13,10 299 <1> %if _NOEXTENDER 300 <1> db " DPMI host without extender",13,10 301 <1> %endif 302 <1> %if 0 303 <1> %if _WIN9XSUPP 304 <1> db " No Windows 4 DPMI hook",13,10 305 <1> %endif 306 <1> %if _PM && _DOSEMU 307 <1> db " No DOSEMU DPMI hook",13,10 308 <1> %endif 309 <1> %else 310 <1> db " Automatic DPMI entrypoint hook detection",13,10 311 <1> %endif 312 <1> %if _EXCCSIP 313 <1> db " Display exception address",13,10 314 <1> %endif 315 <1> %if _DISPHOOK 316 <1> db " Display hooking DPMI entry",13,10 317 <1> %endif 318 <1> %endif 319 <1> %if _DEBUG 320 000027FD 44656275676761626C- <1> db "Debuggable",13,10 320 00002806 650D0A <1> 321 <1> %if _DEBUG_COND 322 00002809 436F6E646974696F6E- <1> db "Conditionally Debuggable",13,10 322 00002812 616C6C792044656275- <1> 322 0000281B 676761626C650D0A <1> 323 <1> %endif 324 <1> %endif 325 <1> %if _INT 326 00002823 444920636F6D6D616E- <1> db "DI command",13,10 326 0000282C 640D0A <1> 327 <1> %endif 328 <1> %if _MCB 329 0000282F 444D20636F6D6D616E- <1> db "DM command",13,10 329 00002838 640D0A <1> 330 <1> %endif 331 <1> %if _DSTRINGS 332 0000283B 4420737472696E6720- <1> db "D string commands",13,10 332 00002844 636F6D6D616E64730D- <1> 332 0000284D 0A <1> 333 <1> %endif 334 <1> %if _SDUMP 335 0000284E 53206D617463682064- <1> db "S match dumps line of following data",13,10 335 00002857 756D7073206C696E65- <1> 335 00002860 206F6620666F6C6C6F- <1> 335 00002869 77696E672064617461- <1> 335 00002872 0D0A <1> 336 <1> %endif 337 <1> %if _RN 338 00002874 524E20636F6D6D616E- <1> db "RN command",13,10 338 0000287D 640D0A <1> 339 <1> %endif 340 <1> %if _USESDA 341 00002880 416363657373205344- <1> db "Access SDA current PSP field",13,10 341 00002889 412063757272656E74- <1> 341 00002892 20505350206669656C- <1> 341 0000289B 640D0A <1> 342 <1> %endif 343 <1> %if _VDD 344 0000289E 4C6F6164204E545644- <1> db "Load NTVDM VDD for sector access",13,10 344 000028A7 4D2056444420666F72- <1> 344 000028B0 20736563746F722061- <1> 344 000028B9 63636573730D0A <1> 345 <1> %endif 346 <1> %if _EMS 347 000028C0 5820636F6D6D616E64- <1> db "X commands for EMS access",13,10 347 000028C9 7320666F7220454D53- <1> 347 000028D2 206163636573730D0A <1> 348 <1> %endif 349 <1> %if _MMXSUPP 350 000028DB 524D20636F6D6D616E- <1> db "RM command and reading MMX registers as variables",13,10 350 000028E4 6420616E6420726561- <1> 350 000028ED 64696E67204D4D5820- <1> 350 000028F6 726567697374657273- <1> 350 000028FF 206173207661726961- <1> 350 00002908 626C65730D0A <1> 351 <1> %endif 352 <1> %if _EXPRESSIONS 353 0000290E 45787072657373696F- <1> db "Expression evaluator",13,10 353 00002917 6E206576616C756174- <1> 353 00002920 6F720D0A <1> 354 <1> %endif 355 <1> %if _INDIRECTION 356 00002924 20496E646972656374- <1> db " Indirection in expressions",13,10 356 0000292D 696F6E20696E206578- <1> 356 00002936 7072657373696F6E73- <1> 356 0000293F 0D0A <1> 357 <1> %endif 358 <1> %if _VARIABLES 359 00002941 5661726961626C6573- <1> db "Variables with user-defined purpose",13,10 359 0000294A 207769746820757365- <1> 359 00002953 722D646566696E6564- <1> 359 0000295C 20707572706F73650D- <1> 359 00002965 0A <1> 360 <1> %endif 361 <1> %if _OPTIONS 362 00002966 446562756767657220- <1> db "Debugger option and status variables",13,10 362 0000296F 6F7074696F6E20616E- <1> 362 00002978 642073746174757320- <1> 362 00002981 7661726961626C6573- <1> 362 0000298A 0D0A <1> 363 <1> %endif 364 <1> %if _PSPVARIABLES 365 0000298C 505350207661726961- <1> db "PSP variables",13,10 365 00002995 626C65730D0A <1> 366 <1> %endif 367 <1> %if _COND 368 0000299B 436F6E646974696F6E- <1> db "Conditional jump notice in register dump",13,10 368 000029A4 616C206A756D70206E- <1> 368 000029AD 6F7469636520696E20- <1> 368 000029B6 726567697374657220- <1> 368 000029BF 64756D700D0A <1> 369 <1> %endif 370 <1> %if _TSR 371 000029C5 545352206D6F646520- <1> db "TSR mode (Process detachment)",13,10 371 000029CE 2850726F6365737320- <1> 371 000029D7 6465746163686D656E- <1> 371 000029E0 74290D0A <1> 372 <1> %endif 373 <1> %if _DEVICE 374 000029E4 4C6F616461626C6520- <1> db "Loadable device driver",13,10 374 000029ED 646576696365206472- <1> 374 000029F6 697665720D0A <1> 375 <1> %endif 376 <1> %if _BOOTLDR 377 000029FC 426F6F74206C6F6164- <1> db "Boot loader",13,10 377 00002A05 65720D0A <1> 378 <1> %endif 379 <1> %if _BREAKPOINTS 380 00002A09 5065726D616E656E74- <1> db "Permanent breakpoints",13,10 380 00002A12 20627265616B706F69- <1> 380 00002A1B 6E74730D0A <1> 381 <1> %endif 382 <1> %push 383 00002A20 496E74657263657074- <1> db "Intercepted" 383 00002A29 6564 <1> 384 <1> %if _PM 385 <1> db " 86M" 386 <1> %endif 387 00002A2B 20696E746572727570- <1> db " interrupts:" 387 00002A34 74733A <1> 388 <1> %define %$pref " " 389 <1> %macro dispint 2.nolist 390 <1> %if %1 391 <1> db %$pref, %2 392 <1> %define %$pref ", " 393 <1> %endif 394 <1> %endmacro 395 00002A37 203030 <1> dispint _CATCHINT00, "00" 396 00002A3A 2C203031 <1> dispint _CATCHINT01, "01" 397 00002A3E 2C203033 <1> dispint _CATCHINT03, "03" 398 00002A42 2C203036 <1> dispint _CATCHINT06, "06" 399 00002A46 2C203138 <1> dispint _CATCHINT18, "18" 400 00002A4A 2C203139 <1> dispint _CATCHINT19, "19" 401 <1> %ifidn %$pref," " 402 <1> db " none" 403 <1> %endif 404 00002A4E 0D0A <1> db 13,10 405 <1> %if _PM || _CATCHINT08 406 00002A50 50726F636573736564 <1> db "Processed" 407 <1> %if _PM 408 <1> db " 86M" 409 <1> %endif 410 00002A59 20696E746572727570- <1> db " interrupts:" 410 00002A62 74733A <1> 411 <1> %define %$pref " " 412 00002A65 203038 <1> dispint _CATCHINT08, "08" 413 <1> dispint _PM, "2F.1687" 414 <1> %ifidn %$pref," " 415 <1> db " none" 416 <1> %endif 417 00002A68 0D0A <1> db 13,10 418 <1> %endif 419 <1> %if _PM 420 <1> db "Intercepted DPMI exceptions:" 421 <1> %define %$pref " " 422 <1> dispint _CATCHEXC00, "00" 423 <1> dispint _CATCHEXC01, "01" 424 <1> dispint _CATCHEXC03, "03" 425 <1> dispint _CATCHEXC06, "06" 426 <1> dispint _CATCHEXC0C, "0C" 427 <1> dispint _CATCHEXC0D, "0D" 428 <1> dispint _CATCHEXC0E, "0E" 429 <1> %ifidn %$pref," " 430 <1> db " none" 431 <1> %endif 432 <1> db 13,10 433 <1> %endif 434 <1> %unmacro dispint 2.nolist 435 <1> %pop 436 <1> %if _PM && _CATCHPMINT214C 437 <1> db "Processed DPMI interrupts: 21.4C",13,10 438 <1> %endif 439 <1> %if _EXTHELP 440 00002A6A 457874656E64656420- <1> db "Extended built-in help pages",13,10 440 00002A73 6275696C742D696E20- <1> 440 00002A7C 68656C702070616765- <1> 440 00002A85 730D0A <1> 441 <1> %endif 442 <1> %if _ONLYNON386 443 <1> db "Only supports non-386 operation",13,10 444 <1> %endif 445 <1> %if _ONLY386 446 <1> db "Only supports 386+ operation",13,10 447 <1> %endif 448 <1> %else 449 <1> %if _BOOTLDR 450 <1> asciz 451 <1> ; This message is used by mak.sh to detect that we 452 <1> ; are building with boot load support. 453 <1> db 13,10,"Boot loader",13,10 454 <1> %endif 455 <1> %endif 456 00002A88 00 <1> asciz 457 <1> 458 <1> %if _EXTHELP 459 <1> .license: 460 00002A89 6C4465627567202D20- <1> db "lDebug - libre 86-DOS debugger",13,10 460 00002A92 6C696272652038362D- <1> 460 00002A9B 444F53206465627567- <1> 460 00002AA4 6765720D0A <1> 461 00002AA9 0D0A <1> db 13,10 462 00002AAB 436F70797269676874- <1> db "Copyright (C) 1995-2003 Paul Vojta",13,10 462 00002AB4 202843292031393935- <1> 462 00002ABD 2D3230303320506175- <1> 462 00002AC6 6C20566F6A74610D0A <1> 463 00002ACF 436F70797269676874- <1> db "Copyright (C) 2008-2021 C. Masloch",13,10 463 00002AD8 202843292032303038- <1> 463 00002AE1 2D3230323120432E20- <1> 463 00002AEA 4D61736C6F63680D0A <1> 464 00002AF3 0D0A <1> db 13,10 465 00002AF5 5573616765206F6620- <1> db "Usage of the works is permitted provided that this",13,10 465 00002AFE 74686520776F726B73- <1> 465 00002B07 206973207065726D69- <1> 465 00002B10 747465642070726F76- <1> 465 00002B19 696465642074686174- <1> 465 00002B22 20746869730D0A <1> 466 00002B29 696E737472756D656E- <1> db "instrument is retained with the works, so that any entity",13,10 466 00002B32 742069732072657461- <1> 466 00002B3B 696E65642077697468- <1> 466 00002B44 2074686520776F726B- <1> 466 00002B4D 732C20736F20746861- <1> 466 00002B56 7420616E7920656E74- <1> 466 00002B5F 6974790D0A <1> 467 00002B64 746861742075736573- <1> db "that uses the works is notified of this instrument.",13,10 467 00002B6D 2074686520776F726B- <1> 467 00002B76 73206973206E6F7469- <1> 467 00002B7F 66696564206F662074- <1> 467 00002B88 68697320696E737472- <1> 467 00002B91 756D656E742E0D0A <1> 468 00002B99 0D0A <1> db 13,10 469 00002B9B 444953434C41494D45- <1> db "DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.",13,10 469 00002BA4 523A2054484520574F- <1> 469 00002BAD 524B53204152452057- <1> 469 00002BB6 4954484F5554205741- <1> 469 00002BBF 5252414E54592E0D0A <1> 470 00002BC8 0D0A <1> db 13,10 471 00002BCA 0D0A <1> db 13,10 472 00002BCC 416C6C20636F6E7472- <1> db "All contributions by Paul Vojta or C. Masloch to the debugger are available",13,10 472 00002BD5 69627574696F6E7320- <1> 472 00002BDE 6279205061756C2056- <1> 472 00002BE7 6F6A7461206F722043- <1> 472 00002BF0 2E204D61736C6F6368- <1> 472 00002BF9 20746F207468652064- <1> 472 00002C02 656275676765722061- <1> 472 00002C0B 726520617661696C61- <1> 472 00002C14 626C650D0A <1> 473 00002C19 756E64657220612063- <1> db "under a choice of three different licenses. These are the Fair License, the",13,10 473 00002C22 686F696365206F6620- <1> 473 00002C2B 746872656520646966- <1> 473 00002C34 666572656E74206C69- <1> 473 00002C3D 63656E7365732E2054- <1> 473 00002C46 686573652061726520- <1> 473 00002C4F 746865204661697220- <1> 473 00002C58 4C6963656E73652C20- <1> 473 00002C61 7468650D0A <1> 474 00002C66 53696D706C69666965- <1> db "Simplified 2-Clause BSD License, or the MIT License.",13,10 474 00002C6F 6420322D436C617573- <1> 474 00002C78 6520425344204C6963- <1> 474 00002C81 656E73652C206F7220- <1> 474 00002C8A 746865204D4954204C- <1> 474 00002C93 6963656E73652E0D0A <1> 475 00002C9C 0D0A <1> db 13,10 476 00002C9E 546869732069732074- <1> db "This is the license and copyright information that applies to lDebug; but note",13,10 476 00002CA7 6865206C6963656E73- <1> 476 00002CB0 6520616E6420636F70- <1> 476 00002CB9 79726967687420696E- <1> 476 00002CC2 666F726D6174696F6E- <1> 476 00002CCB 207468617420617070- <1> 476 00002CD4 6C69657320746F206C- <1> 476 00002CDD 44656275673B206275- <1> 476 00002CE6 74206E6F74650D0A <1> 477 00002CEE 746861742074686572- <1> db "that there have been substantial contributions to the code base that are not",13,10 477 00002CF7 652068617665206265- <1> 477 00002D00 656E20737562737461- <1> 477 00002D09 6E7469616C20636F6E- <1> 477 00002D12 747269627574696F6E- <1> 477 00002D1B 7320746F2074686520- <1> 477 00002D24 636F64652062617365- <1> 477 00002D2D 207468617420617265- <1> 477 00002D36 206E6F740D0A <1> 478 00002D3C 636F70797269676874- <1> db "copyrighted (public domain).",13,10 478 00002D45 656420287075626C69- <1> 478 00002D4E 6320646F6D61696E29- <1> 478 00002D57 2E0D0A <1> 479 00002D5A 00 <1> asciz 480 <1> 481 <1> .reghelp: 482 00002D5B 417661696C61626C65- <1> db "Available 16-bit registers:",9,9,"Available 32-bit registers: (386+)",13,10 482 00002D64 2031362D6269742072- <1> 482 00002D6D 65676973746572733A- <1> 482 00002D76 0909417661696C6162- <1> 482 00002D7F 6C652033322D626974- <1> 482 00002D88 207265676973746572- <1> 482 00002D91 733A20283338362B29- <1> 482 00002D9A 0D0A <1> 483 00002D9C 415809416363756D75- <1> db "AX",9,"Accumulator",9,9,9,"EAX",13,10 483 00002DA5 6C61746F7209090945- <1> 483 00002DAE 41580D0A <1> 484 00002DB2 425809426173652072- <1> db "BX",9,"Base register",9,9,9,"EBX",13,10 484 00002DBB 656769737465720909- <1> 484 00002DC4 094542580D0A <1> 485 00002DCA 435809436F756E7465- <1> db "CX",9,"Counter",9,9,9,9,"ECX",13,10 485 00002DD3 72090909094543580D- <1> 485 00002DDC 0A <1> 486 00002DDD 445809446174612072- <1> db "DX",9,"Data register",9,9,9,"EDX",13,10 486 00002DE6 656769737465720909- <1> 486 00002DEF 094544580D0A <1> 487 00002DF5 535009537461636B20- <1> db "SP",9,"Stack pointer",9,9,9,"ESP",13,10 487 00002DFE 706F696E7465720909- <1> 487 00002E07 094553500D0A <1> 488 00002E0D 425009426173652070- <1> db "BP",9,"Base pointer",9,9,9,"EBP",13,10 488 00002E16 6F696E746572090909- <1> 488 00002E1F 4542500D0A <1> 489 00002E24 534909536F75726365- <1> db "SI",9,"Source index",9,9,9,"ESI",13,10 489 00002E2D 20696E646578090909- <1> 489 00002E36 4553490D0A <1> 490 00002E3B 44490944657374696E- <1> db "DI",9,"Destination index",9,9,"EDI",13,10 490 00002E44 6174696F6E20696E64- <1> 490 00002E4D 657809094544490D0A <1> 491 00002E56 445309446174612073- <1> db "DS",9,"Data segment",13,10 491 00002E5F 65676D656E740D0A <1> 492 00002E67 455309457874726120- <1> db "ES",9,"Extra segment",13,10 492 00002E70 7365676D656E740D0A <1> 493 00002E79 535309537461636B20- <1> db "SS",9,"Stack segment",13,10 493 00002E82 7365676D656E740D0A <1> 494 00002E8B 435309436F64652073- <1> db "CS",9,"Code segment",13,10 494 00002E94 65676D656E740D0A <1> 495 00002E9C 465309457874726120- <1> db "FS",9,"Extra segment 2 (386+)",13,10 495 00002EA5 7365676D656E742032- <1> 495 00002EAE 20283338362B290D0A <1> 496 00002EB7 475309457874726120- <1> db "GS",9,"Extra segment 3 (386+)",13,10 496 00002EC0 7365676D656E742033- <1> 496 00002EC9 20283338362B290D0A <1> 497 00002ED2 495009496E73747275- <1> db "IP",9,"Instruction pointer",9,9,"EIP",13,10 497 00002EDB 6374696F6E20706F69- <1> 497 00002EE4 6E7465720909454950- <1> 497 00002EED 0D0A <1> 498 00002EEF 464C09466C61677309- <1> db "FL",9,"Flags",9,9,9,9,"EFL",13,10 498 00002EF8 09090945464C0D0A <1> 499 00002F00 0D0A <1> db 13,10 500 <1> %if _MMXSUPP && 0 501 <1> db "Available 64-bit Matrix Math Extension (MMX) registers: (if supported)",13,10 502 <1> db "MMx",9,"MM(x)",9,"MMX register x, where x is 0 to 7",13,10 503 <1> db 13,10 504 <1> %endif 505 00002F02 456E746572203F4620- <1> db "Enter ?F to display the recognized flags.",13,10 505 00002F0B 746F20646973706C61- <1> 505 00002F14 792074686520726563- <1> 505 00002F1D 6F676E697A65642066- <1> 505 00002F26 6C6167732E0D0A <1> 506 00002F2D 00 <1> asciz 507 <1> 508 <1> .flaghelp: 509 00002F2E 5265636F676E697A65- <1> db "Recognized flags:",13,10 509 00002F37 6420666C6167733A0D- <1> 509 00002F40 0A <1> 510 00002F41 56616C7565094E616D- <1> db "Value",9,"Name",9,9,9, " Set",9,9,9, " Clear",13,10 510 00002F4A 650909092020536574- <1> 510 00002F53 0909092020436C6561- <1> 510 00002F5C 720D0A <1> 511 00002F5F 3038303020204F4620- <1> db "0800 OF Overflow Flag",9,9,"OV Overflow",9,9, "NV No overflow",13,10 511 00002F68 204F766572666C6F77- <1> 511 00002F71 20466C616709094F56- <1> 511 00002F7A 20204F766572666C6F- <1> 511 00002F83 7709094E5620204E6F- <1> 511 00002F8C 206F766572666C6F77- <1> 511 00002F95 0D0A <1> 512 00002F97 303430302020444620- <1> db "0400 DF Direction Flag",9,"DN Down",9,9, "UP Up",13,10 512 00002FA0 20446972656374696F- <1> 512 00002FA9 6E20466C616709444E- <1> 512 00002FB2 2020446F776E090955- <1> 512 00002FBB 50202055700D0A <1> 513 00002FC2 303230302020494620- <1> db "0200 IF Interrupt Flag",9,"EI Enable interrupts",9,"DI Disable interrupts",13,10 513 00002FCB 20496E746572727570- <1> 513 00002FD4 7420466C6167094549- <1> 513 00002FDD 2020456E61626C6520- <1> 513 00002FE6 696E74657272757074- <1> 513 00002FEF 730944492020446973- <1> 513 00002FF8 61626C6520696E7465- <1> 513 00003001 7272757074730D0A <1> 514 00003009 303038302020534620- <1> db "0080 SF Sign Flag",9,9, "NG Negative",9,9, "PL Plus",13,10 514 00003012 205369676E20466C61- <1> 514 0000301B 6709094E4720204E65- <1> 514 00003024 676174697665090950- <1> 514 0000302D 4C2020506C75730D0A <1> 515 00003036 3030343020205A4620- <1> db "0040 ZF Zero Flag",9,9, "ZR Zero",9,9, "NZ Not zero",13,10 515 0000303F 205A65726F20466C61- <1> 515 00003048 6709095A5220205A65- <1> 515 00003051 726F09094E5A20204E- <1> 515 0000305A 6F74207A65726F0D0A <1> 516 00003063 303031302020414620- <1> db "0010 AF Auxiliary Flag",9,"AC Auxiliary carry",9,"NA No auxiliary carry",13,10 516 0000306C 20417578696C696172- <1> 516 00003075 7920466C6167094143- <1> 516 0000307E 2020417578696C6961- <1> 516 00003087 727920636172727909- <1> 516 00003090 4E4120204E6F206175- <1> 516 00003099 78696C696172792063- <1> 516 000030A2 617272790D0A <1> 517 000030A8 303030342020504620- <1> db "0004 PF Parity Flag",9,9, "PE Parity even",9,9, "PO Parity odd",13,10 517 000030B1 205061726974792046- <1> 517 000030BA 6C6167090950452020- <1> 517 000030C3 506172697479206576- <1> 517 000030CC 656E0909504F202050- <1> 517 000030D5 6172697479206F6464- <1> 517 000030DE 0D0A <1> 518 000030E0 303030312020434620- <1> db "0001 CF Carry Flag",9,9, "CY Carry",9,9, "NC No carry",13,10 518 000030E9 20436172727920466C- <1> 518 000030F2 616709094359202043- <1> 518 000030FB 6172727909094E4320- <1> 518 00003104 204E6F206361727279- <1> 518 0000310D 0D0A <1> 519 0000310F 0D0A <1> db 13,10 520 00003111 5468652073686F7274- <1> db "The short names of the flag states are displayed when dumping registers",13,10 520 0000311A 206E616D6573206F66- <1> 520 00003123 2074686520666C6167- <1> 520 0000312C 207374617465732061- <1> 520 00003135 726520646973706C61- <1> 520 0000313E 796564207768656E20- <1> 520 00003147 64756D70696E672072- <1> 520 00003150 65676973746572730D- <1> 520 00003159 0A <1> 521 0000315A 616E642063616E2062- <1> db "and can be entered to modify the symbolic F register with R. The short",13,10 521 00003163 6520656E7465726564- <1> 521 0000316C 20746F206D6F646966- <1> 521 00003175 79207468652073796D- <1> 521 0000317E 626F6C696320462072- <1> 521 00003187 656769737465722077- <1> 521 00003190 69746820522E205468- <1> 521 00003199 652073686F72740D0A <1> 522 000031A2 6E616D6573206F6620- <1> db "names of the flags can be modified by R.",13,10 522 000031AB 74686520666C616773- <1> 522 000031B4 2063616E206265206D- <1> 522 000031BD 6F6469666965642062- <1> 522 000031C6 7920522E0D0A <1> 523 000031CC 00 <1> asciz 524 <1> 525 <1> %if _COND 526 <1> .condhelp: 527 000031CD 496E20746865207265- <1> db "In the register dump displayed by the R, T, P and G commands, conditional",13,10 527 000031D6 676973746572206475- <1> 527 000031DF 6D7020646973706C61- <1> 527 000031E8 796564206279207468- <1> 527 000031F1 6520522C20542C2050- <1> 527 000031FA 20616E64204720636F- <1> 527 00003203 6D6D616E64732C2063- <1> 527 0000320C 6F6E646974696F6E61- <1> 527 00003215 6C0D0A <1> 528 00003218 6A756D707320617265- <1> db "jumps are displayed with a notice that shows whether the instruction will",13,10 528 00003221 20646973706C617965- <1> 528 0000322A 642077697468206120- <1> 528 00003233 6E6F74696365207468- <1> 528 0000323C 61742073686F777320- <1> 528 00003245 776865746865722074- <1> 528 0000324E 686520696E73747275- <1> 528 00003257 6374696F6E2077696C- <1> 528 00003260 6C0D0A <1> 529 00003263 63617573652061206A- <1> db "cause a jump depending on its condition and the current register and flag",13,10 529 0000326C 756D7020646570656E- <1> 529 00003275 64696E67206F6E2069- <1> 529 0000327E 747320636F6E646974- <1> 529 00003287 696F6E20616E642074- <1> 529 00003290 68652063757272656E- <1> 529 00003299 742072656769737465- <1> 529 000032A2 7220616E6420666C61- <1> 529 000032AB 670D0A <1> 530 000032AE 636F6E74656E74732E- <1> db 'contents. This notice shows either "jumping" or "not jumping" as appropriate.',13,10 530 000032B7 2054686973206E6F74- <1> 530 000032C0 6963652073686F7773- <1> 530 000032C9 206569746865722022- <1> 530 000032D2 6A756D70696E672220- <1> 530 000032DB 6F7220226E6F74206A- <1> 530 000032E4 756D70696E67222061- <1> 530 000032ED 7320617070726F7072- <1> 530 000032F6 696174652E0D0A <1> 531 000032FD 0D0A <1> db 13,10 532 000032FF 54686520636F6E6469- <1> db "The conditional jumps use these conditions: (second column negates)",13,10 532 00003308 74696F6E616C206A75- <1> 532 00003311 6D7073207573652074- <1> 532 0000331A 6865736520636F6E64- <1> 532 00003323 6974696F6E733A2028- <1> 532 0000332C 7365636F6E6420636F- <1> 532 00003335 6C756D6E206E656761- <1> 532 0000333E 746573290D0A <1> 533 00003344 206A6F09096A6E6F09- <1> db " jo",9,9,"jno",9,9,"OF",13,10 533 0000334D 094F460D0A <1> 534 00003352 206A63206A62206A6E- <1> db " jc jb jnae",9,"jnc jnb jae",9,"CF",13,10 534 0000335B 6165096A6E63206A6E- <1> 534 00003364 62206A61650943460D- <1> 534 0000336D 0A <1> 535 0000336E 206A7A206A6509096A- <1> db " jz je",9,9,"jnz jne",9,9,"ZF",13,10 535 00003377 6E7A206A6E6509095A- <1> 535 00003380 460D0A <1> 536 00003383 206A6265206A6E6109- <1> db " jbe jna",9,"jnbe ja",9,9,"ZF||CF",13,10 536 0000338C 6A6E6265206A610909- <1> 536 00003395 5A467C7C43460D0A <1> 537 0000339D 206A7309096A6E7309- <1> db " js",9,9,"jns",9,9,"SF",13,10 537 000033A6 0953460D0A <1> 538 000033AB 206A70206A70650909- <1> db " jp jpe",9,9,"jnp jpo",9,9,"PF",13,10 538 000033B4 6A6E70206A706F0909- <1> 538 000033BD 50460D0A <1> 539 000033C1 206A6C206A6E676509- <1> db " jl jnge",9,"jnl jge",9,9,"OF^^SF",13,10 539 000033CA 6A6E6C206A67650909- <1> 539 000033D3 4F465E5E53460D0A <1> 540 000033DB 206A6C65206A6E6709- <1> db " jle jng",9,"jnle jg",9,9,"OF^^SF || ZF",13,10 540 000033E4 6A6E6C65206A670909- <1> 540 000033ED 4F465E5E5346207C7C- <1> 540 000033F6 205A460D0A <1> 541 000033FB 206A28652963787A09- <1> db " j(e)cxz",9,9,9,"(e)cx==0",13,10 541 00003404 090928652963783D3D- <1> 541 0000340D 300D0A <1> 542 00003410 206C6F6F7009090909- <1> db " loop",9,9,9,9,"(e)cx!=1",13,10 542 00003419 2865296378213D310D- <1> 542 00003422 0A <1> 543 00003423 206C6F6F707A206C6F- <1> db " loopz loope",9,9,9,"(e)cx!=1 && ZF",13,10 543 0000342C 6F7065090909286529- <1> 543 00003435 6378213D3120262620- <1> 543 0000343E 5A460D0A <1> 544 00003442 206C6F6F706E7A206C- <1> db " loopnz loopne",9,9,9,"(e)cx!=1 && !ZF",13,10 544 0000344B 6F6F706E6509090928- <1> 544 00003454 65296378213D312026- <1> 544 0000345D 2620215A460D0A <1> 545 00003464 0D0A <1> db 13,10 546 00003466 456E746572203F4620- <1> db "Enter ?F to display a description of the flag names.",13,10 546 0000346F 746F20646973706C61- <1> 546 00003478 792061206465736372- <1> 546 00003481 697074696F6E206F66- <1> 546 0000348A 2074686520666C6167- <1> 546 00003493 206E616D65732E0D0A <1> 547 0000349C 00 <1> asciz 548 <1> %endif 549 <1> 550 <1> %if _EXPRESSIONS 551 <1> .expressionhelp: 552 0000349D 5265636F676E697A65- <1> db "Recognized operators in expressions:",13,10 552 000034A6 64206F70657261746F- <1> 552 000034AF 727320696E20657870- <1> 552 000034B8 72657373696F6E733A- <1> 552 000034C1 0D0A <1> 553 000034C3 7C0962697477697365- <1> db "|",9, "bitwise OR",9,9, "||",9, "boolean OR",13,10 553 000034CC 204F5209097C7C0962- <1> 553 000034D5 6F6F6C65616E204F52- <1> 553 000034DE 0D0A <1> 554 000034E0 5E0962697477697365- <1> db "^",9, "bitwise XOR",9,9, "^^",9, "boolean XOR",13,10 554 000034E9 20584F5209095E5E09- <1> 554 000034F2 626F6F6C65616E2058- <1> 554 000034FB 4F520D0A <1> 555 000034FF 260962697477697365- <1> db "&",9, "bitwise AND",9,9, "&&",9, "boolean AND",13,10 555 00003508 20414E440909262609- <1> 555 00003511 626F6F6C65616E2041- <1> 555 0000351A 4E440D0A <1> 556 0000351E 3E3E096269742D7368- <1> db ">>",9, "bit-shift right",9,9, ">",9,"test if above",13,10 556 00003527 696674207269676874- <1> 556 00003530 09093E097465737420- <1> 556 00003539 69662061626F76650D- <1> 556 00003542 0A <1> 557 00003543 3E3E3E097369676E65- <1> db ">>>",9, "signed bit-shift right",9, "<",9,"test if below",13,10 557 0000354C 64206269742D736869- <1> 557 00003555 667420726967687409- <1> 557 0000355E 3C0974657374206966- <1> 557 00003567 2062656C6F770D0A <1> 558 0000356F 3C3C096269742D7368- <1> db "<<",9, "bit-shift left",9,9, ">=",9,"test if above-or-equal",13,10 558 00003578 696674206C65667409- <1> 558 00003581 093E3D097465737420- <1> 558 0000358A 69662061626F76652D- <1> 558 00003593 6F722D657175616C0D- <1> 558 0000359C 0A <1> 559 0000359D 3E3C096269742D6D69- <1> db "><",9, "bit-mirror",9,9, "<=",9,"test if below-or-equal",13,10 559 000035A6 72726F7209093C3D09- <1> 559 000035AF 746573742069662062- <1> 559 000035B8 656C6F772D6F722D65- <1> 559 000035C1 7175616C0D0A <1> 560 000035C7 2B096164646974696F- <1> db "+",9, "addition",9,9, "==",9,"test if equal",13,10 560 000035D0 6E09093D3D09746573- <1> 560 000035D9 742069662065717561- <1> 560 000035E2 6C0D0A <1> 561 000035E5 2D0973756274726163- <1> db "-",9, "subtraction",9,9, "!=",9,"test if not equal",13,10 561 000035EE 74696F6E0909213D09- <1> 561 000035F7 74657374206966206E- <1> 561 00003600 6F7420657175616C0D- <1> 561 00003609 0A <1> 562 0000360A 2A096D756C7469706C- <1> db "*",9, "multiplication",9,9, "=>",9,"same as >=",13,10 562 00003613 69636174696F6E0909- <1> 562 0000361C 3D3E0973616D652061- <1> 562 00003625 73203E3D0D0A <1> 563 0000362B 2F096469766973696F- <1> db "/",9, "division",9,9, "=<",9,"same as <=",13,10 563 00003634 6E09093D3C0973616D- <1> 563 0000363D 65206173203C3D0D0A <1> 564 00003646 25096D6F64756C6F20- <1> db "%",9, "modulo (A-(A/B*B))",9, "<>",9,"same as !=",13,10 564 0000364F 28412D28412F422A42- <1> 564 00003658 2929093C3E0973616D- <1> 564 00003661 6520617320213D0D0A <1> 565 0000366A 2A2A09706F7765720D- <1> db "**",9, "power",13,10 565 00003673 0A <1> 566 00003674 0D0A <1> db 13,10 567 00003676 496D706C6963697420- <1> db "Implicit operater precedence is handled in the listed order, with increasing",13,10 567 0000367F 6F7065726174657220- <1> 567 00003688 707265636564656E63- <1> 567 00003691 652069732068616E64- <1> 567 0000369A 6C656420696E207468- <1> 567 000036A3 65206C697374656420- <1> 567 000036AC 6F726465722C207769- <1> 567 000036B5 746820696E63726561- <1> 567 000036BE 73696E670D0A <1> 568 000036C4 707265636564656E63- <1> db "precedence: (Brackets specify explicit precedence of an expression.)",13,10 568 000036CD 653A2028427261636B- <1> 568 000036D6 657473207370656369- <1> 568 000036DF 6679206578706C6963- <1> 568 000036E8 697420707265636564- <1> 568 000036F1 656E6365206F662061- <1> 568 000036FA 6E2065787072657373- <1> 568 00003703 696F6E2E290D0A <1> 569 0000370A 20626F6F6C65616E20- <1> db " boolean operators OR, XOR, AND (each has a different precedence)",13,10 569 00003713 6F70657261746F7273- <1> 569 0000371C 204F522C20584F522C- <1> 569 00003725 20414E442028656163- <1> 569 0000372E 682068617320612064- <1> 569 00003737 6966666572656E7420- <1> 569 00003740 707265636564656E63- <1> 569 00003749 65290D0A <1> 570 0000374D 20636F6D7061726973- <1> db " comparison operators",13,10 570 00003756 6F6E206F7065726174- <1> 570 0000375F 6F72730D0A <1> 571 00003764 206269747769736520- <1> db " bitwise operators OR, XOR, AND (each has a different precedence)",13,10 571 0000376D 6F70657261746F7273- <1> 571 00003776 204F522C20584F522C- <1> 571 0000377F 20414E442028656163- <1> 571 00003788 682068617320612064- <1> 571 00003791 6966666572656E7420- <1> 571 0000379A 707265636564656E63- <1> 571 000037A3 65290D0A <1> 572 000037A7 20736869667420616E- <1> db " shift and bit-mirror operators",13,10 572 000037B0 64206269742D6D6972- <1> 572 000037B9 726F72206F70657261- <1> 572 000037C2 746F72730D0A <1> 573 000037C8 206164646974696F6E- <1> db " addition and subtraction operators",13,10 573 000037D1 20616E642073756274- <1> 573 000037DA 72616374696F6E206F- <1> 573 000037E3 70657261746F72730D- <1> 573 000037EC 0A <1> 574 000037ED 206D756C7469706C69- <1> db " multiplication, division and modulo operators",13,10 574 000037F6 636174696F6E2C2064- <1> 574 000037FF 69766973696F6E2061- <1> 574 00003808 6E64206D6F64756C6F- <1> 574 00003811 206F70657261746F72- <1> 574 0000381A 730D0A <1> 575 0000381D 20706F776572206F70- <1> db " power operator",13,10 575 00003826 657261746F720D0A <1> 576 0000382E 0D0A <1> db 13,10 577 00003830 5265636F676E697A65- <1> db "Recognized unary operators: (modifying the next number)",13,10 577 00003839 6420756E617279206F- <1> 577 00003842 70657261746F72733A- <1> 577 0000384B 20286D6F6469667969- <1> 577 00003854 6E6720746865206E65- <1> 577 0000385D 7874206E756D626572- <1> 577 00003866 290D0A <1> 578 00003869 2B09706F7369746976- <1> db "+",9, "positive (does nothing)",13,10 578 00003872 652028646F6573206E- <1> 578 0000387B 6F7468696E67290D0A <1> 579 00003884 2D096E656761746976- <1> db "-",9, "negative",13,10 579 0000388D 650D0A <1> 580 00003890 7E0962697477697365- <1> db "~",9, "bitwise NOT",13,10 580 00003899 204E4F540D0A <1> 581 0000389F 2109626F6F6C65616E- <1> db "!",9, "boolean NOT",13,10 581 000038A8 204E4F540D0A <1> 582 000038AE 3F096162736F6C7574- <1> db "?",9, "absolute value",13,10 582 000038B7 652076616C75650D0A <1> 583 000038C0 212109636F6E766572- <1> db "!!",9, "convert to boolean",13,10 583 000038C9 7420746F20626F6F6C- <1> 583 000038D2 65616E0D0A <1> 584 000038D7 0D0A <1> db 13,10 585 000038D9 4E6F74652074686174- <1> db "Note that the power operator does not affect unary operator handling.",13,10 585 000038E2 2074686520706F7765- <1> 585 000038EB 72206F70657261746F- <1> 585 000038F4 7220646F6573206E6F- <1> 585 000038FD 742061666665637420- <1> 585 00003906 756E617279206F7065- <1> 585 0000390F 7261746F722068616E- <1> 585 00003918 646C696E672E0D0A <1> 586 00003920 466F7220696E737461- <1> db 'For instance, "- 2 ** 2" is parsed as "(-2) ** 2" and evaluates to 4.',13,10 586 00003929 6E63652C20222D2032- <1> 586 00003932 202A2A203222206973- <1> 586 0000393B 207061727365642061- <1> 586 00003944 732022282D3229202A- <1> 586 0000394D 2A20322220616E6420- <1> 586 00003956 6576616C7561746573- <1> 586 0000395F 20746F20342E0D0A <1> 587 00003967 0D0A <1> db 13,10 588 00003969 416C74686F75676820- <1> db "Although a negative unary and signed bit-shift right operator are provided",13,10 588 00003972 61206E656761746976- <1> 588 0000397B 6520756E6172792061- <1> 588 00003984 6E64207369676E6564- <1> 588 0000398D 206269742D73686966- <1> 588 00003996 74207269676874206F- <1> 588 0000399F 70657261746F722061- <1> 588 000039A8 72652070726F766964- <1> 588 000039B1 65640D0A <1> 589 000039B5 746865206578707265- <1> db "the expression evaluator is intrinsically unsigned. Particularly the division,",13,10 589 000039BE 7373696F6E20657661- <1> 589 000039C7 6C7561746F72206973- <1> 589 000039D0 20696E7472696E7369- <1> 589 000039D9 63616C6C7920756E73- <1> 589 000039E2 69676E65642E205061- <1> 589 000039EB 72746963756C61726C- <1> 589 000039F4 792074686520646976- <1> 589 000039FD 6973696F6E2C0D0A <1> 590 00003A05 6D756C7469706C6963- <1> db "multiplication, modulo and all comparison operators operate unsigned. Due to",13,10 590 00003A0E 6174696F6E2C206D6F- <1> 590 00003A17 64756C6F20616E6420- <1> 590 00003A20 616C6C20636F6D7061- <1> 590 00003A29 7269736F6E206F7065- <1> 590 00003A32 7261746F7273206F70- <1> 590 00003A3B 657261746520756E73- <1> 590 00003A44 69676E65642E204475- <1> 590 00003A4D 6520746F0D0A <1> 591 00003A53 746869732C20746865- <1> db 'this, the expression "-1 < 0" evaluates to zero.',13,10 591 00003A5C 206578707265737369- <1> 591 00003A65 6F6E20222D31203C20- <1> 591 00003A6E 3022206576616C7561- <1> 591 00003A77 74657320746F207A65- <1> 591 00003A80 726F2E0D0A <1> 592 00003A85 0D0A <1> db 13,10 593 00003A87 5265636F676E697A65- <1> db "Recognized terms in an expression:",13,10 593 00003A90 64207465726D732069- <1> 593 00003A99 6E20616E2065787072- <1> 593 00003AA2 657373696F6E3A0D0A <1> 594 00003AAB 2033322D6269742069- <1> db " 32-bit immediates",13,10 594 00003AB4 6D6D65646961746573- <1> 594 00003ABD 0D0A <1> 595 00003ABF 20382D626974207265- <1> db " 8-bit registers",13,10 595 00003AC8 676973746572730D0A <1> 596 00003AD1 2031362D6269742072- <1> db " 16-bit registers including segment registers (except FS, GS)",13,10 596 00003ADA 656769737465727320- <1> 596 00003AE3 696E636C7564696E67- <1> 596 00003AEC 207365676D656E7420- <1> 596 00003AF5 726567697374657273- <1> 596 00003AFE 202865786365707420- <1> 596 00003B07 46532C204753290D0A <1> 597 00003B10 2033322D6269742063- <1> db " 32-bit compound registers made of two 16-bit registers (eg DXAX)",13,10 597 00003B19 6F6D706F756E642072- <1> 597 00003B22 656769737465727320- <1> 597 00003B2B 6D616465206F662074- <1> 597 00003B34 776F2031362D626974- <1> 597 00003B3D 207265676973746572- <1> 597 00003B46 732028656720445841- <1> 597 00003B4F 58290D0A <1> 598 00003B53 2033322D6269742072- <1> db " 32-bit registers and FS, GS only if running on a 386+",13,10 598 00003B5C 656769737465727320- <1> 598 00003B65 616E642046532C2047- <1> 598 00003B6E 53206F6E6C79206966- <1> 598 00003B77 2072756E6E696E6720- <1> 598 00003B80 6F6E2061203338362B- <1> 598 00003B89 0D0A <1> 599 <1> %if 0 && _MMXSUPP 600 <1> db " 64-bit MMX registers only if running on a CPU with MMX (r/o for now)",13,10 601 <1> db " MM0L, MM(0)L accesses the low 32 bits of the register",13,10 602 <1> db " MM0H, MM(0)H accesses the high 32 bits of the register",13,10 603 <1> db " MM0Z, MM(0)Z reads the low 32 bits; writes the full register (zero-extend)",13,10 604 <1> db " MM0S, MM(0)S reads the low 32 bits; writes the full register (sign-extend)",13,10 605 <1> db " MM0, MM(0) is an alias for the MM0Z syntax",13,10 606 <1> %endif 607 <1> %if _VARIABLES 608 00003B8B 2033322D6269742076- <1> db " 32-bit variables V00..VFF",13,10 608 00003B94 61726961626C657320- <1> 608 00003B9D 5630302E2E5646460D- <1> 608 00003BA6 0A <1> 609 <1> %endif 610 <1> %if _OPTIONS || _PSPVARIABLES 611 00003BA7 2033322D6269742073- <1> db " 32-bit special variable" 611 00003BB0 70656369616C207661- <1> 611 00003BB9 726961626C65 <1> 612 <1> %if _OPTIONS 613 00003BBF 732044434F2C204443- <1> db "s DCO, DCS, DAO, DAS, DIF, DPI" 613 00003BC8 532C2044414F2C2044- <1> 613 00003BD1 41532C204449462C20- <1> 613 00003BDA 445049 <1> 614 <1> %if _PSPVARIABLES 615 00003BDD 2C <1> db "," 616 <1> %endif 617 <1> %endif 618 <1> %if _PSPVARIABLES 619 00003BDE 20505049 <1> db " PPI" 620 <1> %endif 621 00003BE2 0D0A <1> db 13,10 622 00003BE4 2031362D6269742073- <1> db " 16-bit special variables" 622 00003BED 70656369616C207661- <1> 622 00003BF6 726961626C6573 <1> 623 <1> %if _OPTIONS 624 00003BFD 204450522C20445050 <1> db " DPR, DPP" 625 <1> %if _PM 626 <1> db ", DPS" 627 <1> %endif 628 <1> %if _PSPVARIABLES 629 00003C06 2C <1> db "," 630 <1> %endif 631 <1> %endif 632 <1> %if _PSPVARIABLES 633 00003C07 205053502C20505052 <1> db " PSP, PPR" 634 <1> %endif 635 00003C10 0D0A <1> db 13,10 636 00003C12 20202866756C6C6572- <1> db " (fuller variable reference in the manual)",13,10 636 00003C1B 207661726961626C65- <1> 636 00003C24 207265666572656E63- <1> 636 00003C2D 6520696E2074686520- <1> 636 00003C36 6D616E75616C290D0A <1> 637 <1> %endif 638 <1> %if _INDIRECTION 639 00003C3F 20627974652F776F72- <1> db " byte/word/3byte/dword memory content (eg byte [seg:ofs], where both the",13,10 639 00003C48 642F33627974652F64- <1> 639 00003C51 776F7264206D656D6F- <1> 639 00003C5A 727920636F6E74656E- <1> 639 00003C63 742028656720627974- <1> 639 00003C6C 65205B7365673A6F66- <1> 639 00003C75 735D2C207768657265- <1> 639 00003C7E 20626F746820746865- <1> 639 00003C87 0D0A <1> 640 00003C89 20206F7074696F6E61- <1> db " optional segment as well as the offset are expressions too)",13,10 640 00003C92 6C207365676D656E74- <1> 640 00003C9B 2061732077656C6C20- <1> 640 00003CA4 617320746865206F66- <1> 640 00003CAD 667365742061726520- <1> 640 00003CB6 65787072657373696F- <1> 640 00003CBF 6E7320746F6F290D0A <1> 641 <1> %endif 642 00003CC8 546865206578707265- <1> db "The expression evaluator case-insensitively checks for names of variables",13,10 642 00003CD1 7373696F6E20657661- <1> 642 00003CDA 6C7561746F72206361- <1> 642 00003CE3 73652D696E73656E73- <1> 642 00003CEC 69746976656C792063- <1> 642 00003CF5 6865636B7320666F72- <1> 642 00003CFE 206E616D6573206F66- <1> 642 00003D07 207661726961626C65- <1> 642 00003D10 730D0A <1> 643 00003D13 616E64207265676973- <1> db "and registers" 643 00003D1C 74657273 <1> 644 <1> %if _INDIRECTION 645 00003D20 2061732077656C6C20- <1> db " as well as size specifiers" 645 00003D29 61732073697A652073- <1> 645 00003D32 706563696669657273 <1> 646 <1> %endif 647 00003D3B 2E0D0A <1> db '.',13,10 648 00003D3E 0D0A <1> db 13,10 649 00003D40 456E746572203F5220- <1> db "Enter ?R to display the recognized register names.",13,10 649 00003D49 746F20646973706C61- <1> 649 00003D52 792074686520726563- <1> 649 00003D5B 6F676E697A65642072- <1> 649 00003D64 65676973746572206E- <1> 649 00003D6D 616D65732E0D0A <1> 650 <1> %if _VARIABLES || _OPTIONS || _PSPVARIABLES 651 00003D74 456E746572203F5620- <1> db "Enter ?V to display the recognized variables.",13,10 651 00003D7D 746F20646973706C61- <1> 651 00003D86 792074686520726563- <1> 651 00003D8F 6F676E697A65642076- <1> 651 00003D98 61726961626C65732E- <1> 651 00003DA1 0D0A <1> 652 <1> %endif 653 00003DA3 00 <1> asciz 654 <1> %endif 655 <1> 656 <1> %if _OPTIONS 657 <1> .options_1: 658 00003DA4 417661696C61626C65- <1> db "Available options: (read/write DCO, read DCS)",13,10 658 00003DAD 206F7074696F6E733A- <1> 658 00003DB6 2028726561642F7772- <1> 658 00003DBF 6974652044434F2C20- <1> 658 00003DC8 726561642044435329- <1> 658 00003DD1 0D0A <1> 659 00003DD3 303030312052583A20- <1> db _4digitshex(dispregs32), " RX: 32-bit register display",13,10 659 00003DDC 33322D626974207265- <1> 659 00003DE5 676973746572206469- <1> 659 00003DEE 73706C61790D0A <1> 660 00003DF5 3030303220544D3A20- <1> db _4digitshex(traceints), " TM: trace into interrupts",13,10 660 00003DFE 747261636520696E74- <1> 660 00003E07 6F20696E7465727275- <1> 660 00003E10 7074730D0A <1> 661 00003E15 3030303420616C6C6F- <1> db _4digitshex(cpdepchars), " allow dumping of CP-dependant characters",13,10 661 00003E1E 772064756D70696E67- <1> 661 00003E27 206F662043502D6465- <1> 661 00003E30 70656E64616E742063- <1> 661 00003E39 686172616374657273- <1> 661 00003E42 0D0A <1> 662 00003E44 3030303820616C7761- <1> db _4digitshex(fakeindos), " always assume InDOS flag non-zero, to debug DOS or TSRs",13,10 662 00003E4D 797320617373756D65- <1> 662 00003E56 20496E444F5320666C- <1> 662 00003E5F 6167206E6F6E2D7A65- <1> 662 00003E68 726F2C20746F206465- <1> 662 00003E71 62756720444F53206F- <1> 662 00003E7A 7220545352730D0A <1> 663 00003E82 303031302064697361- <1> db _4digitshex(nonpagingdevice)," disallow paged output to StdOut",13,10 663 00003E8B 6C6C6F772070616765- <1> 663 00003E94 64206F757470757420- <1> 663 00003E9D 746F205374644F7574- <1> 663 00003EA6 0D0A <1> 664 00003EA8 3030323020616C6C6F- <1> db _4digitshex(pagingdevice), " allow paged output to non-StdOut",13,10 664 00003EB1 77207061676564206F- <1> 664 00003EBA 757470757420746F20- <1> 664 00003EC3 6E6F6E2D5374644F75- <1> 664 00003ECC 740D0A <1> 665 00003ECF 303034302064697370- <1> db _4digitshex(hexrn), " display raw hexadecimal content of FPU registers",13,10 665 00003ED8 6C6179207261772068- <1> 665 00003EE1 657861646563696D61- <1> 665 00003EEA 6C20636F6E74656E74- <1> 665 00003EF3 206F66204650552072- <1> 665 00003EFC 65676973746572730D- <1> 665 00003F05 0A <1> 666 00003F06 30313030207768656E- <1> db _4digitshex(nondospaging), " when prompting during paging, do not use DOS for input",13,10 666 00003F0F 2070726F6D7074696E- <1> 666 00003F18 6720647572696E6720- <1> 666 00003F21 706167696E672C2064- <1> 666 00003F2A 6F206E6F7420757365- <1> 666 00003F33 20444F5320666F7220- <1> 666 00003F3C 696E7075740D0A <1> 667 00003F43 3032303020646F206E- <1> db _4digitshex(nohlt), " do not execute HLT instruction to idle",13,10 667 00003F4C 6F7420657865637574- <1> 667 00003F55 6520484C5420696E73- <1> 667 00003F5E 7472756374696F6E20- <1> 667 00003F67 746F2069646C650D0A <1> 668 00003F70 3034303020646F206E- <1> db _4digitshex(biosidles), " do not idle, the keyboard BIOS idles itself",13,10 668 00003F79 6F742069646C652C20- <1> 668 00003F82 746865206B6579626F- <1> 668 00003F8B 6172642042494F5320- <1> 668 00003F94 69646C657320697473- <1> 668 00003F9D 656C660D0A <1> 669 00003FA2 303830302075736520- <1> db _4digitshex(opt_userawinput)," use rawinput for int 21h interactive input",13,10 669 00003FAB 726177696E70757420- <1> 669 00003FB4 666F7220696E742032- <1> 669 00003FBD 316820696E74657261- <1> 669 00003FC6 637469766520696E70- <1> 669 00003FCF 75740D0A <1> 670 00003FD3 3130303020696E2064- <1> db _4digitshex(use_si_units), " in disp_*_size use SI units (kB = 1000, etc)." 670 00003FDC 6973705F2A5F73697A- <1> 670 00003FE5 652075736520534920- <1> 670 00003FEE 756E69747320286B42- <1> 670 00003FF7 203D20313030302C20- <1> 670 00004000 657463292E <1> 671 00004005 206F76657272696465- <1> db " overrides ",_4digitshex(use_jedec_units),"!",13,10 671 0000400E 732032303030210D0A <1> 672 00004017 3230303020696E2064- <1> db _4digitshex(use_jedec_units)," in disp_*_size use JEDEC units (KB = 1024)",13,10 672 00004020 6973705F2A5F73697A- <1> 672 00004029 6520757365204A4544- <1> 672 00004032 454320756E69747320- <1> 672 0000403B 284B42203D20313032- <1> 672 00004044 34290D0A <1> 673 00004048 3430303020656E6162- <1> db _4digitshex(enable_serial), " enable serial I/O (port ",_4digitshex(_UART_BASE),"h interrupt ",_2digitshex(_INTNUM),"h)",13,10 673 00004051 6C652073657269616C- <1> 673 0000405A 20492F4F2028706F72- <1> 673 00004063 742030324638682069- <1> 673 0000406C 6E7465727275707420- <1> 673 00004075 304268290D0A <1> 674 0000407B 383030302064697361- <1> db _4digitshex(int8_disable_serial), " disable serial I/O when breaking after Ctrl pressed for a while",13,10 674 00004084 626C65207365726961- <1> 674 0000408D 6C20492F4F20776865- <1> 674 00004096 6E20627265616B696E- <1> 674 0000409F 672061667465722043- <1> 674 000040A8 74726C207072657373- <1> 674 000040B1 656420666F72206120- <1> 674 000040BA 7768696C650D0A <1> 675 000040C1 303030313030303020- <1> db _8digitshex(gg_do_not_skip_bp), " gg: do not skip a breakpoint (bb or gg)",13,10 675 000040CA 67673A20646F206E6F- <1> 675 000040D3 7420736B6970206120- <1> 675 000040DC 627265616B706F696E- <1> 675 000040E5 7420286262206F7220- <1> 675 000040EE 6767290D0A <1> 676 000040F3 303030323030303020- <1> db _8digitshex(gg_no_autorepeat), " gg: do not auto-repeat",13,10 676 000040FC 67673A20646F206E6F- <1> 676 00004105 74206175746F2D7265- <1> 676 0000410E 706561740D0A <1> 677 00004114 303030343030303020- <1> db _8digitshex(tp_do_not_skip_bp), " T/TP/P: do not skip a (bb) breakpoint",13,10 677 0000411D 542F54502F503A2064- <1> 677 00004126 6F206E6F7420736B69- <1> 677 0000412F 702061202862622920- <1> 677 00004138 627265616B706F696E- <1> 677 00004141 740D0A <1> 678 00004144 303030383030303020- <1> db _8digitshex(gg_bb_hit_no_repeat), " gg: do not auto-repeat after bb hit",13,10 678 0000414D 67673A20646F206E6F- <1> 678 00004156 74206175746F2D7265- <1> 678 0000415F 706561742061667465- <1> 678 00004168 72206262206869740D- <1> 678 00004171 0A <1> 679 00004172 303031303030303020- <1> db _8digitshex(tp_bb_hit_no_repeat), " T/TP/P: do not auto-repeat after bb hit",13,10 679 0000417B 542F54502F503A2064- <1> 679 00004184 6F206E6F7420617574- <1> 679 0000418D 6F2D72657065617420- <1> 679 00004196 616674657220626220- <1> 679 0000419F 6869740D0A <1> 680 000041A4 303032303030303020- <1> db _8digitshex(gg_unexpected_no_repeat)," gg: do not auto-repeat after unexpectedinterrupt",13,10 680 000041AD 67673A20646F206E6F- <1> 680 000041B6 74206175746F2D7265- <1> 680 000041BF 706561742061667465- <1> 680 000041C8 7220756E6578706563- <1> 680 000041D1 746564696E74657272- <1> 680 000041DA 7570740D0A <1> 681 000041DF 303034303030303020- <1> db _8digitshex(tp_unexpected_no_repeat)," T/TP/P: do not auto-repeat after unexpectedinterrupt",13,10 681 000041E8 542F54502F503A2064- <1> 681 000041F1 6F206E6F7420617574- <1> 681 000041FA 6F2D72657065617420- <1> 681 00004203 616674657220756E65- <1> 681 0000420C 78706563746564696E- <1> 681 00004215 746572727570740D0A <1> 682 0000421E 303038303030303020- <1> db _8digitshex(ss_no_dump), " S: do not dump data after matches",13,10 682 00004227 533A20646F206E6F74- <1> 682 00004230 2064756D7020646174- <1> 682 00004239 61206166746572206D- <1> 682 00004242 6174636865730D0A <1> 683 0000424A 313030303030303020- <1> db _8digitshex(rr_disasm_no_rept), " R: do not repeat disassembly",13,10 683 00004253 523A20646F206E6F74- <1> 683 0000425C 207265706561742064- <1> 683 00004265 6973617373656D626C- <1> 683 0000426E 790D0A <1> 684 00004271 323030303030303020- <1> db _8digitshex(rr_disasm_no_show), " R: do not show memory reference in disassembly",13,10 684 0000427A 523A20646F206E6F74- <1> 684 00004283 2073686F77206D656D- <1> 684 0000428C 6F7279207265666572- <1> 684 00004295 656E636520696E2064- <1> 684 0000429E 6973617373656D626C- <1> 684 000042A7 790D0A <1> 685 000042AA 343030303030303020- <1> db _8digitshex(opt_cmdline_quiet_input)," quiet command line buffer input",13,10 685 000042B3 717569657420636F6D- <1> 685 000042BC 6D616E64206C696E65- <1> 685 000042C5 206275666665722069- <1> 685 000042CE 6E7075740D0A <1> 686 000042D4 383030303030303020- <1> db _8digitshex(opt_cmdline_quiet_output)," quiet command line buffer output",13,10 686 000042DD 717569657420636F6D- <1> 686 000042E6 6D616E64206C696E65- <1> 686 000042EF 20627566666572206F- <1> 686 000042F8 75747075740D0A <1> 687 000042FF 00 <1> asciz 688 <1> 689 <1> .options_2: 690 00004300 4D6F7265206F707469- <1> db "More options: (read/write DCO2, read DCS2)",13,10 690 00004309 6F6E733A2028726561- <1> 690 00004312 642F77726974652044- <1> 690 0000431B 434F322C2072656164- <1> 690 00004324 2044435332290D0A <1> 691 0000432C 303030312044423A20- <1> db _4digitshex(opt2_db_header), " DB: show header",13,10 691 00004335 73686F772068656164- <1> 691 0000433E 65720D0A <1> 692 00004342 303030322044423A20- <1> db _4digitshex(opt2_db_trailer)," DB: show trailer",13,10 692 0000434B 73686F772074726169- <1> 692 00004354 6C65720D0A <1> 693 00004359 303031302044573A20- <1> db _4digitshex(opt2_dw_header), " DW: show header",13,10 693 00004362 73686F772068656164- <1> 693 0000436B 65720D0A <1> 694 0000436F 303032302044573A20- <1> db _4digitshex(opt2_dw_trailer)," DW: show trailer",13,10 694 00004378 73686F772074726169- <1> 694 00004381 6C65720D0A <1> 695 00004386 303130302044443A20- <1> db _4digitshex(opt2_dd_header), " DD: show header",13,10 695 0000438F 73686F772068656164- <1> 695 00004398 65720D0A <1> 696 0000439C 303230302044443A20- <1> db _4digitshex(opt2_dd_trailer)," DD: show trailer",13,10 696 000043A5 73686F772074726169- <1> 696 000043AE 6C65720D0A <1> 697 000043B3 303830302075736520- <1> db _4digitshex(opt2_rawinput_dpmi)," use rawinput for int 21h interactive input in DPMI",13,10 697 000043BC 726177696E70757420- <1> 697 000043C5 666F7220696E742032- <1> 697 000043CE 316820696E74657261- <1> 697 000043D7 637469766520696E70- <1> 697 000043E0 757420696E2044504D- <1> 697 000043E9 490D0A <1> 698 000043EC 3130303020483A2073- <1> db _4digitshex(opt2_hh_compat), " H: stay compatible to MS-DOS Debug",13,10 698 000043F5 74617920636F6D7061- <1> 698 000043FE 7469626C6520746F20- <1> 698 00004407 4D532D444F53204465- <1> 698 00004410 6275670D0A <1> 699 00004415 323030302069646C65- <1> db _4digitshex(opt2_getc_idle), " idle and check for Ctrl-C in getc",13,10 699 0000441E 20616E642063686563- <1> 699 00004427 6B20666F7220437472- <1> 699 00004430 6C2D4320696E206765- <1> 699 00004439 74630D0A <1> 700 0000443D 343030302069646C65- <1> db _4digitshex(opt2_getc_idle_dpmi)," idle and check for Ctrl-C in getc in DPMI",13,10 700 00004446 20616E642063686563- <1> 700 0000444F 6B20666F7220437472- <1> 700 00004458 6C2D4320696E206765- <1> 700 00004461 746320696E2044504D- <1> 700 0000446A 490D0A <1> 701 0000446D 3830303020542F5450- <1> db _4digitshex(opt2_re_cancel_tpg)," T/TP/P/G: cancel run after RE command buffer execution",13,10 701 00004476 2F502F473A2063616E- <1> 701 0000447F 63656C2072756E2061- <1> 701 00004488 667465722052452063- <1> 701 00004491 6F6D6D616E64206275- <1> 701 0000449A 666665722065786563- <1> 701 000044A3 7574696F6E0D0A <1> 702 000044AA 00 <1> asciz 703 <1> 704 <1> .options_3: 705 000044AB 4D6F7265206F707469- <1> db "More options: (read/write DCO3, read DCS3)",13,10 705 000044B4 6F6E733A2028726561- <1> 705 000044BD 642F77726974652044- <1> 705 000044C6 434F332C2072656164- <1> 705 000044CF 2044435333290D0A <1> 706 000044D7 3030303120543A2064- <1> db _4digitshex(opt3_tt_no_paging)," T: do not page output",13,10 706 000044E0 6F206E6F7420706167- <1> 706 000044E9 65206F75747075740D- <1> 706 000044F2 0A <1> 707 000044F3 303030322054503A20- <1> db _4digitshex(opt3_tp_no_paging)," TP: do not page output",13,10 707 000044FC 646F206E6F74207061- <1> 707 00004505 6765206F7574707574- <1> 707 0000450E 0D0A <1> 708 00004510 3030303420503A2064- <1> db _4digitshex(opt3_pp_no_paging)," P: do not page output",13,10 708 00004519 6F206E6F7420706167- <1> 708 00004522 65206F75747075740D- <1> 708 0000452B 0A <1> 709 0000452C 3030303820473A2064- <1> db _4digitshex(opt3_gg_no_paging)," G: do not page output",13,10 709 00004535 6F206E6F7420706167- <1> 709 0000453E 65206F75747075740D- <1> 709 00004547 0A <1> 710 00004548 3031303020542F5450- <1> db _4digitshex(opt3_silence_paging_set), " T/TP/P: modify paging for silent dump",13,10 710 00004551 2F503A206D6F646966- <1> 710 0000455A 7920706167696E6720- <1> 710 00004563 666F722073696C656E- <1> 710 0000456C 742064756D700D0A <1> 711 00004574 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 711 0000457D 2F503A206966203031- <1> 711 00004586 3030207365743A2074- <1> 711 0000458F 75726E20706167696E- <1> 711 00004598 67206F6E2C20656C73- <1> 711 000045A1 65206F66660D0A <1> 712 000045A8 30313030303020523A- <1> db _6digitshex(opt3_r_highlight_diff), " R: highlight changed digits (needs ANSI for DOS output)",13,10 712 000045B1 20686967686C696768- <1> 712 000045BA 74206368616E676564- <1> 712 000045C3 206469676974732028- <1> 712 000045CC 6E6565647320414E53- <1> 712 000045D5 4920666F7220444F53- <1> 712 000045DE 206F7574707574290D- <1> 712 000045E7 0A <1> 713 000045E8 30323030303020523A- <1> db _6digitshex(opt3_r_highlight_dumb), " R: highlight escape sequences to int 10h, else video attributes",13,10 713 000045F1 20686967686C696768- <1> 713 000045FA 742065736361706520- <1> 713 00004603 73657175656E636573- <1> 713 0000460C 20746F20696E742031- <1> 713 00004615 30682C20656C736520- <1> 713 0000461E 766964656F20617474- <1> 713 00004627 726962757465730D0A <1> 714 00004630 30343030303020523A- <1> db _6digitshex(opt3_r_highlight_full), " R: highlight changed registers (overrides ",_6digitshex(opt3_r_highlight_diff),")",13,10 714 00004639 20686967686C696768- <1> 714 00004642 74206368616E676564- <1> 714 0000464B 207265676973746572- <1> 714 00004654 7320286F7665727269- <1> 714 0000465D 646573203031303030- <1> 714 00004666 30290D0A <1> 715 0000466A 30383030303020523A- <1> db _6digitshex(opt3_r_highlight_eip), " R: include highlighting of EIP",13,10 715 00004673 20696E636C75646520- <1> 715 0000467C 686967686C69676874- <1> 715 00004685 696E67206F66204549- <1> 715 0000468E 500D0A <1> 716 <1> %if _PM 717 <1> db _6digitshex(opt3_ss_b_bit_set), " set PM ss B bit",13,10 718 <1> %if _BREAK_INSTALLDPMI 719 <1> db _6digitshex(opt3_break_installdpmi), " break on entering Protected Mode",13,10 720 <1> %endif 721 <1> %endif 722 00004691 303230303030303020- <1> db _8digitshex(opt3_no_idle_2F), " do not call int 2F.1680 for idling",13,10 722 0000469A 646F206E6F74206361- <1> 722 000046A3 6C6C20696E74203246- <1> 722 000046AC 2E3136383020666F72- <1> 722 000046B5 2069646C696E670D0A <1> 723 <1> %if _DELAY_BEFORE_BP 724 000046BE 303430303030303020- <1> db _8digitshex(opt3_delay_before_bp), " delay for a tick before writing breakpoints",13,10 724 000046C7 64656C617920666F72- <1> 724 000046D0 2061207469636B2062- <1> 724 000046D9 65666F726520777269- <1> 724 000046E2 74696E672062726561- <1> 724 000046EB 6B706F696E74730D0A <1> 725 <1> %endif 726 000046F4 303830303030303020- <1> db _8digitshex(opt3_no_call_update), " do not call other lDebug instance's Update IISP Header call",13,10 726 000046FD 646F206E6F74206361- <1> 726 00004706 6C6C206F7468657220- <1> 726 0000470F 6C446562756720696E- <1> 726 00004718 7374616E6365277320- <1> 726 00004721 557064617465204949- <1> 726 0000472A 535020486561646572- <1> 726 00004733 2063616C6C0D0A <1> 727 0000473A 313030303030303020- <1> db _8digitshex(opt3_disable_autorepeat), " disable auto-repeat",13,10 727 00004743 64697361626C652061- <1> 727 0000474C 75746F2D7265706561- <1> 727 00004755 740D0A <1> 728 00004758 323030303030303020- <1> db _8digitshex(opt3_check_ctrlc_keyb), " check int 16h buffer for Control-C if inputting from int 16h",13,10 728 00004761 636865636B20696E74- <1> 728 0000476A 203136682062756666- <1> 728 00004773 657220666F7220436F- <1> 728 0000477C 6E74726F6C2D432069- <1> 728 00004785 6620696E7075747469- <1> 728 0000478E 6E672066726F6D2069- <1> 728 00004797 6E74203136680D0A <1> 729 0000479F 343030303030303020- <1> db _8digitshex(opt3_check_ctrlc_0bh), " call DOS service 0Bh to check for Control-C",13,10 729 000047A8 63616C6C20444F5320- <1> 729 000047B1 736572766963652030- <1> 729 000047BA 426820746F20636865- <1> 729 000047C3 636B20666F7220436F- <1> 729 000047CC 6E74726F6C2D430D0A <1> 730 000047D5 383030303030303020- <1> db _8digitshex(opt3_tsr_quit_leave_tf), " when Q command is used while TSR, leave TF as is",13,10 730 000047DE 7768656E205120636F- <1> 730 000047E7 6D6D616E6420697320- <1> 730 000047F0 75736564207768696C- <1> 730 000047F9 65205453522C206C65- <1> 730 00004802 617665205446206173- <1> 730 0000480B 2069730D0A <1> 731 00004810 00 <1> asciz 732 <1> 733 <1> .options_4: 734 00004811 4D6F7265206F707469- <1> db "More options: (read/write DCO4, read DCS4)",13,10 734 0000481A 6F6E733A2028726561- <1> 734 00004823 642F77726974652044- <1> 734 0000482C 434F342C2072656164- <1> 734 00004835 2044435334290D0A <1> 735 <1> %if _PM 736 <1> db _4digitshex(opt4_int_2F_hook)," enable interrupt 2Fh hook while in 86 Mode",13,10 737 <1> %endif 738 0000483D 3030303420656E6162- <1> db _4digitshex(opt4_int_08_hook)," enable interrupt 8 hook",13,10 738 00004846 6C6520696E74657272- <1> 738 0000484F 757074203820686F6F- <1> 738 00004858 6B0D0A <1> 739 0000485B 3030303820656E6162- <1> db _4digitshex(opt4_int_2D_hook)," enable interrupt 2Dh hook",13,10 739 00004864 6C6520696E74657272- <1> 739 0000486D 757074203244682068- <1> 739 00004876 6F6F6B0D0A <1> 740 0000487B 303030313030303020- <1> db _8digitshex(opt4_int_serial_force)," force serial interrupt unhooking",13,10 740 00004884 666F72636520736572- <1> 740 0000488D 69616C20696E746572- <1> 740 00004896 7275707420756E686F- <1> 740 0000489F 6F6B696E670D0A <1> 741 <1> %if _PM 742 <1> db _8digitshex(opt4_int_2F_force)," force interrupt 2Fh unhooking",13,10 743 <1> %endif 744 000048A6 303030343030303020- <1> db _8digitshex(opt4_int_08_force)," force interrupt 8 unhooking",13,10 744 000048AF 666F72636520696E74- <1> 744 000048B8 657272757074203820- <1> 744 000048C1 756E686F6F6B696E67- <1> 744 000048CA 0D0A <1> 745 000048CC 303030383030303020- <1> db _8digitshex(opt4_int_2D_force)," force interrupt 2Dh unhooking",13,10 745 000048D5 666F72636520696E74- <1> 745 000048DE 657272757074203244- <1> 745 000048E7 6820756E686F6F6B69- <1> 745 000048F0 6E670D0A <1> 746 000048F4 303130303030303020- <1> db _8digitshex(opt4_int_00_force)," force interrupt 0 unhooking",13,10 746 000048FD 666F72636520696E74- <1> 746 00004906 657272757074203020- <1> 746 0000490F 756E686F6F6B696E67- <1> 746 00004918 0D0A <1> 747 0000491A 303230303030303020- <1> db _8digitshex(opt4_int_01_force)," force interrupt 1 unhooking",13,10 747 00004923 666F72636520696E74- <1> 747 0000492C 657272757074203120- <1> 747 00004935 756E686F6F6B696E67- <1> 747 0000493E 0D0A <1> 748 00004940 303430303030303020- <1> db _8digitshex(opt4_int_03_force)," force interrupt 3 unhooking",13,10 748 00004949 666F72636520696E74- <1> 748 00004952 657272757074203320- <1> 748 0000495B 756E686F6F6B696E67- <1> 748 00004964 0D0A <1> 749 00004966 303830303030303020- <1> db _8digitshex(opt4_int_06_force)," force interrupt 6 unhooking",13,10 749 0000496F 666F72636520696E74- <1> 749 00004978 657272757074203620- <1> 749 00004981 756E686F6F6B696E67- <1> 749 0000498A 0D0A <1> 750 0000498C 313030303030303020- <1> db _8digitshex(opt4_int_18_force)," force interrupt 18h unhooking",13,10 750 00004995 666F72636520696E74- <1> 750 0000499E 657272757074203138- <1> 750 000049A7 6820756E686F6F6B69- <1> 750 000049B0 6E670D0A <1> 751 000049B4 323030303030303020- <1> db _8digitshex(opt4_int_19_force)," force interrupt 19h unhooking",13,10 751 000049BD 666F72636520696E74- <1> 751 000049C6 657272757074203139- <1> 751 000049CF 6820756E686F6F6B69- <1> 751 000049D8 6E670D0A <1> 752 <1> .options_5: 753 000049DC 00 <1> asciz 754 <1> 755 <1> .options_6: 756 <1> %if _VXCHG || (_DEBUG && _DEBUG_COND) 757 000049DD 4D6F7265206F707469- <1> db "More options: (read/write DCO6, read DCS6)",13,10 757 000049E6 6F6E733A2028726561- <1> 757 000049EF 642F77726974652044- <1> 757 000049F8 434F362C2072656164- <1> 757 00004A01 2044435336290D0A <1> 758 <1> %endif 759 <1> %if _VXCHG 760 00004A09 3030303120656E6162- <1> db _4digitshex(opt6_vv_mode)," enable video screen swapping",13,10 760 00004A12 6C6520766964656F20- <1> 760 00004A1B 73637265656E207377- <1> 760 00004A24 617070696E670D0A <1> 761 00004A2C 30303032206B656570- <1> db _4digitshex(opt6_vv_keep)," keep video screen when disabling swapping",13,10 761 00004A35 20766964656F207363- <1> 761 00004A3E 7265656E207768656E- <1> 761 00004A47 2064697361626C696E- <1> 761 00004A50 67207377617070696E- <1> 761 00004A59 670D0A <1> 762 00004A5C 303031302072656164- <1> db _4digitshex(opt6_vv_int16)," read key from interrupt 16h when swapping (V command)",13,10 762 00004A65 206B65792066726F6D- <1> 762 00004A6E 20696E746572727570- <1> 762 00004A77 742031366820776865- <1> 762 00004A80 6E207377617070696E- <1> 762 00004A89 6720285620636F6D6D- <1> 762 00004A92 616E64290D0A <1> 763 <1> %endif 764 <1> %if _DEBUG && _DEBUG_COND 765 00004A98 3031303020656E6162- <1> db _4digitshex(opt6_debug_mode)," enable debug mode (and BU command)",13,10 765 00004AA1 6C6520646562756720- <1> 765 00004AAA 6D6F64652028616E64- <1> 765 00004AB3 20425520636F6D6D61- <1> 765 00004ABC 6E64290D0A <1> 766 <1> %endif 767 00004AC1 00 <1> asciz 768 <1> 769 <1> .flags_1: 770 00004AC2 496E7465726E616C20- <1> db "Internal flags: (read DIF)",13,10 770 00004ACB 666C6167733A202872- <1> 770 00004AD4 65616420444946290D- <1> 770 00004ADD 0A <1> 771 00004ADE 30303030303120496E- <1> db _6digitshex(oldpacket), " Int25/Int26 packet method available",13,10 771 00004AE7 7432352F496E743236- <1> 771 00004AF0 207061636B6574206D- <1> 771 00004AF9 6574686F6420617661- <1> 771 00004B02 696C61626C650D0A <1> 772 00004B0A 30303030303220496E- <1> db _6digitshex(newpacket), " Int21.7305 packet method available",13,10 772 00004B13 7432312E3733303520- <1> 772 00004B1C 7061636B6574206D65- <1> 772 00004B25 74686F642061766169- <1> 772 00004B2E 6C61626C650D0A <1> 773 <1> %if _VDD 774 00004B35 303030303034205644- <1> db _6digitshex(ntpacket), " VDD registered and usable",13,10 774 00004B3E 442072656769737465- <1> 774 00004B47 72656420616E642075- <1> 774 00004B50 7361626C650D0A <1> 775 <1> %endif 776 00004B57 30303030303820696E- <1> db _6digitshex(pagedcommand), " internal flag for paged output",13,10 776 00004B60 7465726E616C20666C- <1> 776 00004B69 616720666F72207061- <1> 776 00004B72 676564206F75747075- <1> 776 00004B7B 740D0A <1> 777 00004B7E 303030303130204445- <1> db _6digitshex(notstdinput), " DEBUG's input isn't StdIn",13,10 777 00004B87 425547277320696E70- <1> 777 00004B90 75742069736E277420- <1> 777 00004B99 537464496E0D0A <1> 778 00004BA0 303030303230204445- <1> db _6digitshex(inputfile), " DEBUG's input is a file",13,10 778 00004BA9 425547277320696E70- <1> 778 00004BB2 757420697320612066- <1> 778 00004BBB 696C650D0A <1> 779 00004BC0 303030303430204445- <1> db _6digitshex(notstdoutput), " DEBUG's output isn't StdOut",13,10 779 00004BC9 4255472773206F7574- <1> 779 00004BD2 7075742069736E2774- <1> 779 00004BDB 205374644F75740D0A <1> 780 00004BE4 303030303830204445- <1> db _6digitshex(outputfile), " DEBUG's output is a file",13,10 780 00004BED 4255472773206F7574- <1> 780 00004BF6 707574206973206120- <1> 780 00004BFF 66696C650D0A <1> 781 <1> %if _PM 782 <1> db _6digitshex(hooked2F), " Int2F.1687 hooked",13,10 783 <1> db _6digitshex(nohook2F), " Int2F.1687 won't be hooked",13,10 784 <1> db _6digitshex(dpminohlt), " do not execute HLT to idle in PM",13,10 785 <1> db _6digitshex(protectedmode), " in protected mode",13,10 786 <1> %endif 787 00004C05 303031303030207374- <1> db _6digitshex(debuggeeA20), " state of debuggee's A20",13,10 787 00004C0E 617465206F66206465- <1> 787 00004C17 627567676565277320- <1> 787 00004C20 4132300D0A <1> 788 00004C25 303032303030207374- <1> db _6digitshex(debuggerA20), " state of debugger's A20 (not implemented: same as previous)",13,10 788 00004C2E 617465206F66206465- <1> 788 00004C37 627567676572277320- <1> 788 00004C40 41323020286E6F7420- <1> 788 00004C49 696D706C656D656E74- <1> 788 00004C52 65643A2073616D6520- <1> 788 00004C5B 61732070726576696F- <1> 788 00004C64 7573290D0A <1> 789 <1> %if _BOOTLDR 790 00004C69 303034303030206465- <1> db _6digitshex(nodosloaded), " debugger booted independent of a DOS",13,10 790 00004C72 62756767657220626F- <1> 790 00004C7B 6F74656420696E6465- <1> 790 00004C84 70656E64656E74206F- <1> 790 00004C8D 66206120444F530D0A <1> 791 <1> %endif 792 00004C96 303038303030204350- <1> db _6digitshex(has386), " CPU is at least a 386 (32-bit CPU)",13,10 792 00004C9F 55206973206174206C- <1> 792 00004CA8 656173742061203338- <1> 792 00004CB1 36202833322D626974- <1> 792 00004CBA 20435055290D0A <1> 793 00004CC1 30313030303020696E- <1> db _6digitshex(usecharcounter), " internal flag for tab output processing",13,10 793 00004CCA 7465726E616C20666C- <1> 793 00004CD3 616720666F72207461- <1> 793 00004CDC 62206F757470757420- <1> 793 00004CE5 70726F63657373696E- <1> 793 00004CEE 670D0A <1> 794 <1> %if _VDD 795 00004CF1 303230303030207275- <1> db _6digitshex(runningnt), " running inside NTVDM",13,10 795 00004CFA 6E6E696E6720696E73- <1> 795 00004D03 696465204E5456444D- <1> 795 00004D0C 0D0A <1> 796 <1> %endif 797 <1> %if _PM 798 <1> db _6digitshex(canswitchmode), " DPMI raw mode switch usable to set breakpoints",13,10 799 <1> db _6digitshex(modeswitched), " internal flag for mode switching",13,10 800 <1> %endif 801 00004D0E 31303030303020696E- <1> db _6digitshex(promptwaiting), " internal flag for paged output",13,10 801 00004D17 7465726E616C20666C- <1> 801 00004D20 616720666F72207061- <1> 801 00004D29 676564206F75747075- <1> 801 00004D32 740D0A <1> 802 <1> %if _PM 803 <1> db _6digitshex(switchbuffer), " internal flag for mode switching",13,10 804 <1> %endif 805 <1> %if _TSR 806 00004D35 34303030303020696E- <1> db _6digitshex(tsrmode), " in TSR mode (detached debugger process)",13,10 806 00004D3E 20545352206D6F6465- <1> 806 00004D47 202864657461636865- <1> 806 00004D50 642064656275676765- <1> 806 00004D59 722070726F63657373- <1> 806 00004D62 290D0A <1> 807 <1> %endif 808 <1> %if _DOSEMU 809 00004D65 303130303030303020- <1> db _8digitshex(runningdosemu), " running inside dosemu",13,10 809 00004D6E 72756E6E696E672069- <1> 809 00004D77 6E7369646520646F73- <1> 809 00004D80 656D750D0A <1> 810 <1> %endif 811 00004D85 3034303030303030 <1> db _8digitshex(tt_while) 812 00004D8D 20542F54502F503A20- <1> db " T/TP/P: while condition specified",13,10 812 00004D96 7768696C6520636F6E- <1> 812 00004D9F 646974696F6E207370- <1> 812 00004DA8 656369666965640D0A <1> 813 00004DB1 3038303030303030 <1> db _8digitshex(tt_p) 814 00004DB9 2054503A2050207370- <1> db " TP: P specified (proceed past string ops)",13,10 814 00004DC2 656369666965642028- <1> 814 00004DCB 70726F636565642070- <1> 814 00004DD4 61737420737472696E- <1> 814 00004DDD 67206F7073290D0A <1> 815 00004DE5 3130303030303030 <1> db _8digitshex(tt_silent_mode) 816 00004DED 20542F54502F503A20- <1> db " T/TP/P: silent mode (SILENT specified)",13,10 816 00004DF6 73696C656E74206D6F- <1> 816 00004DFF 6465202853494C454E- <1> 816 00004E08 542073706563696669- <1> 816 00004E11 6564290D0A <1> 817 00004E16 3230303030303030 <1> db _8digitshex(tt_silence) 818 00004E1E 20542F54502F503A20- <1> db " T/TP/P: silent mode is active, writing to silent buffer",13,10 818 00004E27 73696C656E74206D6F- <1> 818 00004E30 646520697320616374- <1> 818 00004E39 6976652C2077726974- <1> 818 00004E42 696E6720746F207369- <1> 818 00004E4B 6C656E742062756666- <1> 818 00004E54 65720D0A <1> 819 00004E58 00 <1> asciz 820 <1> 821 <1> .asmoptions_1: 822 00004E59 417661696C61626C65- <1> db "Available assembler/disassembler options: (read/write DAO, read DAS)",13,10 822 00004E62 20617373656D626C65- <1> 822 00004E6B 722F64697361737365- <1> 822 00004E74 6D626C6572206F7074- <1> 822 00004E7D 696F6E733A20287265- <1> 822 00004E86 61642F777269746520- <1> 822 00004E8F 44414F2C2072656164- <1> 822 00004E98 20444153290D0A <1> 823 00004E9F 303120446973617373- <1> db _2digitshex(disasm_lowercase), " Disassembler: lowercase output",13,10 823 00004EA8 656D626C65723A206C- <1> 823 00004EB1 6F7765726361736520- <1> 823 00004EBA 6F75747075740D0A <1> 824 00004EC2 303220446973617373- <1> db _2digitshex(disasm_commablank)," Disassembler: output blank behind comma",13,10 824 00004ECB 656D626C65723A206F- <1> 824 00004ED4 757470757420626C61- <1> 824 00004EDD 6E6B20626568696E64- <1> 824 00004EE6 20636F6D6D610D0A <1> 825 00004EEE 303420446973617373- <1> db _2digitshex(disasm_nasm), " Disassembler: output addresses in NASM syntax",13,10 825 00004EF7 656D626C65723A206F- <1> 825 00004F00 757470757420616464- <1> 825 00004F09 72657373657320696E- <1> 825 00004F12 204E41534D2073796E- <1> 825 00004F1B 7461780D0A <1> 826 00004F20 3038 <1> db _2digitshex(disasm_lowercase_refmem) 827 00004F22 20446973617373656D- <1> db " Disassembler: lowercase referenced memory location segreg",13,10 827 00004F2B 626C65723A206C6F77- <1> 827 00004F34 657263617365207265- <1> 827 00004F3D 666572656E63656420- <1> 827 00004F46 6D656D6F7279206C6F- <1> 827 00004F4F 636174696F6E207365- <1> 827 00004F58 677265670D0A <1> 828 00004F5E 313020446973617373- <1> db _2digitshex(disasm_show_short)," Disassembler: always show SHORT keyword",13,10 828 00004F67 656D626C65723A2061- <1> 828 00004F70 6C776179732073686F- <1> 828 00004F79 772053484F5254206B- <1> 828 00004F82 6579776F72640D0A <1> 829 00004F8A 323020446973617373- <1> db _2digitshex(disasm_show_near), " Disassembler: always show NEAR keyword",13,10 829 00004F93 656D626C65723A2061- <1> 829 00004F9C 6C776179732073686F- <1> 829 00004FA5 77204E454152206B65- <1> 829 00004FAE 79776F72640D0A <1> 830 00004FB5 343020446973617373- <1> db _2digitshex(disasm_show_far), " Disassembler: always show FAR keyword",13,10 830 00004FBE 656D626C65723A2061- <1> 830 00004FC7 6C776179732073686F- <1> 830 00004FD0 7720464152206B6579- <1> 830 00004FD9 776F72640D0A <1> 831 00004FDF 00 <1> asciz 832 <1> %endif 833 <1> 834 <1> %if _VARIABLES || _OPTIONS || _PSPVARIABLES 835 <1> .varhelp: 836 00004FE0 417661696C61626C65- <1> db "Available " 836 00004FE9 20 <1> 837 <1> %if _PSPVARIABLES && !(_VARIABLES || _OPTIONS) 838 <1> db "read-only " 839 <1> %endif 840 00004FEA 6C4465627567207661- <1> db "lDebug variables:",13,10 840 00004FF3 726961626C65733A0D- <1> 840 00004FFC 0A <1> 841 <1> %if _VARIABLES 842 00004FFD 56302E2E5646095573- <1> db "V0..VF",9,"User-specified usage",13,10 842 00005006 65722D737065636966- <1> 842 0000500F 696564207573616765- <1> 842 00005018 0D0A <1> 843 <1> %endif 844 <1> %if _OPTIONS 845 0000501A 44434F094465627567- <1> db "DCO",9,"Debugger Common Options",13,10 845 00005023 67657220436F6D6D6F- <1> 845 0000502C 6E204F7074696F6E73- <1> 845 00005035 0D0A <1> 846 00005037 44414F094465627567- <1> db "DAO",9,"Debugger Assembler/disassembler Options",13,10 846 00005040 67657220417373656D- <1> 846 00005049 626C65722F64697361- <1> 846 00005052 7373656D626C657220- <1> 846 0000505B 4F7074696F6E730D0A <1> 847 <1> %endif 848 <1> %if _OPTIONS || _PSPVARIABLES && (_OPTIONS || _VARIABLES) 849 00005064 2054686520666F6C6C- <1> db " The following variables cannot be written:",13,10 849 0000506D 6F77696E6720766172- <1> 849 00005076 6961626C6573206361- <1> 849 0000507F 6E6E6F742062652077- <1> 849 00005088 72697474656E3A0D0A <1> 850 <1> %endif 851 <1> %if _PSPVARIABLES 852 00005091 505350094465627567- <1> db "PSP",9,"Debuggee Process" 852 0000509A 6765652050726F6365- <1> 852 000050A3 7373 <1> 853 <1> %if _PM 854 <1> db " (as real mode segment)" 855 <1> %endif 856 000050A5 0D0A <1> db 13,10 857 000050A7 505052094465627567- <1> db "PPR",9,"Debuggee's Parent Process",13,10 857 000050B0 676565277320506172- <1> 857 000050B9 656E742050726F6365- <1> 857 000050C2 73730D0A <1> 858 000050C6 505049094465627567- <1> db "PPI",9,"Debuggee's Parent Process Interrupt 22h",13,10 858 000050CF 676565277320506172- <1> 858 000050D8 656E742050726F6365- <1> 858 000050E1 737320496E74657272- <1> 858 000050EA 757074203232680D0A <1> 859 <1> %endif 860 <1> %if _OPTIONS 861 000050F3 444946094465627567- <1> db "DIF",9,"Debugger Internal Flags",13,10 861 000050FC 67657220496E746572- <1> 861 00005105 6E616C20466C616773- <1> 861 0000510E 0D0A <1> 862 00005110 444353094465627567- <1> db "DCS",9,"Debugger Common Startup options",13,10 862 00005119 67657220436F6D6D6F- <1> 862 00005122 6E2053746172747570- <1> 862 0000512B 206F7074696F6E730D- <1> 862 00005134 0A <1> 863 00005135 444153094465627567- <1> db "DAS",9,"Debugger Assembler/disassembler Startup options",13,10 863 0000513E 67657220417373656D- <1> 863 00005147 626C65722F64697361- <1> 863 00005150 7373656D626C657220- <1> 863 00005159 53746172747570206F- <1> 863 00005162 7074696F6E730D0A <1> 864 0000516A 445052094465627567- <1> db "DPR",9,"Debugger Process" 864 00005173 6765722050726F6365- <1> 864 0000517C 7373 <1> 865 <1> %if _PM 866 <1> db " (as Real mode segment)",13,10 867 <1> db "DPS",9,"Debugger Process Selector (zero in real mode)" 868 <1> %endif 869 0000517E 0D0A <1> db 13,10 870 00005180 445050094465627567- <1> db "DPP",9,"Debugger's Parent Process" 870 00005189 676572277320506172- <1> 870 00005192 656E742050726F6365- <1> 870 0000519B 7373 <1> 871 <1> %if _TSR 872 0000519D 20287A65726F20696E- <1> db " (zero in TSR mode)" 872 000051A6 20545352206D6F6465- <1> 872 000051AF 29 <1> 873 <1> %endif 874 000051B0 0D0A <1> db 13,10 875 000051B2 445049094465627567- <1> db "DPI",9,"Debugger's Parent process Interrupt 22h" 875 000051BB 676572277320506172- <1> 875 000051C4 656E742070726F6365- <1> 875 000051CD 737320496E74657272- <1> 875 000051D6 75707420323268 <1> 876 <1> %if _TSR 877 000051DD 20287A65726F20696E- <1> db " (zero in TSR mode)" 877 000051E6 20545352206D6F6465- <1> 877 000051EF 29 <1> 878 <1> %endif 879 000051F0 0D0A <1> db 13,10 880 000051F2 0D0A <1> db 13,10 881 000051F4 456E746572203F4F20- <1> db "Enter ?O to display the options and internal flags.",13,10 881 000051FD 746F20646973706C61- <1> 881 00005206 7920746865206F7074- <1> 881 0000520F 696F6E7320616E6420- <1> 881 00005218 696E7465726E616C20- <1> 881 00005221 666C6167732E0D0A <1> 882 <1> %endif 883 00005229 00 <1> asciz 884 <1> %endif 885 <1> %if _BOOTLDR 886 <1> .boothelp: 887 0000522A 426F6F74206C6F6164- <1> db "Boot loading commands:",13,10 887 00005233 696E6720636F6D6D61- <1> 887 0000523C 6E64733A0D0A <1> 888 00005242 424F4F54204C495354- <1> db "BOOT LIST HDA",13,10 888 0000524B 204844410D0A <1> 889 00005251 424F4F542044495220- <1> db "BOOT DIR [partition] [dirname]",13,10 889 0000525A 5B706172746974696F- <1> 889 00005263 6E5D205B6469726E61- <1> 889 0000526C 6D655D0D0A <1> 890 00005271 424F4F542052454144- <1> db "BOOT READ|WRITE [partition] segment [[HIDDEN=sector] sector] [count]",13,10 890 0000527A 7C5752495445205B70- <1> 890 00005283 6172746974696F6E5D- <1> 890 0000528C 207365676D656E7420- <1> 890 00005295 5B5B48494444454E3D- <1> 890 0000529E 736563746F725D2073- <1> 890 000052A7 6563746F725D205B63- <1> 890 000052B0 6F756E745D0D0A <1> 891 <1> %if _DOSEMU 892 000052B7 424F4F542051554954- <1> db "BOOT QUIT",9,"[exits dosemu or shuts down using APM]",13,10 892 000052C0 095B65786974732064- <1> 892 000052C9 6F73656D75206F7220- <1> 892 000052D2 736875747320646F77- <1> 892 000052DB 6E207573696E672041- <1> 892 000052E4 504D5D0D0A <1> 893 <1> %else 894 <1> db "BOOT QUIT",9,"[shuts down using APM]",13,10 895 <1> %endif 896 000052E9 424F4F54205B50524F- <1> db "BOOT [PROTOCOL=SECTOR] partition",13,10 896 000052F2 544F434F4C3D534543- <1> 896 000052FB 544F525D2070617274- <1> 896 00005304 6974696F6E0D0A <1> 897 0000530B 424F4F542050524F54- <1> db "BOOT PROTOCOL=proto [opt] [partition] [filename1] [filename2] [cmdline]",13,10 897 00005314 4F434F4C3D70726F74- <1> 897 0000531D 6F205B6F70745D205B- <1> 897 00005326 706172746974696F6E- <1> 897 0000532F 5D205B66696C656E61- <1> 897 00005338 6D65315D205B66696C- <1> 897 00005341 656E616D65325D205B- <1> 897 0000534A 636D646C696E655D0D- <1> 897 00005353 0A <1> 898 00005354 0974686520666F6C6C- <1> db 9,"the following partitions may be specified:",13,10 898 0000535D 6F77696E6720706172- <1> 898 00005366 746974696F6E73206D- <1> 898 0000536F 617920626520737065- <1> 898 00005378 6369666965643A0D0A <1> 899 00005381 09204844416E756D09- <1> db 9," HDAnum",9,"first hard disk, num = partition (1-4 primary, 5+ logical)",13,10 899 0000538A 666972737420686172- <1> 899 00005393 64206469736B2C206E- <1> 899 0000539C 756D203D2070617274- <1> 899 000053A5 6974696F6E2028312D- <1> 899 000053AE 34207072696D617279- <1> 899 000053B7 2C20352B206C6F6769- <1> 899 000053C0 63616C290D0A <1> 900 000053C6 09204844426E756D09- <1> db 9," HDBnum",9,"second hard disk (etc), num = partition",13,10 900 000053CF 7365636F6E64206861- <1> 900 000053D8 7264206469736B2028- <1> 900 000053E1 657463292C206E756D- <1> 900 000053EA 203D20706172746974- <1> 900 000053F3 696F6E0D0A <1> 901 000053F8 092048444109666972- <1> db 9," HDA",9,"first hard disk (only valid for READ|WRITE|PROTOCOL=SECTOR)",13,10 901 00005401 737420686172642064- <1> 901 0000540A 69736B20286F6E6C79- <1> 901 00005413 2076616C696420666F- <1> 901 0000541C 7220524541447C5752- <1> 901 00005425 4954457C50524F544F- <1> 901 0000542E 434F4C3D534543544F- <1> 901 00005437 52290D0A <1> 902 0000543B 092046444109666972- <1> db 9," FDA",9,"first floppy disk",13,10 902 00005444 737420666C6F707079- <1> 902 0000544D 206469736B0D0A <1> 903 00005454 092046444209736563- <1> db 9," FDB",9,"second floppy disk (etc)",13,10 903 0000545D 6F6E6420666C6F7070- <1> 903 00005466 79206469736B202865- <1> 903 0000546F 7463290D0A <1> 904 00005474 09204C445009706172- <1> db 9," LDP",9,"partition the debugger loaded from",13,10 904 0000547D 746974696F6E207468- <1> 904 00005486 652064656275676765- <1> 904 0000548F 72206C6F6164656420- <1> 904 00005498 66726F6D0D0A <1> 905 0000549E 092059445009706172- <1> db 9," YDP",9,"partition the most recent Y command loaded from",13,10 905 000054A7 746974696F6E207468- <1> 905 000054B0 65206D6F7374207265- <1> 905 000054B9 63656E74205920636F- <1> 905 000054C2 6D6D616E64206C6F61- <1> 905 000054CB 6465642066726F6D0D- <1> 905 000054D4 0A <1> 906 000054D5 0920534450096C6173- <1> db 9," SDP",9,"last used partition (default if no partition specified)",13,10 906 000054DE 742075736564207061- <1> 906 000054E7 72746974696F6E2028- <1> 906 000054F0 64656661756C742069- <1> 906 000054F9 66206E6F2070617274- <1> 906 00005502 6974696F6E20737065- <1> 906 0000550B 636966696564290D0A <1> 907 00005514 0966696C656E616D65- <1> db 9,"filename2 may be double-slash // for none",13,10 907 0000551D 32206D617920626520- <1> 907 00005526 646F75626C652D736C- <1> 907 0000552F 617368202F2F20666F- <1> 907 00005538 72206E6F6E650D0A <1> 908 00005540 09636D646C696E6520- <1> db 9,"cmdline is only valid for lDOS, RxDOS.2, RxDOS.3 protocols",13,10 908 00005549 6973206F6E6C792076- <1> 908 00005552 616C696420666F7220- <1> 908 0000555B 6C444F532C20527844- <1> 908 00005564 4F532E322C20527844- <1> 908 0000556D 4F532E332070726F74- <1> 908 00005576 6F636F6C730D0A <1> 909 0000557D 0966696C6573272064- <1> db 9,"files' directory entries are loaded to 500h and 520h",13,10 909 00005586 69726563746F727920- <1> 909 0000558F 656E74726965732061- <1> 909 00005598 7265206C6F61646564- <1> 909 000055A1 20746F203530306820- <1> 909 000055AA 616E6420353230680D- <1> 909 000055B3 0A <1> 910 000055B4 0D0A <1> db 13,10 911 000055B6 417661696C61626C65- <1> db "Available protocols: (default filenames, load segment, then entrypoint)",13,10 911 000055BF 2070726F746F636F6C- <1> 911 000055C8 733A20286465666175- <1> 911 000055D1 6C742066696C656E61- <1> 911 000055DA 6D65732C206C6F6164- <1> 911 000055E3 207365676D656E742C- <1> 911 000055EC 207468656E20656E74- <1> 911 000055F5 7279706F696E74290D- <1> 911 000055FE 0A <1> 912 000055FF 204C444F5309094C44- <1> db " LDOS",9,9, "LDOS.COM or L[D]DEBUG.COM at 200h, 0:400h",13,10 912 00005608 4F532E434F4D206F72- <1> 912 00005611 204C5B445D44454255- <1> 912 0000561A 472E434F4D20617420- <1> 912 00005623 323030682C20303A34- <1> 912 0000562C 3030680D0A <1> 913 00005631 2046524545444F5309- <1> db " FREEDOS",9,"KERNEL.SYS or METAKERN.SYS at 60h, 0:0",13,10 913 0000563A 4B45524E454C2E5359- <1> 913 00005643 53206F72204D455441- <1> 913 0000564C 4B45524E2E53595320- <1> 913 00005655 6174203630682C2030- <1> 913 0000565E 3A300D0A <1> 914 00005662 20444F534309094950- <1> db " DOSC",9,9, "IPL.SYS at 2000h, 0:0",13,10 914 0000566B 4C2E53595320617420- <1> 914 00005674 32303030682C20303A- <1> 914 0000567D 300D0A <1> 915 00005680 20454452444F530909- <1> db " EDRDOS",9,9,"DRBIO.SYS at 70h, 0:0",13,10 915 00005689 445242494F2E535953- <1> 915 00005692 206174203730682C20- <1> 915 0000569B 303A300D0A <1> 916 000056A0 204D53444F53360909- <1> db " MSDOS6",9,9, "IO.SYS + MSDOS.SYS at 70h, 0:0",13,10 916 000056A9 494F2E535953202B20- <1> 916 000056B2 4D53444F532E535953- <1> 916 000056BB 206174203730682C20- <1> 916 000056C4 303A300D0A <1> 917 000056C9 204D53444F53370909- <1> db " MSDOS7",9,9, "IO.SYS at 70h, 0:200h",13,10 917 000056D2 494F2E535953206174- <1> 917 000056DB 203730682C20303A32- <1> 917 000056E4 3030680D0A <1> 918 000056E9 2049424D444F530909- <1> db " IBMDOS",9,9, "IBMBIO.COM + IBMDOS.COM at 70h, 0:0",13,10 918 000056F2 49424D42494F2E434F- <1> 918 000056FB 4D202B2049424D444F- <1> 918 00005704 532E434F4D20617420- <1> 918 0000570D 3730682C20303A300D- <1> 918 00005716 0A <1> 919 00005717 204E544C445209094E- <1> db " NTLDR",9,9, "NTLDR at 2000h, 0:0",13,10 919 00005720 544C44522061742032- <1> 919 00005729 303030682C20303A30- <1> 919 00005732 0D0A <1> 920 00005734 20424F4F544D475209- <1> db " BOOTMGR",9, "BOOTMGR at 2000h, 0:0",13,10 920 0000573D 424F4F544D47522061- <1> 920 00005746 742032303030682C20- <1> 920 0000574F 303A300D0A <1> 921 00005754 205258444F532E3009- <1> db " RXDOS.0",9,"RXDOSBIO.SYS + RXDOS.SYS at 70h, 0:0",13,10 921 0000575D 5258444F5342494F2E- <1> 921 00005766 535953202B20525844- <1> 921 0000576F 4F532E535953206174- <1> 921 00005778 203730682C20303A30- <1> 921 00005781 0D0A <1> 922 00005783 205258444F532E3109- <1> db " RXDOS.1",9,"RXBIO.SYS + RXDOS.SYS at 70h, 0:0",13,10 922 0000578C 525842494F2E535953- <1> 922 00005795 202B205258444F532E- <1> 922 0000579E 535953206174203730- <1> 922 000057A7 682C20303A300D0A <1> 923 000057AF 205258444F532E3209- <1> db " RXDOS.2",9,"RXDOS.COM at 70h, 0:400h",13,10 923 000057B8 5258444F532E434F4D- <1> 923 000057C1 206174203730682C20- <1> 923 000057CA 303A343030680D0A <1> 924 000057D2 205258444F532E3309- <1> db " RXDOS.3",9,"RXDOS.COM at 200h, 0:400h",13,10 924 000057DB 5258444F532E434F4D- <1> 924 000057E4 20617420323030682C- <1> 924 000057ED 20303A343030680D0A <1> 925 000057F6 20434841494E090942- <1> db " CHAIN",9,9,"BOOTSECT.DOS at 7C0h, -7C0h:7C00h",13,10 925 000057FF 4F4F54534543542E44- <1> 925 00005808 4F5320617420374330- <1> 925 00005811 682C202D374330683A- <1> 925 0000581A 37433030680D0A <1> 926 00005821 20534543544F520909- <1> db " SECTOR",9,9,"(default) load partition boot sector or MBR",13,10 926 0000582A 2864656661756C7429- <1> 926 00005833 206C6F616420706172- <1> 926 0000583C 746974696F6E20626F- <1> 926 00005845 6F7420736563746F72- <1> 926 0000584E 206F72204D42520D0A <1> 927 00005857 20534543544F52414C- <1> db " SECTORALT",9,"as SECTOR, but entry at 07C0h:0",13,10 927 00005860 540961732053454354- <1> 927 00005869 4F522C206275742065- <1> 927 00005872 6E7472792061742030- <1> 927 0000587B 374330683A300D0A <1> 928 00005883 0D0A <1> db 13,10 929 00005885 417661696C61626C65- <1> db "Available options:",13,10 929 0000588E 206F7074696F6E733A- <1> 929 00005897 0D0A <1> 930 00005899 204D494E504152413D- <1> db " MINPARA=num",9,9, "load at least that many paragraphs",13,10 930 000058A2 6E756D09096C6F6164- <1> 930 000058AB 206174206C65617374- <1> 930 000058B4 2074686174206D616E- <1> 930 000058BD 792070617261677261- <1> 930 000058C6 7068730D0A <1> 931 000058CB 204D4158504152413D- <1> db " MAXPARA=num",9,9, "load at most that many paragraphs (0 = as many as fit)",13,10 931 000058D4 6E756D09096C6F6164- <1> 931 000058DD 206174206D6F737420- <1> 931 000058E6 74686174206D616E79- <1> 931 000058EF 207061726167726170- <1> 931 000058F8 6873202830203D2061- <1> 931 00005901 73206D616E79206173- <1> 931 0000590A 20666974290D0A <1> 932 00005911 205345474D454E543D- <1> db " SEGMENT=num",9,9, "change segment at that the kernel loads",13,10 932 0000591A 6E756D09096368616E- <1> 932 00005923 6765207365676D656E- <1> 932 0000592C 742061742074686174- <1> 932 00005935 20746865206B65726E- <1> 932 0000593E 656C206C6F6164730D- <1> 932 00005947 0A <1> 933 00005948 20454E5452593D5B6E- <1> db " ENTRY=[num:]num",9,"change entrypoint (CS (relative) : IP)",13,10 933 00005951 756D3A5D6E756D0963- <1> 933 0000595A 68616E676520656E74- <1> 933 00005963 7279706F696E742028- <1> 933 0000596C 4353202872656C6174- <1> 933 00005975 69766529203A204950- <1> 933 0000597E 290D0A <1> 934 00005981 204250423D5B6E756D- <1> db " BPB=[num:]num",9,9, "change BPB load address (segment -1 = auto-BPB)",13,10 934 0000598A 3A5D6E756D09096368- <1> 934 00005993 616E67652042504220- <1> 934 0000599C 6C6F61642061646472- <1> 934 000059A5 65737320287365676D- <1> 934 000059AE 656E74202D31203D20- <1> 934 000059B7 6175746F2D42504229- <1> 934 000059C0 0D0A <1> 936 000059C2 20434845434B4F4646- <1> db " CHECKOFFSET=num",9,"set address of word to check, must be even",13,10 936 000059CB 5345543D6E756D0973- <1> 936 000059D4 657420616464726573- <1> 936 000059DD 73206F6620776F7264- <1> 936 000059E6 20746F20636865636B- <1> 936 000059EF 2C206D757374206265- <1> 936 000059F8 206576656E0D0A <1> 937 000059FF 20434845434B56414C- <1> db " CHECKVALUE=num",9,9,"set value of word to check (0 = no check)",13,10 937 00005A08 55453D6E756D090973- <1> 937 00005A11 65742076616C756520- <1> 937 00005A1A 6F6620776F72642074- <1> 937 00005A23 6F20636865636B2028- <1> 937 00005A2C 30203D206E6F206368- <1> 937 00005A35 65636B290D0A <1> 938 00005A3B 426F6F6C65616E206F- <1> db "Boolean options: [opt=bool]",13,10 938 00005A44 7074696F6E733A205B- <1> 938 00005A4D 6F70743D626F6F6C5D- <1> 938 00005A56 0D0A <1> 939 00005A58 205345545F444C5F55- <1> db " SET_DL_UNIT",9,9,"set dl to load unit",13,10 939 00005A61 4E4954090973657420- <1> 939 00005A6A 646C20746F206C6F61- <1> 939 00005A73 6420756E69740D0A <1> 940 00005A7B 205345545F424C5F55- <1> db " SET_BL_UNIT",9,9,"set bl to load unit",13,10 940 00005A84 4E4954090973657420- <1> 940 00005A8D 626C20746F206C6F61- <1> 940 00005A96 6420756E69740D0A <1> 941 00005A9E 205345545F53494449- <1> db " SET_SIDI_CLUSTER",9,"set si:di to first cluster",13,10 941 00005AA7 5F434C555354455209- <1> 941 00005AB0 7365742073693A6469- <1> 941 00005AB9 20746F206669727374- <1> 941 00005AC2 20636C75737465720D- <1> 941 00005ACB 0A <1> 942 00005ACC 205345545F44535349- <1> db " SET_DSSI_DPT",9,9,"set ds:si to DPT address",13,10 942 00005AD5 5F4450540909736574- <1> 942 00005ADE 2064733A736920746F- <1> 942 00005AE7 204450542061646472- <1> 942 00005AF0 6573730D0A <1> 943 00005AF5 20505553485F445054- <1> db " PUSH_DPT",9,9,"push DPT address and DPT entry address",13,10 943 00005AFE 090970757368204450- <1> 943 00005B07 542061646472657373- <1> 943 00005B10 20616E642044505420- <1> 943 00005B19 656E74727920616464- <1> 943 00005B22 726573730D0A <1> 944 00005B28 204441544153544152- <1> db " DATASTART_HIDDEN",9,"add hidden sectors to datastart var",13,10 944 00005B31 545F48494444454E09- <1> 944 00005B3A 616464206869646465- <1> 944 00005B43 6E20736563746F7273- <1> 944 00005B4C 20746F206461746173- <1> 944 00005B55 74617274207661720D- <1> 944 00005B5E 0A <1> 945 00005B5F 205345545F41584258- <1> db " SET_AXBX_DATASTART",9,"set ax:bx to datastart var",13,10 945 00005B68 5F4441544153544152- <1> 945 00005B71 54097365742061783A- <1> 945 00005B7A 627820746F20646174- <1> 945 00005B83 617374617274207661- <1> 945 00005B8C 720D0A <1> 946 00005B8F 205345545F44534250- <1> db " SET_DSBP_BPB",9,9,"set ds:bp to BPB address",13,10 946 00005B98 5F4250420909736574- <1> 946 00005BA1 2064733A627020746F- <1> 946 00005BAA 204250422061646472- <1> 946 00005BB3 6573730D0A <1> 947 00005BB8 204C42415F5345545F- <1> db " LBA_SET_TYPE",9,9,"set LBA partition type in BPB",13,10 947 00005BC1 545950450909736574- <1> 947 00005BCA 204C42412070617274- <1> 947 00005BD3 6974696F6E20747970- <1> 947 00005BDC 6520696E204250420D- <1> 947 00005BE5 0A <1> 948 00005BE6 204D4553534147455F- <1> db " MESSAGE_TABLE",9,9, "provide message table pointed to at 1EEh",13,10 948 00005BEF 5441424C4509097072- <1> 948 00005BF8 6F76696465206D6573- <1> 948 00005C01 73616765207461626C- <1> 948 00005C0A 6520706F696E746564- <1> 948 00005C13 20746F206174203145- <1> 948 00005C1C 45680D0A <1> 950 00005C20 205345545F41584258- <1> db " SET_AXBX_ROOT_HIDDEN",9, "set ax:bx to root start with hidden sectors",13,10 950 00005C29 5F524F4F545F484944- <1> 950 00005C32 44454E097365742061- <1> 950 00005C3B 783A627820746F2072- <1> 950 00005C44 6F6F74207374617274- <1> 950 00005C4D 207769746820686964- <1> 950 00005C56 64656E20736563746F- <1> 950 00005C5F 72730D0A <1> 952 00005C63 204E4F5F4250420909- <1> db " NO_BPB",9,9,9, "do not load BPB",13,10 952 00005C6C 09646F206E6F74206C- <1> 952 00005C75 6F6164204250420D0A <1> 953 00005C7E 205345545F44535349- <1> db " SET_DSSI_PARTINFO",9, "load part table to 600h, point ds:si + ds:bp to it",13,10 953 00005C87 5F50415254494E464F- <1> 953 00005C90 096C6F616420706172- <1> 953 00005C99 74207461626C652074- <1> 953 00005CA2 6F20363030682C2070- <1> 953 00005CAB 6F696E742064733A73- <1> 953 00005CB4 69202B2064733A6270- <1> 953 00005CBD 20746F2069740D0A <1> 954 00005CC5 00 <1> asciz 955 <1> %endif 956 <1> %endif 957 <1> 958 00005CC6 54686973206C446562- <1> .readonly: asciz "This lDebug variable cannot be written to. See ?V.",13,10 958 00005CCF 756720766172696162- <1> 958 00005CD8 6C652063616E6E6F74- <1> 958 00005CE1 206265207772697474- <1> 958 00005CEA 656E20746F2E205365- <1> 958 00005CF3 65203F562E0D0A00 <1> 959 00005CFB 54686973206D656D6F- <1> .readonly_mem: asciz "This memory variable cannot be written to.",13,10 959 00005D04 727920766172696162- <1> 959 00005D0D 6C652063616E6E6F74- <1> 959 00005D16 206265207772697474- <1> 959 00005D1F 656E20746F2E0D0A00 <1> 960 00005D28 5B6D6F72655D <1> .more: db "[more]" 961 <1> .more_size equ $-.more 962 00005D2E 0D2020202020200D <1> .more_over: db 13," ",13 ; to overwrite previous prompt 963 <1> .more_over_size equ $-.more_over 964 00005D36 5E430D0A <1> .ctrlc: db "^C",13,10 965 <1> .ctrlc_size equ $-.ctrlc 966 00005D3A 00 <1> asciz 967 <1> .freedos_ctrlc_workaround: 968 00005D3B 20284F6C6420467265- <1> asciz " (Old FreeDOS kernel Ctrl-C work around happened)",13,10 968 00005D44 65444F53206B65726E- <1> 968 00005D4D 656C204374726C2D43- <1> 968 00005D56 20776F726B2061726F- <1> 968 00005D5F 756E64206861707065- <1> 968 00005D68 6E6564290D0A00 <1> 969 <1> .not_while_indos: 970 00005D6F 436F6D6D616E64206E- <1> asciz "Command not supported while in InDOS mode.",13,10 970 00005D78 6F7420737570706F72- <1> 970 00005D81 746564207768696C65- <1> 970 00005D8A 20696E20496E444F53- <1> 970 00005D93 206D6F64652E0D0A00 <1> 971 00005D9C 43757272656E74206D- <1> .rv_mode.before: asciz "Current mode: " 971 00005DA5 6F64653A2000 <1> 972 <1> %if _PM 973 <1> .rv_mode_dpmi_16: asciz "DPMI 16-bit CS",13,10 974 <1> .rv_mode_dpmi_32: asciz "DPMI 32-bit CS",13,10 975 <1> %endif 976 00005DAB 5265616C203836204D- <1> .rv_mode_r86m: asciz "Real 86 Mode",13,10 976 00005DB4 6F64650D0A00 <1> 977 00005DBA 5669727475616C2038- <1> .rv_mode_v86m: asciz "Virtual 86 Mode",13,10 977 00005DC3 36204D6F64650D0A00 <1> 978 <1> 979 00005DCC 333836207265676973- <1> .regs386: asciz "386 registers are " 979 00005DD5 746572732061726520- <1> 979 00005DDE 00 <1> 980 00005DDF 6E6F7420 <1> .regs386_off:db "not " 981 00005DE3 646973706C61796564- <1> .regs386_on: asciz "displayed",13,10 981 00005DEC 0D0A00 <1> 982 <1> 983 <1> %if _EMS 984 <1> .xhelp: 985 00005DEF 457870616E64656420- <1> db "Expanded memory (EMS) commands:",13,10 985 00005DF8 6D656D6F7279202845- <1> 985 00005E01 4D532920636F6D6D61- <1> 985 00005E0A 6E64733A0D0A <1> 986 00005E10 2020416C6C6F636174- <1> db " Allocate",9, "XA count",13,10 986 00005E19 6509584120636F756E- <1> 986 00005E22 740D0A <1> 987 00005E25 20204465616C6C6F63- <1> db " Deallocate",9, "XD handle",13,10 987 00005E2E 617465095844206861- <1> 987 00005E37 6E646C650D0A <1> 988 00005E3D 20204D6170206D656D- <1> db " Map memory",9, "XM logical-page physical-page handle",13,10 988 00005E46 6F727909584D206C6F- <1> 988 00005E4F 676963616C2D706167- <1> 988 00005E58 652070687973696361- <1> 988 00005E61 6C2D70616765206861- <1> 988 00005E6A 6E646C650D0A <1> 989 00005E70 20205265616C6C6F63- <1> db " Reallocate",9, "XR handle count",13,10 989 00005E79 617465095852206861- <1> 989 00005E82 6E646C6520636F756E- <1> 989 00005E8B 740D0A <1> 990 00005E8E 202053686F77207374- <1> db " Show status",9, "XS",13,10 990 00005E97 617475730958530D0A <1> 991 00005EA0 00 <1> asciz 992 <1> %endif 993 <1> 994 <1> %if _MCB 995 00005EA1 456E64206F66206368- <1> .invmcbadr: asciz "End of chain: invalid MCB address.",13,10 995 00005EAA 61696E3A20696E7661- <1> 995 00005EB3 6C6964204D43422061- <1> 995 00005EBC 6464726573732E0D0A- <1> 995 00005EC5 00 <1> 996 <1> %endif 997 <1> 998 <1> %if _TSR 999 00005EC6 43616E6E6F7420676F- <1> .pspnotfound: asciz "Cannot go resident, child PSP not found.",13,10 999 00005ECF 207265736964656E74- <1> 999 00005ED8 2C206368696C642050- <1> 999 00005EE1 5350206E6F7420666F- <1> 999 00005EEA 756E642E0D0A00 <1> 1000 00005EF1 43616E6E6F7420676F- <1> .psphooked: asciz "Cannot go resident, child PSP parent return address hooked.",13,10 1000 00005EFA 207265736964656E74- <1> 1000 00005F03 2C206368696C642050- <1> 1000 00005F0C 535020706172656E74- <1> 1000 00005F15 2072657475726E2061- <1> 1000 00005F1E 64647265737320686F- <1> 1000 00005F27 6F6B65642E0D0A00 <1> 1001 00005F2F 506174636865642050- <1> .nowtsr1: asciz "Patched PSP at " 1001 00005F38 53502061742000 <1> 1002 00005F3F 2C206E6F7720726573- <1> .nowtsr2: asciz ", now resident.",13,10 1002 00005F48 6964656E742E0D0A00 <1> 1003 00005F51 416C72656164792072- <1> .alreadytsr: asciz "Already resident.",13,10 1003 00005F5A 65736964656E742E0D- <1> 1003 00005F63 0A00 <1> 1004 <1> %endif 1005 <1> %if _PM && (_TSR || _BOOTLDR) 1006 <1> .cannotpmquit: asciz "Cannot quit, still in protected mode.",13,10 1007 <1> %endif 1008 <1> %if _PM 1009 <1> .cannotpmload: asciz "Process loading aborted: Still in protected mode.",13,10 1010 <1> %endif 1011 <1> %if _BOOTLDR 1012 00005F65 436F6D6D616E64206E- <1> .nobootsupp: asciz "Command not supported in boot loaded mode.",13,10 1012 00005F6E 6F7420737570706F72- <1> 1012 00005F77 74656420696E20626F- <1> 1012 00005F80 6F74206C6F61646564- <1> 1012 00005F89 206D6F64652E0D0A00 <1> 1013 00005F92 53687574646F776E20- <1> .boot_quit_fail:asciz "Shutdown not supported.",13,10 1013 00005F9B 6E6F7420737570706F- <1> 1013 00005FA4 727465642E0D0A00 <1> 1014 00005FAC 426F6F74206661696C- <1> .bootfail: asciz "Boot failure: " 1014 00005FB5 7572653A2000 <1> 1015 00005FBB 52656164696E672073- <1> .bootfail_read: db "Reading sector failed (error " 1015 00005FC4 6563746F7220666169- <1> 1015 00005FCD 6C656420286572726F- <1> 1015 00005FD6 7220 <1> 1016 00005FD8 5F5F68292E0D0A00 <1> .bootfail_read_errorcode: asciz "__h).",13,10 1017 00005FE0 426F6F742073656374- <1> .bootfail_sig: asciz "Boot sector signature missing (is not AA55h).",13,10 1017 00005FE9 6F72207369676E6174- <1> 1017 00005FF2 757265206D69737369- <1> 1017 00005FFB 6E6720286973206E6F- <1> 1017 00006004 74204141353568292E- <1> 1017 0000600D 0D0A00 <1> 1018 00006010 506172746974696F6E- <1> .bootfail_sig_parttable: ascii "Partition table signature missing" 1018 00006019 207461626C65207369- <1> 1018 00006022 676E6174757265206D- <1> 1018 0000602B 697373696E67 <1> 1019 00006031 20286973206E6F7420- <1> asciz " (is not AA55h).",13,10 1019 0000603A 4141353568292E0D0A- <1> 1019 00006043 00 <1> 1020 00006044 426F6F742073656374- <1> .bootfail_code: asciz "Boot sector code invalid (is 0000h).",13,10 1020 0000604D 6F7220636F64652069- <1> 1020 00006056 6E76616C6964202869- <1> 1020 0000605F 73203030303068292E- <1> 1020 00006068 0D0A00 <1> 1021 <1> .bootfail_secsizediffer: 1022 0000606B 425042204270532064- <1> asciz "BPB BpS differs from actual sector size.",13,10 1022 00006074 696666657273206672- <1> 1022 0000607D 6F6D2061637475616C- <1> 1022 00006086 20736563746F722073- <1> 1022 0000608F 697A652E0D0A00 <1> 1023 <1> .bootfail_stack_underflow: 1024 00006096 426F6F742073746163- <1> asciz "Boot stack underflowed.",13,10 1024 0000609F 6B20756E646572666C- <1> 1024 000060A8 6F7765642E0D0A00 <1> 1025 <1> .bootfail_check_mismatch: 1026 000060B0 436865636B206D6973- <1> db "Check mismatch, expected " 1026 000060B9 6D617463682C206578- <1> 1026 000060C2 70656374656420 <1> 1027 <1> .bootfail_check_mismatch.check_value: 1028 000060C9 5F5F5F5F6820617420- <1> db "____h at offset " 1028 000060D2 6F666673657420 <1> 1029 <1> .bootfail_check_mismatch.check_offset: 1030 000060D9 5F5F5F5F6820627574- <1> db "____h but has " 1030 000060E2 2068617320 <1> 1031 <1> .bootfail_check_mismatch.check_got: 1032 000060E7 5F5F5F5F682E0D0A00 <1> asciz "____h.",13,10 1033 000060F0 4F7574206F66206D65- <1> .boot_out_of_memory_error: asciz "Out of memory.", 13,10 1033 000060F9 6D6F72792E0D0A00 <1> 1034 00006101 546F6F206D616E7920- <1> .boot_too_many_partitions_error:asciz "Too many partitions (or a loop).",13,10 1034 0000610A 706172746974696F6E- <1> 1034 00006113 7320286F722061206C- <1> 1034 0000611C 6F6F70292E0D0A00 <1> 1035 00006124 506172746974696F6E- <1> .boot_partition_cycle_error: asciz "Partition table cycle detected.",13,10 1035 0000612D 207461626C65206379- <1> 1035 00006136 636C65206465746563- <1> 1035 0000613F 7465642E0D0A00 <1> 1036 00006146 506172746974696F6E- <1> .boot_partition_not_found: asciz "Partition not found.",13,10 1036 0000614F 206E6F7420666F756E- <1> 1036 00006158 642E0D0A00 <1> 1037 0000615D 52656164206572726F- <1> .boot_access_error: asciz "Read error.", 13,10 1037 00006166 722E0D0A00 <1> 1038 0000616B 536563746F72207369- <1> .boot_sector_too_large: asciz "Sector size too small (< 32 bytes).", 13,10 1038 00006174 7A6520746F6F20736D- <1> 1038 0000617D 616C6C20283C203332- <1> 1038 00006186 206279746573292E0D- <1> 1038 0000618F 0A00 <1> 1039 00006191 536563746F72207369- <1> .boot_sector_too_small: asciz "Sector size too large (> 8192 bytes).", 13,10 1039 0000619A 7A6520746F6F206C61- <1> 1039 000061A3 72676520283E203831- <1> 1039 000061AC 393220627974657329- <1> 1039 000061B5 2E0D0A00 <1> 1040 000061B9 536563746F72207369- <1> .boot_sector_not_power: asciz "Sector size not a power of two.", 13,10 1040 000061C2 7A65206E6F74206120- <1> 1040 000061CB 706F776572206F6620- <1> 1040 000061D4 74776F2E0D0A00 <1> 1041 000061DB 496E76616C69642067- <1> .boot_invalid_sectors: asciz "Invalid geometry sectors.", 13,10 1041 000061E4 656F6D657472792073- <1> 1041 000061ED 6563746F72732E0D0A- <1> 1041 000061F6 00 <1> 1042 000061F7 496E76616C69642067- <1> .boot_invalid_heads: asciz "Invalid geometry heads.", 13,10 1042 00006200 656F6D657472792068- <1> 1042 00006209 656164732E0D0A00 <1> 1043 00006211 46696C65206E6F7420- <1> .boot_file_not_found: asciz "File not found.",13,10 1043 0000621A 666F756E642E0D0A00 <1> 1044 00006223 46696C6520746F6F20- <1> .boot_file_too_big_error: asciz "File too big.",13,10 1044 0000622C 6269672E0D0A00 <1> 1045 00006233 46696C6520746F6F20- <1> .boot_file_too_small_error: asciz "File too small.",13,10 1045 0000623C 736D616C6C2E0D0A00 <1> 1046 00006245 42616420616D6F756E- <1> .boot_badclusters: asciz "Bad amount of clusters.",13,10 1046 0000624E 74206F6620636C7573- <1> 1046 00006257 746572732E0D0A00 <1> 1047 0000625F 42616420636C757374- <1> .boot_badchain: asciz "Bad cluster chain.",13,10 1047 00006268 657220636861696E2E- <1> 1047 00006271 0D0A00 <1> 1048 00006274 4261642046696C6520- <1> .boot_badfat: asciz "Bad File Allocation Table.",13,10 1048 0000627D 416C6C6F636174696F- <1> 1048 00006286 6E205461626C652E0D- <1> 1048 0000628F 0A00 <1> 1049 00006291 496E76616C69642066- <1> .boot_invalid_filename: asciz "Invalid filename.",13,10 1049 0000629A 696C656E616D652E0D- <1> 1049 000062A3 0A00 <1> 1050 000062A5 43616E6E6F74207365- <1> .boot_cannot_set_both: asciz "Cannot set both " 1050 000062AE 7420626F74682000 <1> 1051 000062B6 20616E642000 <1> .boot_and: asciz " and " 1052 000062BC 2E0D0A00 <1> .boot_dot_crlf: asciz ".",13,10 1053 000062C0 2120496E7465726E61- <1> .boot_internal_error: asciz "! Internal error !",13,10 1053 000062C9 6C206572726F722021- <1> 1053 000062D2 0D0A00 <1> 1054 000062D5 42504220616E64206C- <1> .boot_bpb_load_overlap: asciz "BPB and load area overlap.",13,10 1054 000062DE 6F6164206172656120- <1> 1054 000062E7 6F7665726C61702E0D- <1> 1054 000062F0 0A00 <1> 1055 000062F2 5365676D656E742074- <1> .boot_segment_too_low: asciz "Segment too low.",13,10 1055 000062FB 6F6F206C6F772E0D0A- <1> 1055 00006304 00 <1> 1056 00006305 42504220746F6F206C- <1> .boot_bpb_too_low: asciz "BPB too low.",13,10 1056 0000630E 6F772E0D0A00 <1> 1057 00006314 2120496E7465726E61- <1> .boot_auxbuff_crossing: db "! Internal error !, " 1057 0000631D 6C206572726F722021- <1> 1057 00006326 2C20 <1> 1058 00006328 617578627566662063- <1> asciz "auxbuff crosses 64 KiB boundary.",13,10 1058 00006331 726F73736573203634- <1> 1058 0000633A 204B694220626F756E- <1> 1058 00006343 646172792E0D0A00 <1> 1059 0000634B 5245414400 <1> .read: asciz "READ" 1060 00006350 575249544500 <1> .write: asciz "WRITE" 1061 00006356 48494444454E00 <1> .hidden: asciz "HIDDEN" 1062 0000635D 44495200 <1> .dir: asciz "DIR" 1063 00006361 082020205B4449525D <1> .dirinsteadsize:countedb " [DIR]" 1064 0000636A 2F00 <1> .emptydirname: asciz "/" 1065 0000636C 424F4F5400 <1> .boot: asciz "BOOT" 1066 00006371 5155495400 <1> .quit: asciz "QUIT" 1067 00006376 50524F544F434F4C00 <1> .protocol: asciz "PROTOCOL" 1068 0000637F 5345474D454E5400 <1> .segment: asciz "SEGMENT" 1069 00006387 454E54525900 <1> .entry: asciz "ENTRY" 1070 0000638D 42504200 <1> .bpb: asciz "BPB" 1071 00006391 4D494E5041524100 <1> .minpara: asciz "MINPARA" 1072 00006399 4D41585041524100 <1> .maxpara: asciz "MAXPARA" 1073 000063A1 434845434B4F464653- <1> .checkoffset: asciz "CHECKOFFSET" 1073 000063AA 455400 <1> 1074 000063AD 434845434B56414C55- <1> .checkvalue: asciz "CHECKVALUE" 1074 000063B6 4500 <1> 1075 000063B8 534543544F5200 <1> .sector: asciz "SECTOR" 1076 000063BF 534543544F52414C54- <1> .sector_alt: asciz "SECTORALT" 1076 000063C8 00 <1> 1077 000063C9 4B45524E454C2E5359- <1> .freedos_kernel_name: asciz "KERNEL.SYS" 1077 000063D2 5300 <1> 1078 000063D4 49504C2E53595300 <1> .dosc_kernel_name: asciz "IPL.SYS" 1079 000063DC 445242494F2E535953- <1> .edrdos_kernel_name: asciz "DRBIO.SYS" 1079 000063E5 00 <1> 1080 000063E6 4C444F532E434F4D00 <1> .ldos_kernel_name: asciz "LDOS.COM" 1081 <1> .msdos7_kernel_name: 1082 000063EF 494F2E53595300 <1> .msdos6_kernel_name: asciz "IO.SYS" 1083 000063F6 4D53444F532E535953- <1> .msdos6_add_name: asciz "MSDOS.SYS" 1083 000063FF 00 <1> 1084 00006400 49424D42494F2E434F- <1> .ibmdos_kernel_name: asciz "IBMBIO.COM" 1084 00006409 4D00 <1> 1085 0000640B 49424D444F532E434F- <1> .ibmdos_add_name: asciz "IBMDOS.COM" 1085 00006414 4D00 <1> 1086 00006416 4E544C445200 <1> .ntldr_kernel_name: asciz "NTLDR" 1087 0000641C 424F4F544D475200 <1> .bootmgr_kernel_name: asciz "BOOTMGR" 1088 00006424 424F4F54534543542E- <1> .chain_kernel_name: asciz "BOOTSECT.DOS" 1088 0000642D 444F5300 <1> 1089 00006431 5258444F5342494F2E- <1> .rxdos.0_kernel_name: asciz "RXDOSBIO.SYS" 1089 0000643A 53595300 <1> 1090 0000643E 525842494F2E535953- <1> .rxdos.1_kernel_name: asciz "RXBIO.SYS" 1090 00006447 00 <1> 1091 <1> .rxdos.0_add_name: 1092 00006448 5258444F532E535953- <1> .rxdos.1_add_name: asciz "RXDOS.SYS" 1092 00006451 00 <1> 1093 00006452 5258444F532E434F4D- <1> .rxdos.2_kernel_name: asciz "RXDOS.COM" 1093 0000645B 00 <1> 1094 0000645C 00 <1> .addname_empty: asciz 1095 0000645D 43616E6E6F74207175- <1> .cannotbootquit_memsizes: asciz "Cannot quit, memory size changed.",13,10 1095 00006466 69742C206D656D6F72- <1> 1095 0000646F 792073697A65206368- <1> 1095 00006478 616E6765642E0D0A00 <1> 1096 <1> %endif 1097 00006481 5448454E00 <1> .then: asciz "THEN" 1098 00006486 4E4F5400 <1> .not: asciz "NOT" 1099 0000648A 565600 <1> .vv: asciz "VV" 1100 0000648D 564D00 <1> .vm: asciz "VM" 1101 00006490 565000 <1> .vp: asciz "VP" 1102 00006493 564400 <1> .vd: asciz "VD" 1103 <1> %if _BOOTLDR 1104 00006496 4D6F64653A20426F6F- <1> .rvp_boot: ascizline "Mode: Boot loaded" 1104 0000649F 74206C6F616465640D- <1> 1104 000064A8 0A00 <1> 1105 <1> %endif 1106 <1> %if _DEVICE 1107 000064AA 4D6F64653A20446576- <1> .rvp_device: ascizline "Mode: Device driver" 1107 000064B3 696365206472697665- <1> 1107 000064BC 720D0A00 <1> 1108 <1> %endif 1109 <1> %if _TSR 1110 000064C0 4D6F64653A20417070- <1> .rvp_tsr: ascizline "Mode: Application installed as TSR" 1110 000064C9 6C69636174696F6E20- <1> 1110 000064D2 696E7374616C6C6564- <1> 1110 000064DB 206173205453520D0A- <1> 1110 000064E4 00 <1> 1111 <1> %endif 1112 000064E5 4D6F64653A20417070- <1> .rvp_application: ascizline "Mode: Application" 1112 000064EE 6C69636174696F6E0D- <1> 1112 000064F7 0A00 <1> 1113 000064F9 0D436F646520736567- <1> .vm_codeseg: counted "Code segment=" 1113 00006502 6D656E743D <1> 1114 00006507 0D4461746120736567- <1> .vm_dataseg: counted "Data segment=" 1114 00006510 6D656E743D <1> 1115 00006515 0E456E747279207365- <1> .vm_entryseg: counted "Entry segment=" 1115 0000651E 676D656E743D <1> 1116 00006524 104175786275666620- <1> .vm_auxseg: counted "Auxbuff segment=" 1116 0000652D 7365676D656E743D <1> 1117 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 1118 00006535 10486973746F727920- <1> .vm_hisseg: counted "History segment=" 1118 0000653E 7365676D656E743D <1> 1119 <1> %endif 1120 <1> %if _PM 1121 <1> .vm_selector: counted " selector=" 1122 <1> %endif 1123 00006546 0D436C69656E742020- <1> .vp_pspsegment: counted "Client PSP=" 1123 0000654F 205053503D <1> 1124 00006554 0D4465627567676572- <1> .vp_dpspsegment: counted "Debugger PSP=" 1124 0000655D 205053503D <1> 1125 <1> .vp_dparent: 1126 00006562 0820506172656E743D <1> .vp_parent: counted " Parent=" 1127 <1> .vp_dpra: 1128 0000656B 1720506172656E7420- <1> .vp_pra: counted " Parent Return Address=" 1128 00006574 52657475726E204164- <1> 1128 0000657D 64726573733D <1> 1129 <1> %if _PM 1130 <1> .vp_dpspsel: 1131 <1> .vp_pspsel: counted " PSP Selector=" 1132 <1> %endif 1133 00006583 4E6F74206C6F616465- <1> .rvd_not_device: asciz "Not loaded in device mode.",13,10 1133 0000658C 6420696E2064657669- <1> 1133 00006595 6365206D6F64652E0D- <1> 1133 0000659E 0A00 <1> 1134 <1> %if _DEVICE 1135 000065A0 114465766963652068- <1> .rvd_deviceheader: counted "Device header at " 1135 000065A9 656164657220617420 <1> 1136 000065B2 212E20416D6F756E74- <1> .rvd_size: counted ". Amount paragraphs allocated is " 1136 000065BB 207061726167726170- <1> 1136 000065C4 687320616C6C6F6361- <1> 1136 000065CD 74656420697320 <1> 1137 <1> %endif 1138 000065D4 546F6F206C6F6E6720- <1> .n_toolongtail: asciz "Too long N command tail!",13,10 1138 000065DD 4E20636F6D6D616E64- <1> 1138 000065E6 207461696C210D0A00 <1> 1139 000065EF 546F6F206C6F6E6720- <1> .n_toolongname: asciz "Too long N command name!",13,10 1139 000065F8 4E20636F6D6D616E64- <1> 1139 00006601 206E616D65210D0A00 <1> 1140 0000660A 4E554D42455200 <1> .number: asciz "NUMBER" 1141 00006611 434F554E54455200 <1> .counter: asciz "COUNTER" 1142 00006619 494400 <1> .id: asciz "ID" 1143 0000661C 5748454E00 <1> .when: asciz "WHEN" 1144 00006621 4F464653455400 <1> .offset: asciz "OFFSET" 1145 00006628 3F00 <1> .questionmark: asciz "?" 1146 0000662A 4F <1> .or: db "O" 1147 0000662B 5200 <1> .r: asciz "R" 1148 0000662D 4E4400 <1> .nd: asciz "ND" 1149 00006630 52454D454D42455200 <1> .remember: asciz "REMEMBER" 1150 00006639 474F544F00 <1> .goto: asciz "GOTO" 1151 0000663E 534F4600 <1> .sof: asciz "SOF" 1152 00006642 454F4600 <1> .eof: asciz "EOF" 1153 00006646 4572726F723A20474F- <1> .goto_not_file: asciz "Error: GOTO command not supported when not reading a script.",13,10 1153 0000664F 544F20636F6D6D616E- <1> 1153 00006658 64206E6F7420737570- <1> 1153 00006661 706F72746564207768- <1> 1153 0000666A 656E206E6F74207265- <1> 1153 00006673 6164696E6720612073- <1> 1153 0000667C 63726970742E0D0A00 <1> 1154 00006685 4572726F723A20474F- <1> .goto_empty: asciz "Error: GOTO needs a destination label.",13,10 1154 0000668E 544F206E6565647320- <1> 1154 00006697 612064657374696E61- <1> 1154 000066A0 74696F6E206C616265- <1> 1154 000066A9 6C2E0D0A00 <1> 1155 000066AE 4572726F723A20474F- <1> .goto_not_found.1: asciz "Error: GOTO destination label ",'"' 1155 000066B7 544F2064657374696E- <1> 1155 000066C0 6174696F6E206C6162- <1> 1155 000066C9 656C202200 <1> 1156 000066CE 22206E6F7420666F75- <1> .goto_not_found.2: asciz '"'," not found.",13,10 1156 000066D7 6E642E0D0A00 <1> 1157 000066DD 4572726F723A206175- <1> .guard_auxbuff_error: asciz "Error: auxbuff already guarded!",13,10 1157 000066E6 786275666620616C72- <1> 1157 000066EF 656164792067756172- <1> 1157 000066F8 646564210D0A00 <1> 1158 000066FF 4572726F723A20436F- <1> .guard_re_error: asciz "Error: Command not supported while reading from RE buffer.",13,10 1158 00006708 6D6D616E64206E6F74- <1> 1158 00006711 20737570706F727465- <1> 1158 0000671A 64207768696C652072- <1> 1158 00006723 656164696E67206672- <1> 1158 0000672C 6F6D20524520627566- <1> 1158 00006735 6665722E0D0A00 <1> 1159 0000673C 4572726F723A20436F- <1> .guard_rc_error: asciz "Error: Command not supported while reading from RC buffer.",13,10 1159 00006745 6D6D616E64206E6F74- <1> 1159 0000674E 20737570706F727465- <1> 1159 00006757 64207768696C652072- <1> 1159 00006760 656164696E67206672- <1> 1159 00006769 6F6D20524320627566- <1> 1159 00006772 6665722E0D0A00 <1> 1160 00006779 4572726F723A20556E- <1> .unexpected_auxbuff_guard: asciz "Error: Unexpected auxbuff guard!",13,10 1160 00006782 657870656374656420- <1> 1160 0000678B 617578627566662067- <1> 1160 00006794 75617264210D0A00 <1> 1161 0000679C 4572726F723A20556E- <1> .unexpected_noneol_re: asciz "Error: Unexpected non-EOL in RE processing!",13,10 1161 000067A5 657870656374656420- <1> 1161 000067AE 6E6F6E2D454F4C2069- <1> 1161 000067B7 6E2052452070726F63- <1> 1161 000067C0 657373696E67210D0A- <1> 1161 000067C9 00 <1> 1162 000067CA 4572726F723A20556E- <1> .unexpected_noneol_rc: asciz "Error: Unexpected non-EOL in RC processing!",13,10 1162 000067D3 657870656374656420- <1> 1162 000067DC 6E6F6E2D454F4C2069- <1> 1162 000067E5 6E2052432070726F63- <1> 1162 000067EE 657373696E67210D0A- <1> 1162 000067F7 00 <1> 1163 000067F8 5245504C41434500 <1> .replace: asciz "REPLACE" 1164 00006800 415050454E4400 <1> .append: asciz "APPEND" 1165 00006807 44 <1> .dword: db "D" 1166 00006808 574F524400 <1> .word: asciz "WORD" 1167 0000680D 33 <1> .3byte: db "3" 1168 0000680E 4259544500 <1> .byte: asciz "BYTE" 1169 00006813 504152414752415048- <1> .paragraphs: asciz "PARAGRAPHS" 1169 0000681C 5300 <1> 1170 0000681E 504152415300 <1> .paras: asciz "PARAS" 1171 00006824 44 <1> .dwords: db "D" 1172 00006825 574F52445300 <1> .words: asciz "WORDS" 1173 0000682B 425954455300 <1> .bytes: asciz "BYTES" 1174 00006831 4C454E47544800 <1> .length: asciz "LENGTH" 1175 00006838 52414E474500 <1> .range: asciz "RANGE" 1176 <1> %if _VXCHG 1177 0000683E 4F4E00 <1> .on: asciz "ON" 1178 00006841 4F464600 <1> .off: asciz "OFF" 1179 <1> .vv_enable_failure: 1180 00006845 556E61626C6520746F- <1> asciz "Unable to enable video swapping.",13,10 1180 0000684E 20656E61626C652076- <1> 1180 00006857 6964656F2073776170- <1> 1180 00006860 70696E672E0D0A00 <1> 1181 00006868 566964656F20737761- <1> .vv_disabled: asciz "Video swapping is disabled, use V ON to switch it on.",13,10 1181 00006871 7070696E6720697320- <1> 1181 0000687A 64697361626C65642C- <1> 1181 00006883 207573652056204F4E- <1> 1181 0000688C 20746F207377697463- <1> 1181 00006895 68206974206F6E2E0D- <1> 1181 0000689E 0A00 <1> 1182 <1> %endif 1183 000068A0 5245564552534500 <1> .reverse: asciz "REVERSE" 1184 000068A8 56414C554500 <1> .value: asciz "VALUE" 1185 000068AE 494E00 <1> .in: asciz "IN" 1186 000068B1 46524F4D00 <1> .from: asciz "FROM" 1187 000068B6 544F00 <1> .to: asciz "TO" 1188 000068B9 455845435554494E47- <1> .executing: asciz "EXECUTING" 1188 000068C2 00 <1> 1189 000068C3 46524F4D204C494E45- <1> .executing_value_range: asciz "FROM LINEAR cs:eip LENGTH abo - eip" 1189 000068CC 41522063733A656970- <1> 1189 000068D5 204C454E4754482061- <1> 1189 000068DE 626F202D2065697000 <1> 1190 000068E7 4C494E45415200 <1> .linear: asciz "LINEAR" 1191 000068EE 4241534500 <1> .base: asciz "BASE" 1192 000068F3 47524F555000 <1> .group: asciz "GROUP" 1193 000068F9 574944544800 <1> .width: asciz "WIDTH" 1194 <1> %if _HISTORY 1195 <1> .history_internal_error: 1196 000068FF 0D0A496E7465726E61- <1> asciz 13,10,"Internal error in history handling!",13,10 1196 00006908 6C206572726F722069- <1> 1196 00006911 6E20686973746F7279- <1> 1196 0000691A 2068616E646C696E67- <1> 1196 00006923 210D0A00 <1> 1197 <1> %endif 1198 00006927 07204572726F7221 <1> .di_error: counted " Error!" 1199 0000692F 0768696464656E20 <1> .di_hidden: counted "hidden " 1200 00006937 0720284949535029 <1> .di_iisp: counted " (IISP)" 1201 0000693F 1320286E6F6E737461- <1> .di_nonstd_iisp:counted " (nonstandard IISP)" 1201 00006948 6E6461726420494953- <1> 1201 00006951 5029 <1> 1202 00006953 132028756E696E7374- <1> .di_uninst_iisp:counted " (uninstalled IISP)" 1202 0000695C 616C6C656420494953- <1> 1202 00006965 5029 <1> 1203 <1> .di_freedos_reloc: 1204 00006967 1220284644206B6572- <1> counted " (FD kernel reloc)" 1204 00006970 6E656C2072656C6F63- <1> 1204 00006979 29 <1> 1205 0000697A 0E2028666172206A6D- <1> .di_jmpfar: counted " (far jmp imm)" 1205 00006983 7020696D6D29 <1> 1206 <1> .di_jmpfarindirect: 1207 00006989 132028666172206A6D- <1> counted " (far jmp indirect)" 1207 00006992 7020696E6469726563- <1> 1207 0000699B 7429 <1> 1208 0000699D 0C2028746573742068- <1> .di_testhook: counted " (test hook)" 1208 000069A6 6F6F6B29 <1> 1209 000069AA 1C2028746F6F206D61- <1> .di_toomany: counted " (too many chained handlers)" 1209 000069B3 6E7920636861696E65- <1> 1209 000069BC 642068616E646C6572- <1> 1209 000069C5 7329 <1> 1210 000069C7 0F20656D707479204D- <1> .di_empty: counted " empty MCB name" 1210 000069D0 4342206E616D65 <1> 1211 000069D7 0B2073797374656D20- <1> .di_system_mcb: counted " system MCB" 1211 000069E0 4D4342 <1> 1212 <1> .di_system_upper: 1213 000069E3 0E2073797374656D20- <1> counted " system in UMA" 1213 000069EC 696E20554D41 <1> 1214 000069F2 0E2073797374656D20- <1> .di_system_low: counted " system in LMA" 1214 000069FB 696E204C4D41 <1> 1215 00006A01 112068696768206D65- <1> .di_hma: counted " high memory area" 1215 00006A0A 6D6F72792061726561 <1> 1216 00006A13 06205B6D70783A <1> .di_multiplex.1:counted " [mpx:" 1217 00006A1A 0768206C6973743A <1> .di_multiplex.2:counted "h list:" 1218 00006A22 02685D <1> .di_multiplex.3:counted "h]" 1219 00006A25 68656164657200 <1> .header: asciz "header" 1220 <1> .header.length: equ $ - 1 - .header 1221 00006A2C 747261696C657200 <1> .trailer: asciz "trailer" 1222 <1> .trailer.length:equ $ - 1 - .trailer 1223 00006A34 415400 <1> .at: asciz "AT" 1224 00006A37 5748494C4500 <1> .while: asciz "WHILE" 1225 00006A3D 53494C454E5400 <1> .silent: asciz "SILENT" 1226 00006A44 534C45455000 <1> .sleep: asciz "SLEEP" 1227 00006A4A 5345434F4E445300 <1> .seconds: asciz "SECONDS" 1228 00006A52 5449434B5300 <1> .ticks: asciz "TICKS" 1229 00006A58 52452070726F636573- <1> .re_limit_reached: asciz "RE processing reached RELIMIT, aborting.",13,10 1229 00006A61 73696E672072656163- <1> 1229 00006A6A 6865642052454C494D- <1> 1229 00006A73 49542C2061626F7274- <1> 1229 00006A7C 696E672E0D0A00 <1> 1230 00006A83 52432070726F636573- <1> .rc_limit_reached: asciz "RC processing reached RCLIMIT, aborting.",13,10 1230 00006A8C 73696E672072656163- <1> 1230 00006A95 6865642052434C494D- <1> 1230 00006A9E 49542C2061626F7274- <1> 1230 00006AA7 696E672E0D0A00 <1> 1231 00006AAE 2120496E7465726E61- <1> .silent_error: asciz "! Internal error during silent buffer handling !",13,10 1231 00006AB7 6C206572726F722064- <1> 1231 00006AC0 7572696E672073696C- <1> 1231 00006AC9 656E74206275666665- <1> 1231 00006AD2 722068616E646C696E- <1> 1231 00006ADB 6720210D0A00 <1> 1232 00006AE1 5768696C6520636F6E- <1> .while_not_true:asciz "While condition not true, returning.",13,10 1232 00006AEA 646974696F6E206E6F- <1> 1232 00006AF3 7420747275652C2072- <1> 1232 00006AFC 657475726E696E672E- <1> 1232 00006B05 0D0A00 <1> 1233 00006B08 5768696C6520636F6E- <1> .while_terminated_before: asciz "While condition ",'"' 1233 00006B11 646974696F6E202200 <1> 1234 00006B1A 22206E6F206C6F6E67- <1> .while_terminated_after: asciz '"'," no longer true.",13,10 1234 00006B23 657220747275652E0D- <1> 1234 00006B2C 0A00 <1> 1235 00006B2E 4E6F2073657269616C- <1> .no_progress: asciz "No serial comm progress after 5 seconds, giving up. (Keyboard enabled.)",13,10 1235 00006B37 20636F6D6D2070726F- <1> 1235 00006B40 677265737320616674- <1> 1235 00006B49 65722035207365636F- <1> 1235 00006B52 6E64732C2067697669- <1> 1235 00006B5B 6E672075702E20284B- <1> 1235 00006B64 6579626F6172642065- <1> 1235 00006B6D 6E61626C65642E290D- <1> 1235 00006B76 0A00 <1> 1236 00006B78 0D0A436F6E64746E6C- <1> .serial_request_keep: asciz 13,10,_PROGNAME," connected to serial port. Enter KEEP to confirm.",13,10 1236 00006B81 2E2044656275676761- <1> 1236 00006B8A 626C65206C44656275- <1> 1236 00006B93 6720636F6E6E656374- <1> 1236 00006B9C 656420746F20736572- <1> 1236 00006BA5 69616C20706F72742E- <1> 1236 00006BAE 20456E746572204B45- <1> 1236 00006BB7 455020746F20636F6E- <1> 1236 00006BC0 6669726D2E0D0A00 <1> 1237 00006BC8 4E6F204B454550206B- <1> .serial_no_keep_timer: asciz "No KEEP keyword confirmation after timeout, giving up. (Keyboard enabled.)",13,10 1237 00006BD1 6579776F726420636F- <1> 1237 00006BDA 6E6669726D6174696F- <1> 1237 00006BE3 6E2061667465722074- <1> 1237 00006BEC 696D656F75742C2067- <1> 1237 00006BF5 6976696E672075702E- <1> 1237 00006BFE 20284B6579626F6172- <1> 1237 00006C07 6420656E61626C6564- <1> 1237 00006C10 2E290D0A00 <1> 1238 00006C15 4E6F204B454550206B- <1> .serial_no_keep_enter: asciz "No KEEP keyword confirmation, enabling keyboard.",13,10 1238 00006C1E 6579776F726420636F- <1> 1238 00006C27 6E6669726D6174696F- <1> 1238 00006C30 6E2C20656E61626C69- <1> 1238 00006C39 6E67206B6579626F61- <1> 1238 00006C42 72642E0D0A00 <1> 1239 <1> %if _VXCHG 1240 00006C48 4E4F <1> .nokeep: db "NO" 1241 <1> %endif 1242 00006C4A 4B45455000 <1> .keep: asciz "KEEP" 1243 00006C4F 4572726F723A20556E- <1> .cannot_hook_2D.invalid: asciz "Error: Unable to hook interrupt 2Dh due to invalid handler.",13,10 1243 00006C58 61626C6520746F2068- <1> 1243 00006C61 6F6F6B20696E746572- <1> 1243 00006C6A 727570742032446820- <1> 1243 00006C73 64756520746F20696E- <1> 1243 00006C7C 76616C69642068616E- <1> 1243 00006C85 646C65722E0D0A00 <1> 1244 00006C8D 4572726F723A20556E- <1> .cannot_hook_2D.nofree: asciz "Error: Unable to hook interrupt 2Dh, no free multiplex number.",13,10 1244 00006C96 61626C6520746F2068- <1> 1244 00006C9F 6F6F6B20696E746572- <1> 1244 00006CA8 72757074203244682C- <1> 1244 00006CB1 206E6F206672656520- <1> 1244 00006CBA 6D756C7469706C6578- <1> 1244 00006CC3 206E756D6265722E0D- <1> 1244 00006CCC 0A00 <1> 1245 00006CCE 5761726E696E673A20 <1> .serial_cannot_unhook: db "Warning: " 1246 00006CD7 556E61626C6520746F- <1> .serial_cannot_unhook.nowarn: db "Unable to unhook interrupt " 1246 00006CE0 20756E686F6F6B2069- <1> 1246 00006CE9 6E7465727275707420 <1> 1247 00006CF2 2D2D682E0D0A00 <1> .serial_cannot_unhook.int: asciz "--h.",13,10 1248 00006CF9 4572726F723A20556E- <1> .serial_cannot_hook: db "Error: Unable to hook interrupt " 1248 00006D02 61626C6520746F2068- <1> 1248 00006D0B 6F6F6B20696E746572- <1> 1248 00006D14 7275707420 <1> 1249 00006D19 2D2D68206265636175- <1> .serial_cannot_hook.new_int: db "--h because interrupt " 1249 00006D22 736520696E74657272- <1> 1249 00006D2B 75707420 <1> 1250 00006D2F 2D2D68207374696C6C- <1> .serial_cannot_hook.old_int: asciz "--h still hooked.",13,10 1250 00006D38 20686F6F6B65642E0D- <1> 1250 00006D41 0A00 <1> 1251 00006D43 537563636565646564- <1> .serial_late_unhook: db "Succeeded in unhooking interrupt " 1251 00006D4C 20696E20756E686F6F- <1> 1251 00006D55 6B696E6720696E7465- <1> 1251 00006D5E 727275707420 <1> 1252 00006D64 2D2D682E0D0A00 <1> .serial_late_unhook.int: asciz "--h.",13,10 1253 00006D6B 496E7465726E616C20- <1> .line_out_overflow: asciz "Internal error, line_out buffer overflowed!",13,10 1253 00006D74 6572726F722C206C69- <1> 1253 00006D7D 6E655F6F7574206275- <1> 1253 00006D86 66666572206F766572- <1> 1253 00006D8F 666C6F776564210D0A- <1> 1253 00006D98 00 <1> 1254 00006D99 041B5B376D <1> .highlight: counted 27,"[7m" 1255 00006D9E 031B5B6D <1> .unhighlight: counted 27,"[m" 1256 00006DA2 206B4D475400 <1> .prefixes: asciz " kMGT" 1257 00006DA8 50726F63657373206C- <1> .ll_unterm: ascizline "Process loading aborted: Attached process didn't terminate!" 1257 00006DB1 6F6164696E67206162- <1> 1257 00006DBA 6F727465643A204174- <1> 1257 00006DC3 746163686564207072- <1> 1257 00006DCC 6F6365737320646964- <1> 1257 00006DD5 6E2774207465726D69- <1> 1257 00006DDE 6E617465210D0A00 <1> 1258 00006DE6 43616E6E6F74207175- <1> .qq_unterm: ascizline "Cannot quit, attached process didn't terminate!" 1258 00006DEF 69742C206174746163- <1> 1258 00006DF8 6865642070726F6365- <1> 1258 00006E01 7373206469646E2774- <1> 1258 00006E0A 207465726D696E6174- <1> 1258 00006E13 65210D0A00 <1> 1259 <1> %if _PM 1260 <1> .qq_still_pm: ascizline "Cannot quit, still in PM after attached process terminated!" 1261 <1> %endif 1262 00006E18 417474616368656420- <1> .qq_a_unterminated: ascizline "Attached process didn't terminate." 1262 00006E21 70726F636573732064- <1> 1262 00006E2A 69646E277420746572- <1> 1262 00006E33 6D696E6174652E0D0A- <1> 1262 00006E3C 00 <1> 1263 00006E3D 417474616368656420- <1> .qq_a_terminated: ascizline "Attached process did terminate." 1263 00006E46 70726F636573732064- <1> 1263 00006E4F 6964207465726D696E- <1> 1263 00006E58 6174652E0D0A00 <1> 1264 00006E5F 43616E6E6F74206372- <1> .ensure_no_memory: ascizline "Cannot create empty attached process, out of memory!" 1264 00006E68 6561746520656D7074- <1> 1264 00006E71 792061747461636865- <1> 1264 00006E7A 642070726F63657373- <1> 1264 00006E83 2C206F7574206F6620- <1> 1264 00006E8C 6D656D6F7279210D0A- <1> 1264 00006E95 00 <1> 1265 <1> %if _DEVICE 1266 <1> .qq_device_none_selected: 1267 00006E96 43616E6E6F74207175- <1> ascizline "Cannot quit normally when loaded as device driver! Try QC or QD command." 1267 00006E9F 6974206E6F726D616C- <1> 1267 00006EA8 6C79207768656E206C- <1> 1267 00006EB1 6F6164656420617320- <1> 1267 00006EBA 646576696365206472- <1> 1267 00006EC3 697665722120547279- <1> 1267 00006ECC 205143206F72205144- <1> 1267 00006ED5 20636F6D6D616E642E- <1> 1267 00006EDE 0D0A00 <1> 1268 <1> .qq_device_no_d: 1269 00006EE1 43616E6E6F74207175- <1> ascizline "Cannot quit to device driver initialisation, state modified!" 1269 00006EEA 697420746F20646576- <1> 1269 00006EF3 696365206472697665- <1> 1269 00006EFC 7220696E697469616C- <1> 1269 00006F05 69736174696F6E2C20- <1> 1269 00006F0E 7374617465206D6F64- <1> 1269 00006F17 6966696564210D0A00 <1> 1270 <1> .qq_device_no_c: 1271 00006F20 43616E6E6F74207175- <1> ascizline "Cannot quit from device driver container, not found!" 1271 00006F29 69742066726F6D2064- <1> 1271 00006F32 657669636520647269- <1> 1271 00006F3B 76657220636F6E7461- <1> 1271 00006F44 696E65722C206E6F74- <1> 1271 00006F4D 20666F756E64210D0A- <1> 1271 00006F56 00 <1> 1272 <1> %if _PM 1273 <1> .qq_device_pm: ascizline "Cannot quit device driver in PM!" 1274 <1> %endif 1275 00006F57 00 <1> align 2, db 0 1276 00006F58 4E554C20 <1> .NULblank: fill 8, 32, db "NUL" 1277 <1> %endif 1278 00006F60 4330 <1> .c0: db "C0" 1279 00006F62 0D <1> .cr: db 13 1280 <1> 1281 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 1282 00006F63 45584953545300 <1> .exists: asciz "EXISTS" 1283 00006F6A 5900 <1> .y: asciz "Y" 1284 00006F6C 5920636F6D6D616E64- <1> .yy_requires_filename: asciz "Y command requires a filename.",13,10 1284 00006F75 207265717569726573- <1> 1284 00006F7E 20612066696C656E61- <1> 1284 00006F87 6D652E0D0A00 <1> 1285 00006F8D 5920636F6D6D616E64- <1> .yy_filename_empty: asciz "Y command filename is empty.",13,10 1285 00006F96 2066696C656E616D65- <1> 1285 00006F9F 20697320656D707479- <1> 1285 00006FA8 2E0D0A00 <1> 1286 00006FAC 5920636F6D6D616E64- <1> .yy_too_many_handles: asciz "Y command has too many open files.",13,10 1286 00006FB5 2068617320746F6F20- <1> 1286 00006FBE 6D616E79206F70656E- <1> 1286 00006FC7 2066696C65732E0D0A- <1> 1286 00006FD0 00 <1> 1287 00006FD1 5920636F6D6D616E64- <1> .yy_error_file_open: asciz "Y command failed to open file.",13,10 1287 00006FDA 206661696C65642074- <1> 1287 00006FE3 6F206F70656E206669- <1> 1287 00006FEC 6C652E0D0A00 <1> 1288 00006FF2 5920636F6D6D616E64- <1> .yy_no_file: asciz "Y command limited to label only valid in script file.",13,10 1288 00006FFB 206C696D6974656420- <1> 1288 00007004 746F206C6162656C20- <1> 1288 0000700D 6F6E6C792076616C69- <1> 1288 00007016 6420696E2073637269- <1> 1288 0000701F 70742066696C652E0D- <1> 1288 00007028 0A00 <1> 1289 <1> %endif 1290 <1> %if _INPUT_FILE_HANDLES 1291 0000702A 5920636F6D6D616E64- <1> .yy_no_dos: asciz "Y command requires DOS to be available.",13,10 1291 00007033 207265717569726573- <1> 1291 0000703C 20444F5320746F2062- <1> 1291 00007045 6520617661696C6162- <1> 1291 0000704E 6C652E0D0A00 <1> 1292 <1> .yy_filename_missing_unquote: 1293 00007054 5920636F6D6D616E64- <1> asciz "Y command filename missing ending quote.",13,10 1293 0000705D 2066696C656E616D65- <1> 1293 00007066 206D697373696E6720- <1> 1293 0000706F 656E64696E67207175- <1> 1293 00007078 6F74652E0D0A00 <1> 1294 <1> %endif 1295 <1> %if _INPUT_FILE_BOOT 1296 0000707F 5920636F6D6D616E64- <1> .yy_too_large: asciz "Y command file too large.",13,10 1296 00007088 2066696C6520746F6F- <1> 1296 00007091 206C617267652E0D0A- <1> 1296 0000709A 00 <1> 1297 0000709B 5920636F6D6D616E64- <1> .yy_empty: asciz "Y command file empty.",13,10 1297 000070A4 2066696C6520656D70- <1> 1297 000070AD 74792E0D0A00 <1> 1298 <1> %endif 1299 <1> 1300 <1> %if _SYMBOLIC 1301 <1> .zz_switch_s_received: asciz "Allocating symbol table buffer of " 1302 <1> .zz_switch_s_received_xms: 1303 <1> asciz "Allocating XMS symbol table buffer (including transfer buffer) of " 1304 <1> .zz_switch_s_freeing: asciz "Freeing symbol table buffer.",13,10 1305 <1> .zz_switch_s_indos: db "Can't change symbol table buffer allocation" 1306 <1> asciz " while in DOS!",13,10 1307 <1> %if _BOOTLDR 1308 <1> .zz_switch_s_internal_error: 1309 <1> asciz "Internal error in Z /S switch handling!",13,10 1310 <1> .zz_switch_s_boot_memsize_differ: 1311 <1> asciz "Cannot change symbol table buffer allocation, memory size changed!",13,10 1312 <1> .zz_switch_s_boot_transfer_too_low: 1313 <1> asciz "Cannot enlarge symbol table buffer that much, transfer buffer too low!",13,10 1314 <1> .zz_switch_s_boot_loaded_kernel: 1315 <1> asciz "Cannot change symbol table buffer allocation, kernel has been loaded!",13,10 1316 <1> .zz_switch_s_boot_rpl: 1317 <1> asciz "Cannot change symbol table buffer allocation, RPL has been loaded!",13,10 1318 <1> %endif 1319 <1> .zz_s_cannot_alloc_transfer: asciz "Cannot allocate transfer buffer!",13,10 1320 <1> .zz_s_cannot_alloc_target: asciz "Cannot allocate target buffer!",13,10 1321 <1> .zz_too_full: asciz "Symbol tables are too full for this reallocation.",13,10 1322 <1> .zz_xms_not_freed_1: asciz "Unable to free symbol table XMS handle = " 1323 <1> .zz_xms_not_freed_2: asciz "h.",13,10 1324 <1> .invaliddata: asciz "Invalid symbol table data!",13,10 1325 <1> %if _SECOND_SLICE && (_XMS_SYMBOL_TABLE || _BUFFER_86MM_SLICE) 1326 <1> .error_second_slice: asciz "Invalid symbol table access slice usage!",13,10 1327 <1> %endif 1328 <1> .main_too_full: asciz "Symbol main array is too full!",13,10 1329 <1> .main_too_full_crit1: asciz "Symbol main array is too full! Critical error. (Earlier check succeeded.)",13,10 1330 <1> .hash_too_full_crit1: asciz "Symbol hash array is too full! Critical error. (Earlier check succeeded.)",13,10 1331 <1> .hash_too_full_crit2: asciz "Symbol hash array is too full! Critical error. (Main has space.)",13,10 1332 <1> .str_too_full: asciz "Symbol string heap is too full!",13,10 1333 <1> .str_too_long: asciz "Symbol string is too long!",13,10 1334 <1> .liststore.main.end.first: asciz 13,10,"Main total:",9 1335 <1> .liststore.main.free.first: asciz "Main free:",9 1336 <1> .liststore.main.used.first: asciz "Main used:",9 1337 <1> .liststore.hash.end.first: asciz 13,10,"Hash total:",9 1338 <1> .liststore.hash.free.first: asciz "Hash free:",9 1339 <1> .liststore.hash.used.first: asciz "Hash used:",9 1340 <1> .liststore.str.end.first: asciz 13,10,"String total:",9 1341 <1> .liststore.str.free.first: asciz "String free:",9 1342 <1> .liststore.str.used.first: asciz "String used:",9 1343 <1> .liststore.second: asciz " in " 1344 <1> .liststore.third.singular: asciz " unit",13,10 1345 <1> .liststore.third.plural: asciz " units",13,10 1346 <1> .liststore.str.first: asciz "Strings size is " 1347 <1> .liststore.str.unref.first: asciz "Unreferenced strings size is " 1348 <1> .liststore.str.unref.second: 1349 <1> .liststore.str.second: asciz " in " 1350 <1> .liststore.str.unref.third.singular: 1351 <1> .liststore.str.third.singular: asciz " string.",13,10 1352 <1> .liststore.str.unref.third.plural: 1353 <1> .liststore.str.third.plural: asciz " strings.",13,10 1354 <1> .liststore.str.fourth: asciz "Average string structure length is <= " 1355 <1> .liststore.str.invalid: asciz "Error: Average string structure length too large" 1356 <1> .liststore.str.nofourth:asciz "Cannot calculate average string structure length, number of strings is zero" 1357 <1> .liststore.str.last: asciz ".",13,10 1358 <1> .symhint: 1359 <1> .symhint_store_string: db "..@symhint_" 1360 <1> .symhint_size: equ $ - .symhint 1361 <1> db "store_string_" 1362 <1> .symhint_store_string_size equ $ - .symhint_store_string 1363 <1> .trace_caller: db "trace_caller" 1364 <1> .trace_caller_size: equ $ - .trace_caller 1365 <1> .trace_here: db "trace_here" 1366 <1> .trace_here_size: equ $ - .trace_here 1367 <1> .skip_caller: db "skip_caller_" 1368 <1> .skip_caller_size: equ $ - .skip_caller 1369 <1> .skip_here: db "skip_here_" 1370 <1> .skip_here_size: equ $ - .skip_here 1371 <1> .asciz: asciz "ASCIZ" 1372 <1> .zz_list_range_first: asciz "Range: " 1373 <1> .zz_list_range_second: asciz "h--" 1374 <1> .zz_list_range_third: asciz "h" 1375 <1> .zz_list_add_none: db "" 1376 <1> .zz_list_none: asciz " No symbols found",13,10 1377 <1> .zz_list_start: asciz 13,10 1378 <1> .zz_list_between: asciz 1379 <1> .zz_list_first: asciz " Linear=" 1380 <1> .zz_list_second: asciz " Offset=" 1381 <1> .zz_list_middle: asciz "h = ",'"' 1382 <1> .zz_list_last: asciz '"',13,10 1383 <1> .zz_list_end: asciz 1384 <1> .zz_list_add_range: asciz "; " 1385 <1> .zz_list_add_first: asciz "z add linear=(" 1386 <1> .zz_list_base: asciz " + v1" 1387 <1> .zz_list_base_symbol: asciz " + sl." 1388 <1> .zz_list_add_second: asciz ") offset=" 1389 <1> .zz_list_add_middle: asciz " symbol='" 1390 <1> .zz_list_add_last: asciz "'",13,10 1391 <1> .zz_match_add_none: db ";" 1392 <1> .zz_match_none: asciz " No symbols found",13,10 1393 <1> .existing_block: asciz "Symbol already exists and is being blocked.",13,10 1394 <1> .poison_block: asciz "Symbol definition is poisoned and is being blocked.",13,10 1395 <1> .stat: asciz "STAT" 1396 <1> .match: asciz "MATCH" 1397 <1> .add: asciz "ADD" 1398 <1> .commit: asciz "COMMIT" 1399 <1> .abort: asciz "ABORT" 1400 <1> .del: asciz "DEL" 1401 <1> .delete: asciz "DELETE" 1402 <1> .unrefstring: asciz "UNREFSTRING" 1403 <1> .reloc: asciz "RELOC" 1404 <1> .relocate: asciz "RELOCATE" 1405 <1> .symbol: asciz "SYMBOL" 1406 <1> .flags: asciz "FLAGS" 1407 <1> .sl: asciz "SL" 1408 <1> .max: asciz "MAX" 1409 <1> %if _XMS_SYMBOL_TABLE 1410 <1> .zz_no_xms: asciz "No XMS driver detected!",13,10 1411 <1> .zz_fail_xms_alloc: asciz "Failed to allocate XMS block!",13,10 1412 <1> .zz_fail_xms_access: asciz "Failed to access XMS block!",13,10 1413 <1> %endif 1414 <1> .zz_main_hash_mismatch: asciz "Compaction/expansion failed, differing amounts of hash and main entries.",13,10 1415 <1> .zz_main_not_first: asciz "Compaction/expansion failed, main array is not first.",13,10 1416 <1> .zz_hash_not_second: asciz "Compaction/expansion failed, hash array is not second.",13,10 1417 <1> .zz_str_not_third: asciz "Compaction/expansion failed, string heap is not third.",13,10 1418 <1> .zz_table_not_full: asciz "Compaction/expansion failed, table is not full.",13,10 1419 <1> .zz_too_much: asciz "Symbol table size is too large. Internal error!",13,10 1420 <1> .zz_too_short: asciz "Symbol table size is too short. Internal error!",13,10 1421 <1> .zz_str_overflow: asciz "String symbol table got too large. Internal error!",13,10 1422 <1> .zz_length_mismatch: asciz "Symbol table table size mismatch. Internal error!",13,10 1423 <1> .zz_too_small_str: asciz "String symbol table target is too small.",13,10 1424 <1> .zz_too_small_hash: 1425 <1> .zz_too_small_mainhash: asciz "Main/hash symbol table target is too small.",13,10 1426 <1> .zz_internal_error_expand: 1427 <1> asciz "Internal error during symbol table expansion!",13,10 1428 <1> .zz_reloc_amount_none: asciz "No symbols found in given source range.",13,10 1429 <1> .zz_del_amount_none: asciz "Symbol not found!",13,10 1430 <1> .zz_reloc_amount_1: asciz "Relocated " 1431 <1> .zz_del_amount_1: asciz "Deleted " 1432 <1> .zz_reloc_amount_2.plural: 1433 <1> .zz_del_amount_2.plural: asciz " symbols.",13,10 1434 <1> .zz_reloc_amount_2.singular: 1435 <1> .zz_del_amount_2.singular: asciz " symbol.",13,10 1436 <1> .zz_reloc_overflow: asciz "Cannot relocate, length of source range overflows!",13,10 1437 <1> .bb_sym_too_many: asciz "Too many symbol breakpoints!",13,10 1438 <1> .bb_sym_beyond_linear: asciz "Symbol breakpoint linear is beyond reach!",13,10 1439 <1> .bb_sym_beyond_offset: asciz "Symbol breakpoint offset is beyond reach!",13,10 1440 <1> %endif 1441 <1> 1442 <1> %if _BREAKPOINTS 1443 000070B3 414C4C00 <1> .all: asciz "ALL" 1444 000070B7 4E455700 <1> .new: asciz "NEW" 1445 000070BB 4E6F20756E75736564- <1> .bb_no_new: asciz "No unused breakpoint left!",13,10 1445 000070C4 20627265616B706F69- <1> 1445 000070CD 6E74206C656674210D- <1> 1445 000070D6 0A00 <1> 1446 000070D8 19486974207065726D- <1> .bb_hit.1: counted "Hit permanent breakpoint " 1446 000070E1 616E656E7420627265- <1> 1446 000070EA 616B706F696E7420 <1> 1447 <1> .bb_hit.2.nocounter: 1448 000070F2 020D0A <1> counted 13,10 1449 <1> %if _SYMBOLIC 1450 <1> .bb_sym_hit.1: counted "Hit symbol breakpoint " 1451 <1> .bb_sym_hit.2.nocounter: 1452 <1> counted 13,10 1453 <1> %endif 1454 000070F5 1C5061737365642070- <1> .bb_pass.1: counted "Passed permanent breakpoint " 1454 000070FE 65726D616E656E7420- <1> 1454 00007107 627265616B706F696E- <1> 1454 00007110 7420 <1> 1455 <1> .bb_hit.2.counter: 1456 00007112 0A2C20636F756E7465- <1> .bb_pass.2: counted ", counter=" 1456 0000711B 723D <1> 1457 <1> .bb_hit.3.counter.no_id: 1458 <1> .bb_pass.3.no_id: 1459 <1> .bb_hitpass_id.after: 1460 0000711D 020D0A <1> counted 13,10 1461 <1> .bb_hitpass_id.long: 1462 00007120 070D0A2049443A20 <1> counted 13,10," ID: " 1463 <1> .bb_hitpass_id.short: 1464 00007128 062C2049443A20 <1> counted ", ID: " 1465 0000712F 205748454E2000 <1> .bb_when: asciz " WHEN " 1466 <1> 1467 00007136 42502000 <1> .bp: asciz "BP " 1468 0000713A 202B00 <1> .bpenabled: asciz " +" 1469 0000713D 202D00 <1> .bpdisabled: asciz " -" 1470 00007140 20556E7573656400 <1> .bpunused: asciz " Unused" 1471 00007148 204C696E3D00 <1> .bpaddress: asciz " Lin=" 1472 0000714E 202800 <1> .bpcontent: asciz " (" 1473 00007151 2920436F756E746572- <1> .bpcounter: asciz ") Counter=" 1473 0000715A 3D00 <1> 1474 <1> %if 0 1475 <1> BP 00 Unused 1476 <1> BP 00 + Lin=12345678 (CC) Counter=8000 1477 <1> 1234567890123456789012345678901234567890 1478 <1> %endif 1479 0000715C 4E6F20627265616B70- <1> .bpnone: asciz "No breakpoints set currently.",13,10 1479 00007165 6F696E747320736574- <1> 1479 0000716E 2063757272656E746C- <1> 1479 00007177 792E0D0A00 <1> 1480 0000717C 4E6F20627265616B70- <1> .bpnone_at: asciz "No breakpoint set at given address currently.",13,10 1480 00007185 6F696E742073657420- <1> 1480 0000718E 617420676976656E20- <1> 1480 00007197 616464726573732063- <1> 1480 000071A0 757272656E746C792E- <1> 1480 000071A9 0D0A00 <1> 1481 <1> %endif 1482 000071AC 5468652000 <1> .cant_bp_the: asciz "The " 1483 000071B1 70726F636565642062- <1> .cant_bp_type_proceed: asciz "proceed breakpoint" 1483 000071BA 7265616B706F696E74- <1> 1483 000071C3 00 <1> 1484 000071C4 7065726D616E656E74- <1> .cant_bp_type_permanent: db "permanent breakpoint " 1484 000071CD 20627265616B706F69- <1> 1484 000071D6 6E7420 <1> 1485 000071D9 5F5F00 <1> .cant_bp_type_permanent.index: asciz "__" 1486 <1> %if _SYMBOLIC 1487 <1> .cant_bp_type_symbol: db "symbol breakpoint " 1488 <1> .cant_bp_type_symbol.index: asciz "__" 1489 <1> %endif 1490 000071DC 204720627265616B70- <1> .cant_bp_type_gg: asciz " G breakpoint" 1490 000071E5 6F696E7400 <1> 1491 000071EA 20286C696E65617220 <1> .cant_bp_linear: db " (linear " 1492 000071F3 2D2D2D2D5F <1> .cant_bp_linear.address1: db "----_" 1493 000071F8 2D2D2D2D292000 <1> .cant_bp_linear.address2: asciz "----) " 1494 000071FF 63616E6E6F74206265- <1> .cant_bp_write: asciz "cannot be written." 1494 00007208 207772697474656E2E- <1> 1494 00007211 00 <1> 1495 00007212 63616E6E6F74206265- <1> .cant_bp_restore: db "cannot be restored to " 1495 0000721B 20726573746F726564- <1> 1495 00007224 20746F20 <1> 1496 00007228 5F5F2E00 <1> .cant_bp_restore.value: asciz "__." 1497 <1> %if 0 1498 <1> The 15th G breakpoint (linear 0010_FFFF) cannot be written. 1499 <1> The proceed breakpoint (linear 0010_FFFF) cannot be written. 1500 <1> The permanent breakpoint 0F (linear 0010_FFFF) cannot be written. 1501 <1> The permanent breakpoint 0F (linear 0010_FFFF) cannot be restored to __. 1502 <1> 12345678901234567890123456789012345678901234567890123456789012345678901234567890 1503 <1> %endif 1504 0000722C 0D0A20526561736F6E- <1> .cant_bp_reason: asciz 13,10," Reason: " 1504 00007235 3A2000 <1> 1505 00007238 4E6F206572726F722E- <1> .cant_bp_reason0: asciz "No error. (Internal error, report!)",13,10 1505 00007241 2028496E7465726E61- <1> 1505 0000724A 6C206572726F722C20- <1> 1505 00007253 7265706F727421290D- <1> 1505 0000725C 0A00 <1> 1506 0000725E 497420697320726561- <1> .cant_bp_reason1: asciz "It is read-only.",13,10 1506 00007267 642D6F6E6C792E0D0A- <1> 1506 00007270 00 <1> 1507 00007271 497420697320756E72- <1> .cant_bp_reason2: asciz "It is unreachable.",13,10 1507 0000727A 6561636861626C652E- <1> 1507 00007283 0D0A00 <1> 1508 00007286 497420686173206265- <1> .cant_bp_reason3: db "It has been overwritten with " 1508 0000728F 656E206F7665727772- <1> 1508 00007298 697474656E20776974- <1> 1508 000072A1 6820 <1> 1509 000072A3 5F5F2E0D0A00 <1> .cant_bp_reason3.value: asciz "__.",13,10 1510 000072A9 556E6B6E6F776E2065- <1> .cant_bp_reasonu: asciz "Unknown error. (Internal error, report!)",13,10 1510 000072B2 72726F722E2028496E- <1> 1510 000072BB 7465726E616C206572- <1> 1510 000072C4 726F722C207265706F- <1> 1510 000072CD 727421290D0A00 <1> 1511 <1> 1512 000072D4 20202000 <1> .list_bp.first: asciz " " 1513 000072D8 204720627265616B70- <1> .list_bp.second:db " G breakpoint, linear " 1513 000072E1 6F696E742C206C696E- <1> 1513 000072EA 65617220 <1> 1514 <1> .list_bp.address1: 1515 000072EE 2D2D2D2D5F <1> db "----_" 1516 <1> .list_bp.address2: 1517 000072F3 2D2D2D2D00 <1> asciz "----" 1518 000072F8 2C20636F6E74656E74- <1> .list_bp.third: db ", content " 1518 00007301 20 <1> 1519 <1> .list_bp.value: 1520 00007302 5F5F00 <1> asciz "__" 1521 <1> .list_bp_not_cseip: equ crlf 1522 <1> %if _PM 1523 <1> .list_bp_cseip_32: 1524 <1> asciz " (is at CS:EIP)",13,10 1525 <1> %endif 1526 <1> .list_bp_csip_16: 1527 00007305 202869732061742043- <1> asciz " (is at CS:IP)",13,10 1527 0000730E 533A4950290D0A00 <1> 1528 <1> .list_bp_none: 1529 00007316 546865204720627265- <1> asciz "The G breakpoint list is empty.",13,10 1529 0000731F 616B706F696E74206C- <1> 1529 00007328 69737420697320656D- <1> 1529 00007331 7074792E0D0A00 <1> 1530 <1> %if 0 1531 <1> 2nd G breakpoint, linear 0003_28D3 $3600:12345678, content CC (is at CS:EIP) 1532 <1> 12345678901234567890123456789012345678901234567890123456789012345678901234567890 1533 <1> %endif 1534 00007338 00 <1> .empty_message: asciz 1535 00007339 4C49535400 <1> .list: asciz "LIST" 1536 0000733E 414741494E00 <1> .again: asciz "AGAIN" 1537 <1> %if _SYMBOLIC 1538 <1> .wrt: asciz "WRT" 1539 <1> %endif 1540 00007344 52656163686564206C- <1> .uu_too_many_repeat: asciz "Reached limit of repeating disassembly.",13,10 1540 0000734D 696D6974206F662072- <1> 1540 00007356 6570656174696E6720- <1> 1540 0000735F 646973617373656D62- <1> 1540 00007368 6C792E0D0A00 <1> 1541 0000736E 496E7465726E616C20- <1> .uu_internal_error: asciz "Internal error in disassembler!",13,10 1541 00007377 6572726F7220696E20- <1> 1541 00007380 646973617373656D62- <1> 1541 00007389 6C6572210D0A00 <1> 1542 00007390 496E7465726E616C20- <1> .aa_internal_error: asciz "Internal error in assembler!",13,10 1542 00007399 6572726F7220696E20- <1> 1542 000073A2 617373656D626C6572- <1> 1542 000073AB 210D0A00 <1> 1543 000073AF 537461636B206F7665- <1> .stack_overflow: db "Stack overflow occurred, IP=" 1543 000073B8 72666C6F77206F6363- <1> 1543 000073C1 75727265642C204950- <1> 1543 000073CA 3D <1> 1544 000073CB 5F5F5F5F682C206475- <1> .stack_overflow.caller: asciz "____h, due to " 1544 000073D4 6520746F2000 <1> 1545 000073DA 65787072657373696F- <1> .stack_overflow.indirection: asciz "expression indirection.",13,10 1545 000073E3 6E20696E6469726563- <1> 1545 000073EC 74696F6E2E0D0A00 <1> 1546 000073F4 65787072657373696F- <1> .stack_overflow.parens: asciz "expression parentheses.",13,10 1546 000073FD 6E20706172656E7468- <1> 1546 00007406 657365732E0D0A00 <1> 1547 0000740E 65787072657373696F- <1> .stack_overflow.precedence: asciz "expression precedence.",13,10 1547 00007417 6E2070726563656465- <1> 1547 00007420 6E63652E0D0A00 <1> 1548 00007427 65787072657373696F- <1> .stack_overflow.value_in: asciz "expression VALUE x IN y.",13,10 1548 00007430 6E2056414C55452078- <1> 1548 00007439 20494E20792E0D0A00 <1> 1549 00007442 65787072657373696F- <1> .stack_overflow.linear: asciz "expression LINEAR.",13,10 1549 0000744B 6E204C494E4541522E- <1> 1549 00007454 0D0A00 <1> 1550 00007457 65787072657373696F- <1> .stack_overflow.cond: asciz "expression conditional ?? x :: y.",13,10 1550 00007460 6E20636F6E64697469- <1> 1550 00007469 6F6E616C203F3F2078- <1> 1550 00007472 203A3A20792E0D0A00 <1> 1551 <1> %if _SYMBOLIC 1552 <1> .dd_after_symbol.non_wrt: 1553 <1> .uu_after_symbol.non_wrt: db ":" 1554 <1> .dd_after_symbol.2_wrt: 1555 <1> .memref_after_symbol.non_wrt: 1556 <1> .uu_after_symbol.wrt: 1557 <1> .memref_after_symbol.wrt: asciz 13,10 1558 <1> .dd_after_symbol.1_wrt: 1559 <1> .uu_after_symbol_between_1.wrt: 1560 <1> .uu_between_symbol.wrt: db ":" 1561 <1> .memref_between_symbol.wrt: asciz " wrt " 1562 <1> .uu_after_symbol_between_1.non_wrt: db ":" 1563 <1> .uu_after_symbol_between_2.wrt: asciz " + " 1564 <1> .uu_after_symbol_between_3: asciz 13,10 1565 <1> %endif 1566 <1> %if _MEMREF_AMOUNT 1567 <1> %if _DEBUG2 || _SYMBOLIC 1568 <1> .memrefs_branchdirect: asciz 9, "direct branch target = " 1569 <1> .memrefs_stringsource: asciz 9, "string source = " 1570 <1> .memrefs_stringdest: asciz 9, "string destination = " 1571 <1> .memrefs_memsource: asciz 9, "memory source = " 1572 <1> .memrefs_memdest: asciz 9, "memory destination = " 1573 <1> .memrefs_memsourcedest: asciz 9, "memory source/dest = " 1574 <1> .memrefs_mem_unknown: asciz 9, "memory (unknown) = " 1575 <1> .memrefs_unknown: asciz 9, "unknown mem ref type = " 1576 <1> .memrefs_length: counted " length=" 1577 <1> %endif 1578 <1> .memrefs_invalid_internal: 1579 0000747B 496E7465726E616C20- <1> asciz "Internal error, invalid use of too many memrefs!",13,10 1579 00007484 6572726F722C20696E- <1> 1579 0000748D 76616C696420757365- <1> 1579 00007496 206F6620746F6F206D- <1> 1579 0000749F 616E79206D656D7265- <1> 1579 000074A8 6673210D0A00 <1> 1580 <1> %endif 1581 <1> 1582 <1> %if 0 1583 <1> align 2, db 0 1584 <1> .optiontable: dw dispregs32, .r32off, .r32on 1585 <1> dw traceints, .traceoff, .traceon 1586 <1> dw cpdepchars, .cpoff, .cpon 1587 <1> dw fakeindos, .dosoff, .doson 1588 <1> dw nonpagingdevice, .nonpageoff, .nonpageon 1589 <1> dw pagingdevice, .pageoff, .pageon 1590 <1> dw hexrn, .readrnoff, .readrnon 1591 <1> dw 0 1592 <1> 1593 <1> .r32off: asciz "Dump 16-bit register set" 1594 <1> .r32on: asciz "Dump 32-bit register set" 1595 <1> .traceoff: asciz "Interrupts are traced" 1596 <1> .traceon: asciz "Interrupts are processed" 1597 <1> .cpoff: asciz "Extended ASCII characters replaced" 1598 <1> .cpon: asciz "Extended ASCII characters displayed" 1599 <1> .dosoff: asciz "InDOS is checked" 1600 <1> .doson: asciz "InDOS assumed on" 1601 <1> ;asciz "InDOS assumed off" 1602 <1> .nonpageoff: asciz 1603 <1> .nonpageon: asciz "Paging disabled" 1604 <1> .pageoff: asciz 1605 <1> .pageon: asciz "Paging enabled" 1606 <1> .readrnoff: asciz "Readable RN enabled" 1607 <1> .readrnon: asciz "Readable RN disabled" 1608 <1> %endif 1609 <1> 1610 000074AE 5761726E696E673A20- <1> .warnprefix: asciz "Warning: Prefixes in excess of 14, using trace flag.",13,10 1610 000074B7 507265666978657320- <1> 1610 000074C0 696E20657863657373- <1> 1610 000074C9 206F662031342C2075- <1> 1610 000074D2 73696E672074726163- <1> 1610 000074DB 6520666C61672E0D0A- <1> 1610 000074E4 00 <1> 1611 <1> 1612 <1> %if _DEBUG 1613 000074E5 427265616B696E6720- <1> .bu: asciz "Breaking to next instance.",13,10 1613 000074EE 746F206E6578742069- <1> 1613 000074F7 6E7374616E63652E0D- <1> 1613 00007500 0A00 <1> 1614 <1> %if _DEBUG_COND 1615 00007502 44656275676761626C- <1> .bu_disabled: db "Debuggable mode is disabled.",13,10 1615 0000750B 65206D6F6465206973- <1> 1615 00007514 2064697361626C6564- <1> 1615 0000751D 2E0D0A <1> 1616 00007520 456E61626C65207769- <1> asciz "Enable with this command: r DCO6 or= ",_4digitshex(opt6_debug_mode),13,10 1616 00007529 746820746869732063- <1> 1616 00007532 6F6D6D616E643A2072- <1> 1616 0000753B 2044434F36206F723D- <1> 1616 00007544 20303130300D0A00 <1> 1617 <1> %endif 1618 <1> %else 1619 <1> .notbu: asciz "Already in topmost instance. (This is no debugging build of lDebug.)",13,10 1620 <1> %endif 1621 <1> 1622 <1> %if _PM 1623 <1> .ofs32: asciz "Cannot access 16-bit segment with 32-bit offset.",13,10 1624 <1> %endif 1625 <1> 1626 <1> 1627 <1> %define smcb_messages ..@notype,"" 1628 <1> 1629 <1> %imacro smcbtype 2.nolist 1630 <1> dw %2, %%label 1631 <1> %defstr %%str %1 1632 <1> %xdefine smcb_messages smcb_messages,%%label,%%str 1633 <1> %endmacro 1634 <1> 1635 <1> %imacro smcbmsg 2-*.nolist 1636 <1> %if %0 & 1 1637 <1> %error Expected even number of parameters 1638 <1> %endif 1639 <1> %rotate 2 1640 <1> %rep (%0 - 2) / 2 1641 <1> %1: asciz %2 1642 <1> %rotate 2 1643 <1> %endrep 1644 <1> %endmacro 1645 <1> 1646 <1> align 4, db 0 1647 <1> smcbtypes: 1648 0000754C 0000[C875] <1> smcbtype S_OTHER, 00h 1649 00007550 0100[D075] <1> smcbtype S_DOSENTRY, 01h 1650 00007554 0200[DB75] <1> smcbtype S_DOSCODE, 02h 1651 00007558 0300[E575] <1> smcbtype S_DOSDATA, 03h 1652 0000755C 0400[EF75] <1> smcbtype S_IRQSCODE, 04h 1653 00007560 0500[FA75] <1> smcbtype S_IRQSDATA, 05h 1654 00007564 0600[0576] <1> smcbtype S_CDS, 06h 1655 00007568 0700[0B76] <1> smcbtype S_LFNCDS, 07h 1656 0000756C 0800[1476] <1> smcbtype S_DPB, 08h 1657 00007570 0900[1A76] <1> smcbtype S_UPB, 09h 1658 00007574 0A00[2076] <1> smcbtype S_SFT, 0Ah 1659 00007578 0B00[2676] <1> smcbtype S_FCBSFT, 0Bh 1660 0000757C 0C00[2F76] <1> smcbtype S_CCB, 0Ch 1661 00007580 0D00[3576] <1> smcbtype S_IRT, 0Dh 1662 00007584 0E00[3B76] <1> smcbtype S_SECTOR, 0Eh 1663 00007588 0F00[4476] <1> smcbtype S_NLS, 0Fh 1664 0000758C 1000[4A76] <1> smcbtype S_EBDA, 10h 1665 00007590 1900[5176] <1> smcbtype S_INITCONFIG, 19h 1666 00007594 1A00[5E76] <1> smcbtype S_INITFATSEG, 1Ah 1667 00007598 1B00[6B76] <1> smcbtype S_INITSECTORSEG, 1Bh 1668 0000759C 1C00[7B76] <1> smcbtype S_INITSTACKBPB,1Ch 1669 000075A0 1D00[8A76] <1> smcbtype S_INITPSP, 1Dh 1670 000075A4 1E00[9476] <1> smcbtype S_ENVIRONMENT, 1Eh 1671 000075A8 1F00[A276] <1> smcbtype S_INITIALIZE, 1Fh 1672 000075AC 2000[AF76] <1> smcbtype S_DEVICE, 20h ; Device 1673 000075B0 2100[B876] <1> smcbtype S_DEVICEMEMORY,21h ; Allocated by device 1674 000075B4 3000[C776] <1> smcbtype S_EXCLDUMA, 30h ; Excluded UMA 1675 000075B8 3100[D276] <1> smcbtype S_EXCLDUMASUB, 31h ; Excluded UMA with sub-chain of used MCBs 1676 000075BC 3200[E076] <1> smcbtype S_EXCLDLH, 32h ; Excluded by LH 1677 000075C0 3300[EA76] <1> smcbtype S_EXCLDDOS, 33h 1678 000075C4 FFFFFFFF <1> dw -1, -1 1679 <1> 1680 000075C8 535F4F544845520053- <1> smcbmsg smcb_messages 1680 000075D1 5F444F53454E545259- <1> 1680 000075DA 00535F444F53434F44- <1> 1680 000075E3 4500535F444F534441- <1> 1680 000075EC 544100535F49525153- <1> 1680 000075F5 434F444500535F4952- <1> 1680 000075FE 51534441544100535F- <1> 1680 00007607 43445300535F4C464E- <1> 1680 00007610 43445300535F445042- <1> 1680 00007619 00535F55504200535F- <1> 1680 00007622 53465400535F464342- <1> 1680 0000762B 53465400535F434342- <1> 1680 00007634 00535F49525400535F- <1> 1680 0000763D 534543544F5200535F- <1> 1680 00007646 4E4C5300535F454244- <1> 1680 0000764F 4100535F494E495443- <1> 1680 00007658 4F4E46494700535F49- <1> 1680 00007661 4E4954464154534547- <1> 1680 0000766A 00535F494E49545345- <1> 1680 00007673 43544F525345470053- <1> 1680 0000767C 5F494E495453544143- <1> 1680 00007685 4B42504200535F494E- <1> 1680 0000768E 495450535000535F45- <1> 1680 00007697 4E5649524F4E4D454E- <1> 1680 000076A0 5400535F494E495449- <1> 1680 000076A9 414C495A4500535F44- <1> 1680 000076B2 455649434500535F44- <1> 1680 000076BB 45564943454D454D4F- <1> 1680 000076C4 525900535F4558434C- <1> 1680 000076CD 44554D4100535F4558- <1> 1680 000076D6 434C44554D41535542- <1> 1680 000076DF 00535F4558434C444C- <1> 1680 000076E8 4800535F4558434C44- <1> 1680 000076F1 444F5300 <1> 1681 <1> 1682 000076F5 756E6B6E6F776E00 <1> smcbmsg_unknown: asciz "unknown" 1683 <1> 1684 <1> %undef smcb_messages 1685 <1> %unimacro smcbtype 2.nolist 1686 <1> %unimacro smcbmsg 2-*.nolist 1687 <1> 1688 000076FD 5E204572726F7207 <1> errcarat: db "^ Error",7 1689 00007705 0D0A00 <1> crlf: asciz 13,10 1690 <1> 1691 <1> %if _SYMBOLIC 1692 <1> pre_str_list: 1693 <1> db -1, "", 0 1694 <1> .end: 1695 <1> %endif 1696 <1> 1697 <1> 1698 <1> align 4, db 0 1699 <1> msgtable_value_range: 1700 00007708 [B968][C368] <1> dw msg.executing, msg.executing_value_range 1701 <1> %if _ACCESS_VARIABLES_AMOUNT 1702 0000770C [1E77][2677] <1> dw .reading, .reading_range 1703 00007710 [A177][A977] <1> dw .writing, .writing_range 1704 00007714 [2478][2F78] <1> dw .memoperand, .memoperand_range 1705 00007718 [4078][4A78] <1> dw .accessing, .accessing_range 1706 <1> %endif 1707 0000771C 0000 <1> dw 0 1708 <1> 1709 <1> %if _ACCESS_VARIABLES_AMOUNT 1710 0000771E 52454144494E4700 <1> .reading: asciz "READING" 1711 <1> .reading_range: 1712 <1> %assign iicounter 0 1713 <1> %define iiprefix "" 1714 <1> %rep _ACCESS_VARIABLES_AMOUNT 1715 <1> _autohexitsstrdef IIDEF, iicounter 1716 <1> db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 1717 <1> %assign iicounter iicounter + 1 1718 <1> %define iiprefix ", " 1719 <1> %endrep 1715 <2> _autohexitsstrdef IIDEF, iicounter 1716 00007726 46524F4D2072656164- <2> db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 1716 0000772F 61647230204C454E47- <2> 1716 00007738 544820726561646C65- <2> 1716 00007741 6E30 <2> 1717 <2> %assign iicounter iicounter + 1 1718 <2> %define iiprefix ", " 1715 <2> _autohexitsstrdef IIDEF, iicounter 1716 00007743 2C2046524F4D207265- <2> db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 1716 0000774C 616461647231204C45- <2> 1716 00007755 4E4754482072656164- <2> 1716 0000775E 6C656E31 <2> 1717 <2> %assign iicounter iicounter + 1 1718 <2> %define iiprefix ", " 1715 <2> _autohexitsstrdef IIDEF, iicounter 1716 00007762 2C2046524F4D207265- <2> db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 1716 0000776B 616461647232204C45- <2> 1716 00007774 4E4754482072656164- <2> 1716 0000777D 6C656E32 <2> 1717 <2> %assign iicounter iicounter + 1 1718 <2> %define iiprefix ", " 1715 <2> _autohexitsstrdef IIDEF, iicounter 1716 00007781 2C2046524F4D207265- <2> db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 1716 0000778A 616461647233204C45- <2> 1716 00007793 4E4754482072656164- <2> 1716 0000779C 6C656E33 <2> 1717 <2> %assign iicounter iicounter + 1 1718 <2> %define iiprefix ", " 1720 000077A0 00 <1> asciz 1721 000077A1 57524954494E4700 <1> .writing: asciz "WRITING" 1722 <1> .writing_range: 1723 <1> %assign iicounter 0 1724 <1> %define iiprefix "" 1725 <1> %rep _ACCESS_VARIABLES_AMOUNT 1726 <1> _autohexitsstrdef IIDEF, iicounter 1727 <1> db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 1728 <1> %assign iicounter iicounter + 1 1729 <1> %define iiprefix ", " 1730 <1> %endrep 1726 <2> _autohexitsstrdef IIDEF, iicounter 1727 000077A9 46524F4D2077726974- <2> db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 1727 000077B2 61647230204C454E47- <2> 1727 000077BB 544820777269746C65- <2> 1727 000077C4 6E30 <2> 1728 <2> %assign iicounter iicounter + 1 1729 <2> %define iiprefix ", " 1726 <2> _autohexitsstrdef IIDEF, iicounter 1727 000077C6 2C2046524F4D207772- <2> db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 1727 000077CF 697461647231204C45- <2> 1727 000077D8 4E4754482077726974- <2> 1727 000077E1 6C656E31 <2> 1728 <2> %assign iicounter iicounter + 1 1729 <2> %define iiprefix ", " 1726 <2> _autohexitsstrdef IIDEF, iicounter 1727 000077E5 2C2046524F4D207772- <2> db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 1727 000077EE 697461647232204C45- <2> 1727 000077F7 4E4754482077726974- <2> 1727 00007800 6C656E32 <2> 1728 <2> %assign iicounter iicounter + 1 1729 <2> %define iiprefix ", " 1726 <2> _autohexitsstrdef IIDEF, iicounter 1727 00007804 2C2046524F4D207772- <2> db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 1727 0000780D 697461647233204C45- <2> 1727 00007816 4E4754482077726974- <2> 1727 0000781F 6C656E33 <2> 1728 <2> %assign iicounter iicounter + 1 1729 <2> %define iiprefix ", " 1731 00007823 00 <1> asciz 1732 <1> 1733 00007824 4D454D4F504552414E- <1> .memoperand: asciz "MEMOPERAND" 1733 0000782D 4400 <1> 1734 0000782F 52454144494E472C20- <1> .memoperand_range: asciz "READING, WRITING" 1734 00007838 57524954494E4700 <1> 1735 00007840 414343455353494E47- <1> .accessing: asciz "ACCESSING" 1735 00007849 00 <1> 1736 0000784A 52454144494E472C20- <1> .accessing_range: asciz "READING, WRITING, EXECUTING" 1736 00007853 57524954494E472C20- <1> 1736 0000785C 455845435554494E47- <1> 1736 00007865 00 <1> 1737 <1> %endif 1738 <1> 1739 <1> 1740 <1> %if _BOOTLDR 1741 <1> %define lot_list 1742 <1> %define lot_comma 1743 <1> %macro lot_entry 2.nolist 1744 <1> LOAD_%2 equ %1 1745 <1> dw LOAD_%2, .%2 1746 <1> %defstr %%string %2 1747 <1> %xdefine lot_list lot_list lot_comma .%2:, db %%string, db 0 1748 <1> %define lot_comma , 1749 <1> %endmacro 1750 <1> 1751 <1> %macro lot_messages 0-*.nolist 1752 <1> %rep (%0 / 3) 1753 <1> %1 1754 <1> %2 1755 <1> %3 1756 <1> %rotate 3 1757 <1> %endrep 1758 <1> %endmacro 1759 <1> 1760 00007866 00 <1> align 4, db 0 1761 <1> loadoptiontable: 1762 00007868 0100[D478] <1> lot_entry 1, SET_DL_UNIT 1763 0000786C 0200[E078] <1> lot_entry 2, SET_BL_UNIT 1764 00007870 0400[EC78] <1> lot_entry 4, SET_SIDI_CLUSTER 1765 00007874 1000[FD78] <1> lot_entry 10h, SET_DSSI_DPT 1766 00007878 2000[0A79] <1> lot_entry 20h, PUSH_DPT 1767 0000787C 4000[1379] <1> lot_entry 40h, DATASTART_HIDDEN 1768 00007880 8000[2479] <1> lot_entry 80h, SET_AXBX_DATASTART 1769 00007884 0001[3779] <1> lot_entry 100h, SET_DSBP_BPB 1770 00007888 0002[4479] <1> lot_entry 200h, LBA_SET_TYPE 1771 0000788C 0004[5179] <1> lot_entry 400h, MESSAGE_TABLE 1772 00007890 0008[5F79] <1> lot_entry 800h, SET_AXBX_ROOT_HIDDEN 1773 00007894 0010[7479] <1> lot_entry 1000h, CMDLINE 1774 00007898 0020[7C79] <1> lot_entry 2000h, NO_BPB 1775 0000789C 0040[8379] <1> lot_entry 4000h, SET_DSSI_PARTINFO 1776 000078A0 00000000 <1> dw 0, 0 1777 <1> 1778 <1> .incompatible: 1779 000078A4 02008000 <1> dw LOAD_SET_BL_UNIT, LOAD_SET_AXBX_DATASTART 1780 000078A8 02000008 <1> dw LOAD_SET_BL_UNIT, LOAD_SET_AXBX_ROOT_HIDDEN 1781 000078AC 80000008 <1> dw LOAD_SET_AXBX_DATASTART, LOAD_SET_AXBX_ROOT_HIDDEN 1782 000078B0 04001000 <1> dw LOAD_SET_SIDI_CLUSTER, LOAD_SET_DSSI_DPT 1783 000078B4 00011000 <1> dw LOAD_SET_DSBP_BPB, LOAD_SET_DSSI_DPT 1784 000078B8 00200001 <1> dw LOAD_NO_BPB, LOAD_SET_DSBP_BPB 1785 000078BC 00200002 <1> dw LOAD_NO_BPB, LOAD_LBA_SET_TYPE 1786 000078C0 00200004 <1> dw LOAD_NO_BPB, LOAD_MESSAGE_TABLE 1787 000078C4 00400400 <1> dw LOAD_SET_DSSI_PARTINFO, LOAD_SET_SIDI_CLUSTER 1788 000078C8 00401000 <1> dw LOAD_SET_DSSI_PARTINFO, LOAD_SET_DSSI_DPT 1789 000078CC 00400001 <1> dw LOAD_SET_DSSI_PARTINFO, LOAD_SET_DSBP_BPB 1790 000078D0 00000000 <1> dw 0, 0 1791 <1> 1792 000078D4 5345545F444C5F554E- <1> lot_messages lot_list 1792 000078DD 4954005345545F424C- <1> 1792 000078E6 5F554E495400534554- <1> 1792 000078EF 5F534944495F434C55- <1> 1792 000078F8 53544552005345545F- <1> 1792 00007901 445353495F44505400- <1> 1792 0000790A 505553485F44505400- <1> 1792 00007913 444154415354415254- <1> 1792 0000791C 5F48494444454E0053- <1> 1792 00007925 45545F415842585F44- <1> 1792 0000792E 415441535441525400- <1> 1792 00007937 5345545F445342505F- <1> 1792 00007940 425042004C42415F53- <1> 1792 00007949 45545F54595045004D- <1> 1792 00007952 4553534147455F5441- <1> 1792 0000795B 424C45005345545F41- <1> 1792 00007964 5842585F524F4F545F- <1> 1792 0000796D 48494444454E00434D- <1> 1792 00007976 444C494E45004E4F5F- <1> 1792 0000797F 425042005345545F44- <1> 1792 00007988 5353495F5041525449- <1> 1792 00007991 4E464F00 <1> 1793 <1> 1794 <1> %unmacro lot_entry 2.nolist 1795 <1> %unmacro lot_messages 0-*.nolist 1796 <1> 1797 <1> 1798 <1> msdos7_message_table: 1799 <1> ; the first four bytes give displacements to the various 1800 <1> ; messages. an ASCIZ message indicates that this was the 1801 <1> ; last message. a message terminated by 0FFh indicates 1802 <1> ; that the last message (displacement at table + 3) is 1803 <1> ; to follow after this message. 1804 <1> ; the maximum allowed displacement is 7Fh. the minimum 1805 <1> ; allowed displacement is 1, to avoid a zero displacement. 1806 <1> ; only the last message is terminated by a zero byte, 1807 <1> ; as that zero byte indicates the end of the message table. 1808 <1> ; (the entire table is treated as one ASCIZ string.) 1809 <1> ; MS-DOS 7.10 from MSW 98 SE seems to have at least 167h (359) 1810 <1> ; bytes allocated to its buffer for these. 1811 <1> ; 1812 <1> ; this message table was discussed in a dosemu2 repo at 1813 <1> ; https://github.com/stsp/dosemu2/issues/681 1814 00007995 03 <1> .: db .msg_invalid_system - ($ + 1) 1815 00007996 13 <1> db .msg_io_error - ($ + 1) 1816 00007997 01 <1> db .msg_invalid_system - ($ + 1) 1817 00007998 1D <1> db .msg_press_any_key - ($ + 1) 1818 <1> 1819 <1> .msg_invalid_system: 1820 00007999 0D0A496E76616C6964- <1> db 13,10,"Invalid system", -1 1820 000079A2 2073797374656DFF <1> 1821 <1> 1822 <1> .msg_io_error: 1823 000079AA 0D0A492F4F20657272- <1> db 13,10,"I/O error", -1 1823 000079B3 6F72FF <1> 1824 <1> 1825 <1> .msg_press_any_key: 1826 000079B6 0D0A4368616E676520- <1> db 13,10,"Change disk and press any key",13,10,0 1826 000079BF 6469736B20616E6420- <1> 1826 000079C8 707265737320616E79- <1> 1826 000079D1 206B65790D0A00 <1> 1827 <1> .end: 1828 <1> .size: equ .end - . 1829 <1> 1830 <1> %if .size > 150h 1831 <1> %error Message table too large! 1832 <1> %endif 1833 <1> 1834 <1> 1835 <1> 1836 <1> align 4, db 0 1837 <1> loadsettings: 1838 <1> istruc LOADSETTINGS 1839 000079D8 [E663] <1> at lsKernelName, dw msg.ldos_kernel_name 1840 000079DA [5C64] <1> at lsAddName, dw msg.addname_empty 1841 000079DC 6000 <1> at lsMinPara, dw 60h 1842 000079DE 0000 <1> at lsMaxPara, dw 0 1843 000079E0 0010 <1> at lsOptions, dw LOAD_CMDLINE 1844 000079E2 0002 <1> at lsSegment, dw 200h 1845 000079E4 00040000 <1> at lsEntry, dd 400h 1846 000079E8 007CFFFF <1> at lsBPB, dw 7C00h, -1 1847 000079EC FC03 <1> at lsCheckOffset, dw 1020 1848 000079EE 6C44 <1> at lsCheckValue, db "lD" 1849 000079F0 4C444F5300 <1> at lsName, asciz "LDOS" 1850 000079F5 00 <1> iend 1851 <1> istruc LOADSETTINGS 1852 000079F8 [C963] <1> at lsKernelName, dw msg.freedos_kernel_name 1853 000079FA [5C64] <1> at lsAddName, dw msg.addname_empty 1854 000079FC 2000 <1> at lsMinPara, dw 20h 1855 000079FE FFFF <1> at lsMaxPara, dw -1 1856 00007A00 0300 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_BL_UNIT 1857 00007A02 6000 <1> at lsSegment, dw 60h 1858 00007A04 00000000 <1> at lsEntry, dd 0 1859 00007A08 007CFFFF <1> at lsBPB, dw 7C00h, -1 1860 00007A0C 0046524545- <1> at lsName, asciz "FREEDOS" 1860 00007A14 444F5300 <1> 1861 <1> iend 1862 <1> istruc LOADSETTINGS 1863 00007A18 [D463] <1> at lsKernelName, dw msg.dosc_kernel_name 1864 00007A1A [5C64] <1> at lsAddName, dw msg.addname_empty 1865 00007A1C 2000 <1> at lsMinPara, dw 20h 1866 00007A1E FFFF <1> at lsMaxPara, dw -1 1867 00007A20 0300 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_BL_UNIT 1868 00007A22 0020 <1> at lsSegment, dw 2000h 1869 00007A24 00000000 <1> at lsEntry, dd 0 1870 00007A28 007C0000 <1> at lsBPB, dw 7C00h, 0 1871 00007A2C 00444F5343- <1> at lsName, asciz "DOSC" 1871 00007A34 00 <1> 1872 00007A35 00 <1> iend 1873 <1> istruc LOADSETTINGS 1874 00007A38 [DC63] <1> at lsKernelName, dw msg.edrdos_kernel_name 1875 00007A3A [5C64] <1> at lsAddName, dw msg.addname_empty 1876 00007A3C 2000 <1> at lsMinPara, dw 20h 1877 00007A3E FFFF <1> at lsMaxPara, dw -1 1878 00007A40 0301 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_BL_UNIT | LOAD_SET_DSBP_BPB 1880 00007A42 7000 <1> at lsSegment, dw 70h 1881 00007A44 00000000 <1> at lsEntry, dd 0 1882 00007A48 007CFFFF <1> at lsBPB, dw 7C00h, -1 1883 00007A4C 0045445244- <1> at lsName, asciz "EDRDOS" 1883 00007A54 4F5300 <1> 1884 00007A57 00 <1> iend 1885 <1> istruc LOADSETTINGS 1886 00007A58 [EF63] <1> at lsKernelName, dw msg.msdos6_kernel_name 1887 00007A5A [F663] <1> at lsAddName, dw msg.msdos6_add_name 1888 00007A5C 2000 <1> at lsMinPara, dw 20h 1889 00007A5E 6000 <1> at lsMaxPara, dw 60h 1890 00007A60 F100 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_DATASTART | LOAD_DATASTART_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 1893 00007A62 7000 <1> at lsSegment, dw 70h 1894 00007A64 00000000 <1> at lsEntry, dd 0 1895 00007A68 007C0000 <1> at lsBPB, dw 7C00h, 0 1896 00007A6C 004D53444F- <1> at lsName, asciz "MSDOS6" 1896 00007A74 533600 <1> 1897 00007A77 00 <1> iend 1898 <1> istruc LOADSETTINGS 1899 00007A78 [3164] <1> at lsKernelName, dw msg.rxdos.0_kernel_name 1900 00007A7A [4864] <1> at lsAddName, dw msg.rxdos.0_add_name 1901 00007A7C 2000 <1> at lsMinPara, dw 20h 1902 00007A7E 6000 <1> at lsMaxPara, dw 60h 1903 00007A80 3108 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_ROOT_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 1905 00007A82 7000 <1> at lsSegment, dw 70h 1906 00007A84 00000000 <1> at lsEntry, dd 0 1907 00007A88 007C0000 <1> at lsBPB, dw 7C00h, 0 1908 00007A8C 005258444F- <1> at lsName, asciz "RXDOS.0" 1908 00007A94 532E3000 <1> 1909 <1> iend 1910 <1> istruc LOADSETTINGS 1911 00007A98 [3E64] <1> at lsKernelName, dw msg.rxdos.1_kernel_name 1912 00007A9A [4864] <1> at lsAddName, dw msg.rxdos.1_add_name 1913 00007A9C 2000 <1> at lsMinPara, dw 20h 1914 00007A9E 6000 <1> at lsMaxPara, dw 60h 1915 00007AA0 3108 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_ROOT_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 1917 00007AA2 7000 <1> at lsSegment, dw 70h 1918 00007AA4 00000000 <1> at lsEntry, dd 0 1919 00007AA8 007C0000 <1> at lsBPB, dw 7C00h, 0 1920 00007AAC 005258444F- <1> at lsName, asciz "RXDOS.1" 1920 00007AB4 532E3100 <1> 1921 <1> iend 1922 <1> istruc LOADSETTINGS 1923 00007AB8 [5264] <1> at lsKernelName, dw msg.rxdos.2_kernel_name 1924 00007ABA [5C64] <1> at lsAddName, dw msg.addname_empty 1925 00007ABC 6000 <1> at lsMinPara, dw 60h 1926 00007ABE 0000 <1> at lsMaxPara, dw 0 1927 00007AC0 0010 <1> at lsOptions, dw LOAD_CMDLINE 1928 00007AC2 7000 <1> at lsSegment, dw 70h 1929 00007AC4 00040000 <1> at lsEntry, dd 400h 1930 00007AC8 007CFFFF <1> at lsBPB, dw 7C00h, -1 1931 00007ACC 005258444F- <1> at lsName, asciz "RXDOS.2" 1931 00007AD4 532E3200 <1> 1932 <1> iend 1933 <1> istruc LOADSETTINGS 1934 00007AD8 [5264] <1> at lsKernelName, dw msg.rxdos.2_kernel_name 1935 00007ADA [5C64] <1> at lsAddName, dw msg.addname_empty 1936 00007ADC 6000 <1> at lsMinPara, dw 60h 1937 00007ADE 0000 <1> at lsMaxPara, dw 0 1938 00007AE0 0010 <1> at lsOptions, dw LOAD_CMDLINE 1939 00007AE2 0002 <1> at lsSegment, dw 200h 1940 00007AE4 00040000 <1> at lsEntry, dd 400h 1941 00007AE8 007CFFFF <1> at lsBPB, dw 7C00h, -1 1942 00007AEC FC03 <1> at lsCheckOffset, dw 1020 1943 00007AEE 6C44 <1> at lsCheckValue, db "lD" 1944 00007AF0 5258444F532E3300 <1> at lsName, asciz "RXDOS.3" 1945 <1> iend 1946 <1> istruc LOADSETTINGS 1947 00007AF8 [0064] <1> at lsKernelName, dw msg.ibmdos_kernel_name 1948 00007AFA [0B64] <1> at lsAddName, dw msg.ibmdos_add_name 1949 00007AFC 2000 <1> at lsMinPara, dw 20h 1950 00007AFE 8000 <1> at lsMaxPara, dw 80h 1951 00007B00 F100 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_DATASTART | LOAD_DATASTART_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 1954 00007B02 7000 <1> at lsSegment, dw 70h 1955 00007B04 00000000 <1> at lsEntry, dd 0 1956 00007B08 007C0000 <1> at lsBPB, dw 7C00h, 0 1957 00007B0C 0049424D44- <1> at lsName, asciz "IBMDOS" 1957 00007B14 4F5300 <1> 1958 00007B17 00 <1> iend 1959 <1> istruc LOADSETTINGS 1960 00007B18 [EF63] <1> at lsKernelName, dw msg.msdos7_kernel_name 1961 00007B1A [5C64] <1> at lsAddName, dw msg.addname_empty 1962 00007B1C 4000 <1> at lsMinPara, dw 40h 1963 00007B1E 8000 <1> at lsMaxPara, dw 80h 1964 00007B20 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 1967 00007B22 7000 <1> at lsSegment, dw 70h 1968 00007B24 00020000 <1> at lsEntry, dd 200h 1969 00007B28 007CFFFF <1> at lsBPB, dw 7C00h, -1 1970 00007B2C 0002 <1> at lsCheckOffset, dw 200h 1971 00007B2E 424A <1> at lsCheckValue, db "BJ" 1972 00007B30 4D53444F533700 <1> at lsName, asciz "MSDOS7" 1973 00007B37 00 <1> iend 1974 <1> istruc LOADSETTINGS 1975 00007B38 [1664] <1> at lsKernelName, dw msg.ntldr_kernel_name 1976 00007B3A [5C64] <1> at lsAddName, dw msg.addname_empty 1977 00007B3C 2000 <1> at lsMinPara, dw 20h 1978 00007B3E FFFF <1> at lsMaxPara, dw -1 1979 00007B40 4100 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_DATASTART_HIDDEN 1981 00007B42 0020 <1> at lsSegment, dw 2000h 1982 00007B44 00000000 <1> at lsEntry, dd 0 1983 00007B48 007C0000 <1> at lsBPB, dw 7C00h, 0 1984 00007B4C 004E544C44- <1> at lsName, asciz "NTLDR" 1984 00007B54 5200 <1> 1985 00007B56 00 <1> iend 1986 <1> istruc LOADSETTINGS 1987 00007B58 [1C64] <1> at lsKernelName, dw msg.bootmgr_kernel_name 1988 00007B5A [5C64] <1> at lsAddName, dw msg.addname_empty 1989 00007B5C 2000 <1> at lsMinPara, dw 20h 1990 00007B5E FFFF <1> at lsMaxPara, dw -1 1991 00007B60 4100 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_DATASTART_HIDDEN 1993 00007B62 0020 <1> at lsSegment, dw 2000h 1994 00007B64 00000000 <1> at lsEntry, dd 0 1995 00007B68 007C0000 <1> at lsBPB, dw 7C00h, 0 1996 00007B6C 00424F4F54- <1> at lsName, asciz "BOOTMGR" 1996 00007B74 4D475200 <1> 1997 <1> iend 1998 <1> istruc LOADSETTINGS 1999 00007B78 [2464] <1> at lsKernelName, dw msg.chain_kernel_name 2000 00007B7A [5C64] <1> at lsAddName, dw msg.addname_empty 2001 00007B7C 2000 <1> at lsMinPara, dw paras(512) 2002 00007B7E 0002 <1> at lsMaxPara, dw paras(8192) 2003 00007B80 0160 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_DSSI_PARTINFO | LOAD_NO_BPB 2005 00007B82 C007 <1> at lsSegment, dw 7C0h 2006 00007B84 007C40F8 <1> at lsEntry, dw 7C00h, -7C0h 2007 00007B88 007C0000 <1> at lsBPB, dw 7C00h, 0 2008 00007B8C FE01 <1> at lsCheckOffset, dw 510 2009 00007B8E 55AA <1> at lsCheckValue, dw 0AA55h 2010 00007B90 434841494E00 <1> at lsName, asciz "CHAIN" 2011 00007B96 00 <1> iend 2012 00007B98 0000 <1> dw 0 2013 <1> %endif 2014 <1> 2015 <1> 2016 00007B9A 0D21 <1> dskerrs: db dskerr0-dskerrs,dskerr1-dskerrs 2017 00007B9C 3444 <1> db dskerr2-dskerrs,dskerr3-dskerrs 2018 00007B9E 5494 <1> db dskerr4-dskerrs,dskerr9-dskerrs 2019 00007BA0 6570 <1> db dskerr6-dskerrs,dskerr7-dskerrs 2020 00007BA2 8394 <1> db dskerr8-dskerrs,dskerr9-dskerrs 2021 00007BA4 A2AE <1> db dskerra-dskerrs,dskerrb-dskerrs 2022 00007BA6 B9 <1> db dskerrc-dskerrs 2023 00007BA7 57726974652070726F- <1> dskerr0: asciz "Write protect error" 2023 00007BB0 74656374206572726F- <1> 2023 00007BB9 7200 <1> 2024 00007BBB 556E6B6E6F776E2075- <1> dskerr1: asciz "Unknown unit error" 2024 00007BC4 6E6974206572726F72- <1> 2024 00007BCD 00 <1> 2025 00007BCE 4472697665206E6F74- <1> dskerr2: asciz "Drive not ready" 2025 00007BD7 20726561647900 <1> 2026 00007BDE 556E6B6E6F776E2063- <1> dskerr3: asciz "Unknown command" 2026 00007BE7 6F6D6D616E6400 <1> 2027 00007BEE 44617461206572726F- <1> dskerr4: asciz "Data error (CRC)" 2027 00007BF7 7220284352432900 <1> 2028 00007BFF 5365656B206572726F- <1> dskerr6: asciz "Seek error" 2028 00007C08 7200 <1> 2029 00007C0A 556E6B6E6F776E206D- <1> dskerr7: asciz "Unknown media type" 2029 00007C13 656469612074797065- <1> 2029 00007C1C 00 <1> 2030 00007C1D 536563746F72206E6F- <1> dskerr8: asciz "Sector not found" 2030 00007C26 7420666F756E6400 <1> 2031 00007C2E 556E6B6E6F776E2065- <1> dskerr9: asciz "Unknown error" 2031 00007C37 72726F7200 <1> 2032 00007C3C 577269746520666175- <1> dskerra: asciz "Write fault" 2032 00007C45 6C7400 <1> 2033 00007C48 52656164206661756C- <1> dskerrb: asciz "Read fault" 2033 00007C51 7400 <1> 2034 00007C53 47656E6572616C2066- <1> dskerrc: asciz "General failure" 2034 00007C5C 61696C75726500 <1> 2035 00007C63 207265616400 <1> reading: asciz " read" 2036 00007C69 207772697400 <1> writing: asciz " writ" 2037 00007C6F 696E67206472697665- <1> drive: db "ing drive " 2037 00007C78 20 <1> 2038 00007C79 5F00 <1> driveno: asciz "_" 2039 00007C7B 383038362F383800 <1> msg8088: asciz "8086/88" 2040 00007C83 78383600 <1> msgx86: asciz "x86" 2041 00007C87 20776974686F757420- <1> no_copr: asciz " without coprocessor" 2041 00007C90 636F70726F63657373- <1> 2041 00007C99 6F7200 <1> 2042 00007C9C 207769746820636F70- <1> has_copr: asciz " with coprocessor" 2042 00007CA5 726F636573736F7200 <1> 2043 00007CAE 207769746820323837- <1> has_287: asciz " with 287" 2043 00007CB7 00 <1> 2044 00007CB8 7472616365206D6F64- <1> tmodes: db "trace mode is " 2044 00007CC1 6520697320 <1> 2045 00007CC6 5F202D20696E746572- <1> tmodev: asciz "_ - interrupts are " 2045 00007CCF 727570747320617265- <1> 2045 00007CD8 2000 <1> 2046 00007CDA 74726163656400 <1> tmode1: asciz "traced" 2047 00007CE1 70726F636573736564- <1> tmode0: asciz "processed" 2047 00007CEA 00 <1> 2048 00007CEB 2028756E7573656429- <1> unused: asciz " (unused)" 2048 00007CF4 00 <1> 2049 <1> needsmsg: 2050 00007CF5 5B6E6565647320 <1> .: db "[needs " 2051 <1> .digit_x_ofs: equ $ - . 2052 00007CFC 7838 <1> db "x8" 2053 <1> .digit_6_ofs: equ $ - . 2054 00007CFE 365D <1> db "6]" 2055 <1> needsmsg_L: equ $-needsmsg 2056 00007D00 5B6E65656473206D61- <1> needsmath: db "[needs math coprocessor]" 2056 00007D09 746820636F70726F63- <1> 2056 00007D12 6573736F725D <1> 2057 <1> needsmath_L: equ $-needsmath 2058 00007D18 5B6F62736F6C657465- <1> obsolete: db "[obsolete]" 2058 00007D21 5D <1> 2059 <1> obsolete_L: equ $-obsolete 2060 00007D22 446976696465206572- <1> int0msg: asciz "Divide error",13,10 2060 00007D2B 726F720D0A00 <1> 2061 00007D31 556E65787065637465- <1> int1msg: asciz "Unexpected single-step interrupt",13,10 2061 00007D3A 642073696E676C652D- <1> 2061 00007D43 7374657020696E7465- <1> 2061 00007D4C 72727570740D0A00 <1> 2062 00007D54 556E65787065637465- <1> int3msg: asciz "Unexpected breakpoint interrupt",13,10 2062 00007D5D 6420627265616B706F- <1> 2062 00007D66 696E7420696E746572- <1> 2062 00007D6F 727570740D0A00 <1> 2063 <1> %if _CATCHINT06 2064 00007D76 496E76616C6964206F- <1> int6msg: asciz "Invalid opcode",13,10 2064 00007D7F 70636F64650D0A00 <1> 2065 <1> %endif 2066 <1> %if _CATCHINT08 2067 00007D87 446574656374656420- <1> int8msg: asciz "Detected Control pressed for a while",13,10 2067 00007D90 436F6E74726F6C2070- <1> 2067 00007D99 72657373656420666F- <1> 2067 00007DA2 722061207768696C65- <1> 2067 00007DAB 0D0A00 <1> 2068 00007DAE 446574656374656420- <1> int8_kbd_msg: asciz "Detected Control pressed for a while (Keyboard enabled)",13,10 2068 00007DB7 436F6E74726F6C2070- <1> 2068 00007DC0 72657373656420666F- <1> 2068 00007DC9 722061207768696C65- <1> 2068 00007DD2 20284B6579626F6172- <1> 2068 00007DDB 6420656E61626C6564- <1> 2068 00007DE4 290D0A00 <1> 2069 <1> runint_ctrlc_msg: 2070 00007DE8 446574656374656420- <1> asciz "Detected double Control-C via serial",13,10 2070 00007DF1 646F75626C6520436F- <1> 2070 00007DFA 6E74726F6C2D432076- <1> 2070 00007E03 69612073657269616C- <1> 2070 00007E0C 0D0A00 <1> 2071 <1> %endif 2072 <1> %if _CATCHINT18 2073 00007E0F 4469736B6C65737320- <1> int18msg: asciz "Diskless boot hook called",13,10 2073 00007E18 626F6F7420686F6F6B- <1> 2073 00007E21 2063616C6C65640D0A- <1> 2073 00007E2A 00 <1> 2074 <1> %endif 2075 <1> %if _CATCHINT19 2076 00007E2B 426F6F74206C6F6164- <1> int19msg: asciz "Boot load called",13,10 2076 00007E34 2063616C6C65640D0A- <1> 2076 00007E3D 00 <1> 2077 <1> %endif 2078 <1> %if _PM 2079 <1> %if _CATCHEXC06 2080 <1> exc6msg: asciz "Invalid opcode fault",13,10 2081 <1> %endif 2082 <1> %if _CATCHEXC0C 2083 <1> excCmsg: asciz "Stack fault",13,10 2084 <1> %endif 2085 <1> excDmsg: asciz "General protection fault",13,10 2086 <1> %if _EXCCSIP 2087 <1> excloc: db "CS:IP=" 2088 <1> exccsip: asciz " : ",13,10 2089 <1> %endif 2090 <1> excEmsg: asciz "Page fault",13,10 2091 <1> %if _BREAK_INSTALLDPMI 2092 <1> installdpmimsg: asciz "Entered Protected Mode",13,10 2093 <1> %endif 2094 <1> nodosext: asciz "Command not supported in protected mode without a DOS extender",13,10 2095 <1> nopmsupp: asciz "Command not supported in protected mode",13,10 2096 <1> %if _DISPHOOK 2097 <1> dpmihook: db "DPMI entry hooked, new entry=" 2098 <1> dpmihookcs: asciz "____:",_4digitshex(mydpmientry+DATASECTIONFIXUP),13,10 2099 <1> %endif 2100 <1> msg.dpmi_no_hook: asciz "DPMI entry cannot be hooked!",13,10 2101 <1> nodesc: asciz "resource not accessible in real mode",13,10 2102 <1> ;descwrong: asciz "descriptor not accessible",13,10 2103 <1> gatewrong: asciz "gate not accessible",13,10 2104 <1> msg.msdos: asciz "MS-DOS" 2105 <1> descr: db "____ base=" 2106 <1> descbase: db "________ limit=" 2107 <1> desclim: db "________ attr=" 2108 <1> descattr: db "____",13,10 2109 <1> asciz 2110 <1> %endif ; _PM 2111 00007E3E 4572726F7220696E20- <1> ph_msg: asciz "Error in sequence of calls to hack.",13,10 2111 00007E47 73657175656E636520- <1> 2111 00007E50 6F662063616C6C7320- <1> 2111 00007E59 746F206861636B2E0D- <1> 2111 00007E62 0A00 <1> 2112 <1> 2113 00007E64 0D0A50726F6772616D- <1> progtrm: db 13,10,"Program terminated normally (" 2113 00007E6D 207465726D696E6174- <1> 2113 00007E76 6564206E6F726D616C- <1> 2113 00007E7F 6C792028 <1> 2114 00007E83 5F5F5F5F290D0A00 <1> progexit: asciz "____)",13,10 2115 00007E8B 45584520616E642048- <1> nowhexe: asciz "EXE and HEX files cannot be written",13,10 2115 00007E94 45582066696C657320- <1> 2115 00007E9D 63616E6E6F74206265- <1> 2115 00007EA6 207772697474656E0D- <1> 2115 00007EAF 0A00 <1> 2116 00007EB1 43616E6E6F74207772- <1> nownull: asciz "Cannot write: no file name given",13,10 2116 00007EBA 6974653A206E6F2066- <1> 2116 00007EC3 696C65206E616D6520- <1> 2116 00007ECC 676976656E0D0A00 <1> 2117 00007ED4 57726974696E672000 <1> wwmsg1: asciz "Writing " 2118 00007EDD 2062797465730D0A00 <1> wwmsg2: asciz " bytes",13,10 2119 00007EE6 4469736B2066756C6C- <1> diskful: asciz "Disk full",13,10 2119 00007EEF 0D0A00 <1> 2120 00007EF2 4572726F7220 <1> openerr: db "Error " 2121 00007EF8 5F5F5F5F206F70656E- <1> openerr1: asciz "____ opening file",13,10 2121 00007F01 696E672066696C650D- <1> 2121 00007F0A 0A00 <1> 2122 00007F0C 46696C65206E6F7420- <1> doserr2: asciz "File not found",13,10 2122 00007F15 666F756E640D0A00 <1> 2123 00007F1D 50617468206E6F7420- <1> doserr3: asciz "Path not found",13,10 2123 00007F26 666F756E640D0A00 <1> 2124 00007F2E 416363657373206465- <1> doserr5: asciz "Access denied",13,10 2124 00007F37 6E6965640D0A00 <1> 2125 00007F3E 496E73756666696369- <1> doserr8: asciz "Insufficient memory",13,10 2125 00007F47 656E74206D656D6F72- <1> 2125 00007F50 790D0A00 <1> 2126 00007F54 496E76616C69642066- <1> doserr11: asciz "Invalid format",13,10 2126 00007F5D 6F726D61740D0A00 <1> 2127 <1> 2128 <1> %if _EMS 2129 <1> ;emmname: db "EMMXXXX0" 2130 00007F65 454D53206E6F742069- <1> emsnot: asciz "EMS not installed",13,10 2130 00007F6E 6E7374616C6C65640D- <1> 2130 00007F77 0A00 <1> 2131 00007F79 454D5320696E746572- <1> emserr1: asciz "EMS internal error",13,10 2131 00007F82 6E616C206572726F72- <1> 2131 00007F8B 0D0A00 <1> 2132 00007F8E 48616E646C65206E6F- <1> emserr3: asciz "Handle not found",13,10 2132 00007F97 7420666F756E640D0A- <1> 2132 00007FA0 00 <1> 2133 00007FA1 4E6F20667265652068- <1> emserr5: asciz "No free handles",13,10 2133 00007FAA 616E646C65730D0A00 <1> 2134 00007FB3 546F74616C20706167- <1> emserr7: asciz "Total pages exceeded",13,10 2134 00007FBC 657320657863656564- <1> 2134 00007FC5 65640D0A00 <1> 2135 00007FCA 467265652070616765- <1> emserr8: asciz "Free pages exceeded",13,10 2135 00007FD3 732065786365656465- <1> 2135 00007FDC 640D0A00 <1> 2136 00007FE0 506172616D65746572- <1> emserr9: asciz "Parameter error",13,10 2136 00007FE9 206572726F720D0A00 <1> 2137 00007FF2 4C6F676963616C2070- <1> emserra: asciz "Logical page out of range",13,10 2137 00007FFB 616765206F7574206F- <1> 2137 00008004 662072616E67650D0A- <1> 2137 0000800D 00 <1> 2138 0000800E 506879736963616C20- <1> emserrb: asciz "Physical page out of range",13,10 2138 00008017 70616765206F757420- <1> 2138 00008020 6F662072616E67650D- <1> 2138 00008029 0A00 <1> 2139 0000802B 00 <1> align 2, db 0 2140 0000802C [797F][797F]0000- <1> emserrs: dw emserr1,emserr1,0,emserr3,0,emserr5,0,emserr7 2140 00008032 [8E7F]0000[A17F]00- <1> 2140 00008039 00[B37F] <1> 2141 0000803C [CA7F][E07F][F27F]- <1> dw emserr8,emserr9,emserra,emserrb 2141 00008042 [0E80] <1> 2142 00008044 454D53206572726F72- <1> emserrx: asciz "EMS error " 2142 0000804D 2000 <1> 2143 0000804F 48616E646C65206372- <1> xaans: db "Handle created = " 2143 00008058 6561746564203D20 <1> 2144 00008060 5F5F5F5F0D0A00 <1> xaans1: asciz "____",13,10 2145 00008067 48616E646C6520 <1> xdans: db "Handle " 2146 0000806E 5F5F5F5F206465616C- <1> xdans1: asciz "____ deallocated",13,10 2146 00008077 6C6F63617465640D0A- <1> 2146 00008080 00 <1> 2147 00008081 48616E646C65207265- <1> xrans: asciz "Handle reallocated",13,10 2147 0000808A 616C6C6F6361746564- <1> 2147 00008093 0D0A00 <1> 2148 00008096 4C6F676963616C2070- <1> xmans: db "Logical page " 2148 0000809F 61676520 <1> 2149 000080A3 5F5F5F5F206D617070- <1> xmans1: db "____ mapped to physical page " 2149 000080AC 656420746F20706879- <1> 2149 000080B5 736963616C20706167- <1> 2149 000080BE 6520 <1> 2150 000080C0 5F5F0D0A00 <1> xmans2: asciz "__",13,10 2151 000080C5 48616E646C6520 <1> xsstr1: db "Handle " 2152 000080CC 5F5F5F5F2068617320 <1> xsstr1a: db "____ has " 2153 000080D5 5F5F5F5F2070616765- <1> xsstr1b: asciz "____ pages allocated",13,10 2153 000080DE 7320616C6C6F636174- <1> 2153 000080E7 65640D0A00 <1> 2154 000080EC 706879732E20706167- <1> xsstr2: db "phys. page " 2154 000080F5 6520 <1> 2155 000080F7 5F5F203D207365676D- <1> xsstr2a: db "__ = segment " 2155 00008100 656E7420 <1> 2156 00008104 5F5F5F5F202000 <1> xsstr2b: asciz "____ " 2157 0000810B 5F5F5F5F206F662061- <1> xsstr3: db "____ of a total " 2157 00008114 20746F74616C20 <1> 2158 0000811B 5F5F5F5F20454D5320- <1> xsstr3a: asciz "____ EMS " 2158 00008124 00 <1> 2159 00008125 657320686176652062- <1> xsstr4: asciz "es have been allocated",13,10 2159 0000812E 65656E20616C6C6F63- <1> 2159 00008137 617465640D0A00 <1> 2160 0000813E 70616700 <1> xsstrpg: asciz "pag" 2161 00008142 68616E646C00 <1> xsstrhd: asciz "handl" 2162 00008148 6E6F206D6170706162- <1> xsnopgs: asciz "no mappable pages",13,10,13,10 2162 00008151 6C652070616765730D- <1> 2162 0000815A 0A0D0A00 <1> 2163 <1> %endif 2164 <1> 2165 0000815E 00 <1> align 4, db 0 2166 00008160 000800040002800040- <1> flagbits: dw 800h,400h,200h, 80h,040h,010h,004h,001h 2166 00008169 00100004000100 <1> 2167 00008170 4F56444E45494E475A- <1> flagson: dw "OV","DN","EI","NG","ZR","AC","PE","CY" 2167 00008179 52414350454359 <1> 2168 00008180 4E5655504449504C4E- <1> flagsoff: dw "NV","UP","DI","PL","NZ","NA","PO","NC" 2168 00008189 5A4E41504F4E43 <1> 2169 00008190 4F464446494653465A- <1> flagnames: dw "OF","DF","IF","SF","ZF","AF","PF","CF" 2169 00008199 46414650464346 <1> 2170 <1> 2171 <1> %if _COND 2172 000081A0 6E6F7420 <1> msg.condnotjump:db "not " 2173 000081A4 6A756D70696E6700 <1> msg.condjump: asciz "jumping" 2174 <1> %endif 2175 <1> 2176 000081AC 206D6174636865730D- <1> msg.matches: asciz " matches",13,10 2176 000081B5 0A00 <1> 2177 <1> 2178 000081B7 00 <1> align 4, db 0 2179 000081B8 414C4148424C424843- <1> reg8names: dw "AL","AH","BL","BH","CL","CH","DL","DH" 2179 000081C1 4C4348444C4448 <1> 2180 <1> ; Even entries are xL registers, odd ones the xH ones. 2181 <1> ; Order matches that of the first four regs entries. 2182 <1> 2183 000081C8 415842584358445853- <1> reg16names: dw "AX","BX","CX","DX","SP","BP","SI","DI" 2183 000081D1 50425053494449 <1> 2184 000081D8 445345535353435346- <1> dw "DS","ES","SS","CS","FS","GS","IP","FL" 2184 000081E1 5347534950464C <1> 2185 <1> ; 32-bit registers are the first eight and last two entries of 2186 <1> ; reg16names with 'E', which are all non-segment registers. 2187 <1> ; Segment registers can be detected by the 'S' as second letter. 2188 <1> ; FS and GS are the fourth- and third-to-last entries. 2189 <1> ; Order matches that of the sixteen regs entries. 2190 <1> 2191 <1> 2192 <1> ; Table of recognised default (unsigned) types. 2193 <1> ; 2194 <1> ; If any number of characters match, use the type. 2195 <1> ; If an additional "S" is found in front of a valid 2196 <1> ; type, the type is set to signed. (Word and byte 2197 <1> ; types are sign-extended to a dword value.) 2198 <1> ; 2199 <1> ; Each odd entry is an alternative name for the even 2200 <1> ; entry preceding it. 2201 <1> types: 2202 000081E8 0442595445 <1> countedb "BYTE" ; ("B" is hexadecimal) 2203 000081ED 0443484152 <1> countedb "CHAR" ; ("C" is hexadecimal) 2204 000081F2 04574F5244 <1> countedb "WORD" 2205 000081F7 0553484F5254 <1> countedb "SHORT" 2206 000081FD 053342595445 <1> countedb "3BYTE" ; ("3" and "3B" are numeric) 2207 00008203 053342595445 <1> countedb "3BYTE" 2208 00008209 0544574F5244 <1> countedb "DWORD" ; ("D" is hexadecimal) 2209 0000820F 044C4F4E47 <1> countedb "LONG" 2210 <1> .addresses: 2211 00008214 07504F494E544552 <1> countedb "POINTER" 2212 0000821C 03505452 <1> countedb "PTR" 2213 00008220 064F4646534554 <1> countedb "OFFSET" 2214 00008227 034F4653 <1> countedb "OFS" 2215 0000822B 075345474D454E54 <1> countedb "SEGMENT" 2216 <1> .end: 2217 <1> 2218 <1> maxtypesize equ 7 ; size of "SEGMENT" and "POINTER" 1264 1265 msg_end: 1266 1267 numdef SHOWMSGSIZE, _DEFAULTSHOWSIZE 1268 %if _SHOWMSGSIZE 1269 %assign MSGSIZE msg_end - msg_start 1270 %warning msg holds MSGSIZE bytes 1271 %endif 1272 1273 1274 usesection lDEBUG_DATA_ENTRY 1275 ; INP: word [cs:ip] = near address to jump to in other segment 1276 ..@symhint_trace_caller_entry_to_code_seg: 1277 entry_to_code_seg: 1278 00008233 50 push ax ; word space for ?jumpaddress_ip, is ax 1279 00008234 2EA1[0001] mov ax, word [cs:code_seg] 1280 %if _PM 1281 jmp entry_to_code_common 1282 1283 ..@symhint_trace_caller_entry_to_code_sel: 1284 entry_to_code_sel: 1285 push ax 1286 mov ax, word [cs:code_sel] 1287 %endif 1288 1289 entry_to_code_common: 1290 lframe 0 1291 lpar word, jumpaddress_cs_and_orig_ip 1292 lpar word, jumpaddress_ip 1293 00008238 5589E5 lenter 1294 1295 0000823B 56 push si 1296 0000823C 9C pushf 1297 0000823D FC cld 1298 1299 0000823E 874604 xchg word [bp + ?jumpaddress_cs_and_orig_ip], ax ; fill function segment 1300 00008241 89C6 mov si, ax 1301 00008243 2EAD cs lodsw 1302 %if _DEBUG 1303 00008245 3CCC cmp al, 0CCh ; debugger breakpoint ? 1304 00008247 750C jne @F ; no --> 1305 00008249 CC int3 ; break to make it remove the breakpoint 1306 0000824A 4E dec si 1307 0000824B 4E dec si 1308 0000824C 2EAD cs lodsw ; reload the word 1309 0000824E 3CCC cmp al, 0CCh 1310 00008250 7503 jne @F 1311 1312 .l: 1313 00008252 CC int3 1314 00008253 EBFD jmp .l 1315 1316 @@: 1317 %endif 1318 00008255 874602 xchg word [bp + ?jumpaddress_ip], ax ; fill function offset 1319 ; (and restore ax) 1320 1321 00008258 9D popf 1322 00008259 5E pop si 1323 1324 0000825A 5D lleave 1325 0000825B CB retf ; jump to dword [bp + ?jumpaddress] 1326 1327 1328 1329 ; debug22 - Interrupt 22h handler 1330 ; 1331 ; This is for DEBUG itself: it's a catch-all for the various Int23 1332 ; and Int24 calls that may occur unpredictably at any time. What we 1333 ; do is pretend to be a command interpreter (which we are, in a sense, 1334 ; just with different sort of commands) by setting our parent PSP 1335 ; value equal to our own PSP so that DOS does not free our memory when 1336 ; we quit. Therefore control ends up here when DOS detects Control-C 1337 ; or an Abort in the critical error prompt is selected. 1338 debug22: 1339 0000825C FA cli 1340 .cleartraceflag: 1341 0000825D FC cld ; reestablish things 1342 0000825E 8CC8 mov ax, cs 1343 00008260 8ED8 mov ds, ax 1344 00008262 8ED0 mov ss, ax 1345 00008264 8B26[CC0A] mov sp, word [ savesp ] ; restore stack 1346 %if _PM 1347 clropt [internalflags], protectedmode ; reset PM flag 1348 %endif 1349 00008268 90 times 1 - (($ - $$) & 1) nop ; align in-code parameter 1350 00008269 E8C7FF call entry_to_code_seg 1351 0000826C [CF03] dw cmd2_reset_re_maybe_pm 1352 1353 1354 usesection lDEBUG_CODE 1355 1356 %if $ - $$ 1357 %error cmd3 is not at offset 0 in lDEBUG_CODE 1358 %endif 1359 1360 code_insure_low_byte_not_0CCh 1361 ; Begin main command loop. 1362 cmd3: 1363 00000000 16 push ss 1364 00000001 1F pop ds 1365 00000002 66 _386_o32 ; mov esp 1366 00000003 8B26[CC0A] mov sp, word [ savesp ] ; restore stack 1367 00000007 83E4FC _386 and sp, ~3 ; align stack 1368 0000000A 66 _386_o32 1369 0000000B 31C0 xor ax, ax 1370 0000000D 66 _386_o32 1371 0000000E 50 push ax 1372 0000000F 66 _386_o32 1373 00000010 9D popf 1374 00000011 8B26[CC0A] _386 mov sp, word [ savesp ] ; restore stack 1375 00000015 FC cld 1376 00000016 FB sti 1377 00000017 C706[D20A][0000] mov word [ errret ], cmd3 1378 0000001D C706[D40A][DB98] mov word [ throwret ], errhandler 1379 00000023 8926[D60A] mov word [ throwsp ], sp 1380 %if _SYMBOLIC 1381 mov word [ stack_low_address ], str_buffer 1382 %endif 1383 00000027 31C0 xor ax, ax 1384 00000029 8706[280A] xchg ax, word [cmd3_set_options] 1385 0000002D 0906[9400] or word [options], ax 1386 1387 00000031 1E push ds 1388 00000032 07 pop es 1389 1390 %if _SYMBOLIC 1391 clropt [internalflags2], dif2_xms_detection_done 1392 call zz_save_strat 1393 %endif 1394 1395 00000033 31FF xor di, di 1396 00000035 873E[080C] xchg di, word [terminator_in_line_in.offset] 1397 00000039 85FF test di, di 1398 0000003B 7409 jz @F 1399 0000003D 803D00 cmp byte [di], 0 1400 00000040 7504 jne @F 1401 00000042 A0[0A0C] mov al, byte [terminator_in_line_in.value] 1402 00000045 AA stosb 1403 @@: 1404 1405 00000046 8026[CD00]DF clropt [internalflags3], dif3_unquiet_error 1406 0000004B 8026[CE00]FD clropt [internalflags3], dif3_do_not_highlight 1407 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 1408 00000050 8026[CF00]E7 clropt [internalflags3], dif3_auxbuff_guarded_1 | dif3_in_if 1409 %else 1410 clropt [internalflags3], dif3_auxbuff_guarded_1 1411 %endif 1412 00000055 8026[CC00]CF clropt [internalflags3], dif3_input_serial_override | dif3_input_terminal_override 1414 0000005A 8026[CB00]EF clropt [internalflags2], dif2_in_silence_dump 1415 %if _PM 1416 call resetmode 1417 %endif 1418 1419 1420 %if _DEBUG && _DEBUG_COND 1421 cmd3_debug_mode_init: 1422 0000005F F606[A900]01 testopt [options6], opt6_debug_mode 1423 00000064 7411 jz .check_disable 1424 .check_enable: 1425 00000066 F606[D900]01 testopt [internalflags6], dif6_debug_mode 1426 0000006B 7519 jnz .done 1427 0000006D E8933F call reset_interrupts 1428 00000070 800E[D900]01 setopt [internalflags6], dif6_debug_mode 1429 00000075 EB0F jmp .done 1430 1431 .check_disable: 1432 00000077 F606[D900]01 testopt [internalflags6], dif6_debug_mode 1433 0000007C 7408 jz .done 1434 0000007E E8463E call set_interrupts 1435 00000081 8026[D900]FE clropt [internalflags6], dif6_debug_mode 1436 .done: 1437 %endif 1438 1439 1440 %if _PM 1441 cmd3_int2F_init: 1442 mov al, 2Fh ; interrupt number 1443 mov si, debug2F ; -> IISP entry header 1444 1445 testopt [options4], opt4_int_2F_hook 1446 jnz .done 1447 .check_disable: 1448 testopt [internalflags4], dif4_int_2F_hooked 1449 jz .done 1450 1451 mov dx, opt4_int_2F_force >> 16 1452 call UnhookInterruptForce 1453 jc .done 1454 1455 clropt [internalflags], hooked2F 1456 clropt [internalflags4], dif4_int_2F_hooked 1457 call update_inttab_optional 1458 1459 .done: 1460 %endif 1461 1462 1463 %if _CATCHINT08 1464 cmd3_int08_init: 1465 00000086 B008 mov al, 08h ; interrupt number 1466 00000088 BE[B686] mov si, intr8 ; -> IISP entry header 1467 1468 0000008B F606[A000]04 testopt [options4], opt4_int_08_hook 1469 00000090 7414 jz .check_disable 1470 .check_enable: 1471 00000092 F606[D000]04 testopt [internalflags4], dif4_int_08_hooked 1472 00000097 7524 jnz .done 1473 1474 00000099 E8A4C3 call install_86m_interrupt_handler 1475 0000009C 800E[D000]04 setopt [internalflags4], dif4_int_08_hooked 1476 000000A1 E8A2C5 call update_inttab_optional 1477 000000A4 EB17 jmp .done 1478 1479 .check_disable: 1480 000000A6 F606[D000]04 testopt [internalflags4], dif4_int_08_hooked 1481 000000AB 7410 jz .done 1482 1483 000000AD BA0400 mov dx, opt4_int_08_force >> 16 1484 000000B0 E88EC4 call UnhookInterruptForce 1485 000000B3 7208 jc .done 1486 1487 000000B5 8026[D000]FB clropt [internalflags4], dif4_int_08_hooked 1488 000000BA E889C5 call update_inttab_optional 1489 1490 .done: 1491 %endif 1492 1493 1494 %if _CATCHINT2D 1495 cmd3_int2D_init: 1496 000000BD B02D mov al, 2Dh ; interrupt number 1497 000000BF BE[B682] mov si, int2D ; -> IISP entry header 1498 1499 000000C2 F606[A000]08 testopt [options4], opt4_int_2D_hook 1500 000000C7 7448 jz .check_disable 1501 .check_enable: 1502 000000C9 F606[D000]08 testopt [internalflags4], dif4_int_2D_hooked 1503 000000CE 7555 jnz .done 1504 1505 000000D0 E8C3C3 call intchk ; ZR if offset = -1 or segment = 0 1506 ; CHG: ax, dx, bx 1507 000000D3 742F jz .fail 1508 1509 000000D5 8A26[B382] mov ah, byte [try_amis_multiplex_number] 1510 000000D9 B000 mov al, 00h 1511 ; function 0 changes dx, di, cx, al 1512 %if _PM 1513 call call_int2D 1514 %else 1515 000000DB CD2D int 2Dh ; enquire whether there's anyone 1516 %endif 1517 000000DD 84C0 test al, al 1518 000000DF 7413 jz .got 1519 1520 000000E1 31C0 xor ax, ax ; start with multiplex number 0 1521 .loopplex: 1522 000000E3 B000 mov al, 00h ; AMIS installation check 1523 ; function 0 changes dx, di, cx, al 1524 %if _PM 1525 call call_int2D 1526 %else 1527 000000E5 CD2D int 2Dh ; enquire whether there's anyone 1528 %endif 1529 000000E7 84C0 test al, al ; free ? 1530 000000E9 7409 jz .got ; yes, put it to use --> 1531 000000EB FEC4 inc ah 1532 000000ED 75F4 jnz .loopplex ; try next multiplexer --> 1533 1534 000000EF BA[8D6C] mov dx, msg.cannot_hook_2D.nofree 1535 000000F2 EB13 jmp .fail_putsz 1536 1537 .got: 1538 000000F4 8826[CA82] mov byte [amis_multiplex_number], ah 1539 1540 000000F8 B02D mov al, 2Dh ; interrupt number 1541 000000FA E843C3 call install_86m_interrupt_handler 1542 000000FD 800E[D000]08 setopt [internalflags4], dif4_int_2D_hooked 1543 00000102 EB21 jmp .done 1544 1545 .fail: 1546 00000104 BA[4F6C] mov dx, msg.cannot_hook_2D.invalid 1547 .fail_putsz: 1548 00000107 E8F6B0 call putsz 1549 0000010A 8026[A000]F7 clropt [options4], opt4_int_2D_hook 1550 0000010F EB14 jmp .done 1551 1552 .check_disable: 1553 00000111 F606[D000]08 testopt [internalflags4], dif4_int_2D_hooked 1554 00000116 740D jz .done 1555 1556 00000118 BA0800 mov dx, opt4_int_2D_force >> 16 1557 0000011B E823C4 call UnhookInterruptForce 1558 0000011E 7205 jc .done 1559 1560 00000120 8026[D000]F7 clropt [internalflags4], dif4_int_2D_hooked 1561 1562 .done: 1563 %endif 1564 1565 1566 00000125 F606[CF00]01 testopt [internalflags3], dif3_input_re 1567 0000012A 7403E94201 jnz cmd3_continue_1_re 1568 0000012F 8026[9900]7F clropt [options2], opt2_re_cancel_tpg 1569 00000134 E809B0 call silence_dump 1570 1571 1572 cmd3_serial_init: 1573 00000137 F606[9500]40 testopt [options], enable_serial 1574 0000013C 7503E9E800 jz .check_disable_serial 1575 .check_enable_serial: 1576 00000141 F606[E50B]01 testopt [serial_flags], sf_init_done 1577 00000146 7403E92001 jnz .done_serial 1578 .enable_serial: 1579 1580 0000014B A0[E60B] mov al, byte [serial_var_intnum] 1581 0000014E A2[C208] mov byte [serial_use_intnum], al 1582 00000151 A0[E70B] mov al, byte [serial_var_params] 1583 00000154 A2[C308] mov byte [serial_use_params], al 1584 00000157 A0[E80B] mov al, byte [serial_var_fifo] 1585 0000015A A2[C408] mov byte [serial_use_fifo], al 1586 0000015D A1[EA0B] mov ax, word [serial_var_baseport] 1587 00000160 A3[C608] mov word [serial_use_baseport], ax 1588 00000163 A1[EC0B] mov ax, word [serial_var_dl] 1589 00000166 A3[C808] mov word [serial_use_dl], ax 1590 00000169 A1[EE0B] mov ax, word [serial_var_irqmask] 1591 0000016C A3[CA08] mov word [serial_use_irqmask], ax 1592 0000016F E815C1 call serial_clear_fifos 1593 00000172 E8DBC0 call serial_install_interrupt_handler 1594 00000175 7317 jnc @F 1595 00000177 BF[2F6D] mov di, msg.serial_cannot_hook.old_int 1596 0000017A A0[120C] mov al, byte [serial_installed_intnum] 1597 0000017D E8D4AC call hexbyte 1598 00000180 BF[196D] mov di, msg.serial_cannot_hook.new_int 1599 00000183 A0[C208] mov al, byte [serial_use_intnum] 1600 00000186 E8CBAC call hexbyte 1601 00000189 BA[F96C] mov dx, msg.serial_cannot_hook 1602 0000018C EB51 jmp .no_keep 1603 1604 @@: 1605 0000018E C606[B496]80 mov byte [serial_interrupt_handler + ieEOI], 80h 1606 00000193 E804C1 call serial_init_UART 1607 1608 00000196 800E[E50B]01 setopt [serial_flags], sf_init_done 1609 1610 0000019B BA[786B] mov dx, msg.serial_request_keep 1611 0000019E E85FB0 call putsz 1612 1613 000001A1 BF[AE07] mov di, line_out 1614 %if _DEBUG 1615 %if _DEBUG_COND 1616 000001A4 F606[D900]01 testopt [internalflags6], dif6_debug_mode 1617 000001A9 7403 jz @F 1618 %endif 1619 000001AB B07E mov al, '~' ; indicate instance is to be debugged 1620 000001AD AA stosb 1621 @@: 1622 %endif 1623 000001AE B83D20 mov ax, "= " 1624 000001B1 AB stosw 1625 1626 000001B2 31C0 xor ax, ax 1627 000001B4 A3[FA0B] mov word [getline_timer_count], ax 1628 000001B7 A3[FC0B] mov word [getline_timer_last], ax 1629 000001BA C706[FE0B][EA01] mov word [getline_timer_func], .timer 1630 1631 ; if we're executing from the command line 1632 ; buffer or a Y file then we want to 1633 ; override input to be from serial for the 1634 ; KEEP confirmation prompt. 1635 ; output is always to serial if we're here. 1636 000001C0 800E[CC00]20 setopt [internalflags3], dif3_input_serial_override 1637 000001C5 E88EB3 call getline00 1638 000001C8 8026[CC00]DF clropt [internalflags3], dif3_input_serial_override 1639 1640 000001CD E8A4AB call skipcomm0 1641 000001D0 4E dec si 1642 000001D1 BA[4A6C] mov dx, msg.keep 1643 000001D4 E817AB call isstring? 1644 000001D7 7503E98F00 je .done_serial 1645 1646 000001DC BA[156C] mov dx, msg.serial_no_keep_enter 1647 .no_keep: 1648 000001DF 8026[9500]BF clropt [options], enable_serial 1649 000001E4 E819B0 call putsz 1650 000001E7 E916FE jmp cmd3 1651 1652 1653 .timer: 1654 000001EA 50 push ax 1655 000001EB 52 push dx 1656 000001EC 51 push cx 1657 000001ED 06 push es 1658 1659 000001EE BA4000 mov dx, 40h 1660 000001F1 8EC2 mov es, dx 1661 1662 000001F3 8B0E[FA0B] mov cx, word [getline_timer_count] 1663 000001F7 8B16[FC0B] mov dx, word [getline_timer_last] 1664 1665 000001FB 263B166C00 cmp dx, word [es:6Ch] 1666 00000200 741A je .timer_next 1667 00000202 268B166C00 mov dx, word [es:6Ch] 1668 00000207 41 inc cx 1669 00000208 B012 mov al, 18 1670 0000020A F626[E30B] mul byte [serial_keep_timeout] 1671 0000020E 85C0 test ax, ax 1672 00000210 740A jz .timer_next 1673 00000212 39C1 cmp cx, ax 1674 00000214 7206 jb .timer_next 1675 1676 00000216 07 pop es 1677 00000217 BA[C86B] mov dx, msg.serial_no_keep_timer 1678 0000021A EBC3 jmp .no_keep 1679 1680 .timer_next: 1681 0000021C 890E[FA0B] mov word [getline_timer_count], cx 1682 00000220 8916[FC0B] mov word [getline_timer_last], dx 1683 00000224 07 pop es 1684 00000225 59 pop cx 1685 00000226 5A pop dx 1686 00000227 58 pop ax 1687 00000228 C3 retn 1688 1689 1690 .check_disable_serial: 1691 ; If serial is initialised, uninstall it. 1692 00000229 F606[E50B]01 testopt [serial_flags], sf_init_done 1693 0000022E 751D jnz .disable_serial 1694 ; Not initialised. Is the interrupt still hooked? 1695 00000230 F606[D000]01 testopt [internalflags4], dif4_int_serial_hooked 1696 00000235 7434 jz .done_serial 1697 ; Try unhooking the interrupt handler. 1698 00000237 E874C1 call serial_uninstall_interrupt_handler 1699 0000023A 722F jc .done_serial ; if it failed again --> 1700 0000023C BF[646D] mov di, msg.serial_late_unhook.int 1701 0000023F A0[120C] mov al, byte [serial_installed_intnum] 1702 00000242 E80FAC call hexbyte 1703 00000245 BA[436D] mov dx, msg.serial_late_unhook 1704 00000248 E8B5AF call putsz 1705 0000024B EB1E jmp .done_serial 1706 1707 .disable_serial: 1708 1709 0000024D E813C1 call serial_clean_up 1710 00000250 7314 jnc @F 1711 00000252 BF[F26C] mov di, msg.serial_cannot_unhook.int 1712 00000255 A0[120C] mov al, byte [serial_installed_intnum] 1713 00000258 E8F9AB call hexbyte 1714 0000025B BA[CE6C] mov dx, msg.serial_cannot_unhook 1715 0000025E E89FAF call putsz 1716 00000261 C606[B496]00 mov byte [serial_interrupt_handler + ieEOI], 0 1717 ; we do not issue EOI any longer 1718 @@: 1719 00000266 8026[E50B]FE clropt [serial_flags], sf_init_done 1720 .done_serial: 1721 1722 1723 %if _VXCHG 1724 cmd3_vv_set: 1725 0000026B E8D397 call vv_set 1726 %endif 1727 1728 1729 %if _PM 1730 cmd3_ss_init: 1731 call ispm 1732 jnz .done 1733 1734 subcpu 286 1735 mov bx, ss 1736 lar cx, bx 1737 jnz .done 1738 shr cx, 8 1739 1740 testopt [options3], opt3_ss_b_bit_set 1741 jz .check_clear 1742 .check_set: 1743 testopt [internalflags3], dif3_ss_b_bit_set 1744 jnz .done 1745 1746 mov ch, 40h 1747 jmp @F 1748 1749 .check_clear: 1750 testopt [internalflags3], dif3_ss_b_bit_set 1751 jz .done 1752 1753 @@: 1754 mov ax, 0009h 1755 int 31h 1756 jc .done 1757 1758 xoropt [internalflags3], dif3_ss_b_bit_set 1759 subcpureset 1760 1761 .done: 1762 %endif 1763 1764 1765 %if _PM 1766 call ispm 1767 jz @F 1768 %endif 1769 0000026E E83BC4 call ensuredebuggeeloaded ; if no task is active, create a dummy one 1770 %if _PM && 0 1771 jmp @FF 1772 @@: 1773 testopt [internalflags], attachedterm 1774 jz @F 1775 mov dx, .message 1776 call putsz 1777 1778 usesection lDEBUG_DATA_ENTRY 1779 .message: ascizline "Attached term is set in PM!" 1780 usesection lDEBUG_CODE 1781 %endif 1782 @@: 1783 1784 1785 cmd3_continue_1_re: 1786 00000271 BF[AE07] mov di, line_out ; build prompt 1787 %if _DEBUG 1788 %if _DEBUG_COND 1789 00000274 F606[D900]01 testopt [internalflags6], dif6_debug_mode 1790 00000279 7403 jz @F 1791 %endif 1792 0000027B B07E mov al, '~' ; indicate instance is to be debugged 1793 0000027D AA stosb 1794 @@: 1795 %endif 1796 %if _INDOS_PROMPT 1797 0000027E E81C99 call InDos 1798 00000281 740F jz @F 1799 %if _BOOTLDR 1800 00000283 F606[C500]40 testopt [internalflags], nodosloaded 1801 ; boot mode ? 1802 %if _INDOS_PROMPT_NOBOOT 1803 00000288 7508 jnz @F ; yes, do not show special prompt --> 1804 %elif _INDOS_PROMPT_NOFLAG 1805 jnz .indos_prompt ; yes, show special prompt --> 1806 ; (do not call .real_indos check) 1807 %endif 1808 %endif 1809 %if _INDOS_PROMPT_NOFLAG 1810 0000028A E81E99 call InDos.real_indos ; real InDOS set ? 1811 0000028D 7403 jz @F ; no, do not show special prompt --> 1812 %endif 1813 .indos_prompt: 1814 0000028F B021 mov al, '!' 1815 00000291 AA stosb 1816 @@: 1817 %endif 1818 00000292 B02D mov al, '-' ; main prompt 1819 %if _PM 1820 call ispm 1821 jnz .realmode 1822 mov al, '#' ; PM main prompt 1823 .realmode: 1824 %endif 1825 00000294 F606[CD00]01 testopt [internalflags3], dif3_input_cmdline 1826 00000299 7402 jz @F 1827 0000029B B026 mov al, '&' 1828 @@: 1829 0000029D F606[CF00]01 testopt [internalflags3], dif3_input_re 1830 000002A2 7402 jz @F 1831 000002A4 B025 mov al, '%' 1832 @@: 1833 000002A6 AA stosb 1834 1835 000002A7 C606[A896]00 mov byte [hhflag], 0 1836 000002AC 8326[A496]00 and word [hh_depth], 0 1837 000002B1 8326[A696]00 and word [hh_depth_of_single_term], 0 1838 000002B6 C706[FE0B][4A04] mov word [getline_timer_func], dmycmd 1839 000002BC 8026[C600]FE clropt [internalflags], usecharcounter ; reset this automatically 1840 1841 000002C1 F606[CF00]01 testopt [internalflags3], dif3_input_re 1842 000002C6 7515 jnz cmd3_continue_2_re 1843 1844 000002C8 800E[C400]08 setopt [internalflags], pagedcommand ; 2009-02-21: default to page all commands 1845 000002CD 8026[C700]CF clropt [internalflags], tt_silence | tt_silent_mode 1846 ; reset, in case it's still set 1847 000002D2 8126[C800]3FF7 clropt [internalflags2], dif2_tpg_proceed_bp_set | dif2_bp_failure | dif2_tpg_keep_proceed_bp, 1 1849 %if _INPUT_FILE_HANDLES 1850 000002D8 8026[CA00]DF clropt [internalflags2], dif2_closed_input_file 1851 %endif 1852 1853 cmd3_continue_2_re: 1854 000002DD E87A02 call determine_quiet_output 1855 1856 000002E0 31C9 xor cx, cx 1857 000002E2 870E[360B] xchg cx, word [rc] ; reset rc 1858 000002E6 890E[380B] mov word [priorrc], cx ; make prior value available 1859 000002EA E304 jcxz @F 1860 000002EC 890E[3A0B] mov word [erc], cx ; update to last non-zero value 1861 @@: 1862 1863 cmd3_check_relimit: 1864 000002F0 F606[CF00]01 testopt [internalflags3], dif3_input_re 1865 000002F5 7422 jz cmd3_continue_not_re 1866 1867 000002F7 8306[180A]01 add word [re_count], 1 1868 000002FC 8316[1A0A]00 adc word [re_count + 2], 0 1869 00000301 8B16[1E0A] mov dx, word [re_limit + 2] 1870 00000305 A1[1C0A] mov ax, word [re_limit] 1871 00000308 3916[1A0A] cmp word [re_count + 2], dx 1872 0000030C 7504 jne @F 1873 0000030E 3906[180A] cmp word [re_count], ax 1874 @@: 1875 ; This branch bypasses cmd3_check_rclimit 1876 ; because RE buffer commands should not 1877 ; count towards the RC limit. 1878 00000312 7653 jbe cmd3_continue_relimit_not_reached 1879 1880 00000314 BA[586A] mov dx, msg.re_limit_reached 1881 00000317 EB3A jmp cmd3_check_common 1882 1883 cmd3_continue_not_re: 1884 1885 cmd3_check_rclimit: 1886 1887 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 1888 ; If executing from a script file then 1889 ; command doesn't count for RC limit. 1890 %if _INPUT_FILE_BOOT 1891 00000319 F606[CB00]02 testopt [internalflags2], dif2_input_file_boot 1892 0000031E 7547 jnz .file 1893 %endif 1894 %if _INPUT_FILE_HANDLES 1895 00000320 E87A98 call InDos 1896 00000323 7507 jnz .file_not 1897 00000325 F606[CA00]10 testopt [internalflags2], dif2_input_file 1898 0000032A 753B jnz .file 1899 %endif 1900 .file_not: 1901 1902 .file: equ cmd3_continue_rclimit_not_reached 1903 %endif 1904 1905 0000032C F606[CD00]01 testopt [internalflags3], dif3_input_cmdline 1906 00000331 7434 jz cmd3_continue_not_rc 1907 1908 00000333 8306[200A]01 add word [rc_count], 1 1909 00000338 8316[220A]00 adc word [rc_count + 2], 0 1910 0000033D 8B16[260A] mov dx, word [rc_limit + 2] 1911 00000341 A1[240A] mov ax, word [rc_limit] 1912 00000344 3916[220A] cmp word [rc_count + 2], dx 1913 00000348 7504 jne @F 1914 0000034A 3906[200A] cmp word [rc_count], ax 1915 @@: 1916 0000034E 7617 jbe cmd3_continue_rclimit_not_reached 1917 1918 00000350 BA[836A] mov dx, msg.rc_limit_reached 1919 cmd3_check_common: 1920 00000353 E8A4AE call putsz_error 1921 00000356 B80401 mov ax, 0104h 1922 00000359 E8A795 call setrc 1923 0000035C 800E[CD00]04 setopt [internalflags3], dif3_at_line_end 1924 00000361 E840B4 call getline_close_file 1925 00000364 E999FC jmp cmd3 1926 1927 cmd3_continue_not_rc: 1928 cmd3_continue_rclimit_not_reached: 1929 cmd3_continue_relimit_not_reached: 1930 1931 cmd3_check_line_out_overflow: 1932 00000367 813E[B608]4226 cmp word [line_out_overflow], 2642h 1933 0000036D 740C je @F 1934 0000036F C706[B608]4226 mov word [line_out_overflow], 2642h 1935 00000375 BA[6B6D] mov dx, msg.line_out_overflow 1936 00000378 E87FAE call putsz_error 1937 @@: 1938 1939 cmd3_getline: 1940 0000037B E8D8B1 call getline00 ; prompted input, also resets linecounter 1941 1942 0000037E E8D0A9 call iseol?.notsemicolon 1943 00000381 7518 jne cmd3_notblank 1944 00000383 F606[9F00]10 testopt [options3], opt3_disable_autorepeat 1945 00000388 7508 jnz @F 1946 0000038A 8B16[D20B] mov dx, word [lastcmd] 1947 0000038E 8804 mov byte [si], al 1948 00000390 EB35 jmp short cmd4 1949 1950 @@: 1951 00000392 C706[D20B][4A04] mov word [lastcmd], dmycmd 1952 00000398 E965FC jmp cmd3 1953 1954 cmd3_notblank: 1955 0000039B C706[D20B][4A04] mov word [lastcmd], dmycmd 1956 000003A1 3C3B cmp al, ';' 1957 000003A3 7427 je cmd3_j1 ; if comment --> 1958 000003A5 3C3A cmp al, ':' 1959 000003A7 7423 je cmd3_j1 ; if jump label --> 1960 000003A9 3C3F cmp al, '?' 1961 000003AB 7503E99B00 je help ; if request for help --> 1962 000003B0 E8077E call uppercase 1963 000003B3 2C41 sub al, 'A' 1964 %if _SYMBOLIC 1965 cmp al, 'Z' - 'A' 1966 ja error ; if not recognised --> 1967 je @F ; if Z, do not commit --> 1968 call zz_commit_insert ; if not Z, commit now 1969 @@: 1970 %else 1971 000003B5 3C18 cmp al, 'Y' - 'A' 1972 000003B7 7603E90095 ja error ; if not recognised --> 1973 %endif 1974 000003BC 98 cbw 1975 000003BD 93 xchg bx, ax 1976 000003BE E8B2A9 call skipcomma 1977 000003C1 D1E3 shl bx, 1 1978 000003C3 8B97[6200] mov dx, word [ cmdlist+bx ] 1979 cmd4: 1980 000003C7 BF[AE07] mov di, line_out 1981 000003CA FFD2 call dx 1982 cmd3_j1: 1983 000003CC E931FC jmp cmd3 ; back to the top 1984 1985 1986 code_insure_low_byte_not_0CCh 1987 cmd2_reset_re_maybe_pm: 1988 1989 000003CF 66 _386_o32 ; mov esp 1990 000003D0 8B26[CC0A] mov sp, word [ savesp ] ; restore stack 1991 000003D4 83E4FC _386 and sp, ~3 ; align stack 1992 000003D7 66 _386_o32 1993 000003D8 31C0 xor ax, ax 1994 000003DA 66 _386_o32 1995 000003DB 50 push ax 1996 000003DC 66 _386_o32 1997 000003DD 9D popf 1998 000003DE 8B26[CC0A] _386 mov sp, word [ savesp ] ; restore stack 1999 000003E2 FC cld 2000 000003E3 FB sti 2001 2002 %if _PM 2003 call handle_mode_changed 2004 %endif 2005 2006 code_insure_low_byte_not_0CCh 2007 cmd2_reset_re: 2008 000003E4 8B1E[F60B] mov bx, word [io_levels] 2009 .entry_bx_levels: 2010 000003E8 31C9 xor cx, cx 2011 .entry_bx_levels_cx_cmdline: 2012 000003EA 31D2 xor dx, dx 2013 %if _INPUT_FILE_HANDLES 2014 000003EC F606[CA00]10 testopt [internalflags2], dif2_input_file 2015 000003F1 7405 jz @F 2016 000003F3 030E[B80A] add cx, word [input_file_handles.active] 2017 000003F7 41 inc cx 2018 @@: 2019 %endif 2020 %if _INPUT_FILE_BOOT 2021 000003F8 F606[CB00]02 testopt [internalflags2], dif2_input_file_boot 2022 000003FD 7405 jz @F 2023 000003FF 030E[308F] add cx, word [load_input_file.active] 2024 00000403 41 inc cx 2025 @@: 2026 %endif 2027 00000404 F606[CF00]01 testopt [internalflags3], dif3_input_re 2028 00000409 740D jz @F 2029 0000040B 41 inc cx 2030 0000040C 42 inc dx 2031 ; Flag: If we abort anything (effective IOL >= 1) 2032 ; then we need to cancel RE buffer execution. 2033 ; This is so because RE execution is always the 2034 ; topmost command source, taking precedence over 2035 ; yy as well as RC buffer execution. 2036 0000040D F606[F80B]01 testopt [io_flags], iof_extra_iol_for_tpg_re 2037 00000412 7404 jz @F 2038 00000414 43 inc bx 2039 00000415 7501 jnz @F 2040 00000417 4B dec bx 2041 @@: 2042 00000418 F606[CD00]01 testopt [internalflags3], dif3_input_cmdline 2043 0000041D 740C jz @F 2044 0000041F 41 inc cx 2045 00000420 F606[F80B]02 testopt [io_flags], iof_extra_iol_for_rc 2046 00000425 7404 jz @F 2047 00000427 43 inc bx 2048 00000428 7501 jnz @F 2049 0000042A 4B dec bx 2050 @@: 2051 0000042B 39D9 cmp cx, bx 2052 0000042D 7602 jbe @F 2053 0000042F 89D9 mov cx, bx 2054 @@: 2055 00000431 E399 jcxz cmd3_j1 ; IOL zero or nothing active --> 2056 00000433 1E push ds 2057 00000434 07 pop es 2058 @@: 2059 00000435 51 push cx 2060 00000436 52 push dx 2061 00000437 E8E0B3 call getline_close_file.resetstuff 2062 0000043A 5A pop dx 2063 0000043B 59 pop cx 2064 0000043C E2F7 loop @B 2065 0000043E 85D2 test dx, dx ; first cancelled was RE ? 2066 00000440 748A jz cmd3_j1 ; no, just proceed now --> 2067 00000442 800E[9900]80 setopt [options2], opt2_re_cancel_tpg 2068 ; set to cancel command 2069 00000447 E97820 jmp dumpregs_extended.exit ; clean up RE state 2070 2071 2072 dmycmd: 2073 0000044A C3 retn 2074 2075 help: 2076 0000044B E825A9 call skipcomma 2077 0000044E E8697D call uppercase 2078 %if _EXTHELP 2079 %if _COND 2080 00000451 BA[CD31] mov dx, msg.condhelp 2081 00000454 3C43 cmp al, 'C' 2082 00000456 747B je .spec 2083 %endif 2084 %if _OPTIONS 2085 00000458 3C4F cmp al, 'O' 2086 0000045A 7503E99000 je .options ; option help --> 2087 %endif 2088 %if _EXPRESSIONS 2089 0000045F BA[9D34] mov dx, msg.expressionhelp 2090 00000462 3C45 cmp al, 'E' 2091 00000464 746D je .spec 2092 %endif 2093 %endif 2094 %if _EMS 2095 00000466 BA[EF5D] mov dx, msg.xhelp 2096 00000469 3C58 cmp al, 'X' 2097 0000046B 7466 je .spec 2098 %endif 2099 0000046D 4E dec si 2100 %if _BOOTLDR && _EXTHELP 2101 0000046E BA[6C63] mov dx, msg.boot 2102 00000471 E87AA8 call isstring? 2103 00000474 BA[2A52] mov dx, msg.boothelp 2104 00000477 745A je .spec 2105 %endif 2106 %if _EXTHELP 2107 00000479 BA[A31A] mov dx, msg.source 2108 0000047C E86FA8 call isstring? 2109 0000047F BA[AA1A] mov dx, msg.help_source 2110 00000482 744F je .spec 2111 %endif 2112 00000484 BA[061C] mov dx, msg.re 2113 00000487 E864A8 call isstring? 2114 0000048A BA[091C] mov dx, msg.help_re 2115 0000048D 7444 je .spec 2116 0000048F BA[7221] mov dx, msg.run 2117 00000492 E859A8 call isstring? 2118 00000495 BA[7621] mov dx, msg.help_run 2119 00000498 7439 je .spec 2120 0000049A BA[7526] mov dx, msg.string_build 2121 0000049D E84EA8 call isstring? 2122 000004A0 BB[3825] mov bx, msg.build_array 2123 000004A3 B90500 mov cx, msg.build_short_amount 2124 000004A6 7438 je .spec_multi 2125 000004A8 AC lodsb 2126 000004A9 E80E7D call uppercase 2127 000004AC B90600 mov cx, msg.build_long_amount 2128 000004AF 3C42 cmp al, 'B' 2129 000004B1 742D je .spec_multi ; build info --> 2130 %if _EXTHELP 2131 000004B3 BA[892A] mov dx, msg.license 2132 000004B6 3C4C cmp al, 'L' 2133 000004B8 7419 je .spec ; licence --> 2134 000004BA BA[2E2F] mov dx, msg.flaghelp 2135 000004BD 3C46 cmp al, 'F' 2136 000004BF 7412 je .spec ; flag help --> 2137 000004C1 BA[5B2D] mov dx, msg.reghelp 2138 000004C4 3C52 cmp al, 'R' 2139 000004C6 740B je .spec ; register help --> 2140 %if _VARIABLES || _OPTIONS || _PSPVARIABLES 2141 000004C8 BA[E04F] mov dx, msg.varhelp 2142 000004CB 3C56 cmp al, 'V' 2143 000004CD 7404 je .spec ; variable help --> 2144 %endif 2145 %endif 2146 000004CF BA[6C11] mov dx, msg.help ; default help 2147 000004D2 A8 db __TEST_IMM8 ; (skip lodsb) 2148 .spec: 2149 000004D3 AC lodsb 2150 000004D4 E88BA8 call chkeol 2151 prnquit: 2152 000004D7 E826AD call putsz ; print string 2153 cmd3_j1a: 2154 000004DA E9EFFE jmp cmd3_j1 ; done 2155 2156 000004DD E9DC93 errorj1:jmp error 2157 2158 help.spec_multi: 2159 000004E0 AC lodsb 2160 000004E1 E87EA8 call chkeol 2161 .loop: 2162 000004E4 8B17 mov dx, word [bx] 2163 000004E6 E817AD call putsz 2164 000004E9 43 inc bx 2165 000004EA 43 inc bx 2166 000004EB E2F7 loop .loop 2167 000004ED EBEB jmp short cmd3_j1a 2168 2169 %if _EXTHELP && _OPTIONS 2170 help.options: 2171 000004EF 89F3 mov bx, si 2172 000004F1 E8AEA8 call skipwhite 2173 000004F4 E856A8 call iseol? 2174 000004F7 743E je .all 2175 000004F9 E8BE7C call uppercase 2176 000004FC 3C41 cmp al, 'A' 2177 000004FE BA[594E] mov dx, msg.asmoptions_1 2178 00000501 7422 je .single 2179 00000503 3C49 cmp al, 'I' 2180 00000505 BA[C24A] mov dx, msg.flags_1 2181 00000508 741B je .single 2182 0000050A BF[5425] mov di, msg.options_scan 2183 0000050D B90600 mov cx, msg.options_scan_amount 2184 00000510 F2AE repne scasb 2185 00000512 7513 jne .pages 2186 00000514 81EF[5525] sub di, msg.options_scan + 1 2187 00000518 D1E7 shl di, 1 2188 0000051A 8BBD[4425] mov di, word [msg.options_array + di] 2189 0000051E 89FA mov dx, di 2190 00000520 803D00 cmp byte [di], 0 2191 00000523 74B8 je errorj1 2192 .single: 2193 00000525 EBAC jmp help.spec 2194 2195 .pages: 2196 00000527 8D77FF lea si, [bx - 1] 2197 0000052A BA[5A25] mov dx, msg.string_options 2198 0000052D E8BEA7 call isstring? 2199 00000530 75AB jne errorj1 2200 00000532 BA[6225] mov dx, msg.options_pages 2201 00000535 EBEE jmp .single 2202 2203 .all: 2204 00000537 BB[4425] mov bx, msg.options_array 2205 0000053A B90800 mov cx, msg.options_array_amount 2206 .loop: 2207 0000053D 8B3F mov di, word [bx] 2208 0000053F 8B17 mov dx, word [bx] 2209 00000541 E8BCAC call putsz 2210 00000544 43 inc bx 2211 00000545 43 inc bx 2212 00000546 803D00 cmp byte [di], 0 2213 00000549 740B je @F 2214 0000054B 83F901 cmp cx, 1 2215 0000054E 7406 je @F 2216 00000550 BA[0577] mov dx, crlf 2217 00000553 E8AAAC call putsz 2218 @@: 2219 00000556 E2E5 loop .loop 2220 00000558 EB80 jmp short cmd3_j1a 2221 %endif 2222 2223 determine_quiet_output: 2224 0000055A 8026[CD00]EF clropt [internalflags3], dif3_quiet_output 2225 2226 0000055F 57 push di 2227 00000560 50 push ax 2228 00000561 F606[CF00]01 testopt [internalflags3], dif3_input_re 2229 00000566 7549 jnz .notquiet 2230 2231 %if _INPUT_FILE_BOOT 2232 00000568 F606[CB00]02 testopt [internalflags2], dif2_input_file_boot 2233 0000056D 7412 jz @F 2234 0000056F B8A000 mov ax, LOAD_INPUT_FILE_SIZE 2235 00000572 52 push dx 2236 00000573 F726[308F] mul word [load_input_file.active] 2237 00000577 5A pop dx 2238 00000578 89C7 mov di, ax 2239 0000057A F685[D78C]80 testopt [load_input_file + di - LOADDATA3 + ldFATType], ifhfQuietOutput 2240 0000057F EB29 jmp .quiet_if_nz 2241 2242 @@: 2243 %endif 2244 %if _INPUT_FILE_HANDLES 2245 00000581 E81996 call InDos 2246 00000584 7518 jnz @F 2247 2248 00000586 F606[CA00]10 testopt [internalflags2], dif2_input_file 2249 0000058B 7411 jz @F 2250 0000058D 8B3E[B80A] mov di, word [input_file_handles.active] 2251 00000591 D1E7 shl di, 1 2252 00000593 D1E7 shl di, 1 2253 00000595 D1E7 shl di, 1 ; to qword array index 2254 %if INPUTFILEHANDLE_size != 8 2255 %error Unexpected structure size 2256 %endif 2257 00000597 F685[3B0A]80 testopt [input_file_handles + di + ifhFlags], ifhfQuietOutput 2258 0000059C EB0C jmp .quiet_if_nz 2259 2260 @@: 2261 %endif 2262 0000059E F606[CD00]01 testopt [internalflags3], dif3_input_cmdline 2263 000005A3 740C jz @F 2264 000005A5 F606[9700]80 testopt [options], opt_cmdline_quiet_output 2265 ; jmp .quiet_if_nz 2266 2267 .quiet_if_nz: 2268 000005AA 7405 jz @F 2269 .quiet: 2270 000005AC 800E[CD00]10 setopt [internalflags3], dif3_quiet_output 2271 .notquiet: 2272 @@: 2273 000005B1 58 pop ax 2274 000005B2 5F pop di 2275 000005B3 C3 retn 2276 2277 2278 guard_auxbuff: 2279 000005B4 F606[CF00]30 testopt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 2280 000005B9 7506 jnz @F 2281 000005BB 800E[CF00]10 setopt [internalflags3], dif3_auxbuff_guarded_1 2282 000005C0 C3 retn 2283 2284 @@: 2285 000005C1 B80101 mov ax, 0101h 2286 000005C4 E83C93 call setrc 2287 000005C7 BA[DD66] mov dx, msg.guard_auxbuff_error 2288 .putsz_error: 2289 000005CA E833AC call putsz 2290 000005CD E930FA jmp cmd3 2291 2292 2293 ; This is used to disallow commands 2294 ; while reading from the RE buffer. 2295 guard_re: 2296 000005D0 F606[CF00]01 testopt [internalflags3], dif3_input_re 2297 000005D5 7501 jnz @F 2298 000005D7 C3 retn 2299 2300 @@: 2301 000005D8 B80201 mov ax, 0102h 2302 000005DB E82593 call setrc 2303 000005DE BA[FF66] mov dx, msg.guard_re_error 2304 000005E1 EBE7 jmp guard_auxbuff.putsz_error 2305 2306 2307 ; This is used to disallow commands 2308 ; while reading from the RC buffer. 2309 guard_rc: 2310 000005E3 F606[CD00]01 testopt [internalflags3], dif3_input_cmdline 2311 000005E8 7501 jnz @F 2312 000005EA C3 retn 2313 2314 @@: 2315 000005EB B80201 mov ax, 0102h 2316 000005EE E81293 call setrc 2317 000005F1 BA[3C67] mov dx, msg.guard_rc_error 2318 000005F4 EBD4 jmp guard_auxbuff.putsz_error 2319 2320 2321 %include "amis.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug AMIS interface 5 <1> 6 <1> Copyright (C) 2008-2022 C. Masloch 7 <1> 8 <1> Usage of the works is permitted provided that this 9 <1> instrument is retained with the works, so that any entity 10 <1> that uses the works is notified of this instrument. 11 <1> 12 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 <1> 14 <1> %endif 15 <1> 16 <1> 17 <1> usesection lDEBUG_DATA_ENTRY 18 <1> 19 <1> align 2, db 0 20 0000826E 0000 <1> debuggerfunction: dw 0 21 <1> 22 <1> %if ! _CATCHINT2D 23 <1> align 2, db 0 24 <1> debuggeramissig: 25 <1> .ven: fill 8,32,db "ecm" ; vendor 26 <1> .prod: fill 8,32,db "lDebug" ; product 27 <1> db 0, 0 28 <1> 29 <1> try_debugger_amis_multiplex_number: 30 <1> db -1 31 <1> %else 32 <1> %if 0 33 <1> 34 <1> Supported Int2D functions: 35 <1> 36 <1> AMIS - Installation check 37 <1> INP: al = 00h 38 <1> OUT: al = 0FFh 39 <1> cx = Private version number (currently 0100h) 40 <1> dx:di-> signature: "ecm ", "lDebug " 41 <1> 42 <1> AMIS - Get private entry point - NOP: no private entry point 43 <1> INP: al = 01h 44 <1> OUT: al = 00h 45 <1> 46 <1> AMIS - Uninstall - NOP: can't uninstall 47 <1> INP: al = 02h 48 <1> OUT: al = 00h (not implemented) 49 <1> 50 <1> AMIS - Request pop-up - NOP: no pop-up 51 <1> INP: al = 03h 52 <1> OUT: al = 00h 53 <1> 54 <1> AMIS - Determine chained interrupts 55 <1> INP: al = 04h 56 <1> OUT: al = 04h 57 <1> dx:bx -> interrupt hook list (Int2D always.) 58 <1> 59 <1> AMIS - Get hotkeys - NOP: no hotkeys 60 <1> INP: al = 05h 61 <1> OUT: al = 00h 62 <1> 63 <1> AMIS - Get device driver information 64 <1> INP: al = 06h 65 <1> OUT: al = 00h if not device mode 66 <1> al = 01h to indicate one device, 67 <1> ah = device flags = 01h 68 <1> (01h set = installed from CONFIG.SYS, 69 <1> 02h clear = device is linked into DOS device chain, 70 <1> 04h clear = inreentrant device) 71 <1> dx:bx -> device header 72 <1> 73 <1> AMIS - Reserved for AMIS 74 <1> INP: al = 07h..0Fh 75 <1> OUT: al = 00h 76 <1> 77 <1> TSR - Reserved for TSR 78 <1> INP: al = 10h..2Fh 79 <1> OUT: al = 00h 80 <1> 81 <1> lDebug - Update IISP Header 82 <1> INP: al = 30h 83 <1> ds:si -> source IISP header (or pseudo header) 84 <1> es:di -> destination IISP header 85 <1> OUT: al = FFh to indicate suppported, 86 <1> si and di both incremented by 6 87 <1> destination's ieNext field updated from source 88 <1> al != FFh if not supported, 89 <1> si and di unchanged 90 <1> CHG: - 91 <1> REM: This function is intended to aid in debugging 92 <1> handler re-ordering, removal, or insertion. 93 <1> The 32-bit far pointer needs to be updated 94 <1> as atomically as possible to avoid using 95 <1> an incorrect pointer. 96 <1> Test case: Run a program such as our TSRs' 97 <1> uninstaller or SHUFHOOK and step through it 98 <1> with "tp fffff" when operating on something 99 <1> crucial such as interrupt 21h. Without this 100 <1> function the machine will crash! 101 <1> To enable this function to be called, enter 102 <1> the command "r dco4 or= 8" first (install our 103 <1> AMIS multiplexer handler). 104 <1> Other workaround: Use SILENT for TP and disable 105 <1> DCO3 flag 4000_0000 (do not call int 21.0B to 106 <1> check for Ctrl-C status). 107 <1> Yet another workaround: Set flag DCO 8 (enable 108 <1> fake InDOS mode, avoid calling int 21h). 109 <1> REM: The source may be a pseudo IISP header. In this 110 <1> case the ieEntry field should hold 0FEEBh 111 <1> (jmp short $) and the ieSignature field 112 <1> should indicate the source, eg "VT" for the IVT 113 <1> or "NH" for inserting a New Handler. 114 <1> 115 <1> TSR - Reserved for TSR 116 <1> INP: al = 31h..FFh 117 <1> OUT: al = 00h 118 <1> 119 <1> %endif 120 <1> 121 <1> align 2, db 0 122 <1> debuggeramissig: 123 <1> amissig: 124 00008270 65636D20 <1> .ven: fill 8,32,db "ecm" ; vendor 125 00008278 6C446562756720- <1> .prod: fill 8,32,db "lDebug" ; product 125 00008278 <1> 126 00008280 436F6E64746E6C2E20- <1> .desc: asciz _PROGNAME,_VERSION,", debugger." 126 00008289 44656275676761626C- <1> 126 00008292 65206C446562756720- <1> 126 0000829B 28323032322D30382D- <1> 126 000082A4 3035292C2064656275- <1> 126 000082AD 676765722E00 <1> 127 <1> ; description 128 <1> %if $ - .desc > 64 129 <1> %error AMIS description too long 130 <1> %endif 131 <1> 132 <1> try_amis_multiplex_number: 133 000082B3 00 <1> db 0 134 <1> try_debugger_amis_multiplex_number: 135 000082B4 FF <1> db -1 136 <1> 137 <1> 138 000082B5 CBEB10000000004B42- <1> iispentry int2D 138 000082BE 00EBF400 <1> 139 000082C8 80FC00 <1> cmp ah, 0 140 <1> amis_multiplex_number equ $-1 ; AMIS multiplex number (data for cmp opcode) 141 000082CB 7405 <1> je .handle ; our multiplex number --> 142 000082CD 2EFF2E[B882] <1> jmp far [cs:.next] ; else go to next handler --> 143 <1> 144 <1> .handle: 145 000082D2 84C0 <1> test al, al 146 000082D4 740F <1> jz .installationcheck ; installation check --> 147 <1> ; cmp al, 02h 148 <1> ; je .uninstall ; uninstallation --> 149 000082D6 3C04 <1> cmp al, 04h 150 000082D8 7416 <1> je .determineinterrupts ; determine hooked interrupts --> 151 <1> %if _DEVICE 152 000082DA 3C06 <1> cmp al, 06h 153 000082DC 7419 <1> je .getdevice 154 <1> %endif 155 000082DE 3C30 <1> cmp al, 30h 156 000082E0 7428 <1> je .updateiispheader 157 <1> ; all other functions are reserved or not supported by TSR 158 <1> .uninstall: 159 <1> .nop: 160 000082E2 B000 <1> mov al, 0 ; show not implemented 161 000082E4 CF <1> iret 162 <1> 163 <1> .installationcheck: 164 000082E5 FEC8 <1> dec al ; (= FFh) show we're here 165 000082E7 B90001 <1> mov cx, 0100h ; = version 166 000082EA BF[7082] <1> mov di, amissig ; dx:di -> AMIS signature strings of this program 167 <1> .iret_dx_cs: 168 000082ED 8CCA <1> mov dx, cs 169 <1> .iret: 170 000082EF CF <1> iret 171 <1> 172 <1> .determineinterrupts: ; al = 04h, always returns list 173 000082F0 2E8B1E[200C] <1> mov bx, word [cs:amisintr_offset] 174 <1> ; dx:bx -> hooked interrupts list 175 000082F5 EBF6 <1> jmp short .iret_dx_cs 176 <1> 177 <1> %if _DEVICE 178 <1> .getdevice: 179 000082F7 2EF606[DA00]40 <1> testopt [cs:internalflags6], dif6_device_mode 180 000082FD 74E3 <1> jz .nop 181 000082FF B80101 <1> mov ax, 0101h ; CONFIG.SYS, one device 182 00008302 31DB <1> xor bx, bx 183 00008304 8CCA <1> mov dx, cs 184 00008306 83EA04 <1> sub dx, paras(deviceshim_size + 10h) 185 <1> ; -> device header 186 00008309 CF <1> iret 187 <1> %endif 188 <1> 189 <1> .updateiispheader: 190 0000830A B0FF <1> mov al, 0FFh ; show supported 191 0000830C FC <1> cld 192 0000830D FA <1> cli ; try to rest while updating chain 193 0000830E A7 <1> cmpsw ; skip over first word (entrypoint) 194 <1> ; (generally xxEBh or 0EA90h) 195 0000830F A5 <1> movsw 196 00008310 A5 <1> movsw ; transfer source ieNext to dest ieNext 197 00008311 CF <1> iret 198 <1> %endif 2322 2323 2324 ; doscall is used by symbols.asm and run.asm, so define it prior 2325 %if _PM && _NOEXTENDER 2326 %macro doscall 0 2327 call _doscall 2328 %endmacro 2329 %else 2330 ; When we don't support non-extended DPMI all Int21 calls 2331 ; are either in Real Mode or extended (all are real Int21 2332 ; instructions). 2333 %macro doscall 0 2334 int 21h 2335 %endmacro 2336 %endif 2337 2338 2339 usesection lDEBUG_CODE 2340 2341 %if _DEBUG4 || _DEBUG5 2342 %define _DEB_ASM_PREFIX 2343 %include "deb.asm" 2344 %endif 2345 2346 2347 %include "aa.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug A command - Assembler 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2012 C. Masloch 8 <1> 9 <1> Usage of the works is permitted provided that this 10 <1> instrument is retained with the works, so that any entity 11 <1> that uses the works is notified of this instrument. 12 <1> 13 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 14 <1> 15 <1> %endif 16 <1> 17 <1> 18 <1> usesection lDEBUG_DATA_ENTRY 19 <1> 20 <1> align 2, db 0 21 00008312 0000 <1> aa13a_mnemposition: dw 0 ; -> mnemonic, to display error 22 00008314 00 <1> aa_mnemsuffix: db 0 ; 0 = normal, 1 = 'W' suffix, 2 = 'D' suffix 23 <1> 24 00008315 00 <1> asm_mn_flags: db 0 ; flags for the mnemonic 25 <1> AMF_D32 equ 1 ; 32-bit opcode/data operand 26 <1> AMF_WAIT equ 2 27 <1> AMF_A32 equ 4 ; address operand is 32-bit 28 <1> AMF_SIB equ 8 ; there's a SIB in the arguments 29 <1> AMF_MSEG equ 10h ; if a seg prefix was given before mnemonic 30 <1> AMF_FSGS equ 20h ; if FS or GS was encountered 31 <1> AMF_D16 equ 40h ; 16-bit opcode/data operand 32 <1> AMF_ADDR equ 80h ; address operand is given (write address size prefix) 33 <1> 34 00008316 00 <1> aa_saved_prefix:db 0 ; WAIT or REP... prefix 35 <1> ; aa_saved_prefix and aa_seg_pre must be consecutive. 36 00008317 00 <1> aa_seg_pre: db 0 ; segment prefix 37 <1> 38 <1> align 2, db 0 39 00008318 0000 <1> mneminfo: dw 0 ; address associated with the mnemonic 40 <1> 41 <1> ; The following 7 words (including alloweddist) must all be consecutive. 42 0000831A 0000 <1> rmaddr: dw 0 ; address of operand giving the R/M byte 43 <1> ; regmem and sibbyte must be consecutive 44 0000831C 00 <1> regmem: db 0 ; mod reg r/m part of instruction 45 0000831D 00 <1> sibbyte: db 0 ; SIB byte 46 0000831E 0000 <1> immaddr: dw 0 ; address of operand giving the immed stf 47 00008320 0000 <1> xxaddr: dw 0 ; address of additional stuff 48 <1> ; dismach and dmflags must be consecutive 49 00008322 00 <1> dismach: db 0 ; type of processor needed 50 00008323 00 <1> dmflags: db 0 ; flags for extra processor features 51 <1> 52 <1> DM_COPR equ 1 ; math coprocessor 53 <1> DM_MMX equ 2 ; MMX extensions 54 <1> 55 00008324 00 <1> opcode_or: db 0 ; extra bits in the op code 56 00008325 00 <1> opsize: db 0 ; size of this operation (2 or 4) 57 00008326 00 <1> varflags: db 0 ; flags for this variant 58 <1> 59 <1> VAR_LOCKABLE equ 1 ; variant is lockable 60 <1> VAR_MODRM equ 2 ; if there's a MOD R/M here 61 <1> VAR_SIZ_GIVN equ 4 ; if a size was given 62 <1> VAR_SIZ_FORCD equ 8 ; if only one size is permitted 63 <1> VAR_SIZ_NEED equ 10h ; if we need the size 64 <1> VAR_D16 equ 20h ; if operand size is WORD 65 <1> VAR_D32 equ 40h ; if operand size is DWORD 66 00008327 00 <1> alloweddist: db 0 67 <1> 68 00008328 00 <1> a_reqsize: db 0 ; size that this arg should be 69 00008329 00 <1> align 2, db 0 70 0000832A 0000 <1> a_opcode: dw 0 ; op code info for this variant 71 <1> 72 <1> align 2, db 0 73 0000832C 0000 <1> a_opcode2: dw 0 ; copy of a_opcode for obs-instruction 74 0000832E E0DBE1DBE4DB240126- <1> a_obstab: dw 0DBE0h,0DBE1h,0DBE4h,124h,126h ; obs. instruction codes 74 00008337 01 <1> 75 00008338 0101020404 <1> obsmach: db 1,1,2,4,4 ; max permissible machine for the above 76 <1> ; This is used to search for obsolete instructions: 77 <1> ; DBE0h: feni 78 <1> ; DBE1h: fdisi 79 <1> ; DBE4h: fsetpm 80 <1> ; 124h: mov trX, reg 81 <1> ; 126h: mov reg, trX 82 <1> 83 0000833D 00040201 <1> aadbsiz: db 0,4,2,1 ; table for max size of db operand 84 00008341 00 <1> align 2, db 0 85 00008342 0000[9508][9708]- <1> aadbsto: dw 0,aa28,aa29,aa30 ; table for routine to store a number 85 00008348 [9908] <1> 86 <1> 87 <1> align 2, db 0 ; (modrmtab really is an array of words) 88 0000834A 0B000D00 <1> modrmtab: db REG_BX,0,REG_BP,0 ; [bx], [bp] 89 0000834E 0F000E00 <1> db REG_DI,0,REG_SI,0 ; [di], [si] 90 00008352 0F0D0E0D <1> db REG_DI,REG_BP,REG_SI,REG_BP ; [bp+di],[bp+si] 91 00008356 0F0B0E0B <1> db REG_DI,REG_BX,REG_SI,REG_BX ; [bx+di],[bx+si] 92 <1> 93 0000835A 610D <1> aam_args: db 'a',13 94 <1> 95 <1> ; Equates for parsed arguments, stored in OPRND.flags 96 <1> ARG_DEREF equ 1 ; non-immediate memory reference 97 <1> ARG_MODRM equ 2 ; if we've computed the MOD R/M byte 98 <1> ARG_JUSTREG equ 4 ; a solo register 99 <1> ARG_WEIRDREG equ 8 ; if it's a segment register or CR, etc. 100 <1> ARG_IMMED equ 10h ; if it's just a number 101 <1> ARG_FARADDR equ 20h ; if it's of the form xxxx:yyyyyyyy 102 <1> ARG_ECX_SPECIAL equ 80h ; have to overflow loop displacement 103 <1> 104 <1> ; For each operand type in the following table, the value 105 <1> ; is the bits at least one of which must be present. 106 <1> ; For each entry in bittab, there's an entry in asmjmp. 107 <1> ; Entries are defined in the debug.asm opsizeditem list. 108 <1> bittab: 109 0000835C 1005010401040404 <1> db BITTAB_OPSIZEDITEMS 110 00008364 00 <1> times 16 - ($ - bittab) db 0 ; unused OP_SIZE combined types 111 <1> 112 <1> ; OP_END does not have a table entry. Subsequent 113 <1> ; entries are defined in the debug.asm opitem list. 114 0000836C 010101010120101008- <1> db BITTAB_OPITEMS 114 00008375 080808080810101010- <1> 114 0000837E 100808FFFFFFFFFFFF- <1> 114 00008387 FFFFFFFFFFFFFF0410- <1> 114 00008390 100404080808080808- <1> 114 00008399 08 <1> 115 <1> %if ($ - bittab) != OP_AMOUNT_TABLE 116 <1> %error bittab has wrong size 117 <1> %endif 118 <1> 119 <1> ; Jump table for operand types. 120 <1> ; Entries are defined in the debug.asm opsizeditem list. 121 <1> align 2, db 0 122 <1> asmjmp: 123 0000839A [7D0E][5F0E][5F0E]- <1> dw ASMJMP_OPSIZEDITEMS 123 000083A0 [5F0E][830E][640E]- <1> 123 000083A6 [730E][8E0E] <1> 124 000083AA [7511] <1> times 16 - (($ - asmjmp) / 2) dw ao50 ; unused size-combined types (reject) 125 <1> 126 <1> ; OP_END does not have a table entry. Subsequent 127 <1> ; entries are defined in the debug.asm opitem list. 128 000083BA [1F0F][1F0F][1F0F]- <1> dw ASMJMP_OPITEMS 128 000083C0 [1F0F][1F0F][280F]- <1> 128 000083C6 [630F][CA0F][2210]- <1> 128 000083CC [2610][3B10][5710]- <1> 128 000083D2 [5B10][8510][9C10]- <1> 128 000083D8 [A110][AA10][AA10]- <1> 128 000083DE [AA10][2D10][3110]- <1> 128 000083E4 [0911][4111][4911]- <1> 128 000083EA [5311][4D11][3D11]- <1> 128 000083F0 [3D11][3D11][3D11]- <1> 128 000083F6 [3D11][D00C][D00C]- <1> 128 000083FC [D00C][CE10][5711]- <1> 128 00008402 [5E11][6B11][6B11]- <1> 128 00008408 [6B11][6B11][6B11]- <1> 128 0000840E [6B11][6B11][6B11]- <1> 128 00008414 [6B11] <1> 129 <1> %if ($ - asmjmp) / 2 != OP_AMOUNT_TABLE 130 <1> %error asmjmp has wrong size 131 <1> %endif 132 <1> 133 <1> ; special ops DX, CL, ST, CS, DS, ES, FS, GS, SS 134 <1> ; entry required if ao48 is used in the opitem list 135 <1> ; order has to match opitem order 136 <1> ; refer to aagetreg comment for the number assignments 137 00008416 0A011E <1> asm_regnum: db REG_DX, REG_CL, REG_ST 138 00008419 191B181C1D1A <1> db REG_CS, REG_DS, REG_ES, REG_FS, REG_GS, REG_SS 139 <1> 140 <1> ; sizes for OP_M64, OP_MFLOAT, OP_MDOUBLE, OP_M80, OP_MXX 141 <1> ; entry required if ao17 is used in the opitem list 142 <1> ; order has to match opitem order 143 0000841F 05060708 <1> asm_siznum: db SIZ_QWORD, SIZ_FLOAT, SIZ_DOUBLE, SIZ_TBYTE 144 00008423 FF <1> db -1 ; none 145 <1> 146 <1> ; size qualifier 147 <1> ; 1 BY = BYTE 148 <1> ; 2 WO = WORD 149 <1> ; 3 unused 150 <1> ; 4 DW = DWORD 151 <1> ; 5 QW = QWORD 152 <1> ; 6 FL = FLOAT (REAL4) 153 <1> ; 7 DO = DOUBLE (REAL8) 154 <1> ; 8 TB = TBYTE (REAL10) 155 <1> 156 <1> SIZ_NONE equ 0 157 <1> SIZ_BYTE equ 1 158 <1> SIZ_WORD equ 2 159 <1> SIZ_DWORD equ 4 160 <1> SIZ_QWORD equ 5 161 <1> SIZ_FLOAT equ 6 162 <1> SIZ_DOUBLE equ 7 163 <1> SIZ_TBYTE equ 8 164 <1> 165 <1> align 2, db 0 166 00008424 4259574F574F445751- <1> sizetcnam: db "BY","WO","WO","DW","QW","FL","DO","TB" 166 0000842D 57464C444F5442 <1> 167 <1> endarea sizetcnam 168 <1> 169 <1> align 2, db 0 170 00008434 53484E454641 <1> distnam: db "SH","NE","FA" 171 <1> endarea distnam 172 <1> 173 <1> 174 <1> usesection lDEBUG_CODE 175 <1> 176 <1> %if 0 177 <1> ; write byte in al to bx:(e)dx, then increment (e)dx 178 <1> writeasm: 179 <1> call writemem 180 <1> _386_PM_o32 ; inc edx 181 <1> inc dx 182 <1> retn 183 <1> 184 <1> ; write cx bytes from ds:si to bx:(e)dx 185 <1> writeasmn: 186 <1> jcxz .nowrite 187 <1> .loop: 188 <1> lodsb 189 <1> call writeasm 190 <1> loop .loop 191 <1> .nowrite: 192 <1> retn 193 <1> %endif 194 <1> 195 <1> 196 <1> aa_cmd3_check: 197 000005F6 AC <1> lodsb 198 000005F7 E868A7 <1> call chkeol 199 <1> aa_cmd3: 200 000005FA E903FA <1> jmp cmd3 ; exit assembler mode --> 201 <1> 202 <1> 203 <1> aa: 204 000005FD E8D0FF <1> call guard_re 205 00000600 8B1E[880C] <1> mov bx, word [ reg_cs ] ; default segment to use 206 <1> aa00a: 207 00000604 E846A7 <1> call iseol? 208 00000607 740E <1> je aa01 ; if end of line --> 209 00000609 E85797 <1> call getaddr ; get address into bx:(e)dx 210 0000060C E853A7 <1> call chkeol ; expect end of line here 211 <1> _386_PM_o32 ; mov dword [ a_addr ], edx 212 0000060F 8916[420B] <1> mov word [ a_addr ], dx ; save the address 213 00000613 891E[460B] <1> mov word [a_addr + saSegSel], bx 214 <1> %if _PM 215 <1> call ispm 216 <1> jnz .86m 217 <1> .pm: 218 <1> mov word [a_addr + saSelector], bx 219 <1> jmp @F 220 <1> .86m: 221 <1> mov word [a_addr + saSegment], bx 222 <1> @@: 223 <1> %endif 224 <1> 225 <1> ; Begin loop over input lines. 226 <1> aa01: 227 00000617 C706[D20A][1706] <1> mov word [ errret ], aa01 228 0000061D 8B26[CC0A] <1> mov sp, word [ savesp ] ; restore the stack (this implies no "retn") 229 00000621 BF[AE07] <1> mov di, line_out 230 00000624 A1[460B] <1> mov ax, word [a_addr + saSegSel] 231 <1> %if _PM 232 <1> mov bx, ax 233 <1> %endif 234 00000627 E823A8 <1> call hexword 235 0000062A B03A <1> mov al, ':' 236 0000062C AA <1> stosb 237 0000062D C606[1583]00 <1> mov byte [ asm_mn_flags ], 0 238 <1> %if _PM 239 <1> mov byte [ bCSAttr ], 0 240 <1> call test_d_b_bit 241 <1> jz .16 242 <1> mov byte [ bCSAttr ], 40h ; set 32-bit attrib for later checks here 243 <1> mov ax, word [ a_addr+2 ] 244 <1> call hexword 245 <1> .16: 246 <1> %endif 247 00000632 A1[420B] <1> mov ax, word [ a_addr+0 ] 248 00000635 E815A8 <1> call hexword 249 00000638 B020 <1> mov al, 32 250 0000063A AA <1> stosb 251 0000063B E818AF <1> call getline00 252 0000063E 3C2E <1> cmp al, '.' 253 00000640 74B4 <1> je aa_cmd3_check 254 00000642 3C3B <1> cmp al, ';' 255 00000644 74D1 <1> je aa01 ; if comment 256 00000646 E808A7 <1> call iseol?.notsemicolon 257 00000649 74AF <1> je aa_cmd3 ; if done, return to command line --> 258 0000064B C706[1683]0000 <1> mov word [ aa_saved_prefix ], 0 ; clear aa_saved_prefix and aa_seg_pre 259 <1> 260 <1> ; Get mnemonic and look it up. 261 <1> ; (At this point, it has been determined that it is not empty.) 262 <1> ; 263 <1> ; INP: al = first character 264 <1> ; si-> remaining string (al isn't EOL) 265 <1> aa02: 266 00000651 BF[AE07] <1> mov di, line_out ; -> buffer 267 00000654 31C9 <1> xor cx, cx ; = 0 268 00000656 8936[1283] <1> mov [ aa13a_mnemposition ], si 269 <1> 270 0000065A A9 <1> db __TEST_IMM16 ; skip stosb,lodsb initially 271 <1> @@: 272 0000065B AA <1> stosb 273 0000065C AC <1> lodsb 274 0000065D 41 <1> inc cx ; count length 275 0000065E E8597B <1> call uppercase 276 00000661 E8E9A6 <1> call iseol? ; end of mnemonic ? 277 00000664 740C <1> je @F 278 00000666 3C3A <1> cmp al, ':' 279 00000668 7408 <1> je @F ; (for prefixes, else will be an error later) 280 0000066A 3C20 <1> cmp al, 32 281 0000066C 7404 <1> je @F 282 0000066E 3C09 <1> cmp al, 9 283 00000670 75E9 <1> jne @B ; not yet --> 284 <1> @@: 285 <1> 286 00000672 49 <1> dec cx ; = length of input 287 00000673 E82DA7 <1> call skipwh0 ; skip to next field 288 00000676 4E <1> dec si 289 <1> 290 00000677 8A45FF <1> mov al, [di-1] ; get last stored character 291 0000067A 3C57 <1> cmp al, 'W' ; possible suffix? 292 0000067C 7406 <1> je @F 293 0000067E 3C44 <1> cmp al, 'D' 294 00000680 7402 <1> je @F ; yes --> 295 00000682 30C0 <1> xor al, al 296 <1> @@: 297 00000684 A2[1483] <1> mov [aa_mnemsuffix], al ; store 'D', 'W', or 0 298 <1> 299 00000687 56 <1> push si ; save position in input line 300 <1> 301 00000688 BE[9C01] <1> mov si, mnlist ; -> first area: no or optional suffix 302 0000068B BA[290C] <1> mov dx, mnlist_o_suffix_required; -> end of first area 303 <1> 304 <1> ; [line_out] = name to search 305 <1> ; cx = length of name to search 306 <1> ; si-> next mnlist entry 307 <1> ; dx-> behind last mnlist entry of this area 308 <1> ; w[ss:sp]-> next field in input line (operand or EOL) 309 <1> aa_mnemlistloop: 310 0000068E AD <1> lodsw ; load combined word, si-> name 311 0000068F 83E00F <1> and ax, 0Fh ; separate mnemonic length 312 00000692 39C8 <1> cmp ax, cx ; length matches ? 313 00000694 741D <1> je .length_match ; yes, check name --> 314 <1> .cmps_mismatch: 315 00000696 01C6 <1> add si, ax ; -> behind entry 316 00000698 39D6 <1> cmp si, dx ; at end of this list area ? 317 0000069A 72F2 <1> jb aa_mnemlistloop ; not yet, check next entry --> 318 <1> 319 0000069C 81FA[290C] <1> cmp dx, mnlist_o_suffix_required; was first or second area ? 320 000006A0 750D <1> jne .mnem_invalid ; second, not found --> 321 <1> 322 000006A2 BE[900B] <1> mov si, mnlist_a_suffix_allowed ; -> second area: optional or required suffix 323 000006A5 BA[520C] <1> mov dx, end_mnlist ; -> end of second area 324 <1> 325 000006A8 49 <1> dec cx ; prepare for second look-up 326 000006A9 3826[1483] <1> cmp [aa_mnemsuffix], ah ; is there a valid suffix ? (ah still 0) 327 000006AD 75DF <1> jne aa_mnemlistloop ; yes, check for suffixed instruction --> 328 <1> 329 <1> .mnem_invalid: 330 000006AF 58 <1> pop ax ; (discard) 331 000006B0 E95D01 <1> jmp aa13a ; complain --> 332 <1> 333 <1> .length_match: ; found a name of correct length 334 000006B3 BF[AE07] <1> mov di, line_out ; -> all-capitals input 335 000006B6 89F3 <1> mov bx, si ; -> name 336 000006B8 F3A6 <1> repe cmpsb ; compare names 337 000006BA 89DE <1> mov si, bx 338 000006BC 89C1 <1> mov cx, ax ; restore length 339 000006BE 75D6 <1> jne .cmps_mismatch ; not this, continue --> 340 <1> 341 <1> ; We found the mnemonic. 342 <1> ; (bx=si)-> entry's mnemonic 343 <1> ; dx-> behind last mnlist entry of this area 344 <1> ; w[ss:sp]-> next field in input line (operand or EOL) 345 000006C0 89F0 <1> mov ax, si ; -> mnemonic's name 346 <1> 347 000006C2 81FA[520C] <1> cmp dx, end_mnlist ; was first or second area ? 348 000006C6 7409 <1> je .handlesuffix ; second, there's a suffix to handle --> 349 <1> 350 000006C8 3D[900B] <1> cmp ax, mnlist_a_suffix_allowed ; optional suffix that was not specified? 351 000006CB 7232 <1> jb aa_mnemonic_found ; no, done with the suffixes already --> 352 <1> 353 <1> %if _PM 354 <1> mov dl, byte [ bCSAttr ] ; dl = whether a 32-bit CS 355 <1> %else 356 000006CD 30D2 <1> xor dl, dl ; 86 Mode is always 16-bit 357 <1> %endif 358 000006CF EB09 <1> jmp sho .suffix_decide 359 <1> 360 <1> .handlesuffix: 361 <1> 362 000006D1 8A16[1483] <1> mov dl, byte [ aa_mnemsuffix ] ; dl = 'W' or 'D'. 'W' is odd, 'D' is even 363 000006D5 F6D2 <1> not dl ; make 'W' an even value, 'D' an odd one 364 000006D7 80E201 <1> and dl, 1 ; 'W' results in 0, 'D' in 1 365 <1> 366 <1> .suffix_decide: 367 000006DA 3D[B40B] <1> cmp ax, mnlist_o_suffix_allowed ; address size suffix ? 368 000006DD 7212 <1> jb .a_suffix ; yes --> 369 <1> 370 <1> ; Operand size suffix. 371 000006DF 84D2 <1> test dl, dl ; which ? 372 000006E1 7407 <1> jz .o_suffix_w 373 000006E3 800E[1583]01 <1> or byte [asm_mn_flags], AMF_D32 ; o32 374 000006E8 EB15 <1> jmp sho aa_mnemonic_found 375 <1> 376 <1> .o_suffix_w: 377 000006EA 800E[1583]40 <1> or byte [asm_mn_flags], AMF_D16 ; o16 378 000006EF EB0E <1> jmp sho aa_mnemonic_found 379 <1> 380 <1> ; Address size suffix. 381 <1> .a_suffix: 382 000006F1 84D2 <1> test dl, dl ; which ? 383 000006F3 7405 <1> jz .a_suffix_w 384 000006F5 800E[1583]84 <1> or byte [asm_mn_flags], AMF_ADDR|AMF_A32; a32 385 <1> .a_suffix_w: 386 000006FA 800E[1583]80 <1> or byte [asm_mn_flags], AMF_ADDR ; a16 (AMF_A32 still clear) 387 <1> 388 <1> aa_mnemonic_found: 389 000006FF B104 <1> mov cl, 4 390 00000701 8B74FE <1> mov si, [si-2] ; get the combined word 391 00000704 D3EE <1> shr si, cl ; extract offset into asmtab 392 00000706 81C6[0000] <1> add si, asmtab ; -> asmtab sequence 393 <1> 394 <1> ; bx-> name of matching mnlist entry 395 <1> ; If this mnemonic is suffixable/suffixed, 396 <1> ; AMF_D32,AMF_D16,AMF_ADDR,AMF_A32 show suffix status 397 <1> ; si-> associated asmtab sequence 398 <1> ; w[ss:sp]-> next field in input line (operand or EOL) 399 <1> 400 <1> %if 0 401 <1> 402 <1> Now si points to the spot in asmtab corresponding to this mnemonic. 403 <1> The format of the assembler table is as follows. 404 <1> First, there is optionally one of the following bytes: 405 <1> 406 <1> ASM_SPECIAL This is a special mnemonic (directive or AAx). 407 <1> ASM_WAIT The instruction is prefixed by a WAIT. 408 <1> ASM_D32 This is a 32-bit instruction variant. 409 <1> ASM_D16 This is a 16-bit instruction variant. 410 <1> 411 <1> Then, except for non-AAx ASM_SPECIAL, this is followed by one or 412 <1> more of the following sequences, indicating an instruction variant. 413 <1> 414 <1> ASM_LOCKABLE Indicates that this instruction can follow a LOCK prefix. 415 <1> ASM_MACHx Indicates the CPU this instruction requires, 1..6 (186..686). 416 <1> ASM_ESCAPE Escapes a large following word. The assembler table contains 417 <1> as many escapes as necessary; each escape means to add the 418 <1> value of ASM_ESCAPE to the following high byte of the info 419 <1> word. This will easily overflow the word, so a dword is 420 <1> required to process the info word. ASM_ESCAPE currently 421 <1> needs to be equal to ASM_FIRST (ie. the lowest assembler 422 <1> table prefix byte) because otherwise some values would have 423 <1> no valid encoding. _ASM_ESCAPE_USED is a preprocessor 424 <1> variable which will be 0 in case there are no ASM_ESCAPE 425 <1> bytes to be found in the table. 426 <1> [word] This is a 16-bit integer, most significant byte first, giving 427 <1> ASMMOD * a + b, where b is an index into the array opindex 428 <1> (indicating the operand list), and a is as follows (hex): 429 <1> 0..FF The (one-byte) instruction. 430 <1> 100..1FF The lower 8 bits give the second byte of 431 <1> a two-byte instruction beginning with 0Fh. 432 <1> 200..23F Bits 2-0 say which floating point instruction 433 <1> this is (D8h-DFh), and 5-3 give the /r field. 434 <1> 240..1247 (a-240h)/8 is the index in the array agroups 435 <1> (which gives the real value of a), and the 436 <1> low-order 3 bits gives the /r field. 437 <1> [byte] This gives the second byte of a floating point 438 <1> instruction if 0D8h <= a <= 0DFh. 439 <1> 440 <1> Following these is an ASM_END byte. (ASM_SPECIAL has the same value as 441 <1> ASM_END, but the context allows to decide which one is meant.) 442 <1> 443 <1> Exceptions: 444 <1> ASM_SPECIAL are not followed by this opcode information (except AAx). 445 <1> ASM_SPECIAL segment, LOCK and REP prefixes are followed by the literal 446 <1> prefix byte. 447 <1> ASM_SPECIAL for all mnemonics except AAx and the prefixes are not 448 <1> followed by anything at all. 449 <1> 450 <1> The ASM_ symbols are defined where debugtbl.inc is included in debug.asm. 451 <1> 452 <1> %endif 453 <1> 454 <1> ; To do: BITS, USE16, USE32, USEAUTO, CPU 455 0000070A AC <1> lodsb ; get a possible prefix 456 <1> .checkprefix: 457 <1> %if 1 458 0000070B 3CFF <1> cmp al, ASM_SPECIAL ; a special mnemonic ? 459 0000070D 7403E99600 <1> jne .notspecial ; no --> 460 <1> 461 <1> ; Dispatch based on mnemonic. 462 00000712 31C0 <1> xor ax, ax 463 00000714 81FB[AD01] <1> cmp bx, mnlist+MN_O16 464 00000718 7503E9A200 <1> je aa_sizeprefix ; o16 (ax = 0) --> 465 0000071D 40 <1> inc ax 466 0000071E 81FB[A301] <1> cmp bx, mnlist+MN_A16 467 00000722 7503E99800 <1> je aa_sizeprefix ; a16 (ax = 1) --> 468 00000727 B402 <1> mov ah, 2 469 00000729 81FB[9E01] <1> cmp bx, mnlist+MN_A32 470 0000072D 7503E98D00 <1> je aa_sizeprefix ; a32 (ax = 201h) --> 471 00000732 48 <1> dec ax 472 00000733 81FB[A801] <1> cmp bx, mnlist+MN_O32 473 00000737 7503E98300 <1> je aa_sizeprefix ; o32 (ax = 200h) --> 474 0000073C 81FB[9507] <1> cmp bx, mnlist+MN_LOCK 475 00000740 7503E9C200 <1> je aa18 ; lock --> 476 00000745 81FB[B909] <1> cmp bx, mnlist+MN_REP 477 00000749 7209 <1> jb .notreplock 478 0000074B 81FB[D109] <1> cmp bx, mnlist+MN_REPNE 479 0000074F 7703E9B300 <1> jbe aa18 ; rep, repe, repne --> 480 <1> .notreplock: 481 00000754 81FB[F209] <1> cmp bx, mnlist+MN_ES 482 00000758 7209 <1> jb .notseg 483 0000075A 81FB[060A] <1> cmp bx, mnlist+MN_GS 484 0000075E 7703E99900 <1> jbe aa17 ; single segment prefix --> 485 <1> .notseg: 486 00000763 81FB[BE01] <1> cmp bx, mnlist+MN_AAD 487 00000767 7503E92F01 <1> je aa_aax ; aad --> 488 0000076C 81FB[C301] <1> cmp bx, mnlist+MN_AAM 489 00000770 7503E92601 <1> je aa_aax ; aam --> 490 00000775 833E[1683]00 <1> cmp word [ aa_saved_prefix ], byte 0 491 0000077A 7403E99100 <1> jne aa13a ; if there was a prefix or a segment, error --> 492 0000077F 5E <1> pop si ; get position in input line 493 <1> ;cmp bx, mnlist+MN_SEG 494 <1> ;je aa_seg ; SEG mnemonic, process --> 495 00000780 81FB[7B09] <1> cmp bx, mnlist+MN_ORG 496 00000784 7503E98E00 <1> je aa_org 497 00000789 B80100 <1> mov ax, 1 498 0000078C 81FB[6103] <1> cmp bx, mnlist+MN_DD 499 00000790 7503E98A00 <1> je aa20m ; dd (ax = 1) --> 500 00000795 40 <1> inc ax 501 00000796 81FB[6F03] <1> cmp bx, mnlist+MN_DW 502 0000079A 7503E98000 <1> je aa20m ; dw (ax = 2) --> 503 0000079F 40 <1> inc ax 504 000007A0 81FB[5D03] <1> cmp bx, mnlist+MN_DB 505 000007A4 7479 <1> je aa20m ; db (ax = 3) --> 506 000007A6 EB68 <1> jmp short aa13a ; unhandled special mnemonic --> 507 <1> 508 <1> .notspecial: 509 000007A8 2CFC <1> sub al, ASM_D16 ; mnemonic has a prefix ? 510 000007AA 7207 <1> jb .normal ; no --> 511 000007AC 7409 <1> je .d16 ; it is a 16-bit mnemonic form --> 512 <1> %else 513 <1> cmp al, ASM_O16PREF 514 <1> jb .normal ; no special mnemonic --> 515 <1> cmp al, ASM_A32PREF 516 <1> jbe aa_sizeprefix ; 386 address/operand size prefix --> 517 <1> 518 <1> sub al, ASM_LOCKREP ; check for mnemonic flag byte, 519 <1> ; and convert it to 0..9 if one 520 <1> jb .normal ; if none --> 521 <1> je aa18 ; if LOCK/REP --> 522 <1> cbw 523 <1> dec ax 524 <1> jz aa17 ; if segment prefix (ASM_SEG) --> 525 <1> dec ax 526 <1> jz aa_aax ; if aad or aam (ASM_AAX) --> 527 <1> dec ax 528 <1> jz .d16 ; if ASM_D16 --> 529 <1> cmp al, 3 530 <1> jae aa20 ; if ASM_ORG or ASM_DD or ASM_DW or ASM_DB --> 531 <1> %endif 532 000007AE 0806[1583] <1> or [ asm_mn_flags ], al ; save AMF_D32 or AMF_WAIT (1 or 2) 533 000007B2 A8 <1> db __TEST_IMM8 ; (skip dec) 534 <1> .normal: 535 000007B3 4E <1> dec si ; -> first byte of mnemonic info 536 <1> .ab01: 537 000007B4 E9F400 <1> jmp ab01 ; now process the arguments 538 <1> .d16: 539 000007B7 800E[1583]40 <1> or byte [ asm_mn_flags ], AMF_D16 540 000007BC 46 <1> inc si ; skip the ASM_D32 byte 541 000007BD EBF5 <1> jmp short .ab01 ; now process the arguments 542 <1> 543 <1> aa_sizeprefix: 544 <1> %if 0 545 <1> sub al, ASM_O16PREF ; 0 = o16, 1 = a16, 2 = o32, 3 = a32 546 <1> mov ah, al 547 <1> and ax, (2<<8)|1 ; ah = 2 if 32-bit prefix, al = 1 if ASIZE 548 <1> %endif 549 <1> %if _PM 550 <1> or ah, byte [ bCSAttr ] 551 <1> jz .nobyte ; 16-bit CS and 16-bit prefix, no output --> 552 <1> cmp ah, 40h| 2 553 <1> je .nobyte ; 32-bit CS and 32-bit prefix, no output --> 554 <1> %else 555 000007BF 84E4 <1> test ah, ah 556 000007C1 7409 <1> jz .nobyte ; 16-bit CS and 16-bit prefix --> 557 <1> %endif 558 <1> 559 <1> ; CS differs from the prefix's type. 560 <1> ; Output a prefix byte. 561 000007C3 0466 <1> add al, 66h ; 66h if OSIZE, 67h if ASIZE 562 000007C5 BF[AE07] <1> mov di, line_out 563 000007C8 AA <1> stosb 564 000007C9 E8B100 <1> call aa_copymem 565 <1> .nobyte: 566 <1> aa_handleprefixes: 567 000007CC 5E <1> pop si 568 000007CD AC <1> lodsb ; get character 569 000007CE 3C3A <1> cmp al, ':' 570 000007D0 7503 <1> jne .nocolon 571 000007D2 E8CDA5 <1> call skipwhite ; skip a colon 572 <1> .nocolon: 573 000007D5 E875A5 <1> call iseol? ; end of line? 574 000007D8 7403E974FE <1> jne aa02 ; no, process instruction --> 575 <1> 576 <1> ; No instruction follows. 577 <1> ; Write out saved LOCK/REP and/or segment prefix. 578 000007DD A0[1783] <1> mov al, byte [ aa_seg_pre ] 579 000007E0 84C0 <1> test al, al 580 000007E2 7407 <1> jz .noseg 581 000007E4 BF[AE07] <1> mov di, line_out 582 000007E7 AA <1> stosb 583 000007E8 E89200 <1> call aa_copymem 584 <1> .noseg: 585 000007EB A0[1683] <1> mov al, byte [ aa_saved_prefix ] 586 000007EE 84C0 <1> test al, al 587 000007F0 7407 <1> jz .noreplock 588 000007F2 BF[AE07] <1> mov di, line_out 589 000007F5 AA <1> stosb 590 000007F6 E88400 <1> call aa_copymem 591 <1> .noreplock: 592 <1> aa01_j1: 593 000007F9 E91BFE <1> jmp aa01 ; return to prompt 594 <1> 595 <1> %if 0 596 <1> ; SEG directive (segment prefix follows) 597 <1> aa_seg: 598 <1> call skipwhite 599 <1> mov ah, byte [si] 600 <1> and ax, ~2020h 601 <1> mov di, segrgnam 602 <1> mov cx, 6 603 <1> repne scasw 604 <1> jne aa24 ; if not found 605 <1> push si ; save si in case there's no colon 606 <1> inc si ; skip "?s" 607 <1> call skipwhite 608 <1> pop si 609 <1> call chkeol 610 <1> mov bx, prefixlist + 5 611 <1> sub bx, cx 612 <1> mov al, byte [ bx ] ; look up the prefix byte 613 <1> mov di, line_out 614 <1> stosb 615 <1> call aa_copymem 616 <1> jmp short aa01_j1 617 <1> %endif 618 <1> 619 <1> ; segment prefix 620 <1> aa17: 621 000007FC AC <1> lodsb ; get prefix value 622 000007FD A2[1783] <1> mov byte [ aa_seg_pre ], al 623 00000800 800E[1583]10 <1> or byte [ asm_mn_flags ], AMF_MSEG 624 00000805 EBC5 <1> jmp short aa_handleprefixes 625 <1> 626 <1> ; LOCK or REP prefix 627 <1> aa18: 628 00000807 AC <1> lodsb ; get prefix value 629 00000808 8606[1683] <1> xchg al, byte [ aa_saved_prefix ] 630 0000080C 84C0 <1> test al, al 631 0000080E 74BC <1> jz aa_handleprefixes 632 <1> ; if there already was a saved prefix: 633 <1> aa13a: 634 00000810 8B36[1283] <1> mov si, [ aa13a_mnemposition ] 635 00000814 E9A590 <1> jmp error 636 <1> 637 <1> %if 0 638 <1> ; Pseudo ops (org or db/dw/dd). 639 <1> aa20: 640 <1> cmp word [ aa_saved_prefix ], byte 0 641 <1> jne aa13a ; if there was a prefix or a segment, error --> 642 <1> pop si ; get position in input line 643 <1> sub al, 3 ; AX=0 if org, 1 if dd, 2 if dw, 3 if db. 644 <1> jne aa20m ; if not ORG 645 <1> %endif 646 <1> 647 <1> aa_org: 648 <1> ; Process ORG pseudo op. 649 00000817 AC <1> lodsb 650 00000818 8B1E[460B] <1> mov bx, word [a_addr + saSegSel]; default segment 651 0000081C E9E5FD <1> jmp aa00a ; go to top, set address if any given 652 <1> 653 <1> ; Data instructions (DB/DW/DD). 654 <1> aa20m: 655 0000081F BF[AE07] <1> mov di, line_out ; put the bytes here when we get them 656 00000822 93 <1> xchg ax, bx ; mov bx,ax 657 00000823 8A87[3D83] <1> mov al, byte [ aadbsiz+bx ] ; move maximum size 658 00000827 A2[3D83] <1> mov byte [ aadbsiz ], al 659 0000082A D1E3 <1> shl bx, 1 660 0000082C 8B87[4283] <1> mov ax, word [ aadbsto+bx ] ; move address of storage routine 661 00000830 A3[4283] <1> mov word [ aadbsto ],ax 662 00000833 E86CA5 <1> call skipwhite 663 00000836 E814A5 <1> call iseol? 664 00000839 743E <1> je aa27 ; if end of line 665 <1> 666 <1> aa21: 667 0000083B 3C22 <1> cmp al, '"' 668 0000083D 741B <1> je aa22 ; if string 669 0000083F 3C27 <1> cmp al, "'" 670 00000841 7417 <1> je aa22 ; if string 671 00000843 E89D09 <1> call aageti ; get a numerical value into dx:bx, size into cl 672 00000846 3A0E[3D83] <1> cmp cl, byte [ aadbsiz ] 673 0000084A 7721 <1> ja aa24 ; if overflow 674 0000084C 93 <1> xchg ax, bx 675 0000084D FF16[4283] <1> call near [ aadbsto ] ; store the value 676 00000851 81FF[B608] <1> cmp di, line_out_end 677 00000855 7716 <1> ja aa24 ; if output line overflow 678 00000857 93 <1> xchg ax, bx 679 00000858 EB17 <1> jmp short aa26 ; done with this one 680 <1> 681 <1> aa22: 682 0000085A 88C4 <1> mov ah, al 683 <1> aa23: 684 0000085C AC <1> lodsb 685 0000085D E8F1A4 <1> call iseol?.notsemicolon 686 00000860 740B <1> je aa24 ; if end of line (closing quote missing) --> 687 00000862 38E0 <1> cmp al, ah 688 00000864 740A <1> je aa25 ; if end of string 689 00000866 AA <1> stosb 690 00000867 81FF[B608] <1> cmp di, line_out_end 691 0000086B 76EF <1> jbe aa23 ; if output line not overflowing 692 <1> aa24: 693 0000086D E94C90 <1> jmp error ; error 694 <1> aa25: 695 00000870 AC <1> lodsb 696 <1> aa26: 697 00000871 E800A5 <1> call skipcomm0 698 00000874 E8D6A4 <1> call iseol? 699 00000877 75C2 <1> jne aa21 ; if not end of line 700 <1> 701 <1> ; End of line. Copy it to debuggee's memory. 702 <1> aa27: 703 00000879 B8[1706] <1> mov ax, aa01 704 0000087C 50 <1> push ax 705 <1> 706 <1> ; INP: di-> behind memory to copy (starts at line_out) 707 <1> ; [a_addr]-> destination 708 <1> ; OUT: memory copied 709 <1> ; a_addr offset updated 710 <1> ; es set to ss 711 <1> ; CHG: (e)si, (e)cx, (e)di 712 <1> aa_copymem: 713 0000087D BE[AE07] <1> mov si, line_out ; ds:si-> data 714 00000880 89F9 <1> mov cx, di ; -> behind data 715 00000882 29F1 <1> sub cx, si ; = size of data 716 00000884 8E06[460B] <1> mov es, word [a_addr + saSegSel] 717 <1> _386_PM_o32 ; mov edi, dword [ a_addr+0 ] 718 00000888 8B3E[420B] <1> mov di, word [ a_addr+0 ] ; es:(e)di-> destination 719 <1> _386_PM movzx ecx, cx 720 <1> _386_PM movzx esi, si ; fix high words 721 <1> _386_PM_a32 722 0000088C F3A4 <1> rep movsb ; copy it 723 <1> _386_PM_o32 ; mov dword [ a_addr+0 ], edi 724 0000088E 893E[420B] <1> mov word [ a_addr+0 ], di ; save new address 725 00000892 16 <1> push ss 726 00000893 07 <1> pop es 727 00000894 C3 <1> retn 728 <1> 729 <1> ; Routines to store a byte/word/dword, 730 <1> ; into a buffer in our memory. 731 <1> aa28: 732 00000895 AB <1> stosw ; store a dword value 733 00000896 92 <1> xchg ax, dx 734 <1> aa29: 735 00000897 AB <1> stosw ; store a word value 736 00000898 C3 <1> retn 737 <1> 738 <1> aa30: 739 00000899 AA <1> stosb ; store a byte value 740 0000089A C3 <1> retn 741 <1> 742 <1> %if _PM && 0 743 <1> aa_use16: 744 <1> cmp word [ aa_saved_prefix ], byte 0 745 <1> jne aa13a 746 <1> pop si 747 <1> lodsb 748 <1> call chkeol 749 <1> mov dl, 16 750 <1> jmp short aa_bits.parse 751 <1> 752 <1> aa_use32: 753 <1> cmp word [ aa_saved_prefix ], byte 0 754 <1> jne aa13a 755 <1> pop si 756 <1> lodsb 757 <1> call chkeol 758 <1> mov dl, 32 759 <1> jmp short aa_bits.parse 760 <1> 761 <1> aa_useauto: 762 <1> cmp word [ aa_saved_prefix ], byte 0 763 <1> jne aa13a 764 <1> pop si 765 <1> lodsb 766 <1> call chkeol 767 <1> jmp short aa_bits.auto 768 <1> 769 <1> aa_bits: 770 <1> cmp word [ aa_saved_prefix ], byte 0 771 <1> jne aa13a ; if there was a prefix or a segment, error --> 772 <1> pop si ; get position in input line 773 <1> 774 <1> ; Check whether "AUTO" requested. 775 <1> push si 776 <1> lodsw 777 <1> and ax, ~2020h 778 <1> cmp ax, "AU" 779 <1> jne .notauto 780 <1> lodsw 781 <1> and ax, ~2020h 782 <1> cmp ax, "TO" 783 <1> jne .notauto 784 <1> lodsb 785 <1> call iseol? 786 <1> jne .notauto 787 <1> pop ax 788 <1> .auto: 789 <1> xor ax, ax 790 <1> mov al, byte [ bCSAttr+1 ] 791 <1> test al, al ; any saved ? 792 <1> jz aa01_j1 ; no --> 793 <1> mov word [ bCSAttr ], ax ; restore 794 <1> jmp short aa01_j1 795 <1> 796 <1> .notauto: 797 <1> pop si 798 <1> lodsb 799 <1> push si 800 <1> call getbyte 801 <1> call chkeol 802 <1> pop si 803 <1> .parse: 804 <1> mov ax, word [ bCSAttr ] 805 <1> or al, 1 806 <1> cmp dl, 16 807 <1> je .16 808 <1> cmp dl, 16h 809 <1> je .16 810 <1> cmp dl, 32 811 <1> je .32 812 <1> cmp dl, 32h 813 <1> jne aa24 814 <1> .32: 815 <1> _no386 jmp aa24 816 <1> test ah, ah 817 <1> mov ah, al 818 <1> mov al, 40h 819 <1> jmp short .save 820 <1> 821 <1> .16: 822 <1> test ah, ah 823 <1> mov ah, al 824 <1> mov al, 0 825 <1> .save: 826 <1> jnz .saved 827 <1> mov byte [ bCSAttr+1 ], ah 828 <1> .saved: 829 <1> mov byte [ bCSAttr ], al 830 <1> jmp short aa01_j1 831 <1> %endif 832 <1> 833 <1> ; Here we process the AAD and AAM instructions. They are special 834 <1> ; in that they may take a one-byte argument, or none (in which case 835 <1> ; the argument defaults to 0Ah = ten). 836 <1> aa_aax: 837 0000089B 8936[1883] <1> mov word [ mneminfo ], si ; save this address 838 0000089F 5E <1> pop si 839 000008A0 AC <1> lodsb 840 000008A1 E8A9A4 <1> call iseol? 841 000008A4 750B <1> jne ab01b ; if not end of line --> 842 000008A6 BE[5A83] <1> mov si, aam_args ; fake a 0Ah argument if none given 843 000008A9 EB05 <1> jmp short ab01a 844 <1> 845 <1> 846 <1> ; Process normal instructions. 847 <1> 848 <1> ; First we parse each argument into the following structure, 849 <1> ; stored consecutively at line_out, line_out+OPRND_size, etc. 850 <1> ; 851 <1> ; For arguments of the form xxxx:yyyyyyyy, xxxx is stored in 852 <1> ; OPRND.num2, and yyyyyyyy in OPRND.num. The number of bytes 853 <1> ; in yyyyyyyy is stored in opaddr, 2 is stored in OPRND.numadd, 854 <1> ; and di is stored in xxaddr. 855 <1> struc OPRND 856 00000000 ?? <1> .flags: resb 1 ; 0 flags (ARG_DEREF, etc) 857 00000001 ?? <1> .distflags: resb 1 ; 1 distance flags 858 <1> ; (short = 1, near = 2, far = 4) 859 00000002 ?? <1> .sizearg: resb 1 ; 2 size argument, if any 860 <1> ; (1=byte, 2=word, 4=dword, 5=qword, 6=float, 7=double, 8=tbyte) 861 <1> ; (refer to SIZ_ equs, sizetcnam, and asm_siznum) 862 00000003 ?? <1> .sizedis: resb 1 ; 3 size of ModR/M displacement 863 <1> .reg1: ; 4 ModR/M byte or first register (byte) 864 00000004 ?? <1> .numadd: resb 1 ; 4 number of additional bytes at num2 (up to 4) 865 <1> .num2: ; 5 second number (word) 866 00000005 ?? <1> .reg2: resb 1 ; 5 index register, second register or SIB byte 867 <1> ; reg2 needs to follow reg1 immediately 868 00000006 ?? <1> .index: resb 1 ; 6 index factor 869 00000007 ?? <1> .orednum: resb 1 ; 7 sizes of numbers are ORed here 870 00000008 ???????? <1> .num: resd 1 ; 8 number 871 <1> endstruc 1 872 <1> 873 <1> odfShort: equ 1 874 <1> odfNear: equ 2 875 <1> odfFar: equ 4 876 <1> 877 <1> 878 <1> ab01: 879 000008AB 8936[1883] <1> mov word [ mneminfo ], si ; save this address 880 000008AF 5E <1> pop si ; get position in line 881 <1> ab01a: 882 000008B0 AC <1> lodsb 883 <1> ab01b: 884 000008B1 BF[AE07] <1> mov di, line_out 885 <1> 886 <1> ; Loop over operands. 887 <1> ab02: 888 000008B4 E896A4 <1> call iseol? 889 000008B7 7503 <1> jne ab04 ; if not end of line 890 <1> ab99_j1: 891 000008B9 E93503 <1> jmp ab99 ; to next phase 892 <1> 893 <1> ab04: 894 000008BC 57 <1> push di ; clear out the next storage area 895 000008BD B90600 <1> mov cx, OPRND_size_w 896 000008C0 31C0 <1> xor ax, ax 897 000008C2 F3AB <1> rep stosw 898 000008C4 5F <1> pop di 899 <1> 900 <1> ; Small loop over "BYTE PTR" and segment prefixes. 901 <1> ab05: 902 000008C5 4E <1> dec si 903 000008C6 8B04 <1> mov ax, word [ si ] 904 000008C8 25DFDF <1> and ax, TOUPPER_W 905 <1> .checksize: 906 000008CB 807D0200 <1> cmp byte [ di+OPRND.sizearg ], SIZ_NONE 907 000008CF 750C <1> jne .notsize ; if already have a size qualifier ("BYTE PTR",...) 908 000008D1 57 <1> push di 909 000008D2 BF[2484] <1> mov di, sizetcnam 910 000008D5 B90800 <1> mov cx, sizetcnam_size_w 911 000008D8 F2AF <1> repne scasw 912 000008DA 5F <1> pop di 913 000008DB 742D <1> je .size ; if found --> 914 <1> .notsize: 915 <1> .checkdist: 916 000008DD F64501FF <1> test byte [ di + OPRND.distflags ], -1 917 000008E1 7541 <1> jnz .notdist 918 000008E3 57 <1> push di 919 000008E4 BF[3484] <1> mov di, distnam 920 000008E7 B90300 <1> mov cx, distnam_size_w 921 000008EA F2AF <1> repne scasw 922 000008EC 5F <1> pop di 923 000008ED 7535 <1> jne .notdist 924 000008EF 85C9 <1> test cx, cx 925 000008F1 7509 <1> jnz .dist ; if not "FA" 926 000008F3 8A4402 <1> mov al, byte [ si+2 ] 927 000008F6 24DF <1> and al, TOUPPER 928 000008F8 3C52 <1> cmp al, 'R' 929 000008FA 7528 <1> jne .notdist ; if not "FAR" (could be hexadecimal) --> 930 <1> .dist: 931 <1> ; 0 = far, 1 = near, 2 = short 932 000008FC 80E902 <1> sub cl, distnam_size_w - 1 933 <1> ; -2 = far, -1 = near, -0 = short 934 000008FF F6D9 <1> neg cl 935 <1> ; 2 = far, 1 = near, 0 = short 936 00000901 B501 <1> mov ch, 1 937 00000903 D2E5 <1> shl ch, cl 938 <1> ; 4 = far, 2 = near, 1 = short 939 <1> ; 940 <1> ; This matches odfFar = 4, odfNear = 2, odfShort = 1 941 00000905 886D01 <1> mov byte [ di + OPRND.distflags ], ch 942 00000908 EB08 <1> jmp .skipptr 943 <1> 944 <1> .size: 945 0000090A 80E908 <1> sub cl, sizetcnam_size_w 946 0000090D F6D9 <1> neg cl ; convert to 1..8 947 0000090F 884D02 <1> mov byte [ di+OPRND.sizearg ], cl 948 <1> .skipptr: 949 00000912 E883A4 <1> call skipalpha ; go to next token 950 00000915 8A24 <1> mov ah, byte [si] 951 00000917 25DFDF <1> and ax, TOUPPER_W 952 0000091A 3D5054 <1> cmp ax, "PT" 953 0000091D 7503 <1> jne ab05_j1 ; if not "PTR" 954 0000091F E876A4 <1> call skipalpha ; go to next token (ignore "PTR") 955 <1> ab05_j1: equ $ 956 00000922 EBA1 <1> jmp ab05 957 <1> 958 <1> .notdist: 959 <1> ab07: 960 00000924 E80400 <1> call ab08 961 00000927 7531 <1> jne ab09 ; not a segment prefix --> 962 00000929 EBF7 <1> jmp short ab05_j1 ; if it was a segment prefix --> 963 <1> 964 <1> ; Test for and process segment prefix 965 <1> ; 966 <1> ; INP: b[aa_seg_pre] 967 <1> ; si-> string 968 <1> ; ax = w[si] (uppercased) 969 <1> ; OUT: NZ if no segment prefix, 970 <1> ; si unchanged 971 <1> ; ZR if segment prefix, 972 <1> ; si-> behind prefix + 1 973 <1> ; al = character behind prefix 974 <1> ; CHG: ax, bx, cx 975 <1> ab08: 976 0000092B 803E[1783]00 <1> cmp byte [ aa_seg_pre ], 0 977 00000930 7525 <1> jne .ret ; if we already have a segment prefix 978 00000932 57 <1> push di 979 00000933 BF[7289] <1> mov di, segrgnam 980 00000936 B90600 <1> mov cx, N_SEGREGS 981 00000939 F2AF <1> repne scasw 982 0000093B 5F <1> pop di 983 0000093C 7519 <1> jne .ret ; if not found 984 0000093E 56 <1> push si ; save si in case there's no colon 985 0000093F AD <1> lodsw ; skip "?s" 986 00000940 E85FA4 <1> call skipwhite 987 00000943 3C3A <1> cmp al, ':' 988 00000945 7511 <1> jne .retpopsi ; if not followed by ':' 989 00000947 58 <1> pop ax ; discard saved si 990 00000948 E857A4 <1> call skipwhite ; skip it 991 0000094B BB[A989] <1> mov bx, prefixlist + 5 992 0000094E 29CB <1> sub bx, cx 993 00000950 8A07 <1> mov al, byte [ bx ] ; look up the prefix byte 994 00000952 A2[1783] <1> mov byte [ aa_seg_pre ], al ; save it away 995 00000955 38C0 <1> cmp al, al ; ZR, valid segment prefix 996 <1> .ret: 997 00000957 C3 <1> retn 998 <1> 999 <1> .retpopsi: 1000 00000958 5E <1> pop si 1001 00000959 C3 <1> retn 1002 <1> 1003 <1> ; Begin parsing main part of argument. 1004 <1> 1005 <1> ; First check registers. 1006 <1> ab09: 1007 0000095A 57 <1> push di ; check for solo registers 1008 0000095B BF[5289] <1> mov di, rgnam816 1009 0000095E B91B00 <1> mov cx, N_ALLREGS ; 27 1010 00000961 E82D09 <1> call aagetreg 1011 00000964 5F <1> pop di 1012 00000965 727F <1> jc ab14 ; if not a register 1013 00000967 800D04 <1> or byte [di+OPRND.flags], ARG_JUSTREG 1014 0000096A 885D04 <1> mov byte [di+OPRND.reg1], bl ; save register number 1015 0000096D 80FB18 <1> cmp bl, 24 ; 0..23 = AL..DH, AX..DI, EAX..EDI 1016 00000970 730B <1> jae ab09a ; if it's not a normal register 1017 00000972 93 <1> xchg ax, bx ; mov al, bl 1018 00000973 B103 <1> mov cl, 3 1019 00000975 D2E8 <1> shr al, cl ; al = size: 0 -> byte, 1 -> word, 2 -> dword 1020 00000977 04FE <1> add al, -2 1021 00000979 1403 <1> adc al, 3 ; convert to 1, 2, 4 (respectively) 1022 <1> ; matching SIZ_BYTE, SIZ_WORD, SIZ_DWORD 1023 0000097B EB5A <1> jmp short ab13 1024 <1> 1025 <1> ab09a: 1026 0000097D 80350C <1> xor byte [di+OPRND.flags], ARG_JUSTREG|ARG_WEIRDREG 1027 00000980 B002 <1> mov al, SIZ_WORD ; register size 1028 00000982 80FB1E <1> cmp bl, REG_ST ; 24..29 = segment registers 1029 00000985 7737 <1> ja ab11 ; if it's MM, CR, DR, or TR --> 1030 00000987 740C <1> je ab09b ; if it's ST --> 1031 00000989 80FB1C <1> cmp bl, 28 1032 0000098C 7249 <1> jb ab13 ; if it's a non-386 segment register --> 1033 0000098E 800E[1583]20 <1> or byte [asm_mn_flags], AMF_FSGS ; else flag it 1034 00000993 EB42 <1> jmp short ab13 1035 <1> 1036 <1> ; ST registers 1037 <1> ab09b: 1038 00000995 AC <1> lodsb 1039 <1> ; Check for NASM FPU register notation: ST0..ST7 1040 00000996 3C30 <1> cmp al, '0' ; digit following ? 1041 00000998 720B <1> jb .par 1042 0000099A 3C37 <1> cmp al, '7' 1043 0000099C 7707 <1> ja .par ; no --> 1044 0000099E 2C30 <1> sub al, '0' 1045 000009A0 884505 <1> mov byte [di+OPRND.reg2], al ; save number 1046 000009A3 EB30 <1> jmp short ab12 ; --> 1047 <1> 1048 <1> .par: 1049 <1> ; Check for MASM FPU register notation: ST(0)..ST(7) 1050 000009A5 3C28 <1> cmp al, '(' ; parenthesis following ? 1051 000009A7 7403 <1> je .ispar ; yes --> 1052 <1> ; Plain ST (= ST0) 1053 000009A9 4E <1> dec si 1054 000009AA EB29 <1> jmp short ab12 1055 <1> 1056 <1> .ispar: 1057 000009AC AC <1> lodsb ; get digit 1058 000009AD 2C30 <1> sub al, '0' 1059 000009AF 3C07 <1> cmp al, 7 1060 000009B1 7708 <1> ja ab10 ; if not 0..7 1061 000009B3 884505 <1> mov byte [di+OPRND.reg2], al ; save the number 1062 000009B6 AC <1> lodsb 1063 000009B7 3C29 <1> cmp al, ')' ; validate that there's a closing parenthesis 1064 000009B9 741A <1> je ab12 ; okay --> 1065 <1> ab10: 1066 <1> aa24_j2: 1067 000009BB E9AFFE <1> jmp aa24 ; error 1068 <1> 1069 <1> ; other registers: 31..34 (MM, CR, DR, TR) 1070 <1> ab11: 1071 000009BE AC <1> lodsb 1072 000009BF 2C30 <1> sub al, '0' ; get digit 1073 000009C1 3C07 <1> cmp al, 7 1074 000009C3 77F6 <1> ja ab10 ; if error --> 1075 000009C5 884505 <1> mov byte [di+OPRND.reg2], al ; save the number 1076 000009C8 B004 <1> mov al, SIZ_DWORD ; register size 1077 000009CA 80FB1F <1> cmp bl, REG_MM 1078 000009CD 7508 <1> jne ab13 ; if not MM register 1079 000009CF 800D04 <1> or byte [di+OPRND.flags], ARG_JUSTREG 1080 000009D2 B005 <1> mov al, SIZ_QWORD 1081 000009D4 A9 <1> db __TEST_IMM16 ; (skip mov) 1082 <1> ab12: 1083 000009D5 B000 <1> mov al, 0 ; size for ST registers 1084 <1> ab13: 1085 000009D7 3A4502 <1> cmp al, byte [di+OPRND.sizearg] ; compare with stated size 1086 000009DA 7407 <1> je ab13a ; if same 1087 000009DC 864502 <1> xchg al, byte [di+OPRND.sizearg] 1088 000009DF 84C0 <1> test al, al ; SIZ_NONE ? 1089 000009E1 75D8 <1> jnz ab10 ; if wrong size given, error --> 1090 <1> ab13a: 1091 000009E3 E9ED01 <1> jmp ab44 ; done with this operand 1092 <1> 1093 <1> ; It's not a register reference. Try for a number. 1094 <1> ab14: 1095 000009E6 AC <1> lodsb 1096 000009E7 E8D507 <1> call aaifnum 1097 000009EA 7236 <1> jc ab17 ; it's not a number 1098 <1> ab14a: 1099 000009EC E8F407 <1> call aageti ; get the number 1100 000009EF 884D07 <1> mov byte [di+OPRND.orednum], cl 1101 000009F2 895D08 <1> mov word [di+OPRND.num+0], bx 1102 000009F5 89550A <1> mov word [di+OPRND.num+2], dx 1103 000009F8 E8A8A3 <1> call skipwh0 1104 000009FB 80F902 <1> cmp cl, 2 1105 000009FE 7F22 <1> jg ab17 ; if we can't have a colon here 1106 00000A00 3C3A <1> cmp al, ':' 1107 00000A02 751E <1> jne ab17 ; if not xxxx:yyyy 1108 00000A04 E89BA3 <1> call skipwhite 1109 00000A07 E8D907 <1> call aageti 1110 00000A0A 8B4D08 <1> mov cx, word [di+OPRND.num+0] 1111 00000A0D 894D05 <1> mov word [di+OPRND.num2], cx 1112 00000A10 895D08 <1> mov word [di+OPRND.num+0], bx 1113 00000A13 89550A <1> mov word [di+OPRND.num+2], dx 1114 00000A16 800D20 <1> or byte [di+OPRND.flags], ARG_FARADDR 1115 00000A19 E9B601 <1> jmp ab43 ; done with this operand 1116 <1> 1117 <1> ab15: 1118 00000A1C E9B300 <1> jmp ab30 ; do post-processing 1119 <1> 1120 <1> ; Check for [...]. 1121 <1> ab16: 1122 00000A1F E880A3 <1> call skipwhite 1123 <1> ab17: 1124 00000A22 3C5B <1> cmp al, '[' ; begin loop over sets of [] 1125 00000A24 75F6 <1> jne ab15 ; if not [ 1126 00000A26 800D01 <1> or byte [di+OPRND.flags], ARG_DEREF ; set the flag 1127 <1> 1128 <1> ; Process NASM segment prefix inside brackets if any 1129 00000A29 E876A3 <1> call skipwhite 1130 00000A2C 8A24 <1> mov ah, byte [si] 1131 00000A2E 25DFDF <1> and ax, TOUPPER_W 1132 00000A31 4E <1> dec si ; set up for ab08 1133 00000A32 E8F6FE <1> call ab08 1134 00000A35 7403 <1> jz ab19 ; if segment prefix (called skipwhite) 1135 <1> ab18: 1136 00000A37 E868A3 <1> call skipwhite 1137 <1> ab19: 1138 00000A3A 3C5D <1> cmp al, ']' ; begin loop within [] 1139 00000A3C 74E1 <1> je ab16 ; if done 1140 <1> 1141 <1> ; Check for a register (within []). 1142 00000A3E 4E <1> dec si 1143 00000A3F 57 <1> push di 1144 00000A40 BF[6289] <1> mov di, rgnam16 1145 00000A43 B90800 <1> mov cx, N_REGS16 1146 00000A46 E84808 <1> call aagetreg 1147 00000A49 5F <1> pop di 1148 00000A4A 7243 <1> jc ab25 ; if not a register 1149 00000A4C 80FB10 <1> cmp bl, 16 1150 00000A4F 7305 <1> jae ab20 ; if 32-bit register 1151 00000A51 80C308 <1> add bl, 8 ; adjust 0..7 to 8..15 1152 00000A54 EB1D <1> jmp short ab21 1153 <1> ab20: 1154 00000A56 807D0500 <1> cmp byte [di+OPRND.reg2], 0 1155 00000A5A 7517 <1> jnz ab21 ; if we already have an index 1156 00000A5C E843A3 <1> call skipwhite 1157 00000A5F 4E <1> dec si 1158 00000A60 3C2A <1> cmp al, '*' 1159 00000A62 750F <1> jne ab21 ; if not followed by '*' 1160 00000A64 46 <1> inc si 1161 00000A65 885D05 <1> mov byte [di+OPRND.reg2], bl ; save index register 1162 00000A68 E837A3 <1> call skipwhite 1163 00000A6B E87507 <1> call aageti 1164 00000A6E E8FE07 <1> call aaconvindex 1165 00000A71 EB51 <1> jmp short ab28 ; ready for next part 1166 <1> 1167 <1> ab21: 1168 00000A73 807D0400 <1> cmp byte [di+OPRND.reg1], 0 1169 00000A77 7505 <1> jne ab22 ; if there's already a register 1170 00000A79 885D04 <1> mov byte [di+OPRND.reg1], bl 1171 00000A7C EB09 <1> jmp ab23 1172 <1> ab22: 1173 00000A7E 807D0500 <1> cmp byte [di+OPRND.reg2], 0 1174 00000A82 7508 <1> jne ab24 ; if too many registers 1175 00000A84 885D05 <1> mov byte [di+OPRND.reg2], bl 1176 <1> ab23: 1177 00000A87 E818A3 <1> call skipwhite 1178 00000A8A EB38 <1> jmp short ab28 ; ready for next part 1179 <1> 1180 <1> ab24: 1181 <1> aa24_j3: 1182 00000A8C E9DEFD <1> jmp aa24 ; error 1183 <1> 1184 <1> ; Try for a number (within []). 1185 <1> ab25: 1186 00000A8F AC <1> lodsb 1187 <1> ab26: 1188 00000A90 E85007 <1> call aageti ; get a number (or flag an error) 1189 00000A93 E80DA3 <1> call skipwh0 1190 00000A96 3C2A <1> cmp al, '*' 1191 00000A98 740B <1> je ab27 ; if it's an index factor 1192 00000A9A 084D07 <1> or byte [di+OPRND.orednum], cl 1193 00000A9D 015D08 <1> add word [di+OPRND.num+0], bx 1194 00000AA0 11550A <1> adc word [di+OPRND.num+2], dx 1195 00000AA3 EB1F <1> jmp short ab28 ; next part ... 1196 <1> 1197 <1> ab27: 1198 00000AA5 E8C707 <1> call aaconvindex 1199 00000AA8 E8F7A2 <1> call skipwhite 1200 00000AAB 4E <1> dec si 1201 00000AAC 57 <1> push di 1202 00000AAD BF[6289] <1> mov di, rgnam16 1203 00000AB0 31C9 <1> xor cx, cx 1204 00000AB2 E8DC07 <1> call aagetreg 1205 00000AB5 5F <1> pop di 1206 00000AB6 72D4 <1> jc ab24 ; if error 1207 00000AB8 807D0500 <1> cmp byte [di+OPRND.reg2], 0 1208 00000ABC 75CE <1> jne ab24 ; if there is already a register 1209 00000ABE 885D05 <1> mov byte [di+OPRND.reg2], bl 1210 00000AC1 E8DEA2 <1> call skipwhite 1211 <1> 1212 <1> ; Ready for the next term within []. 1213 <1> ab28: 1214 00000AC4 3C2D <1> cmp al, '-' 1215 00000AC6 74C8 <1> je ab26 ; if a (negative) number is next 1216 00000AC8 3C2B <1> cmp al, '+' 1217 00000ACA 7503 <1> jne ab29 ; if no next term (presumably) 1218 00000ACC E968FF <1> jmp ab18 1219 <1> ab29: 1220 00000ACF E968FF <1> jmp ab19 ; back for more 1221 <1> 1222 <1> ; Post-processing for complicated arguments. 1223 <1> ab30: 1224 00000AD2 837D0400 <1> cmp word [di+OPRND.reg1], 0 1225 00000AD6 752C <1> jne ab32 ; if registers were given ( ==> create MOD R/M) 1226 00000AD8 807D0700 <1> cmp byte [di+OPRND.orednum], 0 1227 00000ADC 7424 <1> je ab31 ; if nothing was given ( ==> error) 1228 00000ADE 803D00 <1> cmp byte [di+OPRND.flags], 0 1229 00000AE1 7506 <1> jne ab30b ; if it was not immediate 1230 00000AE3 800D10 <1> or byte [di+OPRND.flags], ARG_IMMED 1231 <1> ab30a: 1232 00000AE6 E9E900 <1> jmp ab43 ; done with this argument 1233 <1> ab30b: 1234 00000AE9 800E[1583]80 <1> or byte [asm_mn_flags], AMF_ADDR 1235 00000AEE B002 <1> mov al, 2 ; size of the displacement 1236 00000AF0 F6450704 <1> test byte [di+OPRND.orednum], 4 1237 00000AF4 7407 <1> jz ab30c ; if no 32-bit displacement --> 1238 00000AF6 40 <1> inc ax 1239 00000AF7 40 <1> inc ax ; al = 4 1240 00000AF8 800E[1583]04 <1> or byte [asm_mn_flags], AMF_A32 ; 32-bit addressing 1241 <1> ab30c: 1242 00000AFD 884503 <1> mov byte [di+OPRND.sizedis], al ; save displacement size 1243 00000B00 EBE4 <1> jmp short ab30a ; done with this argument 1244 <1> ab31: 1245 00000B02 EB88 <1> jmp short aa24_j3 ; flag an error 1246 <1> 1247 <1> ; Create the MOD R/M byte. 1248 <1> ; (For disp-only or register, this will be done later as needed.) 1249 <1> ab32: 1250 00000B04 800D02 <1> or byte [di+OPRND.flags], ARG_MODRM 1251 00000B07 8A4504 <1> mov al, byte [di+OPRND.reg1] 1252 00000B0A 0A4505 <1> or al, byte [di+OPRND.reg2] 1253 00000B0D A810 <1> test al, 10h 1254 00000B0F 7525 <1> jnz ab34 ; if 32-bit addressing 1255 00000B11 F6450704 <1> test byte [di+OPRND.orednum], 4 1256 00000B15 751F <1> jnz ab34 ; if 32-bit addressing 1257 00000B17 800E[1583]80 <1> or byte [asm_mn_flags], AMF_ADDR 1258 00000B1C 8B4504 <1> mov ax, word [di+OPRND.reg1] ; get reg1 and reg2 1259 00000B1F 38E0 <1> cmp al, ah 1260 00000B21 7702 <1> ja ab33 ; make sure al >= ah 1261 00000B23 86C4 <1> xchg al, ah 1262 <1> ab33: 1263 00000B25 57 <1> push di 1264 00000B26 BF[4A83] <1> mov di, modrmtab 1265 00000B29 B90800 <1> mov cx, 8 1266 00000B2C F2AF <1> repne scasw 1267 00000B2E 5F <1> pop di 1268 00000B2F 75D1 <1> jne ab31 ; if not among the possibilities (error) 1269 00000B31 BB0602 <1> mov bx, 206h ; max disp = 2 bytes; 6 ==> (non-existent) [bp] 1270 00000B34 EB6A <1> jmp short ab39 ; done (just about) 1271 <1> 1272 <1> ; 32-bit addressing 1273 <1> ab34: 1274 00000B36 800E[1583]84 <1> or byte [asm_mn_flags], AMF_A32 | AMF_ADDR ; 32-bit addressing 1275 00000B3B 8A4504 <1> mov al, byte [di+OPRND.reg1] 1276 00000B3E 0A4506 <1> or al, byte [di+OPRND.index] 1277 00000B41 7508 <1> jnz ab35 ; if we can't optimize [Exx*1] to [Exx] 1278 00000B43 8B4504 <1> mov ax, word [di+OPRND.reg1] 1279 00000B46 86C4 <1> xchg al, ah 1280 00000B48 894504 <1> mov word [di+OPRND.reg1], ax 1281 <1> ab35: 1282 00000B4B BB0504 <1> mov bx, 405h ; max disp = 4 bytes; 5 ==> (non-existent) [bp] 1283 00000B4E 807D0500 <1> cmp byte [di+OPRND.reg2], 0 1284 00000B52 7510 <1> jne ab36 ; if there's a SIB 1285 00000B54 8A4D04 <1> mov cl, byte [di+OPRND.reg1] 1286 00000B57 80F910 <1> cmp cl, 16 1287 00000B5A 7CA6 <1> jl ab31 ; if wrong register type 1288 00000B5C 80E107 <1> and cl, 7 1289 00000B5F 80F904 <1> cmp cl, 4 ; check for ESP 1290 00000B62 753C <1> jne ab39 ; if not, then we're done (otherwise do SIB) 1291 <1> 1292 <1> ab36: 1293 00000B64 800E[1583]08 <1> or byte [asm_mn_flags], AMF_SIB ; form SIB 1294 00000B69 8A6D06 <1> mov ch, byte [di+OPRND.index] ; get SS bits 1295 00000B6C B103 <1> mov cl, 3 1296 00000B6E D2E5 <1> shl ch, cl ; shift them halfway into place 1297 00000B70 8A4505 <1> mov al, byte [di+OPRND.reg2] ; index register 1298 00000B73 3C14 <1> cmp al, 20 1299 00000B75 748B <1> je ab31 ; if ESP ( ==> error) 1300 00000B77 3C00 <1> cmp al, 0 1301 00000B79 7502 <1> jne ab37 ; if not zero 1302 00000B7B B014 <1> mov al, 20 ; set it for index byte 4 1303 <1> ab37: 1304 00000B7D 3C10 <1> cmp al, 16 1305 00000B7F 7C81 <1> jl ab31 ; if wrong register type 1306 00000B81 2407 <1> and al, 7 1307 00000B83 08C5 <1> or ch, al ; put it into the SIB 1308 00000B85 D2E5 <1> shl ch, cl ; shift it into place 1309 00000B87 41 <1> inc cx ; R/M for SIB = 4 1310 00000B88 8A4504 <1> mov al, byte [di+OPRND.reg1] ; now get the low 3 bits 1311 00000B8B 84C0 <1> test al, al 1312 00000B8D 7505 <1> jnz ab38 ; if there was a first register 1313 00000B8F 80CD05 <1> or ch, 5 1314 00000B92 EB38 <1> jmp short ab42 ; MOD = 0, disp is 4 bytes 1315 <1> 1316 <1> ab38: 1317 00000B94 3C10 <1> cmp al, 16 1318 00000B96 7C56 <1> jl ab45 ; if wrong register type 1319 00000B98 2407 <1> and al, 7 ; first register 1320 00000B9A 08C5 <1> or ch, al ; put it into the SIB 1321 00000B9C 3C05 <1> cmp al, 5 1322 00000B9E 7406 <1> je ab40 ; if it's EBP, then we don't recognize disp=0 1323 <1> ; otherwise bl will be set to 0 1324 <1> 1325 <1> ; Find the size of the displacement. 1326 <1> ab39: 1327 00000BA0 38D9 <1> cmp cl, bl 1328 00000BA2 7402 <1> je ab40 ; if it's [(E)BP], then disp=0 is still 1 byte 1329 00000BA4 B300 <1> mov bl, 0 ; allow 0-byte disp 1330 <1> 1331 <1> ab40: 1332 00000BA6 51 <1> push cx 1333 00000BA7 8A4508 <1> mov al, byte [di+OPRND.num+0] 1334 00000BAA B107 <1> mov cl, 7 1335 00000BAC D2F8 <1> sar al, cl 1336 00000BAE 59 <1> pop cx 1337 00000BAF 8A6509 <1> mov ah, byte [di+OPRND.num+1] 1338 00000BB2 38E0 <1> cmp al, ah 1339 00000BB4 7513 <1> jne ab41 ; if it's bigger than 1 byte 1340 00000BB6 3B450A <1> cmp ax, word [di+OPRND.num+2] 1341 00000BB9 750E <1> jne ab41 ; ditto 1342 00000BBB B700 <1> mov bh, 0 ; no displacement 1343 00000BBD 0A5D08 <1> or bl, byte [di+OPRND.num+0] 1344 00000BC0 740A <1> jz ab42 ; if disp = 0 and it's not (E)BP 1345 00000BC2 FEC7 <1> inc bh ; disp = 1 byte 1346 00000BC4 80C940 <1> or cl, 40h ; set MOD = 1 1347 00000BC7 EB03 <1> jmp short ab42 ; done 1348 <1> 1349 <1> ab41: 1350 00000BC9 80C980 <1> or cl, 80h ; set MOD = 2 1351 <1> 1352 <1> ab42: 1353 00000BCC 887D03 <1> mov byte [di+OPRND.sizedis], bh ; store displacement size 1354 00000BCF 894D04 <1> mov word [di+OPRND.reg1], cx ; store MOD R/M and maybe SIB 1355 <1> 1356 <1> ; Finish up with the operand. 1357 <1> ab43: 1358 00000BD2 4E <1> dec si 1359 <1> ab44: 1360 00000BD3 E8CCA1 <1> call skipwhite 1361 00000BD6 83C70C <1> add di, byte OPRND_size 1362 00000BD9 E871A1 <1> call iseol? 1363 00000BDC 7413 <1> je ab99 ; if end of line --> 1364 00000BDE 3C2C <1> cmp al, ',' 1365 00000BE0 750C <1> jne ab45 ; if not comma ( ==> error) 1366 00000BE2 81FF[D207] <1> cmp di, line_out+3*OPRND_size 1367 00000BE6 7306 <1> jae ab45 ; if too many operands 1368 00000BE8 E8B7A1 <1> call skipwhite 1369 00000BEB E9C6FC <1> jmp ab02 1370 <1> 1371 <1> ab45: 1372 00000BEE E97CFC <1> jmp aa24 ; error jump 1373 <1> 1374 <1> ab99: 1375 00000BF1 C605FF <1> mov byte [di+OPRND.flags], -1 ; end of parsing phase 1376 <1> 1377 <1> %if 0 1378 <1> For the next phase, we match the parsed arguments with the set of 1379 <1> permissible argument lists for the opcode. The first match wins. 1380 <1> Therefore the argument lists should be ordered such that the 1381 <1> cheaper ones come first. 1382 <1> 1383 <1> There is a tricky issue regarding sizes of memory references. 1384 <1> Here are the rules: 1385 <1> 1. If a memory reference is given with a size, then it's OK. 1386 <1> 2. If a memory reference is given without a size, but some 1387 <1> other argument is a register (which implies a size), 1388 <1> then the memory reference inherits that size. 1389 <1> Exceptions: OP_CL does not imply a size (it's the shift counter) 1390 <1> OP_SHOSIZ 1391 <1> 3. If 1 and 2 do not apply, but this is the last possible argument 1392 <1> list, and if the argument list requires a particular size, then 1393 <1> that size is used. 1394 <1> 4. In all other cases, flag an error. 1395 <1> %endif 1396 <1> 1397 <1> ac01: 1398 00000BF4 31C0 <1> xor ax, ax 1399 00000BF6 BF[1A83] <1> mov di, rmaddr 1400 00000BF9 B90700 <1> mov cx, 7 1401 00000BFC F3AB <1> rep stosw ; clear variant-specific variables 1402 <1> ; cx = 0 1403 00000BFE 8B36[1883] <1> mov si, word [mneminfo] 1404 <1> ; -> the next argument variant 1405 <1> %if _ASM_ESCAPE_USED 1406 00000C02 31DB <1> xor bx, bx ; cx:bx = counter of ASM_ESCAPEs 1407 <1> %endif 1408 <1> ; Parse the variant's assembler table entry 1409 <1> ; si-> next argument variant 1410 <1> ; variant-specific variables cleared 1411 <1> ; cx:bx = 0 1412 <1> 1413 <1> ac02: 1414 00000C04 AC <1> lodsb 1415 <1> %if _ASM_ESCAPE_USED 1416 00000C05 3CF4 <1> cmp al, ASM_ESCAPE 1417 00000C07 750B <1> jne .notescape 1418 00000C09 81C300F4 <1> add bx, ASM_ESCAPE << 8 1419 00000C0D 83D100 <1> adc cx, byte 0 1420 00000C10 7219 <1> jc ac04 ; if this branches, too many escapes --> 1421 00000C12 EBF0 <1> jmp short ac02 1422 <1> .notescape: 1423 <1> %endif 1424 00000C14 2CF5 <1> sub al, ASM_MACH1 1425 00000C16 7216 <1> jb ac05 ; if no more special bytes 1426 00000C18 3C06 <1> cmp al, ASM_LOCKABLE-ASM_MACH1 1427 00000C1A 7408 <1> je ac03 ; if ASM_LOCKABLE 1428 00000C1C 770D <1> ja ac04 ; if ASM_END or another (--> error) 1429 00000C1E 40 <1> inc ax 1430 00000C1F A2[2283] <1> mov byte [dismach], al ; save machine type 1431 00000C22 EBE0 <1> jmp short ac02 ; back for next byte 1432 <1> ac03: 1433 00000C24 800E[2683]01 <1> or byte [varflags], VAR_LOCKABLE 1434 00000C29 EBD9 <1> jmp short ac02 ; back for next byte 1435 <1> 1436 <1> ac04: 1437 00000C2B E9E2FB <1> jmp aa13a ; error 1438 <1> 1439 <1> ; Get and unpack the word. 1440 <1> ac05: 1441 00000C2E 4E <1> dec si 1442 00000C2F AD <1> lodsw 1443 00000C30 86C4 <1> xchg al, ah ; put into little-endian order 1444 00000C32 31D2 <1> xor dx, dx 1445 <1> %if _ASM_ESCAPE_USED 1446 00000C34 01D8 <1> add ax, bx ; add in the ASM_ESCAPE adjustment 1447 00000C36 11CA <1> adc dx, cx ; account for overflow (cx = 0) 1448 <1> %endif 1449 00000C38 BB8100 <1> mov bx, ASMMOD 1450 00000C3B F7F3 <1> div bx ; ax = a_opcode; dx = index into opindex 1451 00000C3D A3[2A83] <1> mov word [a_opcode], ax ; save ax 1452 00000C40 A3[2C83] <1> mov word [a_opcode2], ax ; save the second copy 1453 00000C43 3DDF00 <1> cmp ax, 0DFh ; a coprocessor instruction ? 1454 00000C46 7717 <1> ja ac05a 1455 00000C48 3CD8 <1> cmp al, 0D8h 1456 00000C4A 7213 <1> jb ac05a ; if no coprocessor instruction --> 1457 00000C4C 800E[2383]01 <1> or byte [dmflags], DM_COPR ; flag it as an x87 instruction 1458 00000C51 88C4 <1> mov ah, al ; ah = low order byte of opcode 1459 00000C53 AC <1> lodsb ; get extra byte 1460 00000C54 A2[1C83] <1> mov byte [regmem], al ; save it in regmem 1461 00000C57 A3[2C83] <1> mov word [a_opcode2], ax ; save this for obsolete-instruction detection 1462 00000C5A 800E[2683]02 <1> or byte [varflags], VAR_MODRM ; flag its presence 1463 <1> ac05a: 1464 00000C5F 8936[1883] <1> mov [mneminfo], si ; save si back again 1465 00000C63 89D6 <1> mov si, dx 1466 <1> %if ASMMOD > 0FFh 1467 <1> xor bx, bx 1468 <1> %endif 1469 00000C65 8A9C[3416] <1> mov bl, byte [opindex+si] 1470 00000C69 01D2 <1> add dx, dx 1471 00000C6B 4A <1> dec dx 1472 00000C6C 01D3 <1> add bx, dx ; adjust to get correct index into oplists 1473 00000C6E 8DB7[0000] <1> lea si, [oplists+bx] ; si = the address of our operand list 1474 00000C72 BF[AE07] <1> mov di, line_out 1475 <1> 1476 <1> ; Begin loop over operands. 1477 <1> ; [a_opcode] etc set for opcode 1478 <1> ; si-> operand list 1479 <1> ; di-> next parsed operand 1480 <1> ; [mneminfo]-> mnemonic's next variant in assembler table 1481 <1> ac06: 1482 00000C75 AC <1> lodsb ; get next operand byte 1483 00000C76 3C00 <1> cmp al, OP_END 1484 00000C78 745F <1> je ac10 ; if end of list 1485 <1> 1486 <1> ; The OP_STACK_* operand types don't really need another 1487 <1> ; operand structure. So handle them before checking for 1488 <1> ; a valid operand structure. This is required for the 1489 <1> ; cases with no regular operands following the stack hint. 1490 <1> ; Because they aren't needed by the assembler anyway we 1491 <1> ; just loop back to ac06 to load the next operand type. 1492 00000C7A 3C20 <1> cmp al, OP_STACK_PUSH 1493 00000C7C 74F7 <1> je ac06 1494 00000C7E 3C21 <1> cmp al, OP_STACK_POP 1495 00000C80 74F3 <1> je ac06 1496 00000C82 3C22 <1> cmp al, OP_STACK_SPECIAL 1497 00000C84 74EF <1> je ac06 1498 <1> 1499 <1> ; Actual operand, or one of these always followed by one 1500 <1> ; or more actual operands (OP_M_*, OP_SHORT|NEAR|FAR), 1501 <1> ; so check for another valid operand structure. 1502 00000C86 803DFF <1> cmp byte [di+OPRND.flags], -1 1503 00000C89 744B <1> je ac01_j1 ; if too few operands were given 1504 00000C8B 3C40 <1> cmp al, OP_SIZE 1505 00000C8D 720E <1> jb ac07 ; if no size needed 1506 <1> %if 1 1507 00000C8F B400 <1> mov ah, 0 1508 00000C91 B104 <1> mov cl, 4 1509 00000C93 D3E0 <1> shl ax, cl ; move bits 4..7 (size) to ah (OP_1632=5, OP_8=6, OP_16=7, ...) 1510 00000C95 D2E8 <1> shr al, cl ; move bits 0..3 back 1511 <1> %else 1512 <1> aam 16 ; ax=00XY -> ax=0X0Y 1513 <1> %endif 1514 00000C97 8826[2883] <1> mov byte [a_reqsize], ah ; save it away 1515 00000C9B EB02 <1> jmp short ac08 1516 <1> 1517 <1> ac07: ; al = OP_M64.. 1518 <1> ; have al = 1..x 1519 <1> ; want al = 16..y 1520 00000C9D 040F <1> add al, 16-1 ; adjust for the 16 start entries in asmjmp 1521 <1> 1522 <1> ac08: 1523 00000C9F 98 <1> cbw ; al = 0..7 or 16..y, 1524 <1> ; al < 128, thus ax = al 1525 00000CA0 93 <1> xchg ax, bx ; now bx contains the index 1526 00000CA1 8A87[5C83] <1> mov al, byte [bittab+bx] 1527 00000CA5 D1E3 <1> shl bx, 1 ; = offset into word array 1528 00000CA7 8B8F[9A83] <1> mov cx, word [asmjmp + bx] 1529 <1> ; subroutine address 1530 00000CAB D1EB <1> shr bx, 1 ; return to index 1531 00000CAD 83FB3E <1> cmp bx, OP_AMOUNT_TABLE 1532 00000CB0 731E <1> jae ac09_internal_error ; internal error 1533 00000CB2 8405 <1> test al, byte [di+OPRND.flags] 1534 00000CB4 7420 <1> jz ac09 ; if no required bits are present 1535 00000CB6 B400 <1> mov ah, 0 ; (insure ah = 0 for ao90) 1536 00000CB8 FFD1 <1> call cx ; call its specific routine 1537 00000CBA A0[2783] <1> mov al, [alloweddist] 1538 00000CBD F6D0 <1> not al 1539 00000CBF 844501 <1> test byte [di + OPRND.distflags], al 1540 00000CC2 7512 <1> jnz ac09 ; if invalid distance specified --> 1541 00000CC4 817CFF5355 <1> cmp word [si-1], (OP_1632|OP_R)<<8|(OP_1632|OP_R_MOD) 1542 00000CC9 7403 <1> je ac06_j1 ; (hack) for IMUL instruction 1543 00000CCB 83C70C <1> add di, byte OPRND_size 1544 <1> ; -> next operand 1545 <1> ac06_j1: 1546 00000CCE EBA5 <1> jmp ac06 ; back for more 1547 <1> 1548 <1> ac09_internal_error: 1549 00000CD0 BA[9073] <1> mov dx, msg.aa_internal_error 1550 00000CD3 E82AA5 <1> call putsz 1551 <1> ac09: 1552 <1> ac01_j1: 1553 00000CD6 E91BFF <1> jmp ac01 ; back to next possibility 1554 <1> 1555 <1> ; End of operand list. 1556 <1> ac10: 1557 00000CD9 803DFF <1> cmp byte [di+OPRND.flags], -1 1558 00000CDC 75F8 <1> jne ac09 ; if too many operands were given 1559 <1> 1560 <1> ; Final check on sizes 1561 00000CDE A0[2683] <1> mov al, byte [varflags] 1562 00000CE1 A810 <1> test al, VAR_SIZ_NEED 1563 00000CE3 7414 <1> jz ac12 ; if no size needed 1564 00000CE5 A804 <1> test al, VAR_SIZ_GIVN 1565 00000CE7 7510 <1> jnz ac12 ; if a size was given 1566 00000CE9 A808 <1> test al, VAR_SIZ_FORCD 1567 00000CEB 74E9 <1> jz ac09 ; if the size was not forced ( ==> reject) 1568 00000CED 8B36[1883] <1> mov si, word [mneminfo] 1569 00000CF1 803CFF <1> cmp byte [si], ASM_END 1570 00000CF4 7403 <1> je ac12 ; if this is the last one 1571 <1> ac11: 1572 00000CF6 E917FB <1> jmp aa13a ; it was not, error --> (not a retry) 1573 <1> 1574 <1> ; Check other prefixes. 1575 <1> ac12: 1576 00000CF9 A0[1683] <1> mov al, byte [aa_saved_prefix] 1577 00000CFC 3C00 <1> cmp al, 0 1578 00000CFE 7421 <1> je ac14 ; if no saved prefixes to check 1579 00000D00 3CF0 <1> cmp al, 0F0h 1580 00000D02 7509 <1> jne ac13 ; if it's a rep prefix 1581 00000D04 F606[2683]01 <1> test byte [varflags], VAR_LOCKABLE 1582 00000D09 74EB <1> jz ac11 ; if this variant is not lockable, error --> 1583 00000D0B EB14 <1> jmp short ac14 ; done 1584 <1> 1585 <1> ac13: 1586 00000D0D A1[2A83] <1> mov ax, word [a_opcode] ; check if opcode is OK for rep{,z,nz} 1587 00000D10 24FE <1> and al, ~1 ; clear low order bit (MOVSW -> MOVSB) 1588 <1> 1589 00000D12 3DFF00 <1> cmp ax, 0FFh 1590 00000D15 77DF <1> ja ac11 ; if it's not a 1-byte instruction, error --> 1591 00000D17 BF[6511] <1> mov di, replist ; list of instructions that go with rep 1592 00000D1A B90700 <1> mov cx, REP_LEN ; scan all (REP + REPxx) 1593 00000D1D F2AE <1> repne scasb 1594 00000D1F 75D5 <1> jne ac11 ; if it's not among them, error --> 1595 <1> 1596 <1> ac14: 1597 00000D21 F606[1583]10 <1> test byte [asm_mn_flags], AMF_MSEG 1598 00000D26 7412 <1> jz ac15 ; if no segment prefix before mnemonic --> 1599 00000D28 A1[2A83] <1> mov ax, word [a_opcode] ; check if opcode allows this 1600 00000D2B 3DFF00 <1> cmp ax, 0FFh 1601 00000D2E 77C6 <1> ja ac11 ; if it's not a 1-byte instruction, error --> 1602 00000D30 BF[5C11] <1> mov di, segprfxtab 1603 00000D33 B90900 <1> mov cx, SEGP_LEN 1604 00000D36 F2AE <1> repne scasb 1605 00000D38 75BC <1> jne ac11 ; if it's not in the list, error --> 1606 <1> 1607 <1> ac15: 1608 00000D3A 8B1E[1E83] <1> mov bx, word [immaddr] 1609 00000D3E 09DB <1> or bx, bx 1610 00000D40 740C <1> jz ac16 ; if no immediate data 1611 00000D42 A0[2583] <1> mov al, byte [opsize] 1612 00000D45 F6D8 <1> neg al 1613 00000D47 D0E0 <1> shl al, 1 1614 00000D49 844707 <1> test al, byte [bx+7] 1615 00000D4C 75A8 <1> jnz ac11 ; if the immediate data was too big, error --> 1616 <1> 1617 <1> ; Put the instruction together 1618 <1> ; (maybe is this why they call it an assembler) 1619 <1> 1620 <1> ; First, the prefixes (including preceding WAIT instruction) 1621 <1> ac16: 1622 <1> _386_PM_o32 ; mov edi, dword [a_addr] 1623 00000D4E 8B3E[420B] <1> mov di, word [a_addr] 1624 00000D52 8E06[460B] <1> mov es, word [a_addr + saSegSel] 1625 00000D56 F606[1583]02 <1> test byte [asm_mn_flags], AMF_WAIT 1626 00000D5B 7403 <1> jz .nowaitprefix ; if no wait instruction beforehand 1627 00000D5D B09B <1> mov al, 9Bh 1628 <1> _386_PM_a32 1629 00000D5F AA <1> stosb 1630 <1> .nowaitprefix: 1631 <1> 1632 00000D60 A0[1683] <1> mov al,[aa_saved_prefix] 1633 00000D63 84C0 <1> test al, al 1634 00000D65 7401 <1> jz .noprefix ; if no LOCK or REP prefix 1635 <1> _386_PM_a32 1636 00000D67 AA <1> stosb 1637 <1> .noprefix: 1638 <1> 1639 <1> ;--- a 67h address size prefix is needed 1640 <1> ;--- 1. for CS16: if AMF_ADDR=1 and AMF_A32=1 1641 <1> ;--- 2. for CS32: if AMF_ADDR=1 and AMF_A32=0 1642 <1> 1643 00000D68 A0[1583] <1> mov al, byte [asm_mn_flags] 1644 00000D6B A880 <1> test al, AMF_ADDR 1645 00000D6D 7407 <1> jz .noaddressprefix 1646 00000D6F 2404 <1> and al, AMF_A32 1647 <1> %if _PM 1648 <1> or al, byte [bCSAttr] 1649 <1> jz .noaddressprefix ; if 16-bit CS and 16-bit addressing --> 1650 <1> cmp al, AMF_A32| 40h 1651 <1> jz .noaddressprefix ; if 32-bit CS and 32-bit addressing --> 1652 <1> %else 1653 00000D71 7403 <1> jz .noaddressprefix ; 16-bit addressing in RM --> 1654 <1> %endif 1655 <1> ; Otherwise, the CS and addressing bitness mismatch. Write a prefix. 1656 00000D73 B067 <1> mov al, 67h 1657 <1> _386_PM_a32 1658 00000D75 AA <1> stosb ; store address size prefix 1659 <1> .noaddressprefix: 1660 <1> 1661 <1> ;--- a 66h data size prefix is needed 1662 <1> ;--- for CS16: if VAR_D32 == 1 or AMF_D32 == 1 1663 <1> ;--- for CS32: if VAR_D16 == 1 or AMF_D16 == 1 1664 <1> 1665 00000D76 8A26[1583] <1> mov ah, byte [asm_mn_flags] 1666 00000D7A A0[2683] <1> mov al, byte [varflags] 1667 <1> %if _PM 1668 <1> test byte [bCSAttr], 40h 1669 <1> jz .dataprefix_rm 1670 <1> test ax, VAR_D16|(AMF_D16<<8) 1671 <1> jnz .dataprefix 1672 <1> jmp short .nodataprefix 1673 <1> .dataprefix_rm: 1674 <1> %endif 1675 00000D7D A94001 <1> test ax, VAR_D32|(AMF_D32<<8) 1676 00000D80 7403 <1> jz .nodataprefix 1677 <1> .dataprefix: 1678 00000D82 B066 <1> mov al, 66h 1679 <1> _386_PM_a32 1680 00000D84 AA <1> stosb ; store operand size prefix 1681 <1> .nodataprefix: 1682 <1> 1683 00000D85 A0[1783] <1> mov al, [aa_seg_pre] 1684 00000D88 3C00 <1> cmp al, 0 1685 00000D8A 740A <1> je ac22 ; if no segment prefix 1686 <1> _386_PM_a32 1687 00000D8C AA <1> stosb 1688 00000D8D 3C64 <1> cmp al, 64h 1689 00000D8F 7205 <1> jb ac22 ; if not 64 or 65 (FS or GS) --> 1690 00000D91 800E[1583]20 <1> or byte [asm_mn_flags], AMF_FSGS ; flag it 1691 <1> ac22: 1692 <1> 1693 <1> ; Now emit the instruction itself. 1694 00000D96 A1[2A83] <1> mov ax, word [a_opcode] 1695 00000D99 89C3 <1> mov bx, ax 1696 00000D9B 81EB4002 <1> sub bx, 240h 1697 00000D9F 7317 <1> jae ac23 ; if 576.. (AGRP) --> 1698 00000DA1 3D0002 <1> cmp ax, 200h 1699 00000DA4 7229 <1> jb ac24 ; if regular instruction --> 1700 00000DA6 800E[2383]01 <1> or byte [dmflags], DM_COPR ; flag it as an x87 instruction 1701 00000DAB 2438 <1> and al, 38h ; get register part 1702 00000DAD 0806[1C83] <1> or byte [regmem], al 1703 00000DB1 93 <1> xchg ax, bx ; mov ax, bx (the low bits of bx are good) 1704 00000DB2 2407 <1> and al, 7 1705 00000DB4 0CD8 <1> or al, 0D8h 1706 00000DB6 EB20 <1> jmp short ac25 ; on to decoding the instruction 1707 <1> 1708 <1> ac23: 1709 00000DB8 800E[2683]02 <1> or byte [varflags], VAR_MODRM ; flag presence of ModR/M byte 1710 00000DBD B103 <1> mov cl, 3 ; one instruction of a group 1711 00000DBF D3EB <1> shr bx, cl ; separate AGRP()'s num part 1712 00000DC1 2407 <1> and al, 7 ; separate ModR/M register value 1713 00000DC3 D2E0 <1> shl al, cl 1714 00000DC5 0806[1C83] <1> or byte [regmem], al ; fix ModR/M byte 1715 00000DC9 D1E3 <1> shl bx, 1 1716 00000DCB 8B87[7A01] <1> mov ax, word [agroups+bx] ; get actual opcode 1717 <1> 1718 <1> ac24: 1719 00000DCF 84E4 <1> test ah, ah 1720 00000DD1 7405 <1> jz ac25 ; if no 0Fh first --> 1721 00000DD3 50 <1> push ax ; store a 0Fh 1722 00000DD4 B00F <1> mov al, 0Fh 1723 <1> _386_PM_a32 1724 00000DD6 AA <1> stosb 1725 00000DD7 58 <1> pop ax 1726 <1> ac25: 1727 00000DD8 0A06[2483] <1> or al, byte [opcode_or] ; put additional bits into the opcode 1728 <1> _386_PM_a32 1729 00000DDC AA <1> stosb ; store the op code itself 1730 <1> 1731 <1> ; Now store the extra stuff that comes with the instruction. 1732 00000DDD A1[1C83] <1> mov ax, word [regmem] 1733 00000DE0 F606[2683]02 <1> test byte [varflags], VAR_MODRM 1734 00000DE5 740B <1> jz ac26 ; if no ModR/M --> 1735 <1> _386_PM_a32 1736 00000DE7 AA <1> stosb ; store the ModR/M byte 1737 00000DE8 F606[1583]08 <1> test byte [asm_mn_flags], AMF_SIB 1738 00000DED 7403 <1> jz ac26 ; if no SIB --> 1739 00000DEF 88E0 <1> mov al, ah 1740 <1> _386_PM_a32 1741 00000DF1 AA <1> stosb ; store the SIB byte, too 1742 <1> ac26: 1743 <1> 1744 00000DF2 8B1E[1A83] <1> mov bx, word [rmaddr] 1745 00000DF6 85DB <1> test bx, bx 1746 00000DF8 740A <1> jz ac27 ; if no offset associated with the R/M --> 1747 <1> _386_PM_o32 ; xor ecx, ecx 1748 00000DFA 31C9 <1> xor cx, cx 1749 00000DFC 8A4F03 <1> mov cl, byte [bx+OPRND.sizedis] 1750 <1> _386_PM_o32 ; lea esi, [bx+OPRND.num] 1751 00000DFF 8D7708 <1> lea si, [bx+OPRND.num] 1752 <1> _386_PM_a32 1753 00000E02 F3A4 <1> rep movsb ; store the R/M offset (or memory offset) 1754 <1> ac27: 1755 <1> 1756 <1> ; Now store immediate data 1757 00000E04 8B1E[1E83] <1> mov bx, word [immaddr] 1758 00000E08 85DB <1> test bx, bx 1759 00000E0A 740B <1> jz ac28 ; if no immediate data --> 1760 <1> _386_PM_o32 ; xor ecx, ecx 1761 00000E0C 31C9 <1> xor cx, cx 1762 00000E0E 8A0E[2583] <1> mov cl, byte [opsize] 1763 <1> _386_PM_o32 ; lea esi, [bx+OPRND.num] 1764 00000E12 8D7708 <1> lea si, [bx+OPRND.num] 1765 <1> _386_PM_a32 1766 00000E15 F3A4 <1> rep movsb 1767 <1> ac28: 1768 <1> 1769 <1> ; Now store additional bytes (needed for, e.g., enter instruction 1770 <1> ; and far memory address) 1771 00000E17 8B1E[2083] <1> mov bx, word [xxaddr] 1772 00000E1B 85DB <1> test bx, bx 1773 00000E1D 7409 <1> jz ac29 ; if no additional data --> 1774 <1> _386_PM_o32 ; lea esi, [bx+OPRND.numadd] 1775 00000E1F 8D7704 <1> lea si, [bx+OPRND.numadd] 1776 <1> _386_PM_o32 ; xor eax, eax 1777 00000E22 31C0 <1> xor ax, ax 1778 00000E24 AC <1> lodsb 1779 <1> _386_PM_o32 ; xchg eax, ecx 1780 00000E25 91 <1> xchg ax, cx ; (mov cx, ax) 1781 <1> _386_PM_a32 1782 00000E26 F3A4 <1> rep movsb 1783 <1> ac29: 1784 <1> 1785 <1> ; Done emitting. Update assembler address offset. 1786 00000E28 16 <1> push ss 1787 00000E29 07 <1> pop es ; restore es 1788 <1> _386_PM_o32 ; mov dword [a_addr], edi 1789 00000E2A 893E[420B] <1> mov word [a_addr], di 1790 <1> 1791 <1> ; Compute machine type. 1792 00000E2E 803E[2283]03 <1> cmp byte [dismach], 3 1793 00000E33 7313 <1> jae ac31 ; if we already know a 386 is needed 1794 00000E35 F606[1583]25 <1> test byte [asm_mn_flags], AMF_D32 | AMF_A32 | AMF_FSGS 1795 00000E3A 7507 <1> jnz ac30 ; if 386 --> 1796 00000E3C F606[2683]40 <1> test byte [varflags], VAR_D32 1797 00000E41 7405 <1> jz ac31 ; if not 386 --> 1798 <1> ac30: 1799 00000E43 C606[2283]03 <1> mov byte [dismach], 3 1800 <1> ac31: 1801 00000E48 BF[2E83] <1> mov di, a_obstab ; info on this instruction 1802 00000E4B 8B0E[2C83] <1> mov cx, word [a_opcode2] 1803 00000E4F E82D45 <1> call showmach ; get machine message into si, length into cx 1804 00000E52 E308 <1> jcxz ac33 ; if no message 1805 <1> 1806 <1> ac32: 1807 00000E54 BF[AE07] <1> mov di, line_out 1808 00000E57 F3A4 <1> rep movsb ; copy the line to line_out 1809 00000E59 E829A0 <1> call putsline_crlf 1810 <1> 1811 <1> ac33: 1812 00000E5C E9B8F7 <1> jmp aa01 ; back for the next input line 1813 <1> 1814 <1> %if 0 1815 <1> ; This is debugging code. It assumes that the original value 1816 <1> ; of a_addr is on the top of the stack. 1817 <1> pop si ; get orig. a_addr 1818 <1> mov ax, word [a_addr + saSegSel] 1819 <1> mov word [u_addr], si 1820 <1> mov word [u_addr + saSegSel], ax ; (doesn't work with 32-bit CS) 1821 <1> %if _PM 1822 <1> mov ax, word [a_addr + saSegment] 1823 <1> mov word [u_addr + saSegment], ax 1824 <1> mov ax, word [a_addr + saSelector] 1825 <1> mov word [u_addr + saSelector], ax 1826 <1> %endif 1827 <1> mov bx, word [a_addr] 1828 <1> sub bx, si 1829 <1> mov di, line_out 1830 <1> mov cx, 10 1831 <1> mov al, ' ' 1832 <1> rep stosb 1833 <1> mov ds, word [a_addr + saSegSel] 1834 <1> 1835 <1> ax1: lodsb 1836 <1> call hexbyte ; display the generated bytes 1837 <1> dec bx 1838 <1> jnz ax1 1839 <1> push ss 1840 <1> pop ds 1841 <1> call putsline_crlf 1842 <1> and word [disflags], 0 1843 <1> call disasm ; disassemble the new instruction 1844 <1> jmp aa01 ; back to next input line 1845 <1> %endif 1846 <1> 1847 <1> ; Routines to check for specific operand types. 1848 <1> ; Upon success, the routine returns. 1849 <1> ; Upon failure, it pops the return address and jumps to ac01. 1850 <1> ; The routines must preserve si and di. 1851 <1> 1852 <1> ; OP_RM, OP_M, OP_R_MOD: form MOD R/M byte. 1853 <1> aop_rm: 1854 <1> aop_m: 1855 <1> aop_r_mod: 1856 00000E5F E82603 <1> call ao90 ; form reg/mem byte 1857 00000E62 EB30 <1> jmp short ao07 ; go to the size check 1858 <1> 1859 <1> ; OP_R: register. 1860 <1> aop_r: 1861 00000E64 8A4504 <1> mov al, byte [di+OPRND.reg1] ; register number 1862 00000E67 2407 <1> and al, 7 1863 00000E69 B103 <1> mov cl, 3 1864 00000E6B D2E0 <1> shl al, cl ; shift it into place 1865 00000E6D 0806[1C83] <1> or byte [regmem], al ; put it into the reg/mem byte 1866 00000E71 EB21 <1> jmp short ao07 ; go to the size check 1867 <1> 1868 <1> ; OP_R_ADD: register, added to the instruction. 1869 <1> aop_r_add: 1870 00000E73 8A4504 <1> mov al, byte [di+OPRND.reg1] 1871 00000E76 2407 <1> and al, 7 1872 00000E78 A2[2483] <1> mov byte [opcode_or], al ; put it there 1873 00000E7B EB17 <1> jmp short ao07 ; go to the size check 1874 <1> 1875 <1> ; OP_IMM: immediate data. 1876 <1> aop_imm: 1877 00000E7D 893E[1E83] <1> mov word [immaddr], di ; save the location of this 1878 00000E81 EB11 <1> jmp short ao07 ; go to the size check 1879 <1> 1880 <1> ; OP_MOFFS: just the memory offset 1881 <1> aop_moffs: 1882 00000E83 F60502 <1> test byte [di+OPRND.flags], ARG_MODRM 1883 00000E86 754F <1> jnz ao11 ; if MOD R/M byte ( ==> reject) 1884 00000E88 893E[1A83] <1> mov word [rmaddr], di ; save the operand pointer 1885 00000E8C EB06 <1> jmp short ao07 ; go to the size check 1886 <1> 1887 <1> ; OP_AX: check for AL/AX/EAX 1888 <1> aop_ax: 1889 00000E8E F6450407 <1> test byte [di+OPRND.reg1], 7 1890 00000E92 7543 <1> jnz ao11 ; if wrong register, reject --> 1891 <1> ; jmp short ao07 ; go to the size check 1892 <1> 1893 <1> ; Size check 1894 <1> ao07: 1895 00000E94 800E[2683]10 <1> or byte [varflags], VAR_SIZ_NEED 1896 00000E99 A0[2883] <1> mov al, byte [a_reqsize] 1897 00000E9C 2C05 <1> sub al, 5 ; OP_1632 >> 4 1898 00000E9E 7C3A <1> jl ao12 ; if OP_ALL 1899 00000EA0 745A <1> je ao13 ; if OP_1632 1900 00000EA2 3C05 <1> cmp al, 5 ; OP_1632_DEFAULT ? 1901 00000EA4 7444 <1> je ao_1632_default 1902 <1> ; OP_8 = 1, OP_16 = 2, OP_32 = 3, OP_64 = 4 1903 00000EA6 04FD <1> add al, -3 1904 00000EA8 1403 <1> adc al, 3 ; convert 3 --> 4 and 4 --> 5 1905 <1> ao08: 1906 00000EAA 800E[2683]18 <1> or byte [varflags], VAR_SIZ_FORCD| VAR_SIZ_NEED 1907 <1> ao08_1: 1908 00000EAF 8A5D02 <1> mov bl, byte [di+OPRND.sizearg] 1909 00000EB2 84DB <1> test bl, bl ; SIZ_NONE ? 1910 00000EB4 7409 <1> jz ao09 ; yes, if no size given --> 1911 00000EB6 800E[2683]04 <1> or byte [varflags], VAR_SIZ_GIVN 1912 00000EBB 38D8 <1> cmp al, bl 1913 00000EBD 7518 <1> jne ao11 ; if sizes conflict, reject --> 1914 <1> ao09: 1915 00000EBF 3A06[2583] <1> cmp al, byte [opsize] 1916 00000EC3 7411 <1> je ao10 ; if sizes agree --> 1917 00000EC5 3CFF <1> cmp al, -1 ; is it OP_MXX (for lea) ? 1918 00000EC7 740D <1> je ao10 1919 00000EC9 8606[2583] <1> xchg al, byte [opsize] 1920 00000ECD 3C00 <1> cmp al, SIZ_NONE 1921 00000ECF 7506 <1> jne ao11 ; if sizes disagree, reject --> 1922 00000ED1 800E[2683]04 <1> or byte [varflags], VAR_SIZ_GIVN ; added in DEBUG/X 1.18 1923 <1> ao10: 1924 00000ED6 C3 <1> retn 1925 <1> 1926 <1> ao11: 1927 <1> ao50_j1: 1928 00000ED7 E99B02 <1> jmp ao50 ; reject 1929 <1> 1930 <1> ; OP_ALL - Allow all sizes. 1931 <1> ao12: 1932 00000EDA 8A4502 <1> mov al, byte [di+OPRND.sizearg] 1933 00000EDD 3C01 <1> cmp al, SIZ_BYTE 1934 00000EDF 7436 <1> je ao15 ; if byte 1935 00000EE1 721C <1> jb ao14 ; if unknown (SIZ_NONE) --> 1936 00000EE3 800E[2483]01 <1> or byte [opcode_or], 1 ; set bit in instruction 1937 00000EE8 EB15 <1> jmp short ao14 ; if size is 16 or 32 1938 <1> 1939 <1> ; OP_1632_DEFAULT 1940 <1> ao_1632_default: 1941 00000EEA 8A4502 <1> mov al, byte [di+OPRND.sizearg] 1942 00000EED 84C0 <1> test al, al ; SIZ_NONE ? 1943 00000EEF 7512 <1> jnz @F ; no --> 1944 00000EF1 A0[2583] <1> mov al, byte [opsize] ; (for push imm16/32) 1945 00000EF4 84C0 <1> test al, al ; SIZ_NONE ? 1946 00000EF6 750B <1> jnz @F ; no --> 1947 00000EF8 B002 <1> mov al, SIZ_WORD 1948 <1> %if _PM 1949 <1> test byte [bCSAttr], 40h 1950 <1> jz @F 1951 <1> mov al, SIZ_DWORD 1952 <1> %endif 1953 00000EFA EB07 <1> jmp @F 1954 <1> 1955 <1> ; OP_1632 - word or dword. 1956 <1> ao13: 1957 00000EFC 8A4502 <1> mov al, byte [di+OPRND.sizearg] 1958 <1> ao14: 1959 00000EFF 84C0 <1> test al, al ; SIZ_NONE ? 1960 00000F01 741B <1> jz ao16 ; yes, if still unknown --> 1961 <1> @@: 1962 00000F03 3C02 <1> cmp al, SIZ_WORD 1963 00000F05 7507 <1> jne ao15_1 ; if word 1964 00000F07 800E[2683]20 <1> or byte [varflags], VAR_D16 1965 00000F0C EB09 <1> jmp short ao15 1966 <1> ao15_1: 1967 00000F0E 3C04 <1> cmp al, SIZ_DWORD 1968 00000F10 75C5 <1> jne ao11 ; if not dword 1969 00000F12 800E[2683]40 <1> or byte [varflags], VAR_D32 ; set flag 1970 <1> ao15: 1971 00000F17 800E[2683]04 <1> or byte [varflags], VAR_SIZ_GIVN 1972 <1> ; hack for pushd/pushw imm: check for match 1973 00000F1C EBA1 <1> jmp ao09 1974 <1> ao16: 1975 00000F1E C3 <1> retn 1976 <1> 1977 <1> ; OP_M64 - 64-bit memory reference. 1978 <1> ; OP_MFLOAT - single-precision floating point memory reference. 1979 <1> ; OP_MDOUBLE - double-precision floating point memory reference. 1980 <1> ; OP_M80 - 80-bit memory reference. 1981 <1> ; OP_MXX - memory reference, size unknown. 1982 <1> ; INP: (from ac08 calling this:) 1983 <1> ; bx = index into bittab 1984 <1> ao17: 1985 00000F1F E86602 <1> call ao90 ; form reg/mem byte 1986 00000F22 8A87[0F84] <1> mov al, byte [asm_siznum + bx - (OP_FIRST_ASM_SIZNUM + 16 - 1)] 1987 00000F26 EB82 <1> jmp ao08 ; check size 1988 <1> 1989 <1> ; OP_FARIMM - far address contained in instruction 1990 <1> ao21: 1991 00000F28 8A4502 <1> mov al, byte [di+OPRND.sizearg] 1992 00000F2B 84C0 <1> test al, al ; have a size ? (check for not SIZ_NONE) 1993 00000F2D 7502 <1> jnz @F ; yes --> 1994 00000F2F B002 <1> mov al, SIZ_WORD ; default to word, assuming 16-bit CS 1995 <1> %if _PM 1996 <1> test byte [bCSAttr], 40h; is it a 32-bit CS ? 1997 <1> jz @F ; no --> 1998 <1> mov al, SIZ_DWORD ; yes, default to dword 1999 <1> %endif 2000 <1> 2001 <1> @@: 2002 00000F31 3C02 <1> cmp al, SIZ_WORD ; is it word ? 2003 00000F33 750D <1> jne .o32_check ; no, check for dword size --> 2004 <1> .o16: 2005 00000F35 800E[2683]20 <1> or byte [varflags], VAR_D16 2006 <1> ; mark flag for o16 prefix if needed 2007 <1> 2008 00000F3A 837D0A00 <1> cmp word [di+OPRND.num+2], byte 0 2009 00000F3E 7504 <1> jne ..@ao50_j_NZ ; if not a 16-bit offset --> 2010 <1> 2011 00000F40 EB0C <1> jmp short .common 2012 <1> 2013 <1> .o32_check: 2014 00000F42 3C04 <1> cmp al, SIZ_DWORD ; is it dword ? 2015 <1> ..@ao50_j_NZ: 2016 00000F44 7403E92C02 <1> jne ao50 ; no, invalid --> 2017 <1> .o32: 2018 00000F49 800E[2683]40 <1> or byte [varflags], VAR_D32 2019 <1> ; mark flag for o32 prefix if needed 2020 <1> 2021 <1> .common: 2022 00000F4E 800E[2683]04 <1> or byte [varflags], VAR_SIZ_GIVN 2023 <1> 2024 00000F53 C6450402 <1> mov byte [di+OPRND.numadd], 2 ; 2 additional bytes (segment part) 2025 00000F57 893E[1E83] <1> mov word [immaddr], di 2026 00000F5B A2[2583] <1> mov byte [opsize], al ; size of offset, 2 or 4 2027 <1> ao22a: 2028 00000F5E 893E[2083] <1> mov word [xxaddr], di 2029 00000F62 C3 <1> retn 2030 <1> 2031 <1> ; OP_REL8 - relative address 2032 <1> ao23: 2033 00000F63 807D0200 <1> cmp byte [di+OPRND.sizearg], SIZ_NONE 2034 00000F67 75DB <1> jne ..@ao50_j_NZ 2035 <1> 2036 <1> _386_PM_o32 2037 00000F69 A1[420B] <1> mov ax, word [a_addr] ; offset 2038 <1> _386_PM_o32 2039 00000F6C 40 <1> inc ax 2040 <1> _386_PM_o32 2041 00000F6D 40 <1> inc ax ; $ 2042 00000F6E 8A0E[1583] <1> mov cl, byte [asm_mn_flags] 2043 <1> 2044 00000F72 F6C180 <1> test cl, AMF_ADDR 2045 00000F75 7517 <1> jnz ao23aa 2046 <1> ; JxCXZ, LOOPx, LOOPZx and LOOPNZx need a 67h, not a 66h prefix 2047 00000F77 F6C141 <1> test cl, AMF_D32 | AMF_D16 2048 00000F7A 7418 <1> jz ao23b ; if not JxCXZ, LOOPx 2049 00000F7C F6C101 <1> test cl, AMF_D32 2050 00000F7F 7403 <1> jz ao23a 2051 00000F81 80C904 <1> or cl, AMF_A32 2052 <1> ao23a: 2053 00000F84 80E1BE <1> and cl, ~(AMF_D32 | AMF_D16) 2054 00000F87 80C980 <1> or cl, AMF_ADDR 2055 00000F8A 880E[1583] <1> mov byte [asm_mn_flags], cl 2056 <1> ao23aa: 2057 00000F8E 80E104 <1> and cl, AMF_A32 2058 <1> %if _PM 2059 <1> or cl, byte [bCSAttr] 2060 <1> jz ao23b ; 16-bit CS and addressing --> 2061 <1> cmp cl, AMF_A32| 40h 2062 <1> je ao23b ; 32-bit CS and addressing --> 2063 <1> %else 2064 00000F91 7401 <1> jz ao23b ; RM CS and 16-bit addressing --> 2065 <1> %endif 2066 <1> _386_PM_o32 2067 00000F93 40 <1> inc ax ; adjust $ for the prefix that will be used 2068 <1> ao23b: 2069 00000F94 89C3 <1> mov bx, ax 2070 00000F96 31C9 <1> xor cx, cx 2071 <1> _386_PM push eax 2072 <1> _386_PM pop ax 2073 <1> _386_PM pop cx 2074 00000F98 8B4508 <1> mov ax, word [di+OPRND.num+0] 2075 00000F9B 8B550A <1> mov dx, word [di+OPRND.num+2] 2076 00000F9E 29D8 <1> sub ax, bx 2077 00000FA0 19CA <1> sbb dx, cx 2078 <1> 2079 00000FA2 884505 <1> mov byte [di+OPRND.num2], al 2080 00000FA5 3D8000 <1> cmp ax, 80h ; just one byte beyond range ? 2081 00000FA8 750E <1> jne @F 2082 00000FAA 85D2 <1> test dx, dx 2083 00000FAC 750A <1> jnz @F ; no --> 2084 00000FAE 803C23 <1> cmp byte [si], OP_E_CX ; we're trying for loop with (e)cx explicit ? 2085 00000FB1 7505 <1> jne @F ; no --> 2086 00000FB3 800D80 <1> setopt [di + OPRND.flags], ARG_ECX_SPECIAL 2087 <1> ; remember that we have to overflow 2088 00000FB6 EB0C <1> jmp @FF 2089 <1> @@: 2090 00000FB8 B107 <1> mov cl, 7 2091 00000FBA D2F8 <1> sar al, cl 2092 00000FBC 38E0 <1> cmp al, ah 2093 00000FBE 755F <1> jne ao24 ; if too big, reject --> 2094 00000FC0 39D0 <1> cmp ax, dx 2095 00000FC2 755B <1> jne ao24 ; if too big, reject --> 2096 <1> @@: 2097 00000FC4 C6450401 <1> mov byte [di+OPRND.numadd], 1 ; save the length 2098 00000FC8 EB94 <1> jmp short ao22a ; save it away 2099 <1> 2100 <1> 2101 <1> ; OP_REL1632: relative jump/call to a longer address. 2102 <1> ; 2103 <1> ; size of instruction is 2104 <1> ; a) CS 16-bit: 2105 <1> ; 3 (xx xxxx, near jmp/call E9/E8) or 2106 <1> ; 4 (0F xx xxxx, near jcc 0F 80+cc) 2107 <1> ; 6 (66 xx xxxxxxxx, near 32-bit jmp/call E9/E8) 2108 <1> ; 7 (66 0F xx xxxxxxxx, near 32-bit jcc 0F 80+cc) 2109 <1> ; 2110 <1> ; b) CS 32-bit: 2111 <1> ; 5 (xx xxxxxxxx, near jmp/call E9/E8) or 2112 <1> ; 6 (0F xx xxxxxxxx, near jcc 0F 80+cc) 2113 <1> ; 4 (66 xx xxxx, near 16-bit jmp/call E9/E8) 2114 <1> ; 5 (66 0F xx xxxx, near 16-bit jcc 0F 80+cc) 2115 <1> ao25: 2116 00000FCA 8B1E[420B] <1> mov bx, word [a_addr+0] 2117 <1> %if _PM 2118 <1> mov cx, word [a_addr+2] 2119 <1> %else 2120 00000FCE 31C9 <1> xor cx, cx 2121 <1> %endif 2122 <1> 2123 00000FD0 31C0 <1> xor ax, ax 2124 00000FD2 8A4502 <1> mov al, byte [di+OPRND.sizearg] 2125 00000FD5 84C0 <1> test al, al ; SIZ_NONE ? 2126 00000FD7 7502 <1> jnz @F ; no --> 2127 00000FD9 B002 <1> mov al, SIZ_WORD ; in 16-bit CS default to word (2) 2128 <1> %if _PM 2129 <1> test byte [bCSAttr], 40h 2130 <1> jz @F 2131 <1> mov al, SIZ_DWORD ; in 32-bit CS default to dword (4) 2132 <1> %endif 2133 <1> @@: 2134 00000FDB 50 <1> push ax ; preserve size 2135 <1> 2136 <1> %if _PM 2137 <1> test byte [bCSAttr], 40h 2138 <1> jz .adjust_16bitcs 2139 <1> .adjust_32bitcs: 2140 <1> cmp al, SIZ_DWORD ; default size ? 2141 <1> jmp .adjust_common 2142 <1> %endif 2143 <1> 2144 <1> .adjust_16bitcs: 2145 00000FDC 3C02 <1> cmp al, SIZ_WORD ; default size ? 2146 <1> .adjust_common: 2147 00000FDE 7401 <1> je .adjust_done 2148 00000FE0 40 <1> inc ax ; no, increment for 66h prefix (osize) 2149 <1> .adjust_done: 2150 <1> 2151 00000FE1 40 <1> inc ax ; add size of opcode (E8h/E9h/80h+cc) 2152 <1> 2153 00000FE2 813E[2A83]0001 <1> cmp word [a_opcode], 100h 2154 <1> ; is it a 0Fh-prefixed opcode ? 2155 <1> ; (that is, a 0Fh 80h+cc conditional jump) 2156 00000FE8 7201 <1> jb @F 2157 00000FEA 40 <1> inc ax ; add size of 0Fh prefix opcode 2158 <1> @@: 2159 00000FEB 01C3 <1> add bx, ax 2160 00000FED 83D100 <1> adc cx, byte 0 2161 00000FF0 58 <1> pop ax ; restore size (2 or 4) 2162 00000FF1 8B550A <1> mov dx, word [di+OPRND.num+2] 2163 <1> 2164 00000FF4 3C04 <1> cmp al, SIZ_DWORD 2165 00000FF6 740B <1> je ao27_1 ; if the size given was "dword" --> 2166 <1> 2167 <1> ao27: 2168 00000FF8 85D2 <1> test dx, dx 2169 00000FFA 7523 <1> jnz ao24 ; if operand is too big, reject --> 2170 00000FFC 800E[2683]20 <1> or byte [varflags], VAR_D16 2171 00001001 EB05 <1> jmp short ao28 2172 <1> 2173 <1> ao27_1: 2174 00001003 800E[2683]40 <1> or byte [varflags], VAR_D32 2175 <1> 2176 <1> ao28: 2177 00001008 884504 <1> mov byte [di+OPRND.numadd], al ; store the size 2178 0000100B 8B4508 <1> mov ax, word [di+OPRND.num+0] 2179 0000100E 31C9 <1> xor cx, cx 2180 00001010 29D8 <1> sub ax, bx 2181 00001012 19CA <1> sbb dx, cx ; compute DX:AX - CX:BX 2182 00001014 894505 <1> mov word [di+OPRND.num2+0], ax 2183 00001017 895507 <1> mov word [di+OPRND.num2+2], dx 2184 0000101A 893E[2083] <1> mov word [xxaddr], di 2185 0000101E C3 <1> retn 2186 <1> 2187 <1> ao24: 2188 <1> ao50_j2: 2189 0000101F E95301 <1> jmp ao50 ; reject 2190 <1> 2191 <1> ; OP_1CHK - The assembler can ignore this one. 2192 <1> ao29: 2193 00001022 58 <1> pop ax ; discard return address 2194 <1> ac06_j2: 2195 00001023 E9A8FC <1> jmp ac06_j1 ; next operand 2196 <1> 2197 <1> ; OP_STI - ST(I). 2198 <1> aop_sti: 2199 00001026 B01E <1> mov al, REG_ST ; code for ST 2200 00001028 8A5D05 <1> mov bl, byte [di+OPRND.reg2] 2201 0000102B EB47 <1> jmp short ao38 ; to common code --> 2202 <1> 2203 <1> ; OP_MMX (previously was OP_ECX (used for LOOPx)) 2204 <1> aop_mmx: 2205 0000102D B01F <1> mov al, REG_MM 2206 0000102F EB3C <1> jmp short ao37 ; to common code --> 2207 <1> 2208 <1> ; OP_MMX_MOD 2209 <1> aop_mmx_mod: 2210 00001031 B01F <1> mov al, REG_MM 2211 00001033 8A5D05 <1> mov bl, byte [di+OPRND.reg2] 2212 00001036 80CBC0 <1> or bl, 0C0h 2213 00001039 EB39 <1> jmp short ao38 2214 <1> 2215 <1> ; OP_CR 2216 <1> aop_cr: 2217 0000103B 8A4505 <1> mov al, byte [di+OPRND.reg2] ; get the index 2218 0000103E 3C04 <1> cmp al, 4 2219 00001040 77DD <1> ja ao24 ; if too big, reject --> 2220 00001042 7505 <1> jne ao32 ; if not CR4 2221 00001044 C606[2283]05 <1> mov byte [dismach], 5 ; CR4 is new to the 586 2222 <1> ao32: 2223 00001049 3C01 <1> cmp al, 1 2224 0000104B 7506 <1> jne ao33 2225 0000104D 807D0CFF <1> cmp byte [di+OPRND_size+OPRND.flags], -1 2226 00001051 75CC <1> jne ao24 ; reject if no other arg (can't mov CR1,xx) 2227 <1> ao33: 2228 00001053 B020 <1> mov al, REG_CR ; code for CR 2229 00001055 EB16 <1> jmp short ao37 ; to common code 2230 <1> 2231 <1> ; OP_DR 2232 <1> ao34: 2233 00001057 B021 <1> mov al, REG_DR ; code for DR 2234 00001059 EB12 <1> jmp short ao37 ; to common code 2235 <1> 2236 <1> ; OP_TR 2237 <1> ao35: 2238 0000105B 8A4505 <1> mov al, byte [di+OPRND.reg2] ; get the index 2239 0000105E 3C03 <1> cmp al, 3 2240 00001060 72BD <1> jb ao24 ; if too small, reject --> 2241 00001062 3C06 <1> cmp al, 6 2242 00001064 7305 <1> jae ao36 2243 00001066 C606[2283]04 <1> mov byte [dismach], 4 ; TR3-5 are new to the 486 2244 <1> ao36: 2245 0000106B B022 <1> mov al, REG_TR ; code for TR 2246 <1> 2247 <1> ; Common code for these weird registers. 2248 <1> ao37: 2249 0000106D 8A5D05 <1> mov bl, byte [di+OPRND.reg2] 2250 00001070 B103 <1> mov cl, 3 2251 00001072 D2E3 <1> shl bl, cl 2252 <1> ao38: 2253 00001074 081E[1C83] <1> or byte [regmem], bl 2254 00001078 800E[2683]02 <1> or byte [varflags], VAR_MODRM 2255 0000107D 3A4504 <1> cmp al, byte [di+OPRND.reg1] ; check for the right numbered register 2256 00001080 7419 <1> je ao40 ; if yes, then return 2257 <1> ao38a: 2258 00001082 E9F000 <1> jmp ao50 ; reject --> 2259 <1> 2260 <1> ; OP_SEGREG 2261 <1> ao39: 2262 00001085 8A4504 <1> mov al, byte [di+OPRND.reg1] 2263 00001088 2C18 <1> sub al, 24 2264 0000108A 3C06 <1> cmp al, 6 2265 0000108C 73F4 <1> jae ao38a ; if not a segment register, reject --> 2266 0000108E B103 <1> mov cl, 3 2267 00001090 D2E0 <1> shl al, cl 2268 00001092 0806[1C83] <1> or byte [regmem], al 2269 <1> ;--- v1.26: don't force size for MOV sreg, mxx / MOV mxx, sreg 2270 00001096 800E[2683]04 <1> or byte [varflags], VAR_SIZ_GIVN 2271 <1> ao40: 2272 0000109B C3 <1> retn 2273 <1> 2274 <1> ; OP_IMMS8 - Sign-extended immediate byte (PUSH xx) 2275 <1> ao41: 2276 0000109C 8026[2683]EF <1> and byte [varflags], ~VAR_SIZ_NEED ; added for v1.09. Ok? 2277 <1> ao41_extend: 2278 000010A1 8B4508 <1> mov ax, word [di+OPRND.num+0] 2279 000010A4 B107 <1> mov cl, 7 2280 000010A6 D2F8 <1> sar al, cl 2281 000010A8 EB05 <1> jmp short ao43 ; common code 2282 <1> 2283 <1> ; OP_IMM8 - Immediate byte 2284 <1> ao42: 2285 000010AA 8B4508 <1> mov ax, word [di+OPRND.num+0] 2286 000010AD B000 <1> mov al, 0 2287 <1> ao43: 2288 000010AF 38E0 <1> cmp al, ah 2289 000010B1 7403E9BF00 <1> jne ao50 ; if too big, reject --> 2290 000010B6 3B450A <1> cmp ax, word [di+OPRND.num+2] 2291 000010B9 7403E9B700 <1> jne ao50 ; if too big, reject --> 2292 000010BE B001 <1> mov al, SIZ_BYTE 2293 000010C0 E8B700 <1> call aasizchk ; check that size == 0 or 1 2294 000010C3 8A6508 <1> mov ah, byte [di+OPRND.num+0] ; store the byte, length 1 2295 000010C6 894504 <1> mov word [di+OPRND.numadd], ax ; store length (0/1) + the byte 2296 000010C9 893E[2083] <1> mov word [xxaddr], di 2297 <1> ao43r: 2298 000010CD C3 <1> retn 2299 <1> 2300 <1> 2301 <1> aop_e_cx: 2302 000010CE B980FB <1> mov cx, AMF_ADDR | 0 | (~AMF_A32 << 8) 2303 000010D1 837D0409 <1> cmp word [di + OPRND.reg1], REG_CX 2304 000010D5 740B <1> je .a16 2305 <1> .a32: 2306 000010D7 B984FF <1> mov cx, AMF_ADDR | AMF_A32 | (~0 << 8) 2307 000010DA E80500 <1> call .common 2308 000010DD B011 <1> mov al, REG_CX + 8 2309 000010DF E98D00 <1> jmp ao48a 2310 <1> 2311 <1> .a16: 2312 <1> .common: 2313 000010E2 202E[1583] <1> and byte [asm_mn_flags], ch 2314 000010E6 080E[1583] <1> or byte [asm_mn_flags], cl 2315 <1> 2316 000010EA 8B1E[2083] <1> mov bx, word [xxaddr] 2317 000010EE 8A0E[1583] <1> mov cl, byte [asm_mn_flags] 2318 000010F2 80E104 <1> and cl, AMF_A32 2319 <1> %if _PM 2320 <1> or cl, byte [bCSAttr] 2321 <1> jz .noprefix ; 16-bit CS and addressing --> 2322 <1> cmp cl, AMF_A32| 40h 2323 <1> je .noprefix ; 32-bit CS and addressing --> 2324 <1> %else 2325 000010F5 740B <1> jz .noprefix ; 86 Mode CS and 16-bit addressing --> 2326 <1> %endif 2327 000010F7 FE4F05 <1> dec byte [bx + OPRND.num2] 2328 000010FA 7105 <1> jno .ret ; (no need to check special flag) 2329 <1> .prefix_overflow: 2330 000010FC F60780 <1> testopt [bx + OPRND.flags], ARG_ECX_SPECIAL 2331 000010FF 7406 <1> jz .ao50 ; not special, overflow -128 to +127 2332 <1> ; special, accept +128 to +127 2333 <1> .ret: 2334 00001101 C3 <1> retn 2335 <1> 2336 <1> .noprefix: 2337 00001102 F60780 <1> testopt [bx + OPRND.flags], ARG_ECX_SPECIAL 2338 00001105 74FA <1> jz .ret ; not special, no prefix 2339 <1> ; special and no prefix: reject 2340 <1> .ao50: 2341 00001107 EB6C <1> jmp ao50 2342 <1> 2343 <1> 2344 <1> ; OP_SHOSIZ - force the user to declare the size of the next operand 2345 <1> ao44: 2346 00001109 F606[2683]10 <1> test byte [varflags], VAR_SIZ_NEED 2347 0000110E 7407 <1> jz ao45 ; if no testing needs to be done 2348 00001110 F606[2683]04 <1> test byte [varflags], VAR_SIZ_GIVN 2349 00001115 745E <1> jz ao50 ; if size was given ( ==> reject) 2350 <1> ao45: 2351 00001117 8026[2683]FB <1> and byte [varflags], ~VAR_SIZ_GIVN ; clear the flag 2352 0000111C 803C11 <1> cmp byte [si], OP_IMM8 2353 0000111F 7405 <1> je ao45a ; if OP_IMM8 is next, then don't set VAR_SIZ_NEED 2354 00001121 800E[2683]10 <1> or byte [varflags], VAR_SIZ_NEED 2355 <1> ao45a: 2356 <1> 2357 <1> ; hack for pushd/pushw imm (the only OP_SHOSIZ with suffix), 2358 <1> ; set operand size to 2 for pushw, 4 for pushd. 2359 <1> ; this is checked by ao15 later so as to match. 2360 00001126 B002 <1> mov al, 2 2361 00001128 8A26[1483] <1> mov ah, byte [aa_mnemsuffix] 2362 <1> ; 0 = normal, 'W' suffix, or 'D' suffix 2363 0000112C 80FC44 <1> cmp ah, 'D' 2364 0000112F 7407 <1> je @F ; if D, al = 2 --> 2365 00001131 48 <1> dec ax ; al = 1 2366 00001132 80FC57 <1> cmp ah, 'W' 2367 00001135 7401 <1> je @F ; if W, al = 1 --> 2368 00001137 48 <1> dec ax ; al = 0 2369 <1> @@: 2370 00001138 00C0 <1> add al, al ; 0 = no suffix, 2 = 'W' suffix, 4 = 'D' suffix 2371 <1> ; as 0 = SIZ_NONE, 2 = SIZ_WORD, 4 = SIZ_DWORD 2372 0000113A A2[2583] <1> mov byte [opsize], al 2373 <1> ao_modifier_continue: 2374 0000113D 58 <1> pop ax ; discard return address 2375 0000113E E9E2FE <1> jmp ac06_j2 ; next operand 2376 <1> 2377 <1> 2378 <1> ao_short: 2379 00001141 B001 <1> mov al, odfShort 2380 <1> ao_distance: 2381 00001143 0806[2783] <1> or byte [alloweddist], al 2382 00001147 EBF4 <1> jmp ao_modifier_continue 2383 <1> 2384 <1> ao_near: 2385 00001149 B002 <1> mov al, odfNear 2386 0000114B EBF6 <1> jmp ao_distance 2387 <1> 2388 <1> ao_far_required: 2389 0000114D F6450104 <1> test byte [di + OPRND.distflags], odfFar 2390 00001151 7422 <1> jz ao50 ; if not far, reject --> 2391 <1> ao_far: 2392 00001153 B004 <1> mov al, odfFar 2393 00001155 EBEC <1> jmp ao_distance 2394 <1> 2395 <1> 2396 <1> ; OP_1 2397 <1> ao46: 2398 00001157 817D070101 <1> cmp word [di+OPRND.orednum], 101h 2399 <1> ; check both size and value (OPRND.num) 2400 0000115C EB15 <1> jmp short ao49 ; test it later 2401 <1> 2402 <1> ; OP_3 2403 <1> ao47: 2404 0000115E 807D0200 <1> cmp byte [di + OPRND.sizearg], SIZ_NONE 2405 00001162 7511 <1> jne ao50 ; if BYTE is specified, reject this --> 2406 00001164 817D070103 <1> cmp word [di+OPRND.orednum], 301h 2407 <1> ; check both size and value (OPRND.num) 2408 00001169 EB08 <1> jmp short ao49 ; test it later 2409 <1> 2410 <1> ; OP_DX, OP_CL, OP_ST, OP_ES, ..., OP_GS 2411 <1> ; INP: (from ac08 calling this:) 2412 <1> ; bx = index into bittab 2413 <1> ao48: 2414 0000116B 8A87[E183] <1> mov al, [asm_regnum + bx - (OP_FIRST_ASM_REGNUM + 16 - 1)] 2415 <1> ao48a: 2416 0000116F 98 <1> cbw 2417 00001170 3B4504 <1> cmp ax, word [di+OPRND.reg1] 2418 <1> 2419 <1> ao49: 2420 00001173 7404 <1> je ao51 2421 <1> 2422 <1> ; Reject this operand list. 2423 <1> ao50: 2424 00001175 58 <1> pop ax ; discard return address 2425 00001176 E97BFA <1> jmp ac01 ; go back to try the next alternative 2426 <1> 2427 <1> ao51: 2428 00001179 C3 <1> retn 2429 <1> 2430 <1> ; AASIZCHK - Check that the size given is 0 or AL. 2431 <1> aasizchk: 2432 0000117A 807D0200 <1> cmp byte [di+OPRND.sizearg], SIZ_NONE 2433 0000117E 74F9 <1> je ao51 2434 00001180 384502 <1> cmp byte [di+OPRND.sizearg], al 2435 00001183 74F4 <1> je ao51 2436 00001185 58 <1> pop ax ; discard return address 2437 00001186 EBED <1> jmp short ao50 ; reject this list --> 2438 <1> 2439 <1> ; Do reg/mem processing. 2440 <1> ; 2441 <1> ; INP: di-> OPRND structure 2442 <1> ; CHG: ax 2443 <1> ao90: 2444 00001188 F60504 <1> test byte [di+OPRND.flags], ARG_JUSTREG 2445 0000118B 7516 <1> jnz ao92 ; if just register 2446 0000118D F60502 <1> test byte [di+OPRND.flags], ARG_MODRM 2447 00001190 7405 <1> jz ao91 ; if no precomputed MOD R/M byte 2448 00001192 8B4504 <1> mov ax, word [di+OPRND.reg1] ; get the precomputed bytes 2449 00001195 EB1A <1> jmp short ao93 ; done 2450 <1> 2451 <1> ao91: 2452 00001197 B006 <1> mov al, 6 ; convert plain displacement to MOD R/M 2453 00001199 F606[1583]04 <1> test byte [asm_mn_flags], AMF_A32 2454 0000119E 7411 <1> jz ao93 ; if 16-bit addressing 2455 000011A0 48 <1> dec ax 2456 000011A1 EB0E <1> jmp short ao93 ; done 2457 <1> 2458 <1> ao92: 2459 000011A3 8A4504 <1> mov al, byte [di+OPRND.reg1] ; convert register to MOD R/M 2460 <1> %if 1 2461 000011A6 3C1F <1> cmp al, REG_MM 2462 000011A8 7503 <1> jne .notmm 2463 000011AA 8A4505 <1> mov al, byte [di+OPRND.reg2] 2464 <1> .notmm: 2465 <1> %endif 2466 000011AD 2407 <1> and al, 7 ; get low 3 bits 2467 000011AF 0CC0 <1> or al, 0C0h 2468 <1> 2469 <1> ao93: 2470 000011B1 0906[1C83] <1> or word [regmem], ax ; store the MOD R/M and SIB 2471 000011B5 800E[2683]02 <1> or byte [varflags], VAR_MODRM ; flag its presence 2472 000011BA 893E[1A83] <1> mov word [rmaddr], di ; save a pointer 2473 000011BE C3 <1> retn ; done 2474 <1> 2475 <1> ; AAIFNUM - Determine if a number starts here 2476 <1> ; 2477 <1> ; INP: al = first character 2478 <1> ; si-> next character 2479 <1> ; OUT: CY if no number starts there 2480 <1> ; NC if a number starts there 2481 <1> ; CHG: - 2482 <1> ; 2483 <1> ; Note: Actually checks for a plus or minus sign that 2484 <1> ; is followed by a valid (hexadecimal) digit, 2485 <1> ; or just a digit without specified sign. 2486 <1> aaifnum: 2487 000011BF 56 <1> push si 2488 000011C0 50 <1> push ax 2489 000011C1 3C2D <1> cmp al, '-' ; minus or plus sign ? 2490 000011C3 7404 <1> je @F 2491 000011C5 3C2B <1> cmp al, '+' 2492 000011C7 7503 <1> jne @FF ; no --> 2493 <1> @@: 2494 000011C9 E8D69B <1> call skipwhite ; skip sign, and (if any) blanks 2495 <1> @@: 2496 000011CC 3C28 <1> cmp al, '(' 2497 000011CE F9 <1> stc 2498 000011CF 7404 <1> je @F 2499 000011D1 2C30 <1> sub al, '0' 2500 000011D3 3C0A <1> cmp al, 10 2501 <1> @@: 2502 000011D5 58 <1> pop ax 2503 000011D6 7208 <1> jb @F ; if a decimal digit --> 2504 <1> 2505 000011D8 50 <1> push ax 2506 000011D9 24DF <1> and al, TOUPPER 2507 000011DB 2C41 <1> sub al, 'A' 2508 000011DD 3C06 <1> cmp al, 6 2509 000011DF 58 <1> pop ax 2510 <1> @@: 2511 000011E0 F5 <1> cmc ; carry clear <==> it's a number 2512 000011E1 5E <1> pop si 2513 000011E2 C3 <1> retn 2514 <1> 2515 <1> 2516 <1> ; AAGETI - Get a number from the input line. 2517 <1> ; 2518 <1> ; Entry AL First character of number 2519 <1> ; SI Address of next character of number 2520 <1> ; Exit DX:BX Resulting number 2521 <1> ; CL 1 if it's a byte, 2 if a word, 4 if a dword 2522 <1> ; AL Next character not in number 2523 <1> ; SI Address of next character after that 2524 <1> ; Uses AH, CH 2525 <1> aageti: 2526 <1> ; Incorporate expression evaluator here. 2527 000011E3 3C2D <1> cmp al, '-' 2528 000011E5 7416 <1> je aag1 ; if negative number --> 2529 000011E7 3C2B <1> cmp al, '+' ; (unnecessary) plus sign ? 2530 000011E9 7503 <1> jne @F ; no --> 2531 000011EB E8B49B <1> call skipwhite ; skip it, plus blanks 2532 <1> @@: 2533 000011EE E84100 <1> call aag4 ; get the bare number 2534 000011F1 B90100 <1> mov cx, 1 ; set up cx 2535 000011F4 09D2 <1> or dx, dx 2536 000011F6 7536 <1> jnz aag2 ; if dword 2537 000011F8 08FF <1> or bh, bh 2538 000011FA 7534 <1> jnz aag3 ; if word 2539 000011FC C3 <1> retn ; it's a byte 2540 <1> 2541 <1> aag1: 2542 000011FD E8A29B <1> call skipwhite 2543 00001200 E82F00 <1> call aag4 ; get the bare number 2544 00001203 89D9 <1> mov cx, bx 2545 00001205 09D1 <1> or cx, dx 2546 00001207 B90100 <1> mov cx, 1 2547 0000120A 7421 <1> jz aag1a ; if -0 2548 0000120C F7D2 <1> not dx ; negate the answer 2549 0000120E F7DB <1> neg bx 2550 00001210 F5 <1> cmc 2551 00001211 83D200 <1> adc dx, byte 0 2552 00001214 F6C680 <1> test dh, 80h 2553 00001217 7453 <1> jz aag7 ; if error 2554 00001219 83FAFF <1> cmp dx, byte -1 2555 0000121C 7510 <1> jne aag2 ; if dword 2556 0000121E F6C780 <1> test bh, 80h 2557 00001221 740B <1> jz aag2 ; if dword 2558 00001223 80FFFF <1> cmp bh, -1 2559 00001226 7508 <1> jne aag3 ; if word 2560 00001228 F6C380 <1> test bl, 80h 2561 0000122B 7403 <1> jz aag3 ; if word 2562 <1> aag1a: 2563 <1> aag4.got_expr: 2564 0000122D C3 <1> retn ; it's a byte 2565 <1> 2566 <1> aag2: 2567 0000122E 41 <1> inc cx ;return: it's a dword 2568 0000122F 41 <1> inc cx 2569 <1> aag3: 2570 00001230 41 <1> inc cx ;return: it's a word 2571 00001231 C3 <1> retn 2572 <1> 2573 <1> aag4: 2574 00001232 3C28 <1> cmp al, '(' 2575 00001234 7511 <1> jne .not_expr 2576 00001236 AC <1> lodsb ; skip opening paren 2577 00001237 E82A95 <1> call getexpression ; returns bx:dx = numerical value 2578 0000123A 87DA <1> xchg bx, dx ; dx:bx = number 2579 0000123C E8649B <1> call skipwh0 2580 0000123F 3C29 <1> cmp al, ')' 2581 00001241 AC <1> lodsb 2582 00001242 74E9 <1> je .got_expr 2583 00001244 4E <1> dec si 2584 00001245 EB25 <1> jmp aag7 2585 <1> 2586 <1> .not_expr: 2587 00001247 31DB <1> xor bx, bx ; get the basic integer 2588 00001249 31D2 <1> xor dx, dx 2589 0000124B E8039A <1> call getnyb 2590 0000124E 721C <1> jc aag7 ; if not a hex digit 2591 <1> aag5: 2592 00001250 08C3 <1> or bl, al ; add it to the number 2593 <1> @@: 2594 00001252 AC <1> lodsb 2595 00001253 3C5F <1> cmp al, '_' 2596 00001255 74FB <1> je @B 2597 00001257 E8F799 <1> call getnyb 2598 0000125A 72D1 <1> jc aag1a ; if done 2599 0000125C F6C6F0 <1> test dh, 0F0h 2600 0000125F 750B <1> jnz aag7 ; if overflow 2601 00001261 B90400 <1> mov cx, 4 2602 <1> aag6: 2603 00001264 D1E3 <1> shl bx, 1 ; shift it by 4 2604 00001266 D1D2 <1> rcl dx, 1 2605 00001268 E2FA <1> loop aag6 2606 0000126A EBE4 <1> jmp short aag5 2607 <1> 2608 <1> aag7: 2609 0000126C E94D86 <1> jmp error 2610 <1> 2611 <1> ; AACONVINDEX - Convert results from AAGETI and store index value 2612 <1> ; 2613 <1> ; Entry DX:BX,CL As in exit from AAGETI 2614 <1> ; DI Points to information record for this arg 2615 <1> ; Exit SS bits stored in [di+OPRND.index] 2616 <1> ; Uses DL 2617 <1> aaconvindex: 2618 0000126F 80F901 <1> cmp cl, 1 2619 00001272 7517 <1> jne aacv1 ; if the number is too large 2620 00001274 80FB01 <1> cmp bl, 1 2621 00001277 7414 <1> je aacv2 ; if 1 2622 00001279 42 <1> inc dx 2623 0000127A 80FB02 <1> cmp bl, 2 2624 0000127D 740E <1> je aacv2 ; if 2 2625 0000127F 42 <1> inc dx 2626 00001280 80FB04 <1> cmp bl, 4 2627 00001283 7408 <1> je aacv2 ; if 4 2628 00001285 42 <1> inc dx 2629 00001286 80FB08 <1> cmp bl, 8 2630 00001289 7402 <1> je aacv2 ; if 8 2631 <1> aacv1: 2632 0000128B EBDF <1> jmp short aag7 ; error 2633 <1> 2634 <1> aacv2: 2635 0000128D 885506 <1> mov byte [di+OPRND.index], dl ; save the value 2636 00001290 C3 <1> retn 2637 <1> 2638 <1> ; AAGETREG - Get register for the assembler. 2639 <1> ; 2640 <1> ; Entry DI Start of register table 2641 <1> ; CX Length of register table (or 0) 2642 <1> ; SI Address of first character in register name 2643 <1> ; Exit NC if a register was found, 2644 <1> ; SI Updated if a register was found 2645 <1> ; BX Register number, defined as in the table below 2646 <1> ; Uses AX, CX, DI 2647 <1> ; 2648 <1> ; Exit value of BX: 2649 <1> ; DI = rgnam816, CX = 27 DI = rgnam16, CX = 8 2650 <1> ; ---------------------- -------------------- 2651 <1> ; 0 .. 7: AL .. BH 0 .. 7: AX .. DI 2652 <1> ; 8 .. 15: AX .. DI 2653 <1> ; 16 .. 23: EAX..EDI 16 .. 23: EAX..EDI 2654 <1> ; 24 .. 29: ES .. GS 2655 <1> ; 30 .. 34: ST .. TR 2656 <1> ; (This has to match the REG_ equs defined in uu.asm 2657 <1> ; around rgnam816 and following.) 2658 <1> aagetreg: 2659 00001291 8B04 <1> mov ax, word [si] 2660 00001293 25DFDF <1> and ax, TOUPPER_W ; convert to upper case 2661 00001296 3C45 <1> cmp al, 'E' ; check for EAX, etc. 2662 00001298 7522 <1> jne aagr1 ; if not 'E' --> (NZ) 2663 0000129A 50 <1> push ax 2664 0000129B 88E0 <1> mov al, ah 2665 0000129D 8A6402 <1> mov ah, byte [si+2] 2666 000012A0 80E4DF <1> and ah, TOUPPER 2667 000012A3 57 <1> push di 2668 000012A4 BF[6289] <1> mov di, rgnam16 2669 000012A7 51 <1> push cx 2670 000012A8 B90800 <1> mov cx, N_REGS16 2671 000012AB F2AF <1> repne scasw 2672 000012AD 89CB <1> mov bx, cx 2673 000012AF 59 <1> pop cx 2674 000012B0 5F <1> pop di 2675 000012B1 58 <1> pop ax 2676 000012B2 7508 <1> jne aagr1 ; if no match --> (NZ) 2677 000012B4 46 <1> inc si 2678 000012B5 F7D3 <1> not bx 2679 000012B7 80C318 <1> add bl, 8+16 ; adjust BX 2680 000012BA EB11 <1> jmp short aagr2 ; finish up 2681 <1> 2682 <1> aagr1: ; (entered with NZ) 2683 000012BC 89CB <1> mov bx, cx ; (if cx = 0, this is always reached with 2684 000012BE F2AF <1> repne scasw ; ZF clear, that is, NZ) 2685 000012C0 750F <1> jne aagr3 ; if no match 2686 000012C2 29CB <1> sub bx, cx 2687 000012C4 4B <1> dec bx 2688 000012C5 80FB10 <1> cmp bl, 16 2689 000012C8 7203 <1> jb aagr2 ; if AL .. BH or AX .. DI 2690 000012CA 80C308 <1> add bl, 8 2691 <1> aagr2: 2692 000012CD 46 <1> inc si ; skip the register name 2693 000012CE 46 <1> inc si 2694 000012CF F8 <1> clc 2695 000012D0 C3 <1> retn 2696 <1> aagr3: 2697 000012D1 F9 <1> stc ; not found 2698 000012D2 C3 <1> retn 2348 %include "dd.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug D commands - Dump data 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2012 C. Masloch 8 <1> 9 <1> Usage of the works is permitted provided that this 10 <1> instrument is retained with the works, so that any entity 11 <1> that uses the works is notified of this instrument. 12 <1> 13 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 14 <1> 15 <1> %endif 16 <1> 17 <1> 18 <1> usesection lDEBUG_DATA_ENTRY 19 0000843A 00 <1> align 4, db 0 20 0000843C 0000 <1> ddoffset: dw 0 ; offset word for dd 21 <1> ; (number of skipped bytes at start of line) 22 <1> %if _PM 23 <1> dw 0 ; high word initialised to and fixed at zero 24 <1> %endif 25 0000843E 0000 <1> ddskipped: dw 0 26 <1> %if _PM 27 <1> dw 0 ; high word initialised to and fixed at zero 28 <1> %endif 29 00008440 0100 <1> ddsize: dw 1 ; size of dd item 30 00008442 00 <1> ddoffset2: db 0 31 <1> 32 <1> 33 <1> usesection lDEBUG_CODE 34 <1> 35 <1> ; D command - hex/ASCII dump. 36 <1> ddd: 37 <1> %if _INT || _PM || _MCB || _DSTRINGS 38 000012D3 E8E46E <1> call uppercase 39 <1> %endif 40 000012D6 86C4 <1> xchg al, ah 41 000012D8 8A44FE <1> mov al, byte [si - 2] 42 000012DB E8DC6E <1> call uppercase 43 000012DE 3C44 <1> cmp al, 'D' 44 000012E0 86C4 <1> xchg al, ah 45 000012E2 755C <1> jne .not_d_suffix 46 <1> %if _DSTRINGS 47 000012E4 3C5A <1> cmp al, 'Z' ; DZ command ? 48 000012E6 7503E9AB02 <1> je dz ; yes --> 49 000012EB 3C24 <1> cmp al, '$' ; D$ command ? 50 000012ED 7503E97D02 <1> je dcpm ; yes --> 51 000012F2 3C23 <1> cmp al, '#' ; D# command ? 52 000012F4 7503E99002 <1> je dcounted ; yes --> 53 000012F9 3C57 <1> cmp al, 'W' 54 000012FB 750B <1> jne .notstring 55 000012FD 50 <1> push ax 56 000012FE AC <1> lodsb 57 000012FF 3C23 <1> cmp al, '#' ; DW# command ? 58 00001301 58 <1> pop ax 59 00001302 7503E97502 <1> je dwcounted ; yes --> 60 00001307 4E <1> dec si 61 <1> .notstring: 62 <1> %endif 63 <1> %if _INT 64 00001308 3C49 <1> cmp al, 'I' ; DI command ? 65 0000130A 750D <1> jne .notdi 66 <1> %if 1 67 0000130C 50 <1> push ax 68 0000130D AC <1> lodsb 69 0000130E 4E <1> dec si 70 0000130F 24DF <1> and al, TOUPPER 71 00001311 3C50 <1> cmp al, 'P' ; distinguish 'di ...' and 'd ip' 72 00001313 58 <1> pop ax 73 00001314 7403 <1> je .notdi 74 <1> %endif 75 00001316 E91E03 <1> jmp gateout ; yes --> 76 <1> .notdi: 77 <1> %endif 78 <1> %if _PM 79 <1> cmp al, 'L' ; DL command ? 80 <1> jne .notdl 81 <1> jmp descout ; yes --> 82 <1> .notdl: 83 <1> cmp al, 'X' ; DX command ? 84 <1> _386 je extmem ; yes --> 85 <1> .notdx: 86 <1> %endif 87 <1> %if _MCB 88 00001319 3C4D <1> cmp al, 'M' ; DM command ? 89 0000131B 7503 <1> jne .notdm 90 0000131D E9AF08 <1> jmp mcbout ; yes --> 91 <1> .notdm: 92 <1> %endif 93 00001320 B90100 <1> mov cx, 1 94 00001323 3C42 <1> cmp al, 'B' 95 00001325 740B <1> je .d_suffix_size 96 00001327 41 <1> inc cx ; = 2 97 00001328 3C57 <1> cmp al, 'W' 98 0000132A 7406 <1> je .d_suffix_size 99 0000132C 41 <1> inc cx 100 0000132D 41 <1> inc cx ; = 4 101 0000132E 3C44 <1> cmp al, 'D' 102 00001330 750E <1> jne .not_d_suffix 103 <1> .d_suffix_size: 104 00001332 880E[4084] <1> mov byte [ddsize], cl 105 00001336 E8699A <1> call skipwhite 106 00001339 E8119A <1> call iseol? 107 0000133C 7523 <1> jne dd1 ; jump to getting range --> (with new size) 108 0000133E EB08 <1> jmp lastddd ; default range (ADS:ADO length 128), 109 <1> ; but with new size --> 110 <1> 111 <1> .not_d_suffix: 112 00001340 E8609A <1> call skipwh0 113 00001343 E8079A <1> call iseol? 114 00001346 7514 <1> jne dd1_bytes ; if an address was given --> (set byte size) 115 <1> 116 <1> lastddd: 117 <1> ; byte [ddsize] = size already set 118 <1> _386_PM_o32 ; mov edx, dword [d_addr] 119 00001348 8B16[480B] <1> mov dx, word [d_addr] ; compute range of 80h or until end of segment 120 <1> _386_PM_o32 ; mov esi, edx 121 0000134C 89D6 <1> mov si, dx 122 0000134E 8B1E[4C0B] <1> mov bx, [d_addr + saSegSel] 123 <1> _386_PM call test_d_b_bit 124 <1> _386_PM jnz .32 125 00001352 83C27F <1> add dx, byte 7Fh 126 00001355 731F <1> jnc dd2_0 127 00001357 83CAFF <1> or dx, byte -1 128 0000135A EB1A <1> jmp short dd2_0 129 <1> 130 <1> %if _PM 131 <1> [cpu 386] 132 <1> .32: 133 <1> add edx, byte 7Fh 134 <1> jnc dd2_0 ; if no overflow 135 <1> or edx, byte -1 136 <1> jmp short dd2_0 137 <1> __CPU__ 138 <1> %endif 139 <1> 140 <1> dd1_bytes: 141 0000135C C606[4084]01 <1> mov byte [ddsize], 1 142 <1> dd1: 143 00001361 B98000 <1> mov cx, 80h ; default length (128 bytes) 144 00001364 8B1E[7C0C] <1> mov bx, word [reg_ds] 145 00001368 E84489 <1> call getrangeX ; get address range into bx:(e)dx 146 0000136B E8F499 <1> call chkeol ; expect end of line here 147 <1> 148 0000136E 891E[4C0B] <1> mov word [d_addr + saSegSel], bx 149 <1> ; save segment (offset is saved later) 150 <1> %if _PM 151 <1> call ispm 152 <1> jnz .86m 153 <1> .pm: 154 <1> mov word [d_addr + saSelector], bx 155 <1> jmp @F 156 <1> .86m: 157 <1> mov word [d_addr + saSegment], bx 158 <1> @@: 159 <1> %endif 160 <1> _386_PM_o32 ; mov esi, edx 161 00001372 89D6 <1> mov si, dx ; bx:(e)si = start 162 <1> _386_PM_o32 ; mov edx, ecx 163 00001374 89CA <1> mov dx, cx ; bx:(e)dx = last 164 <1> %if _PM && 0 165 <1> jmp short dd2_1 166 <1> %endif 167 <1> 168 <1> ; Parsing is done. Print first line. 169 <1> dd2_0: 170 <1> %if _PM 171 <1> call ispm 172 <1> jnz dd2_1 173 <1> [cpu 286] 174 <1> verr bx ; readable ? 175 <1> __CPU__ 176 <1> jz dd2_1 177 <1> %if 1 178 <1> mov dx, .errmsg 179 <1> jmp putsz_error 180 <1> usesection lDEBUG_DATA_ENTRY 181 <1> .errmsg:asciz "Segment is not readable.",13,10 182 <1> usesection lDEBUG_CODE 183 <1> %else 184 <1> mov bx, word [reg_ds] 185 <1> mov word [d_addr + saSegSel], bx 186 <1> %if _PM 187 <1> call ispm 188 <1> jnz .86m 189 <1> .pm: 190 <1> mov word [d_addr + saSelector], bx 191 <1> jmp @F 192 <1> .86m: 193 <1> mov word [d_addr + saSegment], bx 194 <1> @@: 195 <1> %endif 196 <1> %endif 197 <1> dd2_1: 198 <1> %endif 199 <1> 200 00001376 A1[4084] <1> mov ax, word [ddsize] 201 00001379 48 <1> dec ax ; 0 = byte, 1 = word, 3 = dword 202 0000137A 21F0 <1> and ax, si ; how many bytes to skip at the beginning 203 0000137C A2[4284] <1> mov byte [ddoffset2], al 204 <1> 205 0000137F B80100 <1> mov ax, opt2_db_header 206 00001382 803E[4084]02 <1> cmp byte [ddsize], 2 207 00001387 7207 <1> jb @F 208 00001389 B010 <1> mov al, opt2_dw_header 209 0000138B 7403 <1> je @F 210 0000138D B80001 <1> mov ax, opt2_dd_header 211 <1> @@: 212 00001390 E81400 <1> call dd_header_or_trailer 213 <1> 214 <1> 215 <1> %if _SYMBOLIC 216 <1> dd_with_sym: 217 <1> lframe near 218 <1> lvar dword, startlinear 219 <1> lvar dword, endlinear 220 <1> lvar word, sym_index 221 <1> lvar word, sym_count 222 <1> lenter 223 <1> xor ax, ax 224 <1> lvar dword, offset 225 <1> push ax ; (zero-initialise high word) 226 <1> push ax 227 <1> lvar dword, adjust 228 <1> push ax ; (zero-initialise high word) 229 <1> push ax ; (zero-initialise offset (low) word) 230 <1> 231 <1> _386_PM_o32 232 <1> mov word [bp + ?offset], si 233 <1> 234 <1> push bx 235 <1> _386_PM_o32 236 <1> push si 237 <1> _386_PM_o32 238 <1> push dx 239 <1> 240 <1> _386_PM_o32 241 <1> xchg dx, si ; bx:(e)dx = start address, bx:(e)si = end 242 <1> call getlinear ; dx:ax = start linear 243 <1> jc .justdisplay 244 <1> 245 <1> mov word [bp + ?startlinear + 2], dx 246 <1> mov word [bp + ?startlinear], ax 247 <1> push dx 248 <1> push ax 249 <1> 250 <1> _386_PM_o32 251 <1> xchg dx, si ; bx:(e)dx = end address 252 <1> call getlinear ; dx:ax = end linear 253 <1> 254 <1> mov word [bp + ?endlinear + 2], dx 255 <1> mov word [bp + ?endlinear], ax 256 <1> pop bx 257 <1> pop cx ; cx:bx = start linear 258 <1> jc .justdisplay 259 <1> 260 <1> xchg ax, bx 261 <1> xchg dx, cx ; cx:bx = end linear, dx:ax = start linear 262 <1> 263 <1> call binsearchmain ; es:di -> first entry, cx = number, bx = index 264 <1> mov word [bp + ?sym_index], bx 265 <1> test cx, cx 266 <1> jz .justdisplay 267 <1> 268 <1> _386_PM_o32 269 <1> pop dx 270 <1> _386_PM_o32 271 <1> pop si 272 <1> pop bx 273 <1> 274 <1> .loop: 275 <1> mov word [bp + ?sym_count], cx 276 <1> 277 <1> .loop_no_cx: 278 <1> push word [bp + ?sym_index] 279 <1> push ax ; (reserve space, uninitialised) 280 <1> call getfarpointer.main 281 <1> pop di 282 <1> pop es 283 <1> 284 <1> mov bx, word [bp + ?adjust + 2] 285 <1> mov cx, word [bp + ?adjust] 286 <1> ; bx:cx = adjust 287 <1> 288 <1> add cx, word [bp + ?startlinear] 289 <1> adc bx, word [bp + ?startlinear + 2] 290 <1> ; bx:cx = adjust + start linear (adjust linear) 291 <1> 292 <1> neg bx 293 <1> neg cx 294 <1> sbb bx, byte 0 ; neg bx:cx 295 <1> 296 <1> add cx, word [es:di + smLinear] 297 <1> adc bx, word [es:di + smLinear + 2] 298 <1> ; bx:cx = next linear - adjust linear 299 <1> ; bx:cx = how far from adjust linear to next 300 <1> 301 <1> test bx, bx ; is there a chunk of ddsize at least ? 302 <1> jnz .chunk 303 <1> cmp cx, [ddsize] 304 <1> jae .chunk ; yes, display a chunk --> 305 <1> 306 <1> _386_PM and ecx, 0FFFFh 307 <1> _386_PM_o32 308 <1> push si 309 <1> _386_PM_o32 310 <1> add si, cx 311 <1> push ss 312 <1> pop es 313 <1> mov di, line_out 314 <1> call dd_display_offset 315 <1> 316 <1> testopt [options], dd_no_blanks_sym 317 <1> jnz @FF 318 <1> 319 <1> pop ax ; ax = original si value 320 <1> push ax 321 <1> 322 <1> push si 323 <1> mov si, ax 324 <1> mov cx, word [ddsize] 325 <1> mov ax, cx 326 <1> dec cx 327 <1> and cx, si ; how many bytes to skip at the beginning 328 <1> sub si, cx ; = offset after skipped to first displayed 329 <1> add cx, cx ; how many digits to skip at the beginning 330 <1> and si, 0Fh ; = offset in single line 331 <1> add ax, ax ; = 8 for dword, 4 for word, 2 for byte 332 <1> inc ax ; = 9 for dword, 5 for word, 3 for byte 333 <1> db __TEST_IMM16 ; (skip add in first iteration) 334 <1> @@: 335 <1> add cx, ax ; (in subsequent iterations:) add blanks 336 <1> sub si, word [ddsize] ; still a whole unit to add ? (subtract it) 337 <1> jae @B ; yes --> 338 <1> ; cx = number of blanks to skip 339 <1> mov al, 32 340 <1> rep stosb ; store blanks for each byte 341 <1> pop si 342 <1> @@: 343 <1> 344 <1> push dx 345 <1> call putsline ; puts offset + blanks 346 <1> 347 <1> push word [bp + ?sym_index] 348 <1> call displaystring ; puts symbol label 349 <1> 350 <1> push word [bp + ?sym_index] 351 <1> push ax 352 <1> call getfarpointer.main 353 <1> pop di 354 <1> pop es 355 <1> xor dx, dx 356 <1> _386_PM call test_d_b_bit ; 32-bit segment ? 357 <1> _386_PM jz .16 ; no --> (don't display zero high word) 358 <1> _386_PM push esi 359 <1> _386_PM pop si 360 <1> _386_PM pop dx 361 <1> .16: 362 <1> cmp dx, word [es:di + smOffset + 2] 363 <1> mov dx, msg.dd_after_symbol.non_wrt 364 <1> jne .wrt 365 <1> cmp si, word [es:di + smOffset] 366 <1> je .non_wrt 367 <1> .wrt: 368 <1> mov dx, msg.dd_after_symbol.1_wrt 369 <1> call disp_message 370 <1> 371 <1> mov ax, word [d_addr + 4] 372 <1> push ss 373 <1> pop es 374 <1> mov di, line_out 375 <1> call hexword 376 <1> push bx 377 <1> push cx 378 <1> call putsline 379 <1> pop cx 380 <1> pop bx 381 <1> 382 <1> mov dx, msg.dd_after_symbol.2_wrt 383 <1> .non_wrt: 384 <1> call disp_message ; puts after 385 <1> pop dx 386 <1> 387 <1> _386_PM_o32 388 <1> pop si 389 <1> 390 <1> inc word [bp + ?sym_index] 391 <1> ; point to next symbol's SYMMAIN (if any) 392 <1> mov cx, word [bp + ?sym_count] 393 <1> loop .j_loop ; loop if any more to go 394 <1> jmp .justdisplay_no_pop ; if none, just display remainder --> 395 <1> 396 <1> 397 <1> .j_loop: 398 <1> jmp .loop 399 <1> 400 <1> 401 <1> ; Display a chunk. 402 <1> ; 403 <1> ; INP: (e)si = start offset to display 404 <1> ; (e)dx = end offset to display 405 <1> ; bx:cx = how far from adjust linear to next 406 <1> ; (there is always a next symbol if we are here) 407 <1> .chunk: 408 <1> mov ax, word [ddsize] 409 <1> dec ax 410 <1> not ax 411 <1> and cx, ax 412 <1> 413 <1> add word [bp + ?adjust], cx 414 <1> adc word [bp + ?adjust + 2], bx 415 <1> 416 <1> _386_PM push word [bp + ?adjust + 2] 417 <1> _386_PM push ax 418 <1> _386_PM pop eax 419 <1> mov ax, word [bp + ?adjust] 420 <1> ; (e)ax = adjust 421 <1> _386_PM_o32 422 <1> dec ax ; (e)ax = adjust - 1 423 <1> 424 <1> ; have: (e)si = prior start offset, (e)dx = end offset 425 <1> ; want: (e)si = unchanged, (e)dx = intermediate end offset, 426 <1> ; preserve intermediate start offset, stack = end offset 427 <1> _386_PM_o32 428 <1> push dx ; stack := end offset 429 <1> _386_PM_o32 430 <1> mov dx, word [bp + ?offset] 431 <1> ; (e)dx := start offset 432 <1> _386_PM_o32 433 <1> add dx, ax ; (e)dx := intermediate end offset 434 <1> 435 <1> call dd_display ; display, (e)dx := intermediate start offset 436 <1> 437 <1> ; have: (e)si scrambled, (e)dx = intermediate start offset, 438 <1> ; stack = end offset 439 <1> ; want: (e)si = intermediate start offset, (e)dx = end offset 440 <1> _386_PM_o32 441 <1> mov si, dx ; (e)si := intermediate start offset 442 <1> _386_PM_o32 443 <1> pop dx ; (e)dx := end offset 444 <1> jmp .loop_no_cx 445 <1> 446 <1> .justdisplay: 447 <1> _386_PM_o32 448 <1> pop dx 449 <1> _386_PM_o32 450 <1> pop si 451 <1> pop bx 452 <1> 453 <1> .justdisplay_no_pop: 454 <1> lleave 455 <1> %endif 456 <1> 457 00001393 E87B00 <1> call dd_display 458 <1> 459 00001396 B80200 <1> mov ax, opt2_db_trailer 460 00001399 803E[4084]02 <1> cmp byte [ddsize], 2 461 0000139E 7207 <1> jb @F 462 000013A0 B020 <1> mov al, opt2_dw_trailer 463 000013A2 7403 <1> je @F 464 000013A4 B80002 <1> mov ax, opt2_dd_trailer 465 <1> @@: 466 <1> ; fall through 467 <1> 468 <1> 469 <1> ; INP: ax = flag value to check 470 <1> ; (determines whether "header" or "trailer" is written, 471 <1> ; and which flag must be set in word [options2]) 472 <1> ; byte [ddoffset2] = how many bytes to skip at the start 473 <1> ; CHG: ax, cx, di 474 <1> ; STT: ds = es = ss 475 <1> dd_header_or_trailer: 476 000013A7 8506[9800] <1> test word [options2], ax 477 000013AB 7463 <1> jz .ret 478 000013AD 53 <1> push bx 479 000013AE 56 <1> push si 480 000013AF 52 <1> push dx 481 <1> 482 000013B0 B90600 <1> mov cx, msg.header.length 483 000013B3 BA[256A] <1> mov dx, msg.header 484 000013B6 A91101 <1> test ax, opt2_db_header | opt2_dw_header | opt2_dd_header 485 000013B9 7506 <1> jnz @F 486 000013BB B90700 <1> mov cx, msg.trailer.length 487 000013BE BA[2C6A] <1> mov dx, msg.trailer 488 <1> @@: 489 000013C1 E83C9E <1> call putsz ; put initial word 490 000013C4 F7D9 <1> neg cx ; minus length of initial word 491 000013C6 B80B00 <1> mov ax, 4 + 1 + 4 + 2 ; length of address with 16-bit offset 492 <1> %if _PM 493 <1> mov bx, word [d_addr + saSegSel] 494 <1> call test_d_b_bit ; 32-bit segment ? 495 <1> jz .16 ; no --> 496 <1> mov ax, 4 + 1 + 8 + 2 ; length of address with 32-bit offset 497 <1> .16: 498 <1> %endif 499 000013C9 01C1 <1> add cx, ax ; length of address minus length of word 500 <1> ; = length to pad 501 000013CB B020 <1> mov al, 32 502 000013CD BF[AE07] <1> mov di, line_out 503 000013D0 F3AA <1> rep stosb ; pad 504 <1> ; ch = 0 505 <1> 506 000013D2 B83020 <1> mov ax, '0 ' ; al = '0', ah = blank 507 000013D5 8A0E[4284] <1> mov cl, byte [ddoffset2]; cx = ddoffset2 508 000013D9 E304 <1> jcxz @FF ; if none to skip --> 509 <1> @@: 510 000013DB AB <1> stosw 511 000013DC 40 <1> inc ax ; increment the number (up to '3') 512 000013DD E2FC <1> loop @B ; loop for skipping --> 513 <1> @@: 514 000013DF 2C30 <1> sub al, '0' ; = back to numerical (0 .. 3) 515 000013E1 89C2 <1> mov dx, ax ; dl = numerical offset 516 <1> 517 000013E3 52 <1> push dx 518 000013E4 BE1000 <1> mov si, 16 ; loop counter 519 000013E7 8B1E[4084] <1> mov bx, [ddsize] ; ddsize 520 <1> @@: 521 000013EB 88D0 <1> mov al, dl ; next numerical offset 522 000013ED E86F9A <1> call hexnyb ; display it 523 000013F0 89D9 <1> mov cx, bx 524 000013F2 01C9 <1> add cx, cx ; cx = 2 * ddsize 525 000013F4 B020 <1> mov al, 32 526 000013F6 F3AA <1> rep stosb ; pad to next position 527 000013F8 01DA <1> add dx, bx ; increment dl by how many positions we use 528 000013FA 29DE <1> sub si, bx ; decrement loop counter 529 000013FC 77ED <1> ja @B ; don't jump if si was below-or-equal-to bx 530 000013FE 5A <1> pop dx 531 <1> 532 000013FF B91000 <1> mov cx, 16 ; loop counter 533 <1> @@: 534 00001402 88D0 <1> mov al, dl 535 00001404 E8589A <1> call hexnyb ; display an offset 536 <1> ; Note that this will wrap around for the last 1, 2, or 3 537 <1> ; characters if byte [ddoffset2] is non-zero. 538 00001407 42 <1> inc dx ; increment offset 539 00001408 E2F8 <1> loop @B ; loop 540 <1> 541 0000140A E8789A <1> call putsline_crlf 542 <1> 543 0000140D 5A <1> pop dx 544 0000140E 5E <1> pop si 545 0000140F 5B <1> pop bx 546 <1> .ret: 547 00001410 C3 <1> retn 548 <1> 549 <1> 550 <1> ; INP: word [d_addr + saSegSel] = segment/selector to dump 551 <1> ; (e)si = start offset 552 <1> ; (e)dx = end offset 553 <1> ; byte [ddsize] = 1, 2, or 4 (for byte, word, or dword) 554 <1> ; OUT: (d)word [d_addr] updated 555 <1> ; (e)dx = (d)word [d_addr] 556 <1> ; displayed 557 <1> dd_display: 558 00001411 16 <1> push ss 559 00001412 07 <1> pop es 560 <1> dd2_loop: 561 00001413 E8A927 <1> call handle_serial_flags_ctrl_c 562 <1> 563 00001416 C706[D20B][4813] <1> mov word [lastcmd], lastddd 564 <1> 565 0000141C BF[AE07] <1> mov di, line_out ; reset di for next line 566 0000141F E82201 <1> call dd_display_offset.masklownybble 567 <1> ; ax = offset & ~ 0Fh 568 <1> 569 00001422 8B0E[4084] <1> mov cx, word [ddsize] 570 00001426 51 <1> push cx 571 00001427 49 <1> dec cx ; 0 = byte, 1 = word, 3 = dword 572 00001428 21F1 <1> and cx, si ; how many bytes to skip at the beginning 573 <1> ; eg: si = 101h, cx = 1, skip 1 byte, ax = 101h 574 <1> ; si = 102h, cx = 3, skip 2 bytes, ax = 102h 575 <1> ; si = 103h, cx = 3, skip 3 bytes, ax = 103h 576 <1> ; si = 103h, cx = 1, skip 1 byte, ax = 101h 577 <1> ; si = 10Fh, cx = 1, skip 1 byte, ax = 101h 578 <1> ; si = 10Fh, cx = 3, skip 3 bytes, ax = 103h 579 0000142A 01C8 <1> add ax, cx ; = where to start 580 0000142C 890E[3C84] <1> mov word [ddoffset], cx 581 00001430 50 <1> push ax 582 00001431 B82020 <1> mov ax, 32 << 8 | 32 583 00001434 F3AB <1> rep stosw 584 00001436 58 <1> pop ax 585 00001437 59 <1> pop cx 586 <1> 587 00001438 BB3000 <1> mov bx, (2+1)*16 ; 16 bytes (2 digits each) 588 0000143B 80F902 <1> cmp cl, 2 589 0000143E 7206 <1> jb @F ; if it is 1 --> 590 00001440 B328 <1> mov bl, (4+1)*8 ; 8 words (4 digits each) 591 00001442 7402 <1> je @F ; if it is 2 --> 592 <1> ; it is 4 593 00001444 B324 <1> mov bl, (8+1)*4 ; 4 dwords (8 digits each) 594 <1> @@: 595 00001446 01FB <1> add bx, di 596 00001448 E8F286 <1> call prephack ; set up for faking int vectors 23 and 24 597 <1> 598 0000144B 50 <1> push ax 599 <1> ; blank the start of the line if offset isn't paragraph aligned 600 <1> dd3: 601 0000144C 39F0 <1> cmp ax, si ; skip to position in line 602 0000144E 7429 <1> je dd4 ; if we're there yet 603 00001450 7718 <1> ja .error 604 00001452 50 <1> push ax 605 00001453 B82020 <1> mov ax, 32 << 8| 32 606 00001456 51 <1> push cx 607 00001457 F3AB <1> rep stosw ; store two blanks (2 * 1) if byte, 608 <1> ; four blanks (2 * 2) if word, 609 <1> ; eight blanks (2 * 4) if dword 610 00001459 59 <1> pop cx 611 0000145A AA <1> stosb ; store additional blank as separator 612 0000145B 51 <1> push cx 613 <1> @@: 614 0000145C 268807 <1> mov byte [es:bx], al 615 0000145F 43 <1> inc bx 616 00001460 E2FA <1> loop @B ; store as many blanks in text dump as bytes 617 00001462 59 <1> pop cx 618 00001463 58 <1> pop ax 619 00001464 0306[4084] <1> add ax, word [ddsize] ; -> behind the byte/word/dword just written 620 00001468 EBE2 <1> jmp short dd3 621 <1> 622 <1> 623 <1> .error: 624 0000146A BA[4384] <1> mov dx, .msg_internal_error 625 0000146D E88A9D <1> call putsz_error 626 00001470 B80106 <1> mov ax, 0601h 627 00001473 E88D84 <1> call setrc 628 00001476 E987EB <1> jmp cmd3 629 <1> 630 <1> usesection lDEBUG_DATA_ENTRY 631 <1> .msg_internal_error: 632 00008443 496E7465726E616C20- <1> asciz "Internal error in dd3.",13,10 632 0000844C 6572726F7220696E20- <1> 632 00008455 6464332E0D0A00 <1> 633 <1> usesection lDEBUG_CODE 634 <1> 635 <1> 636 <1> ; Begin main loop over lines of output. 637 <1> dd4: 638 00001479 58 <1> pop ax 639 <1> _386_PM_o32 ; mov ecx, eax 640 0000147A 89C1 <1> mov cx, ax 641 <1> _386_PM_o32 642 0000147C 83C10F <1> add cx, strict byte 0Fh 643 0000147F 7204 <1> jc @F 644 <1> _386_PM_o32 ; cmp ecx, edx 645 00001481 39D1 <1> cmp cx, dx ; compare with end address 646 00001483 7202 <1> jb dd5 ; if we write to the end of the line --> 647 <1> @@: 648 <1> ;_386_PM_o32 ; mov ecx, edx 649 00001485 89D1 <1> mov cx, dx ; only write until (e)dx, inclusive 650 <1> dd5: 651 <1> ;_386_PM_o32 ; sub ecx, esi 652 00001487 29F1 <1> sub cx, si 653 <1> ;_386_PM_o32 ; inc ecx 654 00001489 41 <1> inc cx ; cx = number of bytes to print this line 655 <1> ; up to 16. no 32-bit register required 656 0000148A 8326[3E84]00 <1> and word [ddskipped], 0 657 <1> 658 0000148F E8D486 <1> call dohack ; substitute interrupt vectors 659 00001492 8E1E[4C0B] <1> mov ds, word [d_addr + saSegSel] 660 <1> 661 <1> dd6: 662 00001496 36A1[4084] <1> mov ax, word [ss:ddsize] 663 0000149A 39C8 <1> cmp ax, cx ; ddsize <= left bytes ? 664 0000149C 7617 <1> jbe dd6_simple ; yes, display ddsize bytes --> 665 <1> 666 0000149E 50 <1> push ax 667 0000149F 51 <1> push cx 668 000014A0 57 <1> push di 669 000014A1 F7D9 <1> neg cx ; - left bytes 670 000014A3 01C1 <1> add cx, ax ; ddsize - left bytes = how many skipped 671 000014A5 36890E[3E84] <1> mov word [ss:ddskipped], cx 672 <1> 673 000014AA 89C1 <1> mov cx, ax ; 1 = bytes, 2 = words, 4 = dwords 674 000014AC 49 <1> dec cx ; 0 = bytes, 1 = words, 3 = dwords 675 000014AD B85858 <1> mov ax, 'XX' 676 000014B0 F3AB <1> rep stosw ; fill filler digits not to be written 677 000014B2 5F <1> pop di 678 000014B3 59 <1> pop cx 679 000014B4 58 <1> pop ax 680 <1> 681 <1> dd6_simple: 682 000014B5 01C0 <1> add ax, ax ; 2 = bytes, 4 = words, 8 = dwords 683 000014B7 50 <1> push ax 684 <1> @@: 685 000014B8 48 <1> dec ax 686 000014B9 48 <1> dec ax 687 <1> ; first iteration: 0 = bytes, 2 = words, 6 = dwords 688 <1> ; second iteration: 0 = words, 4 = dwords 689 <1> ; third iteration: (0 = 3byte,) 2 = dwords 690 <1> ; fourth iteration: 0 = dwords 691 000014BA 57 <1> push di 692 000014BB 01C7 <1> add di, ax ; -> where to write next 2 hex digits 693 000014BD 50 <1> push ax 694 <1> _386_PM_a32 695 000014BE AC <1> lodsb ; al = data 696 000014BF E88D00 <1> call dd_store ; stores number at es:di->, char at es:bx-> 697 000014C2 58 <1> pop ax 698 000014C3 5F <1> pop di ; -> start of hex digits space 699 000014C4 85C0 <1> test ax, ax ; did we write the left-most digits? 700 000014C6 E0F0 <1> loopnz @B ; not yet --> (or no more bytes to display) 701 000014C8 58 <1> pop ax ; = how many digits we wrote 702 000014C9 01C7 <1> add di, ax ; -> after right-most digit 703 000014CB B020 <1> mov al, 32 704 000014CD AA <1> stosb ; store a blank 705 000014CE 85C9 <1> test cx, cx 706 000014D0 75C4 <1> jnz dd6 ; (16-bit. cx <= 16) 707 <1> 708 000014D2 16 <1> push ss ; restore ds 709 000014D3 1F <1> pop ds 710 <1> _386_PM_o32 711 000014D4 2B36[3C84] <1> sub si, word [ddoffset] 712 <1> _386_PM_o32 713 000014D8 0336[3E84] <1> add si, word [ddskipped] 714 <1> 715 <1> dd9: 716 000014DC F7C60F00 <1> test si, 0Fh ; space out till end of line 717 000014E0 7417 <1> jz dd10 718 000014E2 B82020 <1> mov ax, 32 << 8 | 32 719 000014E5 8B0E[4084] <1> mov cx, word [ddsize] 720 000014E9 51 <1> push cx 721 000014EA F3AB <1> rep stosw ; store blanks for the number 722 000014EC AA <1> stosb ; store additional blank as separator 723 000014ED 59 <1> pop cx 724 <1> @@: 725 000014EE 46 <1> inc si ; skip as many bytes 726 000014EF F7C60F00 <1> test si, 0Fh 727 000014F3 7404 <1> jz dd10 728 000014F5 E2F7 <1> loop @B 729 000014F7 EBE3 <1> jmp short dd9 730 <1> 731 <1> dd10: 732 <1> _386_PM_o32 733 000014F9 0336[3C84] <1> add si, word [ddoffset] 734 <1> _386_PM_o32 735 000014FD 2B36[3E84] <1> sub si, word [ddskipped] 736 <1> 737 00001501 B91900 <1> mov cx, (1 + 8 * (2 + 1)) ; go back 8 bytes (2 digits each) 738 00001504 803E[4084]02 <1> cmp byte [ddsize], 2 739 00001509 7206 <1> jb @F ; if it is 1 --> 740 0000150B B115 <1> mov cl, (1 + 4 * (4 + 1)) ; go back 4 words (4 digits each) 741 0000150D 7402 <1> je @F ; if it is 2 --> 742 <1> ; it is 4 743 0000150F B113 <1> mov cl, (1 + 2 * (8 + 1)) ; go back 2 dwords (8 digits each) 744 <1> @@: 745 00001511 29CF <1> sub di, cx 746 00001513 C6052D <1> mov byte [di], '-' 747 00001516 E86186 <1> call unhack 748 00001519 89DF <1> mov di, bx 749 0000151B 52 <1> push dx 750 0000151C E86699 <1> call putsline_crlf 751 0000151F 5A <1> pop dx 752 <1> _386_PM_o32 ; dec esi 753 00001520 4E <1> dec si 754 <1> _386_PM_o32 ; cmp esi, edx 755 00001521 39D6 <1> cmp si, dx 756 <1> _386_PM_o32 ; inc esi 757 00001523 46 <1> inc si 758 00001524 7303E9EAFE <1> jb dd2_loop ; display next line --> 759 <1> dd11: 760 <1> ; This check is necessary to wrap around at FFFFh (64 KiB) 761 <1> ; for 16-bit segments instead of at FFFFFFFFh (4 GiB). 762 <1> _386_PM mov bx, word [d_addr + saSegSel] 763 <1> ; reset bx 764 <1> _386_PM call test_d_b_bit ; 32-bit segment ? 765 <1> _386_PM jz .16 ; no --> 766 <1> _386_PM_o32 ; inc edx 767 <1> .16: 768 00001529 42 <1> inc dx ; set up the address for the next 'D' command. 769 <1> _386_PM_o32 ; mov dword [d_addr], edx 770 0000152A 8916[480B] <1> mov word [d_addr], dx 771 0000152E C3 <1> retn 772 <1> 773 <1> 774 <1> ; INP: (e)si = offset (to display) 775 <1> ; (e)dx = end offset (for range check of 16-bit segment) 776 <1> ; word [d_addr + saSegSel] = segment/selector 777 <1> ; es:di -> where to write to 778 <1> ; OUT: bx = segment/selector 779 <1> dd_display_offset: 780 <1> .: 781 0000152F A1[4C0B] <1> mov ax, word [d_addr + saSegSel] 782 00001532 89C3 <1> mov bx, ax 783 00001534 E81699 <1> call hexword 784 00001537 B03A <1> mov al, ':' 785 00001539 AA <1> stosb 786 <1> _386_PM_o32 ; mov eax, esi 787 0000153A 89F0 <1> mov ax, si 788 <1> %if _PM 789 <1> call test_d_b_bit ; 32-bit segment ? 790 <1> jz .16 ; no --> (don't display zero high word) 791 <1> call hexword_high ; yes, display high word of address 792 <1> jmp short .common 793 <1> 794 <1> ; Insure that the high word is zero. 795 <1> .16: 796 <1> ;_386 test esi, ~0FFFFh 797 <1> ;_386 jnz .error 798 <1> _386 test edx, ~0FFFFh 799 <1> _386 jz .common 800 <1> ;.error: 801 <1> _386 mov dx, msg.ofs32 802 <1> _386 call putsz_error 803 <1> _386 jmp cmd3 804 <1> .common: 805 <1> %endif 806 0000153C E80E99 <1> call hexword 807 0000153F B82020 <1> mov ax, 32<<8|32 808 00001542 AB <1> stosw 809 00001543 C3 <1> retn 810 <1> 811 <1> ; INP: (e)si = offset (to display) 812 <1> ; (e)dx = end offset (for range check of 16-bit segment) 813 <1> ; word [d_addr + saSegSel] = segment/selector 814 <1> ; es:di -> where to write to 815 <1> ; OUT: bx = segment/selector 816 <1> ; (e)ax = offset & ~0Fh 817 <1> .masklownybble: 818 00001544 56 <1> push si 819 00001545 83E6F0 <1> and si, ~0Fh 820 <1> _386_PM_o32 821 00001548 56 <1> push si 822 00001549 E8E3FF <1> call . 823 <1> _386_PM_o32 824 0000154C 58 <1> pop ax 825 0000154D 5E <1> pop si 826 0000154E C3 <1> retn 827 <1> 828 <1> 829 <1> ; Store a character into the buffer. Characters that can't 830 <1> ; be displayed are replaced by a dot. 831 <1> ; 832 <1> ; INP: al = character 833 <1> ; es:bx-> buffer for displayed characters 834 <1> ; es:di-> buffer for hexadecimal number 835 <1> ; OUT: es:bx-> behind displayed character 836 <1> ; es:di-> behind hexadecimal number and space 837 <1> ; CHG: ax 838 <1> ; STT: ds unknown 839 <1> dd_store: 840 0000154F 88C4 <1> mov ah, al 841 00001551 3C20 <1> cmp al, 32 ; below blank ? 842 00001553 720E <1> jb .ctrl ; control char --> 843 00001555 3C7F <1> cmp al, 127 ; DEL ? 844 00001557 740A <1> je .ctrl ; yes, control char --> 845 00001559 720A <1> jb .noctrl ; below, not a control char --> 846 0000155B 36F606[9400]04 <1> testopt [ss:options], cpdepchars ; allow CP-dependant characters ? 847 00001561 7502 <1> jnz .noctrl ; yes --> 848 <1> .ctrl: 849 00001563 B42E <1> mov ah, '.' 850 <1> .noctrl: 851 00001565 268827 <1> mov byte [es:bx], ah 852 00001568 43 <1> inc bx 853 00001569 51 <1> push cx 854 0000156A E8E798 <1> call hexbyte 855 0000156D 59 <1> pop cx 856 0000156E C3 <1> retn 857 <1> 858 <1> 859 <1> %if _PM 860 <1> ; DL command 861 <1> descout: 862 <1> call skipwhite 863 <1> call getword ; get word into DX 864 <1> mov bx, dx 865 <1> call skipcomm0 866 <1> mov dx, 1 867 <1> call iseol? 868 <1> je .onlyone 869 <1> call uppercase 870 <1> cmp al, 'L' 871 <1> jne .notlength 872 <1> call skipcomma 873 <1> .notlength: 874 <1> call getword 875 <1> call chkeol 876 <1> .onlyone: 877 <1> inc dx ; (note js at nextdesc changed to jz) 878 <1> mov si, dx ; save count 879 <1> call ispm 880 <1> je nextdesc 881 <1> mov dx, nodesc 882 <1> jmp putsz 883 <1> desc_done: 884 <1> retn 885 <1> subcpu 286 886 <1> nextdesc: 887 <1> dec si 888 <1> jz desc_done 889 <1> mov di, descr 890 <1> mov ax, bx 891 <1> call hexword 892 <1> mov di, descbase 893 <1> push di 894 <1> mov ax, "??" 895 <1> stosw 896 <1> stosw 897 <1> stosw 898 <1> stosw 899 <1> add di, byte (desclim-(descbase+8)) 900 <1> stosw 901 <1> stosw 902 <1> stosw 903 <1> stosw 904 <1> add di, byte (descattr-(desclim+8)) 905 <1> stosw 906 <1> stosw 907 <1> pop di 908 <1> ; lar ax, bx 909 <1> ; jnz skipdesc ; tell that this descriptor is invalid 910 <1> mov ax, 6 911 <1> int 31h 912 <1> jc desc_o1 913 <1> mov ax, cx 914 <1> call hexword 915 <1> mov ax, dx 916 <1> call hexword 917 <1> desc_o1: 918 <1> mov di, desclim 919 <1> _no386_jmps use16desc 920 <1> subcpu 386 921 <1> lsl eax, ebx 922 <1> jnz desc_out 923 <1> push ax 924 <1> shr eax, 16 925 <1> call hexword 926 <1> pop ax 927 <1> call hexword 928 <1> lar eax, ebx 929 <1> shr eax, 8 930 <1> desc_o2: 931 <1> mov di, descattr 932 <1> call hexword 933 <1> desc_out: 934 <1> mov dx, descr 935 <1> call putsz 936 <1> add bx, byte 8 937 <1> jmp short nextdesc 938 <1> subcpureset ; subcpu 386 939 <1> use16desc: 940 <1> lsl ax, bx 941 <1> jnz desc_out 942 <1> call hexword 943 <1> mov ax, 32<<8|32 944 <1> stosw 945 <1> stosw 946 <1> lar ax, bx 947 <1> shr ax, 8 948 <1> jmp short desc_o2 949 <1> subcpureset ; subcpu 286 950 <1> %endif 951 <1> 952 <1> %if _DSTRINGS 953 <1> ; D$ command 954 <1> dcpm: 955 0000156F C606[780B]24 <1> mov byte [dstringtype], 36 956 00001574 C706[7A0B][660B] <1> mov word [dstringaddr], dcpm_addr 957 0000157A EB25 <1> jmp short dstring 958 <1> 959 <1> ; DW# command 960 <1> dwcounted: 961 0000157C C606[780B]FE <1> mov byte [dstringtype], 0FEh 962 00001581 C706[7A0B][720B] <1> mov word [dstringaddr], dwcount_addr 963 00001587 EB18 <1> jmp short dstring 964 <1> 965 <1> ; D# command 966 <1> dcounted: 967 00001589 C606[780B]FF <1> mov byte [dstringtype], 0FFh 968 0000158E C706[7A0B][6C0B] <1> mov word [dstringaddr], dcount_addr 969 00001594 EB0B <1> jmp short dstring 970 <1> 971 <1> ; DZ command 972 <1> dz: 973 00001596 C606[780B]00 <1> mov byte [dstringtype], 0 974 0000159B C706[7A0B][600B] <1> mov word [dstringaddr], dz_addr 975 <1> 976 <1> ; common code for all string commands 977 <1> dstring: 978 000015A1 E8FE97 <1> call skipwhite 979 000015A4 E8A697 <1> call iseol? 980 000015A7 7508 <1> jne .getaddr ; if an address was given 981 <1> .last: 982 000015A9 8B1E[7A0B] <1> mov bx, word [dstringaddr] 983 <1> _386_PM_o32 ; mov edx, dword [bx] 984 000015AD 8B17 <1> mov dx, word [bx] 985 000015AF EB12 <1> jmp short .haveaddr ; edx = offset, [bx + saSegSel] = segment 986 <1> .getaddr: 987 000015B1 8B1E[7C0C] <1> mov bx, word [reg_ds] 988 000015B5 E8AB87 <1> call getaddrX ; get address into bx:(e)dx 989 000015B8 E8A797 <1> call chkeol ; expect end of line here 990 <1> %if _PM 991 <1> push bx 992 <1> %endif 993 000015BB 53 <1> push bx 994 000015BC 8B1E[7A0B] <1> mov bx, word [dstringaddr] 995 000015C0 8F4704 <1> pop word [bx + saSegSel]; save segment (offset behind string is saved later) 996 <1> %if _PM 997 <1> call ispm 998 <1> jnz .86m 999 <1> .pm: 1000 <1> pop word [bx + saSelector] 1001 <1> jmp @F 1002 <1> .86m: 1003 <1> pop word [bx + saSegment] 1004 <1> @@: 1005 <1> %endif 1006 <1> .haveaddr: 1007 000015C3 C706[D20B][A915] <1> mov word [lastcmd], dstring.last 1008 000015C9 E87185 <1> call prephack 1009 <1> _386_PM_o32 ; mov esi, edx 1010 000015CC 89D6 <1> mov si, dx 1011 000015CE 800E[C600]01 <1> setopt [internalflags], usecharcounter 1012 000015D3 C606[CA0A]01 <1> mov byte [ charcounter ], 1 1013 <1> ; initialize 1014 000015D8 E88B85 <1> call dohack 1015 000015DB 8E5F04 <1> mov ds, word [bx + saSegSel] 1016 <1> ; ds:(e)si-> string 1017 000015DE 36803E[780B]FE <1> cmp byte [ss:dstringtype], 0FEh 1018 000015E4 7232 <1> jb .terminated ; terminated string --> 1019 000015E6 9F <1> lahf 1020 <1> _386_PM_a32 1021 000015E7 AC <1> lodsb ; load first byte 1022 000015E8 31C9 <1> xor cx, cx 1023 000015EA 88C1 <1> mov cl, al ; low byte of count 1024 000015EC 9E <1> sahf 1025 000015ED 7503 <1> jne .counted ; only byte count --> 1026 <1> _386_PM_a32 1027 000015EF AC <1> lodsb ; load second byte 1028 000015F0 88C5 <1> mov ch, al ; high byte of count 1029 <1> .counted: 1030 000015F2 E331 <1> jcxz .done ; length zero --> 1031 <1> .loop: 1032 <1> _386_PM_a32 1033 000015F4 AC <1> lodsb ; get character 1034 000015F5 E80400 <1> call .char ; display 1035 000015F8 E2FA <1> loop .loop ; until done --> 1036 000015FA EB29 <1> jmp short .done 1037 <1> 1038 <1> .char: 1039 000015FC 16 <1> push ss 1040 000015FD 1F <1> pop ds 1041 000015FE 50 <1> push ax 1042 000015FF E87885 <1> call unhack ; restore state 1043 00001602 58 <1> pop ax 1044 00001603 56 <1> push si 1045 00001604 51 <1> push cx 1046 00001605 E81A9C <1> call putc ; display 1047 00001608 59 <1> pop cx 1048 00001609 5E <1> pop si 1049 0000160A E8B225 <1> call handle_serial_flags_ctrl_c 1050 0000160D E85685 <1> call dohack 1051 00001610 8B1E[7A0B] <1> mov bx, word [dstringaddr] 1052 00001614 8E5F04 <1> mov ds, word [bx + saSegSel] 1053 <1> ; go back to special state 1054 00001617 C3 <1> retn 1055 <1> 1056 <1> .terminated: 1057 <1> _386_PM_a32 1058 00001618 AC <1> lodsb ; load character 1059 00001619 363A06[780B] <1> cmp al, byte [ss:dstringtype] 1060 0000161E 7405 <1> je .done ; it's the terminator --> 1061 00001620 E8D9FF <1> call .char ; display 1062 00001623 EBF3 <1> jmp short .terminated ; and get next --> 1063 <1> 1064 <1> .done: 1065 00001625 16 <1> push ss 1066 00001626 1F <1> pop ds ; restore ds 1067 <1> _386_PM_o32 ; mov dword [bx], esi 1068 00001627 8937 <1> mov word [bx], si 1069 00001629 E84E85 <1> call unhack 1070 0000162C B00D <1> mov al, 13 1071 0000162E E8F19B <1> call putc 1072 00001631 B00A <1> mov al, 10 1073 00001633 E8EC9B <1> call putc 1074 00001636 C3 <1> retn 1075 <1> %endif 1076 <1> 1077 <1> %if _INT 1078 <1> ; DI command 1079 <1> gateout: 1080 00001637 31C9 <1> xor cx, cx 1081 00001639 AC <1> lodsb 1082 0000163A E87D6B <1> call uppercase 1083 0000163D 3C52 <1> cmp al, 'R' 1084 0000163F 7502 <1> jne @F 1085 00001641 41 <1> inc cx ; always 86 Mode 1086 00001642 AC <1> lodsb 1087 <1> @@: 1088 00001643 E8746B <1> call uppercase 1089 00001646 3C4D <1> cmp al, 'M' 1090 00001648 7503 <1> jne @F 1091 0000164A FEC5 <1> inc ch ; show MCB names 1092 0000164C AC <1> lodsb 1093 <1> @@: 1094 0000164D E86A6B <1> call uppercase 1095 00001650 3C4C <1> cmp al, 'L' 1096 00001652 7504 <1> jne @F 1097 00001654 80CD02 <1> or ch, 2 ; follow AMIS interrupt lists 1098 00001657 AC <1> lodsb 1099 <1> @@: 1100 00001658 E84897 <1> call skipwh0 1101 <1> 1102 0000165B 4E <1> dec si 1103 0000165C BA[AE68] <1> mov dx, msg.in 1104 0000165F E88C96 <1> call isstring? 1105 00001662 755C <1> jne .not_in 1106 <1> 1107 00001664 56 <1> push si 1108 00001665 51 <1> push cx 1109 <1> .in.loop: 1110 00001666 E83997 <1> call skipwhite 1111 00001669 4E <1> dec si 1112 <1> 1113 0000166A E8FF95 <1> call get_value_range ; OUT: cx:di = from, bx:dx = to 1114 0000166D 730D <1> jnc @F 1115 0000166F 7508 <1> jnz .error 1116 00001671 81FFFF00 <1> cmp di, 255 1117 00001675 7702 <1> ja .error 1118 00001677 E317 <1> jcxz .in.next 1119 <1> .error: 1120 00001679 E94082 <1> jmp error 1121 <1> 1122 <1> @@: 1123 0000167C 81FFFF00 <1> cmp di, 255 1124 00001680 77F7 <1> ja .error 1125 00001682 E302 <1> jcxz @F 1126 00001684 EBF3 <1> jmp .error 1127 <1> 1128 <1> @@: 1129 00001686 85DB <1> test bx, bx 1130 00001688 75EF <1> jnz .error 1131 0000168A 81FAFF00 <1> cmp dx, 255 1132 0000168E 77E9 <1> ja .error 1133 <1> 1134 <1> .in.next: 1135 <1> @@: 1136 00001690 E81097 <1> call skipwh0 1137 00001693 3C2C <1> cmp al, ',' 1138 00001695 74CF <1> je .in.loop 1139 00001697 E8C896 <1> call chkeol 1140 0000169A 59 <1> pop cx 1141 0000169B E89300 <1> call .prepare 1142 0000169E 5E <1> pop si 1143 <1> 1144 <1> .indo.loop: 1145 0000169F E80097 <1> call skipwhite 1146 000016A2 4E <1> dec si 1147 <1> 1148 000016A3 51 <1> push cx 1149 000016A4 E8C595 <1> call get_value_range ; OUT: cx:di = from, bx:dx = to 1150 000016A7 59 <1> pop cx 1151 000016A8 720D <1> jc .indo.next 1152 <1> 1153 000016AA 89FB <1> mov bx, di 1154 000016AC A8 <1> db __TEST_IMM8 ; (skip inc) 1155 <1> @@: 1156 000016AD 43 <1> inc bx 1157 000016AE 52 <1> push dx 1158 000016AF E89400 <1> call .do 1159 000016B2 5A <1> pop dx 1160 000016B3 39D3 <1> cmp bx, dx 1161 000016B5 72F6 <1> jb @B 1162 <1> 1163 <1> .indo.next: 1164 000016B7 4E <1> dec si 1165 000016B8 E8E796 <1> call skipwhite 1166 000016BB 3C2C <1> cmp al, ',' 1167 000016BD 74E0 <1> je .indo.loop 1168 000016BF C3 <1> retn 1169 <1> 1170 <1> 1171 <1> 1172 <1> .not_in: 1173 000016C0 AC <1> lodsb 1174 000016C1 E87695 <1> call getbyte ; get byte into DL 1175 000016C4 30F6 <1> xor dh, dh 1176 000016C6 89D3 <1> mov bx, dx 1177 000016C8 E8A996 <1> call skipcomm0 1178 000016CB BA0100 <1> mov dx, 1 1179 000016CE E87C96 <1> call iseol? 1180 000016D1 7451 <1> je .onlyone 1181 000016D3 E8E46A <1> call uppercase 1182 000016D6 3C4C <1> cmp al, 'L' 1183 000016D8 753F <1> jne .notlength 1184 000016DA E89696 <1> call skipcomma 1185 000016DD E84C95 <1> call getword ; get byte into DL 1186 000016E0 85D2 <1> test dx, dx 1187 000016E2 741A <1> jz .err 1188 000016E4 81FA0001 <1> cmp dx, 100h 1189 000016E8 740A <1> je .checkrange 1190 000016EA 50 <1> push ax 1191 000016EB 80E41F <1> and ah, 1Fh 1192 000016EE 80FC08 <1> cmp ah, 8 1193 000016F1 58 <1> pop ax 1194 000016F2 770A <1> ja .err 1195 <1> .checkrange: 1196 000016F4 52 <1> push dx 1197 000016F5 01DA <1> add dx, bx 1198 000016F7 81FA0001 <1> cmp dx, 100h 1199 000016FB 5A <1> pop dx 1200 000016FC 7623 <1> jna .rangeok 1201 <1> .err: 1202 000016FE E9BB81 <1> jmp error 1203 <1> 1204 <1> .last: 1205 00001701 31DB <1> xor bx, bx 1206 00001703 8A1E[820B] <1> mov bl, byte [lastint] 1207 00001707 8B0E[800B] <1> mov cx, word [lastint_is_86m_and_mcb] 1208 0000170B BA0100 <1> mov dx, 1 1209 0000170E FEC3 <1> inc bl 1210 00001710 7512 <1> jnz .onlyone 1211 00001712 C706[D20B][4A04] <1> mov word [lastcmd], dmycmd 1212 00001718 C3 <1> retn 1213 <1> 1214 <1> .notlength: 1215 00001719 E81E95 <1> call getbyte 1216 0000171C 30F6 <1> xor dh, dh 1217 0000171E 28DA <1> sub dl, bl 1218 00001720 42 <1> inc dx 1219 <1> .rangeok: 1220 00001721 E83E96 <1> call chkeol 1221 <1> .onlyone: 1222 00001724 E80A00 <1> call .prepare 1223 00001727 89D6 <1> mov si, dx ; save count 1224 <1> .next: 1225 00001729 E81A00 <1> call .do 1226 0000172C 43 <1> inc bx 1227 0000172D 4E <1> dec si 1228 0000172E 75F9 <1> jnz .next 1229 00001730 C3 <1> retn 1230 <1> 1231 <1> 1232 <1> .prepare: 1233 00001731 F6C502 <1> test ch, 2 1234 00001734 7403 <1> jz @F 1235 00001736 E87BEE <1> call guard_auxbuff 1236 <1> @@: 1237 00001739 C706[D20B][0117] <1> mov word [lastcmd], .last 1238 0000173F 890E[800B] <1> mov word [lastint_is_86m_and_mcb], cx 1239 00001743 E9F783 <1> jmp prephack 1240 <1> 1241 <1> 1242 <1> ; INP: bx = interrupt number 1243 <1> ; cx = options 1244 <1> ; CHG: di, eax. edx, bp 1245 <1> ; STT: ds = es = ss 1246 <1> ; prephack called 1247 <1> .do: 1248 00001746 881E[820B] <1> mov byte [lastint], bl 1249 0000174A E87224 <1> call handle_serial_flags_ctrl_c 1250 0000174D E81684 <1> call dohack 1251 00001750 BF[AE07] <1> mov di, line_out 1252 00001753 B8696E <1> mov ax, "in" 1253 00001756 AB <1> stosw 1254 00001757 B87420 <1> mov ax, "t " 1255 0000175A AB <1> stosw 1256 0000175B 88D8 <1> mov al, bl 1257 0000175D E8F496 <1> call hexbyte 1258 00001760 B020 <1> mov al, 32 1259 00001762 AA <1> stosb 1260 <1> %if _PM 1261 <1> test cl, cl 1262 <1> jnz .rm 1263 <1> call ispm 1264 <1> jnz .rm 1265 <1> 1266 <1> mov ax, 0204h 1267 <1> cmp bl, 20h 1268 <1> adc bh, 1 ; if below, bh = 2 1269 <1> .loopexception: 1270 <1> push cx 1271 <1> int 31h 1272 <1> mov ax, cx 1273 <1> pop cx 1274 <1> jc .failed 1275 <1> call hexword 1276 <1> mov al, ':' 1277 <1> stosb 1278 <1> _386_PM_o32 ; mov eax, edx 1279 <1> mov ax, dx 1280 <1> cmp byte [dpmi32], 0 1281 <1> jz .gate16 1282 <1> call hexword_high 1283 <1> .gate16: 1284 <1> call hexword 1285 <1> mov al, 32 1286 <1> stosb 1287 <1> mov ax, 0202h 1288 <1> dec bh 1289 <1> jnz .loopexception 1290 <1> dec di 1291 <1> call unhack 1292 <1> push bx 1293 <1> push cx 1294 <1> call putsline_crlf 1295 <1> pop cx 1296 <1> pop bx 1297 <1> retn 1298 <1> 1299 <1> .rm: 1300 <1> %endif 1301 00001763 53 <1> push bx 1302 00001764 51 <1> push cx 1303 00001765 56 <1> push si 1304 <1> 1305 00001766 53 <1> push bx 1306 00001767 31ED <1> xor bp, bp 1307 00001769 D1E3 <1> shl bx, 1 1308 0000176B D1E3 <1> shl bx, 1 1309 0000176D 31D2 <1> xor dx, dx 1310 <1> %if _PM 1311 <1> call setes2dx 1312 <1> %else 1313 0000176F 8EC2 <1> mov es, dx ; es => IVT 1314 <1> %endif 1315 00001771 268B4702 <1> mov ax, word [es:bx + 2] ; ax = segment 1316 00001775 268B17 <1> mov dx, word [es:bx] 1317 00001778 5B <1> pop bx 1318 <1> 1319 00001779 F6C502 <1> test ch, 2 1320 0000177C 7568 <1> jnz int_list 1321 <1> 1322 <1> .loop_chain: 1323 0000177E 50 <1> push ax ; segment 1324 0000177F 52 <1> push dx 1325 <1> 1326 00001780 16 <1> push ss 1327 00001781 07 <1> pop es 1328 00001782 E8C896 <1> call hexword 1329 00001785 B03A <1> mov al, ':' 1330 00001787 AA <1> stosb 1331 00001788 89D0 <1> mov ax, dx 1332 0000178A E8C096 <1> call hexword 1333 <1> 1334 0000178D 5B <1> pop bx 1335 0000178E 5A <1> pop dx ; segment 1336 <1> 1337 0000178F 8916[7E0B] <1> mov word [intaddress + 2], dx 1338 00001793 891E[7C0B] <1> mov word [intaddress], bx 1339 <1> 1340 00001797 45 <1> inc bp 1341 00001798 81FD0001 <1> cmp bp, 256 1342 0000179C 7740 <1> ja .toomany 1343 <1> 1344 0000179E E8F202 <1> call check_int_chain 1345 000017A1 722C <1> jc .end_chain 1346 <1> 1347 000017A3 52 <1> push dx ; segment 1348 000017A4 50 <1> push ax 1349 000017A5 16 <1> push ss 1350 000017A6 07 <1> pop es 1351 000017A7 E8D083 <1> call unhack 1352 000017AA 51 <1> push cx 1353 000017AB E8EE19 <1> call copy_single_counted_string 1354 000017AE 59 <1> pop cx 1355 000017AF E87C03 <1> call .mcbname 1356 000017B2 51 <1> push cx 1357 000017B3 E8CF96 <1> call putsline_crlf 1358 000017B6 59 <1> pop cx 1359 000017B7 E80524 <1> call handle_serial_flags_ctrl_c 1360 000017BA E8A983 <1> call dohack 1361 000017BD BF[AE07] <1> mov di, line_out 1362 000017C0 B8202D <1> mov ax, " -" 1363 000017C3 AB <1> stosw 1364 000017C4 B82D3E <1> mov ax, "->" 1365 000017C7 AB <1> stosw 1366 000017C8 B020 <1> mov al, 32 1367 000017CA AA <1> stosb 1368 <1> 1369 000017CB 5A <1> pop dx 1370 000017CC 58 <1> pop ax ; (ax = segment) 1371 000017CD EBAF <1> jmp .loop_chain 1372 <1> 1373 <1> .end_chain: 1374 000017CF 16 <1> push ss 1375 000017D0 07 <1> pop es 1376 000017D1 E8A683 <1> call unhack 1377 000017D4 E85703 <1> call .mcbname 1378 000017D7 E8AB96 <1> call putsline_crlf 1379 <1> .86next: 1380 000017DA 5E <1> pop si 1381 000017DB 59 <1> pop cx 1382 000017DC 5B <1> pop bx 1383 000017DD C3 <1> retn 1384 <1> 1385 <1> .toomany: 1386 000017DE BE[AA69] <1> mov si, msg.di_toomany 1387 000017E1 E8B819 <1> call copy_single_counted_string 1388 000017E4 EBE9 <1> jmp .end_chain 1389 <1> 1390 <1> %if _PM 1391 <1> .failed: 1392 <1> call unhack 1393 <1> pop dx ; discard a near return address 1394 <1> mov dx, gatewrong 1395 <1> jmp putsz 1396 <1> %endif 1397 <1> 1398 <1> 1399 <1> int_list: 1400 000017E6 57 <1> push di 1401 000017E7 51 <1> push cx 1402 000017E8 53 <1> push bx 1403 000017E9 92 <1> xchg ax, dx ; dx = segment 1404 <1> 1405 000017EA 368E06[2A0A] <1> mov es, word [ss:auxbuff_segorsel] 1406 000017EF 31FF <1> xor di, di ; -> auxbuff 1407 000017F1 AB <1> stosw ; store offset 1408 000017F2 92 <1> xchg ax, dx ; dx = offset 1409 000017F3 AB <1> stosw ; store segment 1410 000017F4 92 <1> xchg ax, dx ; dx = segment 1411 000017F5 93 <1> xchg bx, ax ; bx = offset 1412 000017F6 B80003 <1> mov ax, 300h ; flag for IVT | unused 1413 000017F9 AB <1> stosw ; which multiplex number 1414 000017FA 31C0 <1> xor ax, ax 1415 000017FC AB <1> stosw ; which int list entry = none = 0 1416 <1> 1417 <1> .loop_ivt_chain: 1418 000017FD E89302 <1> call check_int_chain 1419 00001800 7219 <1> jc .end_ivt_chain 1420 <1> 1421 00001802 81FFF81F <1> cmp di, _AUXBUFFSIZE - 3 * 8 1422 00001806 7734 <1> ja .error 1423 00001808 368E06[2A0A] <1> mov es, word [ss:auxbuff_segorsel] 1424 0000180D AB <1> stosw ; store offset 1425 0000180E 92 <1> xchg ax, dx 1426 0000180F AB <1> stosw ; store segment 1427 00001810 92 <1> xchg ax, dx 1428 00001811 93 <1> xchg bx, ax 1429 00001812 B80002 <1> mov ax, 200h ; flag for unused 1430 00001815 AB <1> stosw ; found in chain = 200h 1431 00001816 31C0 <1> xor ax, ax 1432 00001818 AB <1> stosw 1433 00001819 EBE2 <1> jmp .loop_ivt_chain 1434 <1> 1435 <1> .end_ivt_chain: 1436 0000181B 83C8FF <1> or ax, -1 1437 0000181E 368E06[2A0A] <1> mov es, word [ss:auxbuff_segorsel] 1438 00001823 B90800 <1> mov cx, 8 1439 00001826 F3AB <1> rep stosw ; terminator is all-ones 1440 <1> ; (two terminators actually) 1441 <1> 1442 00001828 31C0 <1> xor ax, ax 1443 <1> .loopplex: 1444 0000182A B000 <1> mov al, 00h ; AMIS installation check 1445 0000182C 51 <1> push cx 1446 <1> ; function 0 changes dx, di, cx, al 1447 <1> %if _PM 1448 <1> call call_int2D 1449 <1> %else 1450 0000182D CD2D <1> int 2Dh ; enquire whether there's anyone 1451 <1> %endif 1452 0000182F 59 <1> pop cx ; but we don't care who it might be 1453 00001830 FEC0 <1> inc al ; = FFh ? 1454 00001832 7503E90201 <1> jz .search ; yes, it is in use --> 1455 <1> .nextplex: 1456 00001837 FEC4 <1> inc ah 1457 00001839 75EF <1> jnz .loopplex ; try next multiplexer --> 1458 <1> 1459 <1> .done: 1460 0000183B A8 <1> db __TEST_IMM8 ; (NC) 1461 <1> .error: 1462 0000183C F9 <1> stc 1463 <1> 1464 0000183D 5B <1> pop bx 1465 0000183E 59 <1> pop cx 1466 0000183F 5F <1> pop di 1467 00001840 16 <1> push ss 1468 00001841 1F <1> pop ds 1469 00001842 16 <1> push ss 1470 00001843 07 <1> pop es 1471 <1> 1472 00001844 BE[2769] <1> mov si, msg.di_error 1473 00001847 7303E9B000 <1> jc .error_string 1474 <1> 1475 0000184C 31F6 <1> xor si, si 1476 <1> 1477 <1> .loop_chain: 1478 0000184E 8E1E[2A0A] <1> mov ds, word [auxbuff_segorsel] 1479 00001852 AD <1> lodsw 1480 00001853 92 <1> xchg ax, dx 1481 00001854 AD <1> lodsw 1482 00001855 83C604 <1> add si, 4 1483 <1> 1484 00001858 89C3 <1> mov bx, ax 1485 0000185A 21D3 <1> and bx, dx 1486 0000185C 43 <1> inc bx 1487 0000185D 746D <1> jz .next_seq 1488 <1> 1489 <1> .next_chain: 1490 0000185F 16 <1> push ss 1491 00001860 1F <1> pop ds 1492 <1> 1493 00001861 50 <1> push ax ; segment 1494 00001862 52 <1> push dx 1495 <1> 1496 00001863 16 <1> push ss 1497 00001864 07 <1> pop es 1498 00001865 E8E595 <1> call hexword 1499 00001868 B03A <1> mov al, ':' 1500 0000186A AA <1> stosb 1501 0000186B 89D0 <1> mov ax, dx 1502 0000186D E8DD95 <1> call hexword 1503 <1> 1504 00001870 5B <1> pop bx 1505 00001871 5A <1> pop dx ; segment 1506 <1> 1507 00001872 8916[7E0B] <1> mov word [intaddress + 2], dx 1508 00001876 891E[7C0B] <1> mov word [intaddress], bx 1509 <1> 1510 0000187A 56 <1> push si 1511 0000187B E81502 <1> call check_int_chain 1512 0000187E 722E <1> jc .end_chain 1513 <1> 1514 00001880 16 <1> push ss 1515 00001881 07 <1> pop es 1516 00001882 E8F582 <1> call unhack 1517 00001885 51 <1> push cx 1518 00001886 E81319 <1> call copy_single_counted_string 1519 00001889 59 <1> pop cx 1520 0000188A 5E <1> pop si 1521 0000188B E87A00 <1> call .mpx 1522 0000188E 56 <1> push si 1523 0000188F E89C02 <1> call gateout.mcbname 1524 00001892 51 <1> push cx 1525 00001893 E8EF95 <1> call putsline_crlf 1526 00001896 59 <1> pop cx 1527 00001897 E82523 <1> call handle_serial_flags_ctrl_c 1528 0000189A E8C982 <1> call dohack 1529 0000189D BF[AE07] <1> mov di, line_out 1530 000018A0 B8202D <1> mov ax, " -" 1531 000018A3 AB <1> stosw 1532 000018A4 B82D3E <1> mov ax, "->" 1533 000018A7 AB <1> stosw 1534 000018A8 B020 <1> mov al, 32 1535 000018AA AA <1> stosb 1536 <1> 1537 000018AB 5E <1> pop si 1538 000018AC EBA0 <1> jmp .loop_chain 1539 <1> 1540 <1> .end_chain: 1541 000018AE 16 <1> push ss 1542 000018AF 07 <1> pop es 1543 000018B0 E8C782 <1> call unhack 1544 000018B3 5E <1> pop si 1545 000018B4 E85100 <1> call .mpx 1546 000018B7 56 <1> push si 1547 000018B8 E87302 <1> call gateout.mcbname 1548 000018BB 51 <1> push cx 1549 000018BC E8C695 <1> call putsline_crlf 1550 000018BF 59 <1> pop cx 1551 000018C0 BF[AE07] <1> mov di, line_out 1552 000018C3 E8F922 <1> call handle_serial_flags_ctrl_c 1553 000018C6 E89D82 <1> call dohack 1554 000018C9 5E <1> pop si 1555 000018CA EB82 <1> jmp .loop_chain 1556 <1> 1557 <1> .next_seq: 1558 000018CC AD <1> lodsw 1559 000018CD 92 <1> xchg ax, dx 1560 000018CE AD <1> lodsw 1561 000018CF 83C604 <1> add si, 4 1562 <1> 1563 000018D2 89C3 <1> mov bx, ax 1564 000018D4 21D3 <1> and bx, dx 1565 000018D6 43 <1> inc bx 1566 000018D7 741A <1> jz @F 1567 <1> 1568 000018D9 16 <1> push ss 1569 000018DA 1F <1> pop ds 1570 000018DB 16 <1> push ss 1571 000018DC 07 <1> pop es 1572 000018DD E89A82 <1> call unhack 1573 000018E0 51 <1> push cx 1574 000018E1 56 <1> push si 1575 000018E2 BE[2F69] <1> mov si, msg.di_hidden 1576 000018E5 E8B418 <1> call copy_single_counted_string 1577 000018E8 5E <1> pop si 1578 000018E9 59 <1> pop cx 1579 000018EA E8D222 <1> call handle_serial_flags_ctrl_c 1580 000018ED E87682 <1> call dohack 1581 <1> 1582 000018F0 E96CFF <1> jmp .next_chain 1583 <1> 1584 <1> @@: 1585 000018F3 16 <1> push ss 1586 000018F4 1F <1> pop ds 1587 000018F5 16 <1> push ss 1588 000018F6 07 <1> pop es 1589 000018F7 E88082 <1> call unhack 1590 000018FA EB09 <1> jmp @F 1591 <1> 1592 <1> 1593 <1> .error_string: 1594 000018FC E89D18 <1> call copy_single_counted_string 1595 <1> 1596 000018FF E87882 <1> call unhack 1597 00001902 E88095 <1> call putsline_crlf 1598 <1> @@: 1599 <1> %if 0 ; _DEBUG 1600 <1> mov es, word [auxbuff_segorsel] 1601 <1> int3 1602 <1> push ss 1603 <1> pop es 1604 <1> %endif 1605 00001905 E9D2FE <1> jmp gateout.86next 1606 <1> 1607 <1> 1608 <1> .mpx: 1609 00001908 8E06[2A0A] <1> mov es, word [auxbuff_segorsel] 1610 0000190C 268B44FC <1> mov ax, word [es:si - 4] 1611 00001910 268B54FE <1> mov dx, word [es:si - 2] 1612 00001914 16 <1> push ss 1613 00001915 07 <1> pop es 1614 00001916 F6C402 <1> test ah, 2 1615 00001919 751D <1> jnz @F 1616 0000191B 56 <1> push si 1617 0000191C 51 <1> push cx 1618 0000191D BE[136A] <1> mov si, msg.di_multiplex.1 1619 00001920 E87918 <1> call copy_single_counted_string 1620 00001923 E82E95 <1> call hexbyte 1621 00001926 BE[1A6A] <1> mov si, msg.di_multiplex.2 1622 00001929 E87018 <1> call copy_single_counted_string 1623 0000192C 92 <1> xchg ax, dx 1624 0000192D E81D95 <1> call hexword 1625 00001930 BE[226A] <1> mov si, msg.di_multiplex.3 1626 00001933 E86618 <1> call copy_single_counted_string 1627 00001936 59 <1> pop cx 1628 00001937 5E <1> pop si 1629 <1> @@: 1630 00001938 C3 <1> retn 1631 <1> 1632 <1> 1633 <1> ; INP: ah = multiplex number of AMIS TSR to search through 1634 <1> ; ss:sp-> interrupt number (byte), must be preserved 1635 <1> ; CHG: es, di, dx, bx 1636 <1> .search: 1637 00001939 B004 <1> mov al, 04h 1638 0000193B 5B <1> pop bx 1639 0000193C 53 <1> push bx ; low byte is the interrupt number 1640 <1> ; function 4 changes dx, bx, al 1641 <1> %if _PM 1642 <1> call call_int2D 1643 <1> %else 1644 0000193D CD2D <1> int 2Dh 1645 <1> %endif 1646 0000193F 3C03 <1> cmp al, 03h ; returned its interrupt entry ? 1647 <1> ; RBIL doesn't explicitly state that this interrupt entry has to 1648 <1> ; be IISP compatible. But I'm too lazy to look up the older AMIS, 1649 <1> ; and SearchIISPChain checks the interrupt entry anyway. 1650 00001941 743C <1> je .search_dxbx 1651 00001943 3C04 <1> cmp al, 04h ; returned list of hooked interrupts ? 1652 00001945 7403E9EDFE <1> jne .nextplex ; no, try next multiplexer --> 1653 0000194A 89DF <1> mov di, bx 1654 0000194C 5B <1> pop bx 1655 0000194D 53 <1> push bx ; bl = interrupt number 1656 0000194E 31C9 <1> xor cx, cx ; = index into list 1657 00001950 88D8 <1> mov al, bl 1658 <1> .search_intlist_seg: 1659 <1> %if _PM 1660 <1> call setes2dx 1661 <1> %else 1662 00001952 8EC2 <1> mov es, dx ; es:di-> list 1663 <1> %endif 1664 <1> .search_intlist: ; Search the returned list for the required interrupt number. 1665 00001954 AE <1> scasb ; our interrupt number ? 1666 00001955 740E <1> je .search_found_intlist 1667 00001957 26807DFF2D <1> cmp byte [es:di-1], 2Dh ; was last in list ? 1668 0000195C 7503E9D6FE <1> je .nextplex 1669 00001961 AF <1> scasw ; skip pointer 1670 00001962 41 <1> inc cx 1671 00001963 EBEF <1> jmp short .search_intlist ; try next entry --> 1672 <1> 1673 <1> .search_found_intlist: 1674 00001965 268B1D <1> mov bx, word [es:di] ; dx:bx = es:bx -> IISP entry 1675 00001968 AF <1> scasw ; skip pointer 1676 00001969 52 <1> push dx ; preserve dx for .search_intlist_seg 1677 0000196A 57 <1> push di 1678 0000196B E82100 <1> call .add 1679 0000196E 5F <1> pop di 1680 0000196F 5A <1> pop dx 1681 00001970 7303E9C7FE <1> jc .error 1682 <1> ; je .search_found ; found entry --> 1683 <1> ; This specific jump supports TSRs that hook the same 1684 <1> ; interrupt more than once; jumping to .nextplex instead 1685 <1> ; (as previously) aborts the search after the first match 1686 <1> ; in the interrupt list. This support might become useful. 1687 00001975 3C2D <1> cmp al, 2Dh ; was last in list ? 1688 00001977 7503E9BBFE <1> je .nextplex 1689 0000197C 41 <1> inc cx 1690 0000197D EBD3 <1> jmp short .search_intlist_seg 1691 <1> 1692 <1> .search_dxbx: 1693 <1> %if _PM 1694 <1> call setes2dx 1695 <1> %else 1696 0000197F 8EC2 <1> mov es, dx ; es:bx-> (IISP) interrupt entry 1697 <1> %endif 1698 <1> ; The entry we found now is possibly behind the non-IISP entry that 1699 <1> ; terminated our first SearchIISPChain call (at .hard). We then 1700 <1> ; possibly might find our entry in this hidden part of the chain. 1701 00001981 83C9FF <1> or cx, -1 1702 00001984 E80800 <1> call .add 1703 00001987 7303E9B0FE <1> jc .error 1704 <1> ; jne .nextplex ; didn't find our entry in the chain --> 1705 0000198C E9A8FE <1> jmp .nextplex 1706 <1> 1707 <1> 1708 <1> int_list.add: 1709 0000198F 31FF <1> xor di, di 1710 00001991 368E1E[2A0A] <1> mov ds, word [ss:auxbuff_segorsel] 1711 00001996 83CEFF <1> or si, -1 1712 00001999 E8D400 <1> call .check 1713 0000199C 7516 <1> jne @F 1714 0000199E F6450502 <1> testopt [di + 4], 200h 1715 000019A2 7503E9C700 <1> jz .error 1716 000019A7 886504 <1> mov byte [di + 4], ah 1717 000019AA 806505FD <1> clropt [di + 4], 200h 1718 000019AE 894D06 <1> mov word [di + 6], cx 1719 000019B1 E9B900 <1> jmp .done 1720 <1> 1721 <1> @@: 1722 <1> ; ds:di -> second terminator 1723 000019B4 81FFF81F <1> cmp di, _AUXBUFFSIZE - 8 * 3 1724 000019B8 7603E9B100 <1> ja .error 1725 000019BD 8D75F8 <1> lea si, [di - 8] 1726 <1> 1727 000019C0 93 <1> xchg ax, bx 1728 000019C1 368E06[2A0A] <1> mov es, word [ss:auxbuff_segorsel] 1729 <1> ; => auxbuff 1730 000019C6 AB <1> stosw ; store offset 1731 000019C7 92 <1> xchg ax, dx ; dx = offset 1732 000019C8 AB <1> stosw ; store segment 1733 000019C9 92 <1> xchg ax, dx ; dx = segment 1734 000019CA 93 <1> xchg ax, bx 1735 000019CB 50 <1> push ax 1736 000019CC B000 <1> mov al, 0 1737 000019CE 86C4 <1> xchg al, ah 1738 000019D0 AB <1> stosw ; which multiplex number 1739 000019D1 89C8 <1> mov ax, cx 1740 000019D3 AB <1> stosw ; which int list entry = none = 0 1741 000019D4 58 <1> pop ax 1742 <1> 1743 <1> .loop_chain: 1744 000019D5 50 <1> push ax 1745 000019D6 56 <1> push si 1746 000019D7 E8B900 <1> call check_int_chain 1747 000019DA 5E <1> pop si 1748 000019DB 5B <1> pop bx 1749 000019DC 727E <1> jc .end_chain 1750 <1> 1751 000019DE 81FFF81F <1> cmp di, _AUXBUFFSIZE - 3 * 8 1752 000019E2 7603E98700 <1> ja .error 1753 000019E7 368E06[2A0A] <1> mov es, word [ss:auxbuff_segorsel] 1754 000019EC AB <1> stosw ; store offset 1755 000019ED 92 <1> xchg ax, dx 1756 000019EE AB <1> stosw ; store segment 1757 000019EF 92 <1> xchg ax, dx 1758 000019F0 93 <1> xchg bx, ax ; ah = multiplex number, bx = offset 1759 000019F1 50 <1> push ax 1760 000019F2 B80002 <1> mov ax, 200h 1761 000019F5 AB <1> stosw ; found in chain = 200h 1762 000019F6 31C0 <1> xor ax, ax 1763 000019F8 AB <1> stosw 1764 000019F9 58 <1> pop ax 1765 000019FA 57 <1> push di 1766 000019FB 31FF <1> xor di, di 1767 000019FD E87000 <1> call .check 1768 00001A00 7403 <1> je @F 1769 00001A02 5F <1> pop di 1770 00001A03 EBD0 <1> jmp .loop_chain 1771 <1> 1772 <1> @@: 1773 00001A05 5B <1> pop bx 1774 00001A06 F6450501 <1> testopt [di + 4], 100h 1775 00001A0A 7562 <1> jnz .error 1776 00001A0C 837DFCFF <1> cmp word [di - 8 + 4], -1 1777 00001A10 755C <1> jne .error 1778 <1> ; di -> match (insert to move here) 1779 <1> ; bx -> after repeat 1780 <1> ; bx - 8 -> repeat 1781 <1> ; bx - 16 -> last entry to move 1782 <1> ; si -> single terminator 1783 <1> ; si + 8 -> first entry to move 1784 <1> 1785 00001A12 83EB10 <1> sub bx, 16 ; -> last entry to move 1786 <1> 1787 <1> .insert: 1788 <1> ; di -> match (insert to move here) 1789 <1> ; bx + 8 -> repeat 1790 <1> ; bx -> last entry to move 1791 <1> ; si -> single terminator 1792 <1> ; si + 8 -> first entry to move 1793 <1> 1794 00001A15 FF7706 <1> push word [bx + 6] 1795 00001A18 FF7704 <1> push word [bx + 4] 1796 00001A1B FF7702 <1> push word [bx + 2] 1797 00001A1E FF37 <1> push word [bx] ; get the last entry 1798 00001A20 57 <1> push di 1799 00001A21 56 <1> push si 1800 00001A22 51 <1> push cx 1801 00001A23 368E06[2A0A] <1> mov es, word [ss:auxbuff_segorsel] 1802 00001A28 89F9 <1> mov cx, di ; = where to insert 1803 <1> ; -> first to displace 1804 00001A2A F7D9 <1> neg cx 1805 00001A2C 89DE <1> mov si, bx ; -> after end of source 1806 00001A2E 8D7F08 <1> lea di, [bx + 8] ; -> after end of dest 1807 00001A31 01F1 <1> add cx, si ; after end of source - first to displace 1808 <1> ; = how many bytes to displace 1809 00001A33 D1E9 <1> shr cx, 1 1810 00001A35 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND as below 1811 00001A36 A7 <1> cmpsw ; si -= 2, di -= 2 1812 <1> 1813 <1> numdef AMD_ERRATUM_109_WORKAROUND, 1 1814 <1> ; Refer to comment in init.asm init_movp. 1815 <1> 1816 <1> %if _AMD_ERRATUM_109_WORKAROUND 1817 00001A37 E308 <1> jcxz @FF 1818 00001A39 83F914 <1> cmp cx, 20 1819 00001A3C 7703 <1> ja @FF 1820 <1> @@: 1821 00001A3E A5 <1> movsw 1822 00001A3F E2FD <1> loop @B 1823 <1> @@: 1824 <1> %endif 1825 00001A41 F3A5 <1> rep movsw 1826 00001A43 FC <1> cld 1827 00001A44 59 <1> pop cx 1828 00001A45 5E <1> pop si 1829 00001A46 5F <1> pop di 1830 00001A47 8F05 <1> pop word [di] 1831 00001A49 8F4502 <1> pop word [di + 2] 1832 00001A4C 8F4504 <1> pop word [di + 4] 1833 00001A4F 8F4506 <1> pop word [di + 6] ; insert moved entry 1834 00001A52 83C608 <1> add si, 8 1835 <1> 1836 <1> ; di -> match (inserted here, insert next here) 1837 <1> ; bx + 8 -> repeat 1838 <1> ; bx -> last entry to move 1839 <1> ; si -> single terminator 1840 <1> ; si + 8 -> first entry to move 1841 00001A55 39DE <1> cmp si, bx ; if last to move != terminator 1842 00001A57 75BC <1> jne .insert ; then move another -> 1843 00001A59 89F7 <1> mov di, si ; where to put double terminator 1844 <1> 1845 00001A5B 93 <1> xchg ax, bx 1846 <1> .end_chain: 1847 00001A5C 53 <1> push bx 1848 00001A5D 51 <1> push cx 1849 00001A5E 83C8FF <1> or ax, -1 1850 00001A61 368E06[2A0A] <1> mov es, word [ss:auxbuff_segorsel] 1851 00001A66 B90800 <1> mov cx, 8 1852 00001A69 F3AB <1> rep stosw ; terminator is all-ones 1853 <1> ; (two terminators actually) 1854 00001A6B 59 <1> pop cx 1855 00001A6C 58 <1> pop ax 1856 <1> 1857 <1> .done: 1858 00001A6D A8 <1> db __TEST_IMM8 ; (NC) 1859 <1> .error: 1860 00001A6E F9 <1> stc 1861 <1> 1862 00001A6F C3 <1> retn 1863 <1> 1864 <1> 1865 <1> ; INP: dx:bx = 86 Mode far pointer to handler 1866 <1> ; di -> to check 1867 <1> ; si = end of area to check 1868 <1> 1869 <1> .check: 1870 00001A70 391D <1> cmp word [di + 0], bx 1871 00001A72 7506 <1> jne .mismatch 1872 00001A74 395502 <1> cmp word [di + 2], dx 1873 00001A77 7501 <1> jne .mismatch 1874 <1> .match: 1875 00001A79 C3 <1> retn 1876 <1> 1877 <1> .mismatch: 1878 00001A7A 83C708 <1> add di, 8 1879 <1> 1880 00001A7D 39F7 <1> cmp di, si 1881 00001A7F 730F <1> jae .checkret 1882 <1> 1883 00001A81 837D04FF <1> cmp word [di + 4], -1 1884 00001A85 75E9 <1> jne .check 1885 <1> 1886 00001A87 83C708 <1> add di, 8 1887 00001A8A 837D04FF <1> cmp word [di + 4], -1 1888 00001A8E 75E0 <1> jne .check 1889 <1> .checkret: 1890 00001A90 85FF <1> test di, di 1891 00001A92 C3 <1> retn 1892 <1> 1893 <1> 1894 <1> ; INP: dx:bx = 86 Mode far pointer to int handler 1895 <1> ; OUT: NC if chain found, 1896 <1> ; dx:ax = 86 Mode far pointer to next 1897 <1> ; ss:si -> type message (counted) 1898 <1> ; STT: es != ss, ds != ss 1899 <1> check_int_chain: 1900 <1> %if _PM 1901 <1> call setes2dx 1902 <1> %else 1903 00001A93 8EC2 <1> mov es, dx ; es:bx -> entrypoint 1904 <1> %endif 1905 00001A95 E880AB <1> call IsIISPEntry? 1906 00001A98 752A <1> jnz .not_iisp 1907 <1> 1908 00001A9A 26FF7704 <1> push word [es:bx + ieNext + 2] 1909 00001A9E 26FF7702 <1> push word [es:bx + ieNext] 1910 <1> 1911 00001AA2 BE[5369] <1> mov si, msg.di_uninst_iisp 1912 00001AA5 26813F90EA <1> cmp word [ es:bx + ieEntry ], 0EA90h ; nop\jmp far imm16:imm16 ? 1913 00001AAA 7414 <1> je @F 1914 00001AAC BE[3769] <1> mov si, msg.di_iisp 1915 00001AAF 26807F09EB <1> cmp byte [ es:bx + ieJmphwreset ], 0EBh ; jmp short ? 1916 00001AB4 7507 <1> jne .nonstd 1917 00001AB6 26813FEB10 <1> cmp word [ es:bx + ieEntry ], 010EBh ; jmp short $+18 ? 1918 00001ABB 7403 <1> je @F 1919 <1> .nonstd: 1920 00001ABD BE[3F69] <1> mov si, msg.di_nonstd_iisp 1921 <1> @@: 1922 00001AC0 58 <1> pop ax 1923 00001AC1 5A <1> pop dx ; segment 1924 00001AC2 F8 <1> clc 1925 00001AC3 C3 <1> retn 1926 <1> 1927 <1> 1928 <1> .not_iisp: 1929 00001AC4 26803FE8 <1> cmp byte [es:bx], 0E8h 1930 00001AC8 7514 <1> jne .not_fd 1931 00001ACA 26807F03EA <1> cmp byte [es:bx + 3], 0EAh 1932 00001ACF 750D <1> jne .not_fd 1933 00001AD1 26FF7706 <1> push word [es:bx + 4 + 2] 1934 00001AD5 26FF7704 <1> push word [es:bx + 4] 1935 00001AD9 BE[6769] <1> mov si, msg.di_freedos_reloc 1936 00001ADC EBE2 <1> jmp @B 1937 <1> 1938 <1> .not_fd: 1939 00001ADE BE[7A69] <1> mov si, msg.di_jmpfar 1940 00001AE1 26803FEA <1> cmp byte [es:bx], 0EAh 1941 00001AE5 750A <1> jne .not_jmpfar 1942 00001AE7 26FF7703 <1> push word [es:bx + 1 + 2] 1943 00001AEB 26FF7701 <1> push word [es:bx + 1] 1944 00001AEF EBCF <1> jmp @B 1945 <1> 1946 <1> .not_jmpfar: 1947 00001AF1 BE[8969] <1> mov si, msg.di_jmpfarindirect 1948 00001AF4 26803FEB <1> cmp byte [es:bx], 0EBh 1949 00001AF8 750D <1> jne .not_testhook_try_jmpfarindirect 1950 00001AFA BE[9D69] <1> mov si, msg.di_testhook 1951 00001AFD 268A4701 <1> mov al, byte [es:bx + 1] 1952 00001B01 98 <1> cbw 1953 00001B02 83C002 <1> add ax, 2 1954 00001B05 01C3 <1> add bx, ax 1955 <1> .not_testhook_try_jmpfarindirect: 1956 00001B07 83FBFA <1> cmp bx, -6 1957 00001B0A 7720 <1> ja .not_testhook_or_jmpfarindirect 1958 00001B0C 26813F2EFF <1> cmp word [es:bx], 0FF2Eh 1959 00001B11 7519 <1> jne .not_testhook_or_jmpfarindirect 1960 00001B13 26807F022E <1> cmp byte [es:bx + 2], 2Eh 1961 00001B18 7512 <1> jne .not_testhook_or_jmpfarindirect 1962 00001B1A 268B5F03 <1> mov bx, word [es:bx + 3] 1963 00001B1E 83FBFC <1> cmp bx, -4 1964 00001B21 7709 <1> ja .not_testhook_or_jmpfarindirect 1965 00001B23 26FF7702 <1> push word [es:bx + 2] 1966 00001B27 26FF37 <1> push word [es:bx] 1967 00001B2A EB94 <1> jmp @B 1968 <1> 1969 <1> .not_testhook_or_jmpfarindirect: 1970 00001B2C F9 <1> stc 1971 00001B2D C3 <1> retn 1972 <1> 1973 <1> 1974 <1> gateout.mcbname: 1975 00001B2E F6C501 <1> test ch, 1 1976 00001B31 7503E99800 <1> jz .ret 1977 00001B36 8B16[020B] <1> mov dx, word [firstmcb] 1978 00001B3A 83FAFF <1> cmp dx, -1 1979 00001B3D 7503E98C00 <1> je .ret 1980 00001B42 51 <1> push cx 1981 00001B43 A1[7C0B] <1> mov ax, word [intaddress] 1982 00001B46 B104 <1> mov cl, 4 1983 00001B48 D3E8 <1> shr ax, cl 1984 00001B4A 0306[7E0B] <1> add ax, word [intaddress + 2] ; => segment of handler 1985 00001B4E 724F <1> jc .hma 1986 <1> .loop: 1987 <1> %if _PM 1988 <1> call setes2dx 1989 <1> %else 1990 00001B50 8EC2 <1> mov es, dx 1991 <1> %endif 1992 00001B52 89D1 <1> mov cx, dx 1993 00001B54 26030E0300 <1> add cx, word [es:3] 1994 00001B59 41 <1> inc cx 1995 00001B5A 39D0 <1> cmp ax, dx 1996 00001B5C 7246 <1> jb .next 1997 00001B5E 39C8 <1> cmp ax, cx 1998 00001B60 7342 <1> jae .next 1999 00001B62 268B160100 <1> mov dx, word [es:1] 2000 00001B67 BE[D769] <1> mov si, msg.di_system_mcb 2001 00001B6A 83FA50 <1> cmp dx, 50h 2002 00001B6D 7259 <1> jb .copy 2003 00001B6F 4A <1> dec dx 2004 <1> %if _PM 2005 <1> call setes2dx 2006 <1> %else 2007 00001B70 8EC2 <1> mov es, dx 2008 <1> %endif 2009 00001B72 06 <1> push es 2010 00001B73 1F <1> pop ds 2011 00001B74 16 <1> push ss 2012 00001B75 07 <1> pop es 2013 00001B76 B020 <1> mov al, 32 2014 00001B78 AA <1> stosb 2015 00001B79 89F8 <1> mov ax, di 2016 00001B7B BE0800 <1> mov si, 8 2017 00001B7E 89F1 <1> mov cx, si 2018 00001B80 57 <1> push di 2019 00001B81 F3A4 <1> rep movsb 2020 00001B83 B000 <1> mov al, 0 2021 00001B85 AA <1> stosb ; append zero-value byte 2022 00001B86 5F <1> pop di ; -> name in buffer 2023 00001B87 16 <1> push ss 2024 00001B88 1F <1> pop ds 2025 <1> @@: 2026 00001B89 AE <1> scasb ; is it zero ? 2027 00001B8A 75FD <1> jne @B ; no, continue --> 2028 <1> ; first dec makes it -> at the zero 2029 <1> @@: 2030 00001B8C 4F <1> dec di 2031 00001B8D 39F8 <1> cmp ax, di 2032 00001B8F 7408 <1> je .empty 2033 00001B91 807DFF20 <1> cmp byte [di - 1], 32 2034 00001B95 74F5 <1> je @B 2035 00001B97 EB34 <1> jmp .ret_cx 2036 <1> 2037 <1> .empty: 2038 00001B99 4F <1> dec di 2039 00001B9A BE[C769] <1> mov si, msg.di_empty 2040 00001B9D EB29 <1> jmp .copy 2041 <1> 2042 <1> .hma: 2043 00001B9F BE[016A] <1> mov si, msg.di_hma 2044 00001BA2 EB24 <1> jmp .copy 2045 <1> 2046 <1> .next: 2047 00001BA4 89CA <1> mov dx, cx 2048 00001BA6 3B16[040B] <1> cmp dx, word [firstumcb]; is next one the first UMCB ? 2049 00001BAA 74A4 <1> je .loop ; yes, ignore the "Z" (if any) --> 2050 00001BAC 26803E00004D <1> cmp byte [es:0], "M" ; check current signature 2051 00001BB2 749C <1> je .loop ; if "M" then loop to next --> 2052 <1> 2053 00001BB4 8B36[040B] <1> mov si, word [firstumcb] 2054 00001BB8 46 <1> inc si 2055 00001BB9 7503 <1> jnz @F 2056 00001BBB BE00A0 <1> mov si, 0A000h 2057 <1> @@: 2058 00001BBE 39F0 <1> cmp ax, si 2059 00001BC0 BE[E369] <1> mov si, msg.di_system_upper 2060 00001BC3 7303 <1> jae @F 2061 00001BC5 BE[F269] <1> mov si, msg.di_system_low 2062 <1> @@: 2063 <1> .copy: 2064 00001BC8 16 <1> push ss 2065 00001BC9 07 <1> pop es 2066 00001BCA E8CF15 <1> call copy_single_counted_string 2067 <1> .ret_cx: 2068 00001BCD 59 <1> pop cx 2069 <1> .ret: 2070 00001BCE C3 <1> retn 2071 <1> 2072 <1> %endif 2073 <1> 2074 <1> %if _MCB 2075 <1> ; DM command 2076 <1> mcbout: 2077 00001BCF E8D091 <1> call skipwhite 2078 00001BD2 8B16[020B] <1> mov dx, word [firstmcb] 2079 00001BD6 E87491 <1> call iseol? 2080 00001BD9 7406 <1> je .lolmcb 2081 00001BDB E84E90 <1> call getword 2082 00001BDE E88191 <1> call chkeol 2083 <1> .lolmcb: 2084 00001BE1 89D6 <1> mov si, dx 2085 00001BE3 BF[AE07] <1> mov di, line_out 2086 00001BE6 B85053 <1> mov ax, "PS" 2087 00001BE9 AB <1> stosw 2088 00001BEA B8503A <1> mov ax, "P:" 2089 00001BED AB <1> stosw 2090 00001BEE B020 <1> mov al, 32 2091 00001BF0 AA <1> stosb 2092 00001BF1 A1[DE0A] <1> mov ax, word [pspdbe] 2093 00001BF4 E85692 <1> call hexword 2094 00001BF7 E88B92 <1> call putsline_crlf ; destroys cx,dx,bx 2095 00001BFA B14D <1> mov cl, 'M' 2096 <1> .next: 2097 00001BFC 83FEFF <1> cmp si, byte -1 2098 00001BFF 7405 <1> je .invmcb 2099 00001C01 83FE50 <1> cmp si, byte 50h 2100 00001C04 7306 <1> jae .valmcb 2101 <1> .invmcb: 2102 00001C06 BA[A15E] <1> mov dx, msg.invmcbadr 2103 00001C09 E9F495 <1> jmp putsz 2104 <1> .valmcb: 2105 00001C0C BF[AE07] <1> mov di, line_out 2106 00001C0F 1E <1> push ds 2107 <1> %if _PM 2108 <1> call setds2si 2109 <1> %else 2110 00001C10 8EDE <1> mov ds, si 2111 <1> %endif 2112 00001C12 8A2E0000 <1> mov ch, byte [0000] 2113 00001C16 8B1E0100 <1> mov bx, word [0001] 2114 00001C1A 8B160300 <1> mov dx, word [0003] 2115 <1> 2116 00001C1E 89F0 <1> mov ax, si 2117 00001C20 E82A92 <1> call hexword ; segment address of MCB 2118 00001C23 B020 <1> mov al, 32 2119 00001C25 AA <1> stosb 2120 00001C26 88E8 <1> mov al, ch 2121 00001C28 E82992 <1> call hexbyte ; 'M' or 'Z' 2122 00001C2B B020 <1> mov al, 32 2123 00001C2D AA <1> stosb 2124 00001C2E 89D8 <1> mov ax, bx 2125 00001C30 E81A92 <1> call hexword ; MCB owner 2126 00001C33 B020 <1> mov al, 32 2127 00001C35 AA <1> stosb 2128 00001C36 89D0 <1> mov ax, dx 2129 00001C38 E81292 <1> call hexword ; MCB size in paragraphs 2130 <1> 2131 00001C3B B020 <1> mov al, 32 2132 00001C3D AA <1> stosb 2133 00001C3E 89D0 <1> mov ax, dx ; ax = size in paragraphs 2134 00001C40 53 <1> push bx 2135 00001C41 50 <1> push ax 2136 00001C42 52 <1> push dx 2137 00001C43 51 <1> push cx 2138 00001C44 31D2 <1> xor dx, dx ; dx:ax = size in paragraphs 2139 00001C46 B91000 <1> mov cx, 16 ; cx = 16, multiplier (get size in bytes) 2140 00001C49 BB0800 <1> mov bx, 4+4 ; bx = 4+4, width 2141 <1> 2142 00001C4C E89900 <1> call disp_dxax_times_cx_width_bx_size.store 2143 00001C4F 59 <1> pop cx 2144 00001C50 5A <1> pop dx 2145 00001C51 58 <1> pop ax 2146 00001C52 5B <1> pop bx 2147 <1> 2148 00001C53 85DB <1> test bx, bx 2149 00001C55 7471 <1> jz .freemcb ; free MCBs have no name --> 2150 00001C57 B020 <1> mov al, 32 2151 00001C59 AA <1> stosb 2152 00001C5A 56 <1> push si 2153 00001C5B 51 <1> push cx 2154 00001C5C 52 <1> push dx 2155 <1> 2156 00001C5D 1E <1> push ds 2157 00001C5E BE0800 <1> mov si, 8 2158 00001C61 B90200 <1> mov cx, 2 2159 00001C64 39F3 <1> cmp bx, si ; is it a "system" MCB? (owner 0008h or 0007h) 2160 00001C66 7707 <1> ja @F 2161 00001C68 803C53 <1> cmp byte [si], "S" ; "S", "SD", "SC" ? 2162 00001C6B 7407 <1> je .nextmcbchar ; yes, limit name to two characters --> 2163 00001C6D EB03 <1> jmp .nextmcbchar_cx_si ; no, assume full name given 2164 <1> @@: 2165 00001C6F 4B <1> dec bx ; => owner block's MCB 2166 <1> %if _PM 2167 <1> call setds2bx 2168 <1> %else 2169 00001C70 8EDB <1> mov ds, bx 2170 <1> %endif 2171 <1> .nextmcbchar_cx_si: 2172 00001C72 89F1 <1> mov cx, si ; = 8 2173 <1> .nextmcbchar: ; copy name of owner MCB 2174 00001C74 AC <1> lodsb 2175 00001C75 AA <1> stosb 2176 00001C76 84C0 <1> test al, al 2177 00001C78 E0FA <1> loopnz .nextmcbchar ; was not NUL and more bytes left ? 2178 00001C7A 84C0 <1> test al, al 2179 00001C7C 7501 <1> jnz @F 2180 00001C7E 4F <1> dec di 2181 <1> @@: 2182 00001C7F 1F <1> pop ds 2183 <1> 2184 00001C80 833E010008 <1> cmp word [1], 8 2185 00001C85 753E <1> jne .not_s_mcb 2186 00001C87 833E080053 <1> cmp word [8], "S" ; S MCB ? 2187 00001C8C 7537 <1> jne .not_s_mcb 2188 <1> 2189 00001C8E B82074 <1> mov ax, " t" 2190 00001C91 AB <1> stosw 2191 00001C92 B87970 <1> mov ax, "yp" 2192 00001C95 AB <1> stosw 2193 00001C96 B86520 <1> mov ax, "e " 2194 00001C99 AB <1> stosw 2195 <1> 2196 00001C9A 31C0 <1> xor ax, ax 2197 00001C9C A00A00 <1> mov al, [10] 2198 00001C9F E8B291 <1> call hexbyte 2199 <1> 2200 00001CA2 16 <1> push ss 2201 00001CA3 1F <1> pop ds 2202 00001CA4 BE[4C75] <1> mov si, smcbtypes 2203 <1> .s_mcb_loop: 2204 00001CA7 833CFF <1> cmp word [si], -1 2205 00001CAA 740E <1> je .s_mcb_unknown 2206 00001CAC 3904 <1> cmp word [si], ax 2207 00001CAE 7405 <1> je .s_mcb_known 2208 00001CB0 83C604 <1> add si, 4 2209 00001CB3 EBF2 <1> jmp .s_mcb_loop 2210 <1> 2211 <1> .s_mcb_known: 2212 00001CB5 8B7402 <1> mov si, word [si + 2] 2213 00001CB8 EB03 <1> jmp .s_mcb_common 2214 <1> 2215 <1> .s_mcb_unknown: 2216 00001CBA BE[F576] <1> mov si, smcbmsg_unknown 2217 <1> .s_mcb_common: 2218 00001CBD B020 <1> mov al, 32 2219 <1> @@: 2220 00001CBF AA <1> stosb 2221 00001CC0 AC <1> lodsb 2222 00001CC1 84C0 <1> test al, al 2223 00001CC3 75FA <1> jnz @B 2224 <1> 2225 <1> .not_s_mcb: 2226 00001CC5 5A <1> pop dx 2227 00001CC6 59 <1> pop cx 2228 00001CC7 5E <1> pop si 2229 <1> .freemcb: 2230 <1> 2231 00001CC8 1F <1> pop ds 2232 00001CC9 80FD4D <1> cmp ch, 'M' 2233 00001CCC 7406 <1> je .disp 2234 00001CCE 80FD5A <1> cmp ch, 'Z' 2235 00001CD1 7401 <1> je .disp 2236 <1> .ret: 2237 00001CD3 C3 <1> retn 2238 <1> 2239 <1> .disp: 2240 00001CD4 88E9 <1> mov cl, ch 2241 00001CD6 52 <1> push dx 2242 00001CD7 51 <1> push cx 2243 00001CD8 E8AA91 <1> call putsline_crlf ; destroys cx,dx,bx 2244 00001CDB 59 <1> pop cx 2245 00001CDC 5A <1> pop dx 2246 00001CDD 01D6 <1> add si, dx 2247 00001CDF 72F2 <1> jc .ret ; over FFFFh, must be end of chain --> (hmm) 2248 00001CE1 46 <1> inc si 2249 00001CE2 74EF <1> jz .ret 2250 00001CE4 E915FF <1> jmp .next 2251 <1> 2252 <1> %if _PM 2253 <1> setds2si: 2254 <1> mov bx, si 2255 <1> setds2bx: 2256 <1> call ispm 2257 <1> jnz sd2s_ex 2258 <1> mov dx, bx 2259 <1> call setrmsegm 2260 <1> sd2s_ex: 2261 <1> mov ds, bx 2262 <1> retn 2263 <1> %endif ; _PM 2264 <1> %endif ; _MCB 2265 <1> 2266 <1> ;--- DX command. Display extended memory 2267 <1> 2268 <1> %if _PM 2269 <1> [cpu 386] 2270 <1> extmem: 2271 <1> mov dx, word [x_addr+0] 2272 <1> mov bx, word [x_addr+2] 2273 <1> call skipwhite 2274 <1> call iseol? 2275 <1> je extmem_1 2276 <1> call getdword ; get linear address into bx:dx 2277 <1> call chkeol ; expect end of line here 2278 <1> extmem_1: 2279 <1> mov word [lastcmd], extmem 2280 <1> push bx 2281 <1> push dx 2282 <1> pop ebp 2283 <1> 2284 <1> mov di, stack ; create a GDT for Int15.87 2285 <1> xor ax, ax 2286 <1> mov cx, 8 2287 <1> rep stosw 2288 <1> mov ax, 007Fh 2289 <1> stosw 2290 <1> mov ax, dx 2291 <1> stosw 2292 <1> mov al, bl 2293 <1> stosb 2294 <1> mov ax, 0093h 2295 <1> stosw 2296 <1> mov al, bh 2297 <1> stosb 2298 <1> mov ax, 007Fh 2299 <1> stosw 2300 <1> mov ax, line_in+128 2301 <1> mov bx, word [pspdbg] 2302 <1> movzx ebx, bx 2303 <1> shl ebx, 4 2304 <1> movzx eax, ax 2305 <1> add eax, ebx ; eax = flat address of line_in+128 2306 <1> stosw 2307 <1> shr eax, 16 2308 <1> stosb 2309 <1> mov bl, ah 2310 <1> mov ax, 0093h 2311 <1> stosw 2312 <1> mov al, bl 2313 <1> stosb 2314 <1> mov cx, 8 2315 <1> xor ax, ax 2316 <1> rep stosw 2317 <1> 2318 <1> call ispm 2319 <1> mov si, stack 2320 <1> mov cx, 0040h 2321 <1> mov ah, 87h 2322 <1> jnz extmem_rm 2323 <1> push word [pspdbg] 2324 <1> push 15h 2325 <1> call intcall 2326 <1> jmp short i15ok 2327 <1> extmem_rm: 2328 <1> int 15h 2329 <1> i15ok: 2330 <1> jc extmem_exit 2331 <1> mov si, line_in+128 2332 <1> mov ch, 8h 2333 <1> nexti15l: 2334 <1> call handle_serial_flags_ctrl_c 2335 <1> mov di, line_out 2336 <1> mov eax, ebp 2337 <1> shr eax, 16 2338 <1> call hexword 2339 <1> mov ax, bp 2340 <1> call hexword 2341 <1> mov ax, 32<<8|32 2342 <1> stosw 2343 <1> mov bx, line_out+10+3*16 2344 <1> mov cl, 10h 2345 <1> nexti15b: 2346 <1> lodsb 2347 <1> call dd_store 2348 <1> mov al, 32 2349 <1> stosb 2350 <1> dec cl 2351 <1> jnz nexti15b 2352 <1> mov byte [di-(8*3+1)], '-' ; display a '-' after 8 bytes 2353 <1> add di, 16 2354 <1> push cx 2355 <1> call putsline_crlf 2356 <1> pop cx 2357 <1> add ebp, byte 10h 2358 <1> dec ch 2359 <1> jnz nexti15l 2360 <1> mov dword [x_addr], ebp 2361 <1> extmem_exit: 2362 <1> retn 2363 <1> __CPU__ 2364 <1> %endif 2365 <1> 2366 <1> ; INP: dx:ax = numerator 2367 <1> ; cx = multiplier (0 to take si:dx:ax as numerator) 2368 <1> ; bx = field width 2369 <1> ; es:di -> buffer where to store 2370 <1> ; STT: UP, ds = ss 2371 <1> ; OUT: written to buffer, es:di -> behind written string 2372 <1> disp_dxax_times_cx_width_bx_size: 2373 00001CE7 A8 <1> db __TEST_IMM8 ; (skip stc, NC) 2374 <1> .store: 2375 00001CE8 F9 <1> stc 2376 <1> 2377 <1> lframe near 2378 <1> lequ 4 + 4 + 2, buffer_size 2379 <1> ; 4: "2048" (maximum number) 2380 <1> ; 4: " ?iB" (IEC prefixed unit) 2381 <1> ; 2: ??? 2382 <1> lvar ?buffer_size, buffer 2383 <1> lvar 6, dividend 2384 00001CE9 5589E58D66F0 <1> lenter 2385 <1> lvar word, bit_0_is_store 2386 00001CEF 9C <1> pushf 2387 <1> lvar word, width 2388 00001CF0 53 <1> push bx 2389 00001CF1 56 <1> push si 2390 00001CF2 1E <1> push ds 2391 00001CF3 51 <1> push cx 2392 00001CF4 50 <1> push ax 2393 00001CF5 52 <1> push dx 2394 00001CF6 06 <1> push es 2395 00001CF7 57 <1> push di 2396 <1> 2397 00001CF8 16 <1> push ss ; push cs 2398 00001CF9 1F <1> pop ds 2399 00001CFA 16 <1> push ss 2400 00001CFB 07 <1> pop es 2401 <1> 2402 00001CFC E310 <1> jcxz .use_si 2403 <1> 2404 00001CFE 52 <1> push dx 2405 00001CFF F7E1 <1> mul cx 2406 00001D01 97 <1> xchg ax, di 2407 00001D02 87D6 <1> xchg dx, si ; si:di = first mul 2408 <1> 2409 00001D04 58 <1> pop ax 2410 00001D05 F7E1 <1> mul cx 2411 00001D07 01F0 <1> add ax, si 2412 00001D09 83D200 <1> adc dx, 0 ; dx:ax = second mul + adj, dx:ax:di = mul 2413 <1> 2414 00001D0C EB05 <1> jmp @F 2415 <1> 2416 <1> .use_si: 2417 00001D0E 89C7 <1> mov di, ax 2418 00001D10 92 <1> xchg ax, dx 2419 00001D11 89F2 <1> mov dx, si 2420 <1> 2421 <1> @@: 2422 00001D13 897EF0 <1> mov word [bp + ?dividend], di 2423 00001D16 8946F2 <1> mov word [bp + ?dividend + 2], ax 2424 00001D19 8956F4 <1> mov word [bp + ?dividend + 4], dx 2425 <1> 2426 <1> ; set up divisor for the unit prefixes 2427 00001D1C B90004 <1> mov cx, 1024 ; 1000 here if SI units 2428 00001D1F F606[9500]10 <1> testopt [options], use_si_units ; SI units ? 2429 00001D24 7403 <1> jz @F ; no --> 2430 00001D26 B9E803 <1> mov cx, 1000 ; yes, use 1000 2431 <1> @@: 2432 <1> 2433 00001D29 BE[A26D] <1> mov si, msg.prefixes ; -> first prefix (blank) 2434 <1> .loop: 2435 00001D2C 837EF400 <1> cmp word [bp + ?dividend + 4], 0 2436 00001D30 750D <1> jnz .divide 2437 00001D32 837EF200 <1> cmp word [bp + ?dividend + 2], 0 2438 00001D36 7507 <1> jnz .divide 2439 00001D38 817EF00008 <1> cmp word [bp + ?dividend], 2048 2440 00001D3D 7614 <1> jbe .end 2441 <1> .divide: 2442 00001D3F 46 <1> inc si ; -> next prefix 2443 <1> 2444 00001D40 31D2 <1> xor dx, dx 2445 00001D42 BF0600 <1> mov di, 6 2446 <1> .loop_divide: 2447 00001D45 8B43EE <1> mov ax, [bp + ?dividend - 2 + di] 2448 00001D48 F7F1 <1> div cx 2449 00001D4A 8943EE <1> mov word [bp + ?dividend - 2 + di], ax 2450 00001D4D 4F <1> dec di 2451 00001D4E 4F <1> dec di 2452 00001D4F 75F4 <1> jnz .loop_divide 2453 <1> ; dx = last remainder 2454 00001D51 EBD9 <1> jmp .loop 2455 <1> 2456 <1> .end: 2457 00001D53 8D7EFF <1> lea di, [bp + ?buffer + ?buffer_size - 1] 2458 00001D56 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND does not apply 2459 00001D57 B042 <1> mov al, "B" 2460 00001D59 AA <1> stosb 2461 00001D5A 8A04 <1> mov al, [si] 2462 00001D5C 3C20 <1> cmp al, 32 2463 00001D5E 7416 <1> je @FF 2464 <1> 2465 00001D60 F606[9500]10 <1> testopt [options], use_si_units 2466 <1> ; SI units ? 2467 00001D65 750E <1> jnz @F ; yes --> 2468 00001D67 24DF <1> and al, ~20h ; uppercase, don't do this if SI units 2469 00001D69 F606[9500]20 <1> testopt [options], use_jedec_units 2470 <1> ; JEDEC units ? 2471 00001D6E 7505 <1> jnz @F ; yes --> 2472 00001D70 50 <1> push ax 2473 00001D71 B069 <1> mov al, "i" 2474 00001D73 AA <1> stosb ; don't store this if SI or JEDEC units 2475 00001D74 58 <1> pop ax 2476 <1> @@: 2477 00001D75 AA <1> stosb 2478 <1> @@: 2479 00001D76 B020 <1> mov al, 32 2480 00001D78 AA <1> stosb 2481 <1> 2482 00001D79 8B46F0 <1> mov ax, word [bp + ?dividend] 2483 00001D7C B90A00 <1> mov cx, 10 2484 <1> .loop_write: 2485 00001D7F 31D2 <1> xor dx, dx 2486 00001D81 F7F1 <1> div cx 2487 00001D83 92 <1> xchg ax, dx 2488 <1> ; ax = remainder (next digit) 2489 <1> ; dx = result of div 2490 00001D84 0430 <1> add al, '0' 2491 00001D86 AA <1> stosb 2492 00001D87 92 <1> xchg ax, dx ; ax = result of div 2493 00001D88 85C0 <1> test ax, ax ; any more ? 2494 00001D8A 75F3 <1> jnz .loop_write ; loop --> 2495 <1> 2496 00001D8C FC <1> cld 2497 <1> 2498 00001D8D 47 <1> inc di ; -> first digit 2499 00001D8E 8D5E00 <1> lea bx, [bp + ?buffer + ?buffer_size] 2500 <1> ; -> behind 'B' 2501 00001D91 29FB <1> sub bx, di ; = length of string 2502 00001D93 89FE <1> mov si, di 2503 <1> 2504 00001D95 5F <1> pop di 2505 00001D96 07 <1> pop es ; restore es:di 2506 <1> ; -> where to store (if storing) 2507 <1> 2508 00001D97 8B4EEC <1> mov cx, [bp + ?width] 2509 00001D9A 29D9 <1> sub cx, bx 2510 00001D9C 760F <1> jbe .none_blank 2511 00001D9E B020 <1> mov al, 32 2512 00001DA0 F646EE01 <1> test byte [bp + ?bit_0_is_store], 1 2513 00001DA4 7505 <1> jnz @F 2514 <1> .loop_blank_disp: 2515 00001DA6 E87994 <1> call disp_al 2516 00001DA9 E2FB <1> loop .loop_blank_disp 2517 <1> ; now cx = 0 so the rep stosb is a nop 2518 <1> @@: 2519 00001DAB F3AA <1> rep stosb 2520 <1> .none_blank: 2521 <1> 2522 <1> 2523 00001DAD 89D9 <1> mov cx, bx 2524 00001DAF F646EE01 <1> test byte [bp + ?bit_0_is_store], 1 2525 00001DB3 7506 <1> jnz @F 2526 <1> 2527 <1> ; ! note ss = ds 2528 00001DB5 89F2 <1> mov dx, si ; ds:dx -> string 2529 00001DB7 E88F36 <1> call disp_message_length_cx 2530 00001DBA A9 <1> db __TEST_IMM16 ; (skip rep movsb) 2531 <1> @@: 2532 <1> ; ! note ss = ds 2533 <1> ; ds:si -> string, cx = length 2534 00001DBB F3A4 <1> rep movsb 2535 <1> 2536 00001DBD 5A <1> pop dx 2537 00001DBE 58 <1> pop ax 2538 00001DBF 59 <1> pop cx 2539 00001DC0 1F <1> pop ds 2540 00001DC1 5E <1> pop si 2541 00001DC2 5B <1> pop bx 2542 00001DC3 89EC5D <1> lleave 2543 00001DC6 C3 <1> lret 2544 <1> 2349 %include "rr.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug R commands - Register access 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2012 C. Masloch 8 <1> 9 <1> Usage of the works is permitted provided that this 10 <1> instrument is retained with the works, so that any entity 11 <1> that uses the works is notified of this instrument. 12 <1> 13 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 14 <1> 15 <1> %endif 16 <1> 17 <1> 18 <1> usesection lDEBUG_CODE 19 <1> 20 <1> ; R command - dump and manipulate registers. 21 <1> rr: 22 00001DC7 E8838F <1> call iseol? 23 00001DCA 7503E92A07 <1> je dumpregs ; if no parameters --> 24 <1> 25 00001DCF E8E863 <1> call uppercase 26 00001DD2 3C45 <1> cmp al, 'E' 27 00001DD4 7514 <1> jne @F 28 <1> 29 00001DD6 50 <1> push ax 30 00001DD7 56 <1> push si 31 00001DD8 AC <1> lodsb 32 00001DD9 3C2E <1> cmp al, '.' 33 00001DDB 7503E95305 <1> je re_cmd 34 00001DE0 E86A8F <1> call iseol? 35 00001DE3 5E <1> pop si 36 00001DE4 58 <1> pop ax 37 00001DE5 7503E96406 <1> je dumpregs_extended 38 <1> @@: 39 <1> 40 00001DEA 3C43 <1> cmp al, 'C' 41 00001DEC 7514 <1> jne @F 42 <1> 43 00001DEE 50 <1> push ax 44 00001DEF 56 <1> push si 45 00001DF0 AC <1> lodsb 46 00001DF1 3C2E <1> cmp al, '.' 47 00001DF3 7503E93305 <1> je rc_cmd 48 00001DF8 E8528F <1> call iseol? 49 00001DFB 5E <1> pop si 50 00001DFC 58 <1> pop ax 51 00001DFD 7503E92D06 <1> je rc_run 52 <1> @@: 53 <1> 54 <1> %if !_ONLYNON386 || (_OPTIONS || _VARIABLES) || _MMXSUPP || _RN 55 00001E02 4E <1> dec si 56 00001E03 BA[8A64] <1> mov dx, msg.vv 57 00001E06 E8E58E <1> call isstring? 58 00001E09 7503E92A0B <1> je dumpallvars 59 00001E0E BA[8D64] <1> mov dx, msg.vm 60 00001E11 E8DA8E <1> call isstring? 61 00001E14 7503E9640B <1> je dumpmemory 62 00001E19 BA[9064] <1> mov dx, msg.vp 63 00001E1C E8CF8E <1> call isstring? 64 00001E1F 7503E9910B <1> je dumpprocess 65 00001E24 BA[9364] <1> mov dx, msg.vd 66 00001E27 E8C48E <1> call isstring? 67 00001E2A 7503E9110C <1> je dumpdevice 68 00001E2F AC <1> lodsb 69 00001E30 E88763 <1> call uppercase 70 <1> 71 00001E33 50 <1> push ax 72 00001E34 56 <1> push si 73 00001E35 E86A8F <1> call skipwhite 74 00001E38 E8128F <1> call iseol? ; line ends after single character ? 75 00001E3B 5E <1> pop si 76 00001E3C 58 <1> pop ax 77 00001E3D 7550 <1> jne short rr1 ; no, not other kinds of dumps --> 78 <1> 79 00001E3F 3C46 <1> cmp al, 'F' ; only valid input to a later check 80 00001E41 7503E95603 <1> je rr2.writeprompt ; so go there --> 81 <1> ; (note that byte [si-1] must != '.') 82 <1> %if _OPTIONS || _VARIABLES 83 00001E46 3C56 <1> cmp al, 'V' 84 00001E48 7503E92B0A <1> je dumpvars 85 <1> %endif 86 <1> %if _MMXSUPP 87 00001E4D 3C4D <1> cmp al, 'M' 88 00001E4F 750A <1> jne .notrm 89 00001E51 803E[120B]00 <1> cmp byte [has_mmx], 0 90 00001E56 7403 <1> je .notrm 91 00001E58 E91B0C <1> jmp dumpregsMMX 92 <1> .notrm: 93 <1> %endif 94 00001E5B 3C58 <1> _386 cmp al, 'X' 95 00001E5D 7411 <1> _386 je short rrx 96 <1> %if _RN 97 00001E5F 3C4E <1> cmp al, 'N' 98 00001E61 750A <1> jne .notrn 99 00001E63 803E[0F0B]00 <1> cmp byte [has_87], 0 100 00001E68 7403 <1> je .notrn 101 00001E6A E99108 <1> jmp dumpregsFPU 102 <1> .notrn: 103 <1> %endif 104 00001E6D E94C7A <1> jmp error ; all other single characters are invalid 105 <1> %endif 106 <1> 107 <1> %ifn _ONLYNON386 108 <1> rrx: 109 00001E70 AC <1> lodsb 110 00001E71 E8EE8E <1> call chkeol 111 00001E74 8036[9400]01 <1> xoropt [options], dispregs32 112 00001E79 BA[CC5D] <1> mov dx, msg.regs386 113 00001E7C E88193 <1> call putsz 114 00001E7F BA[E35D] <1> mov dx, msg.regs386_on 115 00001E82 F606[9400]01 <1> testopt [options], dispregs32 116 00001E87 7503 <1> jnz .on 117 00001E89 BA[DF5D] <1> mov dx, msg.regs386_off 118 <1> .on: 119 00001E8C E97193 <1> jmp putsz 120 <1> %endif 121 <1> 122 <1> rr1: 123 <1> lframe 124 <1> lvar dword, offset 125 <1> lvar word, segsel 126 <1> lvar word, memsizestring 127 <1> lvar word, ismem_high_size_low 128 <1> lequ ?ismem_high_size_low, size 129 <1> lequ ?ismem_high_size_low + 1, ismem 130 <1> lvar word, hhtype_high_rrtype_low 131 <1> lequ ?hhtype_high_rrtype_low, replace_rrtype 132 <1> %define rrtype bp + ?replace_rrtype 133 <1> lequ ?hhtype_high_rrtype_low + 1, hhtype 134 <1> lvar word, replace_rrmask 135 <1> %define rrmask bp + ?replace_rrmask 136 <1> lvar word, hhoffset 137 <1> lequ 16, namebufferlength 138 <1> lvar ?namebufferlength, namebuffer 139 00001E8F 5589E58D66E0 <1> lenter 140 00001E95 89E7 <1> mov di, sp ; -> ?namebuffer 141 00001E97 E8B484 <1> call isvariable?.return_name 142 00001E9A 7203E90601 <1> jnc rr1_variable 143 <1> 144 00001E9F 4E <1> dec si 145 00001EA0 BA[0E68] <1> mov dx, msg.byte 146 00001EA3 BB0101 <1> mov bx, 101h 147 00001EA6 52 <1> push dx 148 00001EA7 E8448E <1> call isstring? 149 00001EAA 7428 <1> je rr1_memory 150 00001EAC 5A <1> pop dx 151 00001EAD BA[0868] <1> mov dx, msg.word 152 00001EB0 43 <1> inc bx ; = 102h 153 00001EB1 52 <1> push dx 154 00001EB2 E8398E <1> call isstring? 155 00001EB5 741D <1> je rr1_memory 156 00001EB7 5A <1> pop dx 157 00001EB8 BA[0D68] <1> mov dx, msg.3byte 158 00001EBB 43 <1> inc bx ; = 103h 159 00001EBC 52 <1> push dx 160 00001EBD E82E8E <1> call isstring? 161 00001EC0 7412 <1> je rr1_memory 162 00001EC2 5A <1> pop dx 163 00001EC3 BA[0768] <1> mov dx, msg.dword 164 00001EC6 43 <1> inc bx ; = 104h 165 00001EC7 52 <1> push dx 166 00001EC8 E8238E <1> call isstring? 167 00001ECB 7407 <1> je rr1_memory 168 <1> ; pop dx 169 00001ECD 89EC5D <1> lleave code 170 00001ED0 AC <1> lodsb 171 00001ED1 E9A602 <1> jmp rr2 172 <1> 173 <1> rr1_memory: 174 00001ED4 8F46F8 <1> pop word [bp + ?memsizestring] 175 00001ED7 895EF6 <1> mov word [bp + ?ismem_high_size_low], bx 176 <1> 177 00001EDA 31C0 <1> xor ax, ax 178 00001EDC 88D8 <1> mov al, bl 179 00001EDE F7D8 <1> neg ax 180 00001EE0 05[8096] <1> add ax, masks + 4 ; 4 - size = offset into masks 181 00001EE3 8946F2 <1> mov word [rrmask], ax ; -> mask 182 00001EE6 E88A8E <1> call skipcomma 183 00001EE9 3C5B <1> cmp al, '[' 184 00001EEB 7403E9CC79 <1> jne error 185 00001EF0 AC <1> lodsb 186 00001EF1 8B1E[7C0C] <1> mov bx, word [reg_ds] 187 00001EF5 E86B7E <1> call getaddrX 188 00001EF8 895EFA <1> mov word [bp + ?segsel], bx 189 <1> _386_PM_o32 190 00001EFB 8956FC <1> mov word [bp + ?offset], dx 191 00001EFE E8738E <1> call skipcomm0 192 00001F01 3C5D <1> cmp al, ']' 193 00001F03 7403E9B479 <1> jne error 194 <1> 195 00001F08 E8688E <1> call skipcomma 196 00001F0B 3C2E <1> cmp al, '.' ; special ? 197 00001F0D 7405 <1> je short .writeprompt ; yes --> 198 00001F0F E83B8E <1> call iseol? 199 00001F12 755D <1> jne short .noprompt 200 <1> .writeprompt: 201 <1> ; si -> behind dot if any 202 00001F14 BF[AE07] <1> mov di, line_out 203 00001F17 56 <1> push si 204 00001F18 8B76F8 <1> mov si, word [bp + ?memsizestring] 205 <1> ; si -> size string (ASCIZ) 206 00001F1B A8 <1> db __TEST_IMM8 ; (skip stosb) 207 <1> @@: 208 00001F1C AA <1> stosb ; store next byte 209 00001F1D AC <1> lodsb ; load next byte 210 00001F1E 84C0 <1> test al, al ; is zero ? 211 00001F20 75FA <1> jnz @B ; not yet, loop --> 212 00001F22 5E <1> pop si ; (preserve si) 213 00001F23 B8205B <1> mov ax, " [" 214 00001F26 AB <1> stosw 215 00001F27 8B46FA <1> mov ax, word [bp + ?segsel] 216 00001F2A 89C3 <1> mov bx, ax 217 00001F2C E81E8F <1> call hexword 218 00001F2F B03A <1> mov al, ':' 219 00001F31 AA <1> stosb 220 <1> _386_PM_o32 221 00001F32 8B46FC <1> mov ax, word [bp + ?offset] 222 <1> %if _PM 223 <1> call test_d_b_bit 224 <1> jz .16 225 <1> call hexword_high 226 <1> .16: 227 <1> %endif 228 00001F35 E8158F <1> call hexword 229 00001F38 B85D20 <1> mov ax, "] " 230 00001F3B AB <1> stosw 231 <1> 232 00001F3C E8FE7B <1> call prephack 233 00001F3F E83700 <1> call rr1_read_mem_dxax 234 <1> 235 00001F42 80F904 <1> cmp cl, 4 236 00001F45 7207 <1> jb .pnohigh 237 00001F47 92 <1> xchg ax, dx 238 00001F48 E8028F <1> call hexword ; display high word 239 00001F4B 92 <1> xchg ax, dx 240 00001F4C EB0C <1> jmp @F 241 <1> .pnohigh: 242 00001F4E 80F903 <1> cmp cl, 3 243 00001F51 7207 <1> jb @F 244 00001F53 86C2 <1> xchg al, dl 245 00001F55 E8FC8E <1> call hexbyte 246 00001F58 86C2 <1> xchg al, dl 247 <1> @@: 248 00001F5A 80F902 <1> cmp cl, 2 249 00001F5D 7207 <1> jb .pnobyte 250 00001F5F 86C4 <1> xchg al, ah 251 00001F61 E8F08E <1> call hexbyte ; display high byte 252 00001F64 86C4 <1> xchg al, ah 253 <1> .pnobyte: 254 00001F66 E8EB8E <1> call hexbyte ; display low byte 255 <1> 256 00001F69 E88503 <1> call dot_prompt 257 00001F6C 7503E9A701 <1> je .return 258 <1> .noprompt: 259 00001F71 31C9 <1> xor cx, cx 260 00001F73 8A4EF6 <1> mov cl, byte [bp + ?size] 261 00001F76 E99400 <1> jmp rr1_common 262 <1> 263 <1> 264 <1> ; OUT: cl = ?size 265 <1> ; dx:ax = value read from memory 266 <1> ; CHG: bx 267 <1> rr1_read_mem_dxax: 268 00001F79 E8EA7B <1> call dohack 269 00001F7C 31C0 <1> xor ax, ax 270 00001F7E 31D2 <1> xor dx, dx 271 00001F80 8A4EF6 <1> mov cl, byte [bp + ?size] 272 <1> %if _PM 273 <1> mov bx, word [bp + ?segsel] 274 <1> call test_d_b_bit 275 <1> mov ds, bx 276 <1> %else 277 00001F83 8E5EFA <1> mov ds, word [bp + ?segsel] 278 <1> %endif 279 <1> _386_PM_o32 280 00001F86 8B5EFC <1> mov bx, word [bp + ?offset] 281 <1> %if _PM 282 <1> jz .16 283 <1> 284 <1> [cpu 386] 285 <1> .32: 286 <1> cmp cl, 2 287 <1> jb .32_1 288 <1> je .32_2 289 <1> cmp cl, 4 290 <1> jb .32_3 291 <1> .32_4: 292 <1> mov dh, byte [ebx + 3] 293 <1> .32_3: 294 <1> mov dl, byte [ebx + 2] 295 <1> .32_2: 296 <1> mov ah, byte [ebx + 1] 297 <1> .32_1: 298 <1> mov al, byte [ebx] 299 <1> jmp .ret 300 <1> __CPU__ 301 <1> %endif 302 <1> 303 <1> .16: 304 00001F89 80F902 <1> cmp cl, 2 305 00001F8C 7210 <1> jb .16_1 306 00001F8E 740B <1> je .16_2 307 00001F90 80F904 <1> cmp cl, 4 308 00001F93 7203 <1> jb .16_3 309 <1> .16_4: 310 00001F95 8A7703 <1> mov dh, byte [bx + 3] 311 <1> .16_3: 312 00001F98 8A5702 <1> mov dl, byte [bx + 2] 313 <1> .16_2: 314 00001F9B 8A6701 <1> mov ah, byte [bx + 1] 315 <1> .16_1: 316 00001F9E 8A07 <1> mov al, byte [bx] 317 <1> .ret: 318 00001FA0 16 <1> push ss 319 00001FA1 1F <1> pop ds 320 00001FA2 E9D57B <1> jmp unhack 321 <1> 322 <1> 323 <1> rr1_variable: 324 00001FA5 897EF2 <1> mov word [rrmask], di ; -> mask of read-only bits 325 00001FA8 88C8 <1> mov al, cl 326 00001FAA B100 <1> mov cl, 0 327 00001FAC 4E <1> dec si ; (to reload al) 328 00001FAD 50 <1> push ax ; h = variable's field type, l = its size 329 00001FAE B400 <1> mov ah, 0 330 00001FB0 8946F6 <1> mov word [bp + ?ismem_high_size_low], ax 331 00001FB3 86CD <1> xchg cl, ch ; cx = variable's name's length 332 <1> 333 00001FB5 E8BB8D <1> call skipcomma 334 00001FB8 3C2E <1> cmp al, '.' ; special ? 335 00001FBA 7405 <1> je short .writeprompt ; yes --> 336 00001FBC E88E8D <1> call iseol? 337 00001FBF 7542 <1> jne short .noprompt 338 <1> .writeprompt: 339 00001FC1 56 <1> push si ; -> behind dot if any 340 00001FC2 8D76E0 <1> lea si, [bp + ?namebuffer] 341 <1> ; -> name 342 00001FC5 BF[AE07] <1> mov di, line_out 343 00001FC8 F3A4 <1> rep movsb 344 00001FCA 5E <1> pop si ; -> behind dot if any 345 00001FCB B020 <1> mov al, 32 346 00001FCD AA <1> stosb 347 00001FCE 59 <1> pop cx ; h = variable's field type, l = its size 348 00001FCF 87DA <1> xchg bx, dx 349 00001FD1 8B07 <1> mov ax, word [bx] 350 00001FD3 87DA <1> xchg bx, dx 351 00001FD5 51 <1> push cx 352 00001FD6 80F904 <1> cmp cl, 4 353 00001FD9 7205 <1> jb .pnohigh 354 00001FDB E86F8E <1> call hexword ; display high word 355 00001FDE EB08 <1> jmp @F 356 <1> .pnohigh: 357 00001FE0 80F903 <1> cmp cl, 3 358 00001FE3 7203 <1> jb @F 359 00001FE5 E86C8E <1> call hexbyte 360 <1> @@: 361 00001FE8 8B07 <1> mov ax, word [bx] 362 00001FEA 80F902 <1> cmp cl, 2 363 00001FED 7207 <1> jb .pnobyte 364 00001FEF 86C4 <1> xchg al, ah 365 00001FF1 E8608E <1> call hexbyte ; display high byte 366 00001FF4 86C4 <1> xchg al, ah 367 <1> .pnobyte: 368 00001FF6 E85B8E <1> call hexbyte ; display low byte 369 00001FF9 E8F502 <1> call dot_prompt 370 00001FFC 59 <1> pop cx ; h = variable's field type, l = its size 371 00001FFD 7503E91601 <1> je .return 372 00002002 A8 <1> db __TEST_IMM8 ; (skip pop) 373 <1> .noprompt: 374 00002003 59 <1> pop cx ; h = variable's field type, l = its size 375 00002004 84ED <1> test ch, ch 376 00002006 7403E91101 <1> jnz rr1_readonly 377 0000200B 53 <1> push bx 378 0000200C 52 <1> push dx 379 <1> rr1_common: 380 0000200D 884EF4 <1> mov byte [rrtype], cl 381 00002010 51 <1> push cx 382 00002011 50 <1> push ax 383 00002012 56 <1> push si 384 00002013 E8CD7D <1> call isoperator? 385 00002016 750E <1> jne .nooperator 386 00002018 89CB <1> mov bx, cx 387 0000201A 01DB <1> add bx, bx ; bh = 0 ! 388 0000201C 50 <1> push ax 389 0000201D FF97[9A90] <1> call near [operatordispatchers+bx] 390 00002021 58 <1> pop ax 391 00002022 85DB <1> test bx, bx 392 00002024 7504 <1> jnz .gotoperator 393 <1> .nooperator: 394 00002026 BB1800 <1> mov bx, OPERATOR_RIGHTOP; set default computation function 395 00002029 A8 <1> db __TEST_IMM8 396 <1> .gotoperator: 397 0000202A AC <1> lodsb 398 <1> 399 0000202B E8E602 <1> call isassignmentoperator? 400 0000202E 7317 <1> jnc .assign_op_done ; found an assignment operator --> 401 00002030 83FB18 <1> cmp bx, OPERATOR_RIGHTOP; dummy (no operator specified) ? 402 00002033 7412 <1> je .assign_op_done ; yes, assignment operator not required --> 403 00002035 59 <1> pop cx 404 00002036 58 <1> pop ax ; restore al, si in front of operator 405 00002037 50 <1> push ax 406 00002038 51 <1> push cx 407 00002039 87F1 <1> xchg si, cx 408 0000203B 51 <1> push cx 409 0000203C E89E7D <1> call isunaryoperator? ; is this a valid unary operator too ? 410 0000203F 59 <1> pop cx 411 00002040 74E4 <1> je .nooperator ; yes --> 412 00002042 87F1 <1> xchg si, cx 413 <1> errorj9: equ $ 414 00002044 E97578 <1> jmp error ; error where the assignment operator needs to be 415 <1> .assign_op_done: 416 00002047 59 <1> pop cx 417 00002048 59 <1> pop cx 418 00002049 59 <1> pop cx 419 0000204A 53 <1> push bx 420 0000204B 80FB17 <1> cmp bl, OPERATOR_COND 421 0000204E 7503E96978 <1> je error 422 00002053 E81E8D <1> call skipcomm0 423 <1> 424 00002056 E80B87 <1> call getexpression ; bx:dx = expression result 425 00002059 8866F5 <1> mov byte [bp + ?hhtype], ah 426 0000205C 8976F0 <1> mov word [bp + ?hhoffset], si 427 0000205F E8008D <1> call chkeol 428 00002062 59 <1> pop cx ; operator computation function 429 <1> 430 00002063 807EF700 <1> cmp byte [bp + ?ismem], 0 431 00002067 7419 <1> je .var_hhvar 432 <1> 433 <1> .mem_hhvar: 434 00002069 89C7 <1> mov di, ax 435 0000206B 89D6 <1> mov si, dx 436 0000206D 53 <1> push bx 437 0000206E 51 <1> push cx 438 0000206F E807FF <1> call rr1_read_mem_dxax 439 00002072 59 <1> pop cx 440 00002073 5B <1> pop bx 441 00002074 52 <1> push dx 442 00002075 50 <1> push ax 443 00002076 89F8 <1> mov ax, di 444 00002078 89F2 <1> mov dx, si 445 0000207A BF[7C96] <1> mov di, mask_4byte ; di -> zero 446 0000207D BE[7E96] <1> mov si, mask_4byte + 2 ; si -> zero 447 <1> 448 00002080 EB06 <1> jmp .common_hhvar 449 <1> 450 <1> .var_hhvar: 451 00002082 5E <1> pop si ; si-> high word 452 00002083 5F <1> pop di ; di-> low word 453 00002084 FF34 <1> push word [si] 454 00002086 FF35 <1> push word [di] 455 <1> 456 <1> .common_hhvar: 457 00002088 8F06[A096] <1> pop word [hhvar] 458 0000208C 8F06[A296] <1> pop word [hhvar+2] ; save variable's current value (as left operand) 459 <1> 460 00002090 C606[A996]00 <1> mov byte [hhtype], 0 ; type info signed=0 pointer=0 461 00002095 807EF404 <1> cmp byte [rrtype], 4 462 00002099 7317 <1> jae .cleardword 463 0000209B 807EF402 <1> cmp byte [rrtype], 2 464 0000209F 770C <1> ja .clearthreebyte 465 000020A1 7405 <1> je .clearword 466 <1> .clearbyte: 467 000020A3 C606[A196]00 <1> mov byte [hhvar + 1], 0 ; clear second byte 468 <1> .clearword: 469 000020A8 C606[A296]00 <1> mov byte [hhvar + 2], 0 ; clear third byte 470 <1> .clearthreebyte: 471 000020AD C606[A396]00 <1> mov byte [hhvar + 3], 0 ; clear fourth byte 472 <1> .cleardword: 473 000020B2 87CB <1> xchg cx, bx 474 000020B4 01DB <1> add bx, bx 475 000020B6 8B9F[DA90] <1> mov bx, word [bx + operatorfunctions] 476 000020BA 87CB <1> xchg cx, bx ; cx = operator function 477 000020BC 8A66F5 <1> mov ah, byte [bp + ?hhtype] 478 000020BF FFD1 <1> call cx ; compute 479 <1> 480 000020C1 E8888A <1> call getexpression.countsignificantbits 481 000020C4 53 <1> push bx 482 000020C5 56 <1> push si 483 000020C6 31DB <1> xor bx, bx 484 000020C8 8A5EF4 <1> mov bl, byte [rrtype] 485 000020CB 01DB <1> add bx, bx 486 000020CD 8B76F0 <1> mov si, word [bp + ?hhoffset] 487 000020D0 FF97[5C84] <1> call near word [checksignificantbits_table + bx] 488 000020D4 5E <1> pop si 489 000020D5 5B <1> pop bx 490 <1> 491 000020D6 97 <1> xchg ax, di ; ax -> low word of variable 492 000020D7 8B7EF2 <1> mov di, word [rrmask] ; di -> mask dword 493 000020DA 53 <1> push bx ; use bx as a scratch space 494 000020DB 8B0D <1> mov cx, word [di] ; = low word of mask 495 000020DD 51 <1> push cx ; preserve low word of mask 496 000020DE 97 <1> xchg ax, di ; di -> low word of variable 497 000020DF 230D <1> and cx, word [di] ; cx = low word value to preserve 498 000020E1 5B <1> pop bx ; = low word of mask 499 000020E2 F7D3 <1> not bx ; = bitmask of bits to use from result 500 000020E4 21DA <1> and dx, bx ; dx = bits to use from result low word 501 000020E6 09CA <1> or dx, cx ; dx = low word compound 502 000020E8 5B <1> pop bx ; restore high word after scratch use 503 000020E9 97 <1> xchg ax, di ; di -> mask dword 504 000020EA 52 <1> push dx ; use dx as a scratch space 505 000020EB 8B4D02 <1> mov cx, word [di + 2] ; = high word of mask 506 000020EE 51 <1> push cx ; preserve high word of mask 507 000020EF 230C <1> and cx, word [si] ; cx = high word value to preserve 508 000020F1 5A <1> pop dx ; = high word of mask 509 000020F2 F7D2 <1> not dx ; = bitmask of bits to use from result 510 000020F4 21D3 <1> and bx, dx ; bx = bits to use from result high word 511 000020F6 09CB <1> or bx, cx 512 000020F8 5A <1> pop dx ; restore low word after scratch use 513 000020F9 97 <1> xchg ax, di ; di -> low word of variable 514 <1> 515 000020FA 807EF700 <1> cmp byte [bp + ?ismem], 0 516 000020FE 7524 <1> jne rr1_mem_set 517 <1> 518 <1> .var_set: 519 00002100 807EF402 <1> cmp byte [rrtype], 2 520 00002104 7210 <1> jb .setbyte 521 00002106 740B <1> je .setword 522 00002108 807EF404 <1> cmp byte [rrtype], 4 523 0000210C 7203 <1> jb .setthreebyte 524 <1> .setdword: 525 0000210E 887C01 <1> mov byte [si + 1], bh ; set fourth byte 526 <1> .setthreebyte: 527 00002111 881C <1> mov byte [si], bl ; set third byte 528 <1> .setword: 529 00002113 887501 <1> mov byte [di + 1], dh ; set second byte 530 <1> .setbyte: 531 00002116 8815 <1> mov byte [di], dl ; set first byte 532 <1> .return: 533 <1> rr1_memory.return: 534 <1> rr1_variable.return: 535 00002118 89EC5D <1> lleave code 536 <1> rr1b: 537 0000211B C3 <1> retn 538 <1> 539 <1> 540 <1> rr1_readonly: 541 0000211C BA[C65C] <1> mov dx, msg.readonly 542 0000211F E8D890 <1> call putsz_error 543 00002122 EBF4 <1> jmp rr1_variable.return 544 <1> 545 <1> 546 <1> rr1_mem_set: 547 00002124 89D0 <1> mov ax, dx 548 00002126 89DA <1> mov dx, bx 549 <1> 550 00002128 E83B7A <1> call dohack 551 0000212B 8A4EF6 <1> mov cl, byte [bp + ?size] 552 <1> %if _PM 553 <1> mov bx, word [bp + ?segsel] 554 <1> call verifysegm 555 <1> jc .ro 556 <1> call test_d_b_bit 557 <1> mov ds, bx 558 <1> %else 559 0000212E 8E5EFA <1> mov ds, word [bp + ?segsel] 560 <1> %endif 561 <1> _386_PM_o32 562 00002131 8B5EFC <1> mov bx, word [bp + ?offset] 563 <1> %if _PM 564 <1> jz .16 565 <1> 566 <1> [cpu 386] 567 <1> .32: 568 <1> cmp cl, 2 569 <1> jb .32_1 570 <1> je .32_2 571 <1> cmp cl, 4 572 <1> jb .32_3 573 <1> .32_4: 574 <1> mov byte [ebx + 3], dh 575 <1> .32_3: 576 <1> mov byte [ebx + 2], dl 577 <1> .32_2: 578 <1> mov byte [ebx + 1], ah 579 <1> .32_1: 580 <1> mov byte [ebx], al 581 <1> 582 <1> .32_check: 583 <1> cmp cl, 2 584 <1> jb .32_check_1 585 <1> je .32_check_2 586 <1> cmp cl, 4 587 <1> jb .32_check_3 588 <1> .32_check_4: 589 <1> cmp dh, byte [ebx + 3] 590 <1> jne .ro 591 <1> .32_check_3: 592 <1> cmp dl, byte [ebx + 2] 593 <1> jne .ro 594 <1> .32_check_2: 595 <1> cmp ah, byte [ebx + 1] 596 <1> jne .ro 597 <1> .32_check_1: 598 <1> cmp al, byte [ebx] 599 <1> jne .ro 600 <1> jmp .ret 601 <1> __CPU__ 602 <1> %endif 603 <1> 604 <1> .16: 605 00002134 80F902 <1> cmp cl, 2 606 00002137 7210 <1> jb .16_1 607 00002139 740B <1> je .16_2 608 0000213B 80F904 <1> cmp cl, 4 609 0000213E 7203 <1> jb .16_3 610 <1> .16_4: 611 00002140 887703 <1> mov byte [bx + 3], dh 612 <1> .16_3: 613 00002143 885702 <1> mov byte [bx + 2], dl 614 <1> .16_2: 615 00002146 886701 <1> mov byte [bx + 1], ah 616 <1> .16_1: 617 00002149 8807 <1> mov byte [bx], al 618 <1> 619 <1> .16_check: 620 0000214B 80F902 <1> cmp cl, 2 621 0000214E 7216 <1> jb .16_check_1 622 00002150 740F <1> je .16_check_2 623 00002152 80F904 <1> cmp cl, 4 624 00002155 7205 <1> jb .16_check_3 625 <1> .16_check_4: 626 00002157 3A7703 <1> cmp dh, byte [bx + 3] 627 0000215A 7513 <1> jne .ro 628 <1> .16_check_3: 629 0000215C 3A5702 <1> cmp dl, byte [bx + 2] 630 0000215F 750E <1> jne .ro 631 <1> .16_check_2: 632 00002161 3A6701 <1> cmp ah, byte [bx + 1] 633 00002164 7509 <1> jne .ro 634 <1> .16_check_1: 635 00002166 3A07 <1> cmp al, byte [bx] 636 00002168 7505 <1> jne .ro 637 <1> .ret: 638 0000216A E88960 <1> call ee0a 639 0000216D EBA9 <1> jmp rr1_memory.return 640 <1> 641 <1> .ro: 642 0000216F E88460 <1> call ee0a 643 00002172 BA[FB5C] <1> mov dx, msg.readonly_mem 644 00002175 E88290 <1> call putsz_error 645 00002178 EB9E <1> jmp rr1_memory.return 646 <1> 647 <1> lleave ctx 648 <1> 649 <1> 650 <1> usesection lDEBUG_DATA_ENTRY 651 <1> align 2, db 0 652 <1> checksignificantbits_table: 653 0000845C [BC98] <1> dw error 654 0000845E [43AC] <1> dw getbyte.checksignificantbits 655 00008460 [31AC] <1> dw getword.checksignificantbits 656 00008462 [23AC] <1> dw get3byte.checksignificantbits 657 00008464 [4A04] <1> dw dmycmd 658 <1> 659 <1> usesection lDEBUG_CODE 660 <1> 661 <1> 662 <1> ; Change flag register with mnemonics - F 663 <1> rr2: 664 0000217A E83D60 <1> call uppercase 665 0000217D 3C46 <1> cmp al, 'F' 666 0000217F 7403E99B00 <1> jne rr3 ; if not 'F' --> 667 00002184 50 <1> push ax 668 00002185 8A04 <1> mov al, byte [si] 669 00002187 E86F7C <1> call isseparator? ; valid separator ? 670 0000218A 58 <1> pop ax 671 0000218B 7403E98F00 <1> jne rr3 ; no --> 672 <1> .ef: 673 00002190 E8E08B <1> call skipcomma 674 00002193 3C2E <1> cmp al, '.' ; special ? 675 00002195 7405 <1> je .writeprompt ; yes --> 676 00002197 E8B38B <1> call iseol? ; end of line ? 677 0000219A 7512 <1> jne .noprompt ; no --> 678 <1> .writeprompt: 679 0000219C 800E[CE00]02 <1> setopt [internalflags3], dif3_do_not_highlight 680 000021A1 56 <1> push si 681 000021A2 E89206 <1> call dmpflags 682 000021A5 5E <1> pop si ; -> behind dot if any 683 000021A6 E84801 <1> call dot_prompt 684 000021A9 7503E96DFF <1> je rr1b ; if no change 685 <1> .noprompt: 686 <1> 687 000021AE E86301 <1> call isassignmentoperator? 688 000021B1 56 <1> push si 689 000021B2 7308 <1> jnc .noteol ; at least one value is required --> 690 <1> .check_loop: 691 000021B4 E8BD8B <1> call skipcomm0 692 000021B7 E8938B <1> call iseol? 693 000021BA 7420 <1> je .really ; return if done 694 <1> .noteol: 695 000021BC E8FB5F <1> call uppercase 696 000021BF 86C4 <1> xchg al, ah 697 000021C1 AC <1> lodsb 698 000021C2 E8F55F <1> call uppercase 699 000021C5 86C4 <1> xchg al, ah ; ax = mnemonic 700 000021C7 BF[7081] <1> mov di, flagson 701 000021CA B91000 <1> mov cx, 16 702 000021CD F2AF <1> repne scasw 703 000021CF 7507 <1> jne short .errordec ; if no match 704 000021D1 AC <1> lodsb 705 000021D2 E8247C <1> call isseparator? 706 000021D5 74DD <1> je .check_loop 707 <1> .errordec2: 708 000021D7 4E <1> dec si 709 <1> .errordec: 710 <1> errordec: equ $ 711 000021D8 4E <1> dec si ; back up one before flagging an error 712 000021D9 E9E076 <1> jmp error 713 <1> 714 <1> .really: 715 000021DC 5E <1> pop si 716 000021DD 4E <1> dec si 717 000021DE AC <1> lodsb 718 <1> .loop: 719 000021DF E86B8B <1> call iseol? 720 000021E2 7503E934FF <1> je rr1b ; return if done 721 <1> 722 000021E7 E8D05F <1> call uppercase 723 000021EA 86C4 <1> xchg al, ah 724 000021EC AC <1> lodsb 725 000021ED E8CA5F <1> call uppercase 726 000021F0 86C4 <1> xchg al, ah ; ax = mnemonic 727 <1> 728 000021F2 BF[7081] <1> mov di, flagson 729 000021F5 B91000 <1> mov cx, 16 730 000021F8 F2AF <1> repne scasw 731 000021FA 75DC <1> jne short .errordec ; if no match 732 000021FC 81FF[8081] <1> cmp di, flagsoff 733 00002200 7709 <1> ja .clear ; if we're clearing 734 00002202 8B45EE <1> mov ax, word [di-(flagson-flagbits)-2] 735 00002205 0906[980C] <1> or word [reg_efl], ax ; set the bit 736 00002209 EB09 <1> jmp short .common 737 <1> .clear: 738 0000220B 8B45DE <1> mov ax, word [di-(flagsoff-flagbits)-2] 739 0000220E F7D0 <1> not ax 740 00002210 2106[980C] <1> and word [reg_efl], ax ; clear the bit 741 <1> .common: 742 00002214 AC <1> lodsb 743 00002215 E8E17B <1> call isseparator? 744 00002218 75BD <1> jne short .errordec2 745 0000221A E8578B <1> call skipcomm0 746 0000221D EBC0 <1> jmp short .loop 747 <1> 748 <1> ; Change flag register with mnemonics - EF 749 <1> rr3: 750 0000221F 86C4 <1> xchg al, ah 751 00002221 AC <1> lodsb 752 00002222 E8955F <1> call uppercase 753 00002225 86C4 <1> xchg al, ah ; ax = next two characters 754 00002227 3D4546 <1> _386 cmp ax, "EF" 755 0000222A 750B <1> _386 jne rr4 ; if not "EF" --> 756 0000222C 50 <1> _386 push ax 757 0000222D 8A04 <1> _386 mov al, byte [si] 758 0000222F E8C77B <1> _386 call isseparator? ; valid separator ? 759 00002232 58 <1> _386 pop ax 760 00002233 0F8459FF <1> _386 je rr2.ef 761 <1> 762 <1> ; Change a single flag with mnemonic 763 <1> rr4: 764 00002237 BF[9081] <1> mov di, flagnames 765 0000223A B90800 <1> mov cx, 8 766 0000223D F2AF <1> repne scasw 767 0000223F 7597 <1> jne short rr2.errordec 768 00002241 89C2 <1> mov dx, ax 769 00002243 AC <1> lodsb 770 00002244 E8B27B <1> call isseparator? 771 00002247 758E <1> jne short rr2.errordec2 772 00002249 FF75CE <1> push word [di-(flagnames-flagbits)-2] 773 0000224C E8258B <1> call skipcomm0 774 0000224F 3C2E <1> cmp al, '.' ; special ? 775 00002251 7405 <1> je .writeprompt ; yes --> 776 00002253 E8F78A <1> call iseol? 777 00002256 7519 <1> jne .noprompt 778 <1> .writeprompt: 779 00002258 BF[AE07] <1> mov di, line_out 780 0000225B 89D0 <1> mov ax, dx 781 0000225D AB <1> stosw 782 0000225E 58 <1> pop ax 783 0000225F 50 <1> push ax 784 00002260 8506[980C] <1> test word [reg_efl], ax ; is it off ? 785 00002264 B82030 <1> mov ax, " 0" ; assume so 786 00002267 7402 <1> jz .off ; it is off --> 787 00002269 FEC4 <1> inc ah ; is on, set to '1' 788 <1> .off: 789 0000226B AB <1> stosw 790 0000226C E88200 <1> call dot_prompt 791 0000226F 747E <1> je .ret_pop ; if no change --> 792 <1> .noprompt: 793 00002271 E8D98A <1> call iseol? ; end of line ? 794 00002274 7479 <1> je .ret_pop ; yes, no change requested --> 795 00002276 51 <1> push cx 796 00002277 50 <1> push ax 797 00002278 56 <1> push si 798 00002279 E8677B <1> call isoperator? 799 0000227C 7520 <1> jne .nooperator 800 0000227E 89CB <1> mov bx, cx 801 00002280 01DB <1> add bx, bx ; bh = 0 ! 802 00002282 50 <1> push ax 803 00002283 FF97[9A90] <1> call near [operatordispatchers+bx] 804 00002287 58 <1> pop ax 805 00002288 85DB <1> test bx, bx 806 0000228A 7412 <1> jz .nooperator 807 0000228C 80FB16 <1> cmp bl, OPERATOR_BOOL_AND 808 0000228F 770D <1> ja .nooperator 809 00002291 80FB14 <1> cmp bl, OPERATOR_BOOL_OR 810 00002294 730C <1> jae .gotoperator 811 00002296 80C303 <1> add bl, OPERATOR_BOOL_OR - OPERATOR_BIT_OR 812 00002299 80FB14 <1> cmp bl, OPERATOR_BOOL_OR 813 0000229C 7304 <1> jae .gotoperator 814 <1> .nooperator: 815 0000229E BB1800 <1> mov bx, OPERATOR_RIGHTOP; set default computation function 816 000022A1 A8 <1> db __TEST_IMM8 817 <1> .gotoperator: 818 000022A2 AC <1> lodsb 819 <1> 820 000022A3 E86E00 <1> call isassignmentoperator? 821 000022A6 7308 <1> jnc .assign_op_done ; found an assignment operator --> 822 000022A8 83FB18 <1> cmp bx, OPERATOR_RIGHTOP; dummy (no operator specified) ? 823 <1> %if 1 ; since | ^ & are never unary operators 824 000022AB 7403E90C76 <1> jne error 825 <1> %else 826 <1> je .assign_op_done ; yes, assignment operator not required --> 827 <1> pop cx 828 <1> pop ax ; restore al, si in front of operator 829 <1> push ax 830 <1> push cx 831 <1> xchg si, cx 832 <1> push cx 833 <1> call isunaryoperator? ; is this a valid unary operator too ? 834 <1> pop cx 835 <1> je .nooperator ; yes --> 836 <1> xchg si, cx 837 <1> jmp error ; error where the assignment operator needs to be 838 <1> %endif 839 <1> .assign_op_done: 840 000022B0 59 <1> pop cx 841 000022B1 59 <1> pop cx 842 000022B2 59 <1> pop cx 843 000022B3 53 <1> push bx 844 000022B4 E8AD84 <1> call getexpression 845 000022B7 E8A88A <1> call chkeol 846 000022BA E86C7E <1> call toboolean 847 000022BD 59 <1> pop cx ; operator index 848 000022BE 31C0 <1> xor ax, ax 849 000022C0 A2[A996] <1> mov byte [hhtype], al 850 000022C3 A3[A296] <1> mov word [hhvar+2], ax 851 000022C6 5E <1> pop si 852 000022C7 56 <1> push si ; flag 853 000022C8 8536[980C] <1> test word [reg_efl], si 854 000022CC 7401 <1> jz .notset 855 000022CE 40 <1> inc ax 856 <1> .notset: 857 000022CF A3[A096] <1> mov word [hhvar], ax 858 000022D2 87CB <1> xchg cx, bx 859 000022D4 01DB <1> add bx, bx 860 000022D6 8B9F[DA90] <1> mov bx, word [bx+operatorfunctions] 861 000022DA 87CB <1> xchg cx, bx ; cx = operator function 862 000022DC FFD1 <1> call cx ; compute 863 000022DE 58 <1> pop ax 864 000022DF 85D2 <1> test dx, dx 865 000022E1 7405 <1> jz .clear 866 000022E3 0906[980C] <1> or word [reg_efl], ax ; set the bit 867 000022E7 C3 <1> retn 868 <1> .clear: 869 000022E8 F7D0 <1> not ax 870 000022EA 2106[980C] <1> and word [reg_efl], ax ; clear the bit 871 000022EE C3 <1> retn 872 <1> 873 <1> .ret_pop: 874 000022EF 58 <1> pop ax 875 000022F0 C3 <1> retn 876 <1> 877 <1> 878 <1> ; INP: di-> behind prompt to display (in line_out) 879 <1> ; Iff byte[si-1] == '.', 880 <1> ; only display without actual prompting 881 <1> ; si-> line to check for EOL 882 <1> ; OUT: NZ iff actually prompted and got non-empty line, 883 <1> ; al = first character 884 <1> ; si-> next character 885 <1> ; dx, bx preserved 886 <1> ; CHG: ax, cx, si, di, dx, bx 887 <1> dot_prompt: 888 000022F1 807CFF2E <1> cmp byte [si-1], '.' ; syntax for display without prompt ? 889 000022F5 7414 <1> je .onlydisplay ; yes --> 890 000022F7 53 <1> push bx 891 000022F8 52 <1> push dx 892 000022F9 E85392 <1> call getline0 893 000022FC 5A <1> pop dx 894 000022FD 5B <1> pop bx 895 000022FE E84C8A <1> call iseol? ; no change requested ? 896 00002301 7410 <1> je .ret ; yes --> (ZR) 897 00002303 3C2E <1> cmp al, '.' ; other syntax for no change ? 898 00002305 750C <1> jne .ret ; no --> (NZ) 899 <1> .chkeol1: 900 00002307 AC <1> lodsb 901 00002308 E9578A <1> jmp chkeol ; (ZR) 902 <1> 903 <1> .onlydisplay: 904 0000230B E8F9FF <1> call .chkeol1 905 0000230E E8748B <1> call putsline_crlf 906 00002311 38C0 <1> cmp al, al ; ZR 907 <1> .ret: 908 00002313 C3 <1> retn 909 <1> 910 <1> 911 <1> ; INP: al = first character 912 <1> ; si-> remaining string 913 <1> ; OUT: CY if no assignment operator was found 914 <1> ; NC if an assignment operator was found, 915 <1> ; al = first character behind it (skipcomma called) 916 <1> ; si-> remaining string behind character al 917 <1> isassignmentoperator?: 918 00002314 3C3A <1> cmp al, ':' 919 00002316 750A <1> jne .checksingleequality 920 00002318 AC <1> lodsb 921 00002319 3C3D <1> cmp al, '=' 922 0000231B 7409 <1> je .skip ; long form assignment operator --> 923 <1> ; A single colon. Report "no assignment operator" here. 924 0000231D 4E <1> dec si 925 0000231E B03A <1> mov al, ':' ; restore si, al 926 <1> .return_cy: 927 00002320 F9 <1> stc 928 00002321 C3 <1> retn 929 <1> 930 <1> .checksingleequality: 931 00002322 3C3D <1> cmp al, '=' 932 00002324 75FA <1> jne .return_cy ; no assignment operator --> 933 <1> .skip: 934 00002326 E84A8A <1> call skipcomma 935 00002329 F8 <1> clc 936 0000232A C3 <1> retn 937 <1> 938 <1> 939 <1> rc_cmd: 940 0000232B BF[1001] <1> mov di, cmdline_buffer 941 0000232E BD[1002] <1> mov bp, cmdline_buffer.end 942 00002331 EB06 <1> jmp @F 943 <1> 944 <1> ; INP: al = '.' 945 <1> ; si -> next character 946 <1> re_cmd: 947 00002333 BF[1402] <1> mov di, re_buffer 948 00002336 BD[140A] <1> mov bp, re_buffer.end 949 <1> @@: 950 00002339 5A <1> pop dx 951 0000233A 5A <1> pop dx ; discard si and ax on stack 952 0000233B BA[3973] <1> mov dx, msg.list 953 0000233E E8AD89 <1> call isstring? 954 00002341 7503E99000 <1> je .list 955 <1> 956 00002346 81FF[1402] <1> cmp di, re_buffer 957 0000234A 7405 <1> je @F 958 0000234C E894E2 <1> call guard_rc 959 0000234F EB03 <1> jmp @FF 960 <1> 961 <1> @@: 962 00002351 E87CE2 <1> call guard_re 963 <1> @@: 964 <1> 965 00002354 BA[0068] <1> mov dx, msg.append 966 00002357 E89489 <1> call isstring? 967 0000235A 740D <1> je .append 968 0000235C BA[F867] <1> mov dx, msg.replace 969 0000235F E88C89 <1> call isstring? 970 00002362 740D <1> je .common ; di -> at first byte (where to append) 971 00002364 B80401 <1> mov ax, 0104h 972 00002367 EB67 <1> jmp .error_common 973 <1> 974 <1> .append: 975 00002369 30C0 <1> xor al, al 976 0000236B B9FFFF <1> mov cx, -1 977 0000236E F2AE <1> repne scasb ; di -> after zero byte 978 00002370 4F <1> dec di ; -> at zero byte 979 <1> 980 <1> .common: 981 00002371 E82E8A <1> call skipwhite 982 00002374 E83DE2 <1> call guard_auxbuff 983 <1> 984 00002377 31DB <1> xor bx, bx 985 <1> 986 00002379 50 <1> push ax 987 0000237A B00D <1> mov al, 13 988 0000237C 3845FF <1> cmp byte [di - 1], al ; is there an EOL in front of us? 989 0000237F 8E06[2A0A] <1> mov es, word [auxbuff_segorsel] 990 00002383 87DF <1> xchg bx, di ; es:di -> auxbuff, bx -> at zero byte 991 00002385 7401 <1> je @F ; yes --> 992 <1> 993 00002387 AA <1> stosb ; first store a CR 994 <1> @@: 995 00002388 58 <1> pop ax 996 <1> .loop: 997 00002389 3C5C <1> cmp al, '\' 998 0000238B 750A <1> jne .literal 999 <1> 1000 0000238D AC <1> lodsb ; load escaped character 1001 0000238E E8C089 <1> call iseol?.notsemicolon; EOL ? 1002 00002391 7435 <1> je .error_escaped_cr ; yes, error --> 1003 00002393 AA <1> stosb ; store escaped literal 1004 00002394 AC <1> lodsb ; load next 1005 00002395 EBF2 <1> jmp .loop 1006 <1> 1007 <1> .literal: 1008 00002397 E8B789 <1> call iseol?.notsemicolon; EOL ? 1009 0000239A 7410 <1> je .end ; got all --> 1010 0000239C 3C3B <1> cmp al, ';' ; semicolon ? 1011 0000239E 7508 <1> jne @F 1012 000023A0 B00D <1> mov al, 13 1013 000023A2 AA <1> stosb ; store linebreak 1014 000023A3 E8FC89 <1> call skipwhite ; skip leading blanks 1015 000023A6 EBE1 <1> jmp .loop 1016 <1> 1017 <1> @@: 1018 000023A8 AA <1> stosb ; store character 1019 000023A9 AC <1> lodsb 1020 000023AA EBDD <1> jmp .loop 1021 <1> 1022 <1> .end: 1023 <1> ; di -> behind last character 1024 000023AC 31C0 <1> xor ax, ax 1025 000023AE AA <1> stosb 1026 000023AF 89D8 <1> mov ax, bx 1027 000023B1 01F8 <1> add ax, di 1028 000023B3 7218 <1> jc .error_too_much 1029 000023B5 39E8 <1> cmp ax, bp 1030 000023B7 7714 <1> ja .error_too_much 1031 000023B9 31F6 <1> xor si, si 1032 000023BB 06 <1> push es 1033 000023BC 1F <1> pop ds 1034 000023BD 16 <1> push ss 1035 000023BE 07 <1> pop es 1036 000023BF 89F9 <1> mov cx, di 1037 000023C1 89DF <1> mov di, bx 1038 000023C3 F3A4 <1> rep movsb 1039 000023C5 16 <1> push ss 1040 000023C6 1F <1> pop ds 1041 000023C7 C3 <1> retn 1042 <1> 1043 <1> .error_escaped_cr: 1044 000023C8 B80501 <1> mov ax, 0105h 1045 000023CB EB03 <1> jmp .error_common 1046 <1> 1047 <1> .error_too_much: 1048 000023CD B80601 <1> mov ax, 0106h 1049 <1> 1050 <1> .error_common: 1051 000023D0 E83075 <1> call setrc 1052 000023D3 E9E674 <1> jmp error 1053 <1> 1054 <1> re_cmd.list: 1055 000023D6 AC <1> lodsb 1056 000023D7 E88889 <1> call chkeol 1057 <1> 1058 000023DA 89FE <1> mov si, di 1059 000023DC B400 <1> mov ah, 0 ; ah = 0 (flag to escape blanks) 1060 <1> .loop: 1061 000023DE AC <1> lodsb 1062 000023DF 84C0 <1> test al, al 1063 000023E1 7442 <1> jz .end 1064 000023E3 3C0D <1> cmp al, 13 ; (intentionally not iseol?) 1065 000023E5 742E <1> je .cr 1066 000023E7 3C20 <1> cmp al, 32 1067 000023E9 741B <1> je .escapeif 1068 000023EB 3C09 <1> cmp al, 9 1069 000023ED 7417 <1> je .escapeif 1070 000023EF B401 <1> mov ah, 1 ; ah = 1 1071 000023F1 3C3B <1> cmp al, ';' 1072 000023F3 7417 <1> je .escape 1073 000023F5 3C22 <1> cmp al, '"' 1074 000023F7 7413 <1> je .escape 1075 000023F9 3C27 <1> cmp al, "'" 1076 000023FB 740F <1> je .escape 1077 000023FD 3C5C <1> cmp al, '\' 1078 000023FF 740B <1> je .escape 1079 <1> .put: 1080 00002401 E81E8E <1> call putc 1081 00002404 EBD8 <1> jmp .loop 1082 <1> 1083 <1> .escapeif: 1084 00002406 84E4 <1> test ah, ah 1085 00002408 75F7 <1> jnz .put 1086 0000240A B401 <1> mov ah, 1 ; ah = 1 1087 <1> .escape: 1088 0000240C 50 <1> push ax 1089 0000240D B05C <1> mov al, '\' 1090 0000240F E8108E <1> call putc 1091 00002412 58 <1> pop ax 1092 00002413 EBEC <1> jmp .put 1093 <1> 1094 <1> .cr: 1095 00002415 AC <1> lodsb 1096 00002416 84C0 <1> test al, al 1097 00002418 740B <1> jz .end 1098 0000241A 4E <1> dec si 1099 0000241B B03B <1> mov al, ';' 1100 0000241D E8028E <1> call putc 1101 00002420 B82000 <1> mov ax, 32 ; ah = 0 1102 00002423 EBDC <1> jmp .put 1103 <1> 1104 <1> .end: 1105 00002425 B00D <1> mov al, 13 1106 00002427 E8F88D <1> call putc 1107 0000242A B00A <1> mov al, 10 1108 0000242C E9F38D <1> jmp putc 1109 <1> 1110 <1> 1111 <1> rc_run: 1112 0000242F E8B1E1 <1> call guard_rc 1113 00002432 E89BE1 <1> call guard_re ; do not allow RE command to run RC 1114 <1> ; (the RE buffer would drain first) 1115 <1> 1116 00002435 E8629B <1> call yy_reset_buf 1117 <1> 1118 00002438 C706[1002][1001] <1> mov word [cmdline_buffer.position], cmdline_buffer 1119 0000243E 8326[200A]00 <1> and word [rc_count], 0 1120 00002443 8326[220A]00 <1> and word [rc_count + 2], 0 1121 <1> 1122 00002448 800E[CD00]01 <1> setopt [internalflags3], dif3_input_cmdline 1123 <1> 1124 0000244D C3 <1> retn 1125 <1> 1126 <1> 1127 <1> dumpregs_extended: 1128 0000244E E87FE1 <1> call guard_re 1129 00002451 813E[1402]4052 <1> cmp word [re_buffer], "@R" 1130 00002457 7408 <1> je @F 1131 00002459 813E[1402]4072 <1> cmp word [re_buffer], "@r" 1132 0000245F 750A <1> jne .complex 1133 <1> @@: 1134 00002461 803E[1602]00 <1> cmp byte [re_buffer + 2], 0 1135 00002466 7503E98E00 <1> je .just_dumpregs 1136 <1> 1137 <1> .complex: 1138 0000246B F606[CF00]20 <1> testopt [internalflags3], dif3_auxbuff_guarded_2 1139 00002470 740C <1> jz @F 1140 <1> 1141 00002472 B80301 <1> mov ax, 0103h 1142 00002475 E88B74 <1> call setrc 1143 00002478 BA[7967] <1> mov dx, msg.unexpected_auxbuff_guard 1144 0000247B E9828D <1> jmp putsz 1145 <1> 1146 <1> @@: 1147 0000247E E8199B <1> call yy_reset_buf 1148 <1> 1149 00002481 C706[140A][1402] <1> mov word [re_buffer.position], re_buffer 1150 00002487 8326[180A]00 <1> and word [re_count], 0 1151 0000248C 8326[1A0A]00 <1> and word [re_count + 2], 0 1152 <1> 1153 00002491 FF36[360B] <1> push word [rc] 1154 00002495 FF36[CC0A] <1> push word [savesp] 1155 00002499 FF36[D60A] <1> push word [throwsp] 1156 0000249D FF36[D20B] <1> push word [lastcmd] 1157 000024A1 55 <1> push bp 1158 000024A2 8926[CC0A] <1> mov word [savesp], sp 1159 000024A6 8926[D60A] <1> mov word [throwsp], sp 1160 000024AA 8926[D00A] <1> mov word [re_sp], sp 1161 <1> 1162 000024AE 800E[CF00]01 <1> setopt [internalflags3], dif3_input_re 1163 <1> 1164 000024B3 F606[CF00]10 <1> testopt [internalflags3], dif3_auxbuff_guarded_1 1165 000024B8 7405 <1> jz @F 1166 000024BA 8036[CF00]30 <1> xoropt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 1167 <1> @@: 1168 <1> .cmd3: 1169 000024BF E93EDB <1> jmp cmd3 1170 <1> 1171 <1> .exit: 1172 000024C2 8B26[D00A] <1> mov sp, word [re_sp] 1173 000024C6 5D <1> pop bp 1174 000024C7 8F06[D20B] <1> pop word [lastcmd] 1175 000024CB 8F06[D60A] <1> pop word [throwsp] 1176 000024CF 8F06[CC0A] <1> pop word [savesp] 1177 000024D3 58 <1> pop ax 1178 000024D4 85C0 <1> test ax, ax 1179 000024D6 7403 <1> jz @F 1180 000024D8 A3[360B] <1> mov word [rc], ax 1181 <1> @@: 1182 000024DB 8026[CF00]FE <1> clropt [internalflags3], dif3_input_re 1183 <1> 1184 000024E0 F606[CF00]20 <1> testopt [internalflags3], dif3_auxbuff_guarded_2 1185 000024E5 7405 <1> jz @F 1186 000024E7 8036[CF00]30 <1> xoropt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 1187 <1> @@: 1188 <1> 1189 000024EC F606[9900]80 <1> testopt [options2], opt2_re_cancel_tpg 1190 000024F1 7501 <1> jnz @F 1191 <1> 1192 000024F3 C3 <1> retn 1193 <1> 1194 <1> @@: 1195 000024F4 E86D16 <1> call terminate_silent_dump.if_nonnull 1196 000024F7 EBC6 <1> jmp .cmd3 1197 <1> 1198 <1> 1199 <1> .just_dumpregs: 1200 <1> ; DUMPREGS - Dump registers. 1201 <1> ; 1202 <1> ; 16 bit: 8 regs, line break, first 4 segment regs, IP, flags 1203 <1> ; 32 bit: 6 regs, line break, 2 regs, flags, line break, 6 segment regs, EIP 1204 <1> ; 1205 <1> ; CHG: ax, bx, cx, dx, di, si 1206 <1> dumpregs: 1207 000024F9 F606[9E00]08 <1> testopt [options3], opt3_r_highlight_eip 1208 000024FE 7506 <1> jnz @F 1209 00002500 A1[940C] <1> mov ax, word [reg_eip] 1210 00002503 A3[D40C] <1> mov word [reg_eip - regs + regs_prior], ax 1211 <1> %if _PM 1212 <1> mov ax, word [reg_eip + 2] 1213 <1> mov word [reg_eip + 2 - regs + regs_prior], ax 1214 <1> %endif 1215 <1> @@: 1216 <1> 1217 00002506 BE[C881] <1> mov si, reg16names 1218 00002509 BF[AE07] <1> mov di, line_out 1219 0000250C B90800 <1> mov cx, 8 ; display all 8 standard regs (16-bit) 1220 0000250F F606[9400]01 <1> testopt [options], dispregs32 1221 00002514 7402 <1> jz .firstrow16 1222 00002516 B106 <1> mov cl, 6 ; room for 6 standard regs (32-bit) only 1223 <1> .firstrow16: 1224 00002518 9C <1> pushf 1225 00002519 57 <1> push di 1226 0000251A E80701 <1> call dmpr1 ; display first row 1227 0000251D E85D89 <1> call trimputs 1228 00002520 5F <1> pop di ; (reset di) 1229 00002521 9D <1> popf ; (reset ZF) 1230 00002522 7511 <1> jnz .secondrow32 1231 00002524 B104 <1> mov cl, 4 ; display 4 segment regs 1232 00002526 E8FB00 <1> call dmpr1 1233 00002529 83C604 <1> add si, byte 2*2 ; skip FS+GS 1234 0000252C 41 <1> inc cx ; (= 1) 1235 0000252D E8F400 <1> call dmpr1 ; display IP 1236 00002530 E80403 <1> call dmpflags ; display flags in 16-bit display 1237 00002533 EB18 <1> jmp short .lastrowdone 1238 <1> .secondrow32: 1239 00002535 57 <1> push di 1240 00002536 B102 <1> mov cl, 2 ; display rest of 32-bit standard regs 1241 00002538 E8E900 <1> call dmpr1 1242 0000253B 56 <1> push si 1243 0000253C E8F802 <1> call dmpflags ; display flags in 32-bit display 1244 0000253F E84389 <1> call putsline_crlf 1245 00002542 5E <1> pop si 1246 00002543 5F <1> pop di ; (reset di) 1247 00002544 B106 <1> mov cl, 6 ; display all segment registers 1248 00002546 E8DB00 <1> call dmpr1 1249 00002549 41 <1> inc cx ; (= 1) 1250 0000254A E8D700 <1> call dmpr1 ; display EIP 1251 <1> .lastrowdone: 1252 0000254D E82D89 <1> call trimputs 1253 <1> 1254 00002550 BE[5C0C] <1> mov si, regs 1255 00002553 BF[9C0C] <1> mov di, regs_prior 1256 00002556 B92000 <1> mov cx, words(regs_prior.size) 1257 00002559 F3A5 <1> rep movsw ; update prior regs save area 1258 <1> 1259 <1> ; Set U address to CS:(E)IP. 1260 0000255B BE[940C] <1> mov si, reg_eip 1261 0000255E BF[540B] <1> mov di, u_addr 1262 00002561 A5 <1> movsw ; first word of saOffset 1263 <1> %if saSegSel == 4 1264 00002562 A5 <1> movsw ; second word of saOffset 1265 <1> %endif 1266 00002563 A1[880C] <1> mov ax, word [reg_cs] 1267 00002566 AB <1> stosw ; saSegSel 1268 <1> %if _PM 1269 <1> call ispm 1270 <1> jnz .86m 1271 <1> .pm: 1272 <1> scasw ; skip saSegment, sto to saSelector 1273 <1> .86m: 1274 <1> stosw ; (if jumped to .86m) saSegment 1275 <1> @@: 1276 <1> %endif 1277 <1> 1278 00002567 B80300 <1> mov ax, DIS_F_REPT | DIS_F_SHOW 1279 0000256A F606[9700]10 <1> testopt [options], rr_disasm_no_rept 1280 0000256F 7402 <1> jz @F 1281 00002571 24FE <1> and al, ~ DIS_F_REPT 1282 <1> @@: 1283 00002573 F606[9700]20 <1> testopt [options], rr_disasm_no_show 1284 00002578 7402 <1> jz @F 1285 0000257A 24FD <1> and al, ~ DIS_F_SHOW 1286 <1> @@: 1287 0000257C A3[3689] <1> mov word [disflags], ax 1288 0000257F E8481D <1> call disasm 1289 <1> 1290 <1> ; Set ABO to address after the dumpregs disassembly. 1291 00002582 BF[4E0B] <1> mov di, behind_r_u_addr 1292 00002585 BE[540B] <1> mov si, u_addr 1293 00002588 A5 <1> movsw ; first word of saOffset 1294 <1> %if saSegSel == 4 1295 00002589 A5 <1> movsw ; second word of saOffset 1296 <1> %endif 1297 0000258A A5 <1> movsw ; saSegSel 1298 <1> %if _PM 1299 <1> movsw ; saSegment 1300 <1> movsw ; saSelector 1301 <1> %endif 1302 <1> %if (behind_r_u_addr + SEGADR_size) != u_addr 1303 <1> %error Expected u_addr behind behind_r_u_addr 1304 <1> ; mov di, u_addr 1305 <1> %endif 1306 <1> ; Reset U offset to (E)IP. 1307 0000258B BE[940C] <1> mov si, reg_eip 1308 0000258E A5 <1> movsw ; first word of saOffset 1309 <1> _386_PM movsw ; second word of saOffset 1310 <1> 1311 <1> 1312 <1> %if _ACCESS_VARIABLES_AMOUNT 1313 <1> dumpregs_set_access_variables: 1314 0000258F 31C0 <1> xor ax, ax 1315 00002591 BF[6884] <1> mov di, reading_access_variables 1316 00002594 B92000 <1> mov cx, words(_ACCESS_VARIABLES_AMOUNT * 8 * 2) 1317 00002597 F3AB <1> rep stosw 1318 <1> 1319 00002599 8B0E[1089] <1> mov cx, [memrefs.free] 1320 0000259D 85C9 <1> test cx, cx 1321 0000259F 744A <1> jz .none 1322 000025A1 31F6 <1> xor si, si 1323 <1> .loop: 1324 000025A3 89F3 <1> mov bx, si 1325 000025A5 E88229 <1> call get_memref_index_bx 1326 000025A8 8B87[DA88] <1> mov ax, word [memrefs + bx + mrFlags] 1327 000025AC A801 <1> test al, mrfBranchDirect 1328 000025AE 7537 <1> jnz .next 1329 000025B0 31D2 <1> xor dx, dx ; 0 = reading 1330 000025B2 A840 <1> test al, mrfStringSource 1331 000025B4 751C <1> jnz .gotmsg 1332 000025B6 42 <1> inc dx ; 1 = writing 1333 000025B7 A880 <1> test al, mrfStringDest 1334 000025B9 7517 <1> jnz .gotmsg 1335 000025BB 88C2 <1> mov dl, al 1336 000025BD 80E20C <1> and dl, mrfMemSource | mrfMemDest 1337 000025C0 80FA0C <1> cmp dl, mrfMemSource | mrfMemDest 1338 000025C3 B202 <1> mov dl, 2 ; 2 = r/w 1339 000025C5 740B <1> je .gotmsg 1340 000025C7 31D2 <1> xor dx, dx ; 0 = reading 1341 000025C9 A804 <1> test al, mrfMemSource 1342 000025CB 7505 <1> jnz .gotmsg 1343 000025CD 42 <1> inc dx ; 1 = writing 1344 000025CE A808 <1> test al, mrfMemDest 1345 <1> ; jnz .gotmsg 1346 000025D0 7415 <1> jz .next 1347 <1> .gotmsg: 1348 <1> 1349 000025D2 84D2 <1> test dl, dl 1350 000025D4 740B <1> jz .read 1351 <1> 1352 <1> .write: 1353 000025D6 BF[8884] <1> mov di, writing_access_variables 1354 000025D9 E81000 <1> call add_access_variable 1355 000025DC 80FA01 <1> cmp dl, 1 1356 000025DF 7406 <1> je .next 1357 <1> 1358 <1> .read: 1359 000025E1 BF[6884] <1> mov di, reading_access_variables 1360 000025E4 E80500 <1> call add_access_variable 1361 <1> 1362 <1> .next: 1363 000025E7 46 <1> inc si 1364 000025E8 49 <1> dec cx 1365 000025E9 75B8 <1> jnz .loop 1366 <1> .none: 1367 <1> %endif 1368 000025EB C3 <1> retn 1369 <1> 1370 <1> 1371 <1> %if _ACCESS_VARIABLES_AMOUNT 1372 <1> add_access_variable: 1373 000025EC 93 <1> xchg ax, bx 1374 000025ED 31DB <1> xor bx, bx 1375 <1> .loop: 1376 000025EF 83790400 <1> cmp word [di + bx + 4], 0 1377 000025F3 7525 <1> jne .next 1378 000025F5 83790600 <1> cmp word [di + bx + 4 + 2], 0 1379 000025F9 751F <1> jne .next 1380 000025FB 93 <1> xchg ax, bx 1381 000025FC FFB7[D288] <1> push word [memrefs + bx + mrLinear + 2] 1382 00002600 FFB7[D088] <1> push word [memrefs + bx + mrLinear] 1383 00002604 FFB7[DE88] <1> push word [memrefs + bx + mrLength + 2] 1384 00002608 FFB7[DC88] <1> push word [memrefs + bx + mrLength] 1385 0000260C 93 <1> xchg ax, bx 1386 0000260D 8F4104 <1> pop word [di + bx + 4] 1387 00002610 8F4106 <1> pop word [di + bx + 4 + 2] 1388 00002613 8F01 <1> pop word [di + bx] 1389 00002615 8F4102 <1> pop word [di + bx + 2] 1390 00002618 93 <1> xchg ax, bx 1391 00002619 C3 <1> retn 1392 <1> 1393 <1> .next: 1394 0000261A 83C308 <1> add bx, 8 1395 0000261D 83FB20 <1> cmp bx, _ACCESS_VARIABLES_AMOUNT * 8 1396 00002620 72CD <1> jb .loop 1397 00002622 93 <1> xchg ax, bx 1398 00002623 C3 <1> retn 1399 <1> 1400 <1> 1401 <1> usesection lDEBUG_DATA_ENTRY 1402 00008466 00 <1> align 4, db 0 1403 <1> reading_access_variables: 1404 00008468 00 <1> times _ACCESS_VARIABLES_AMOUNT * 8 db 0 1405 <1> 1406 <1> writing_access_variables: 1407 00008488 00 <1> times _ACCESS_VARIABLES_AMOUNT * 8 db 0 1408 <1> 1409 <1> usesection lDEBUG_CODE 1410 <1> %endif 1411 <1> 1412 <1> 1413 <1> ; Function to display multiple register entries. 1414 <1> ; 1415 <1> ; INP: [options]&dispregs32 = whether to display 32-bit registers, 1416 <1> ; except segment registers which are always 16-bit 1417 <1> ; si-> 2-byte register name in table 1418 <1> ; cx = number of registers to display 1419 <1> ; OUT: si-> register name in table after the last one displayed 1420 <1> ; cx = 0 1421 <1> ; CHG: bx, ax, dx 1422 <1> dmpr1: 1423 <1> .: 1424 00002624 8D9C387D <1> lea bx, [si-(reg16names+DATASECTIONFIXUP)] 1425 00002628 01DB <1> add bx, bx ; index * 4 1426 0000262A 807C0153 <1> cmp byte [si+1], 'S' ; segment register ? 1427 0000262E 740A <1> je .no_e ; always 16-bit --> (ZR) 1428 00002630 F606[9400]01 <1> testopt [options], dispregs32 ; display 32-bit register ? 1429 00002635 7403 <1> jz .no_e ; no --> (ZR) 1430 00002637 B045 <1> mov al, 'E' 1431 00002639 AA <1> stosb ; store E for Exx register name 1432 <1> .no_e: 1433 0000263A A5 <1> movsw ; store register name, increase pointer 1434 0000263B B03D <1> mov al, '=' 1435 0000263D AA <1> stosb ; store equality sign 1436 0000263E 742E <1> jz .no_high ; (ZF left from before) 1437 <1> 1438 00002640 8026[CE00]FE <1> clropt [internalflags3], dif3_highlighting 1439 00002645 8B87[5E0C] <1> mov ax, word [regs + bx + 2] 1440 00002649 8B97[9E0C] <1> mov dx, word [regs_prior + bx + 2] 1441 0000264D F606[9E00]04 <1> testopt [options3], opt3_r_highlight_full 1442 00002652 7417 <1> jz @F 1443 00002654 39C2 <1> cmp dx, ax 1444 00002656 7510 <1> jne .highlighthigh 1445 00002658 52 <1> push dx 1446 00002659 50 <1> push ax 1447 0000265A 8B87[5C0C] <1> mov ax, word [regs + bx] 1448 0000265E 8B97[9C0C] <1> mov dx, word [regs_prior + bx] 1449 00002662 39C2 <1> cmp dx, ax 1450 00002664 58 <1> pop ax 1451 00002665 5A <1> pop dx 1452 00002666 7403 <1> je @F 1453 <1> .highlighthigh: 1454 00002668 E82500 <1> call highlight 1455 <1> @@: 1456 0000266B E85000 <1> call hexword_diff ; store high word (only if 32-bit register) 1457 <1> .no_high: 1458 0000266E 8B87[5C0C] <1> mov ax, word [regs + bx] 1459 00002672 8B97[9C0C] <1> mov dx, word [regs_prior + bx] 1460 00002676 F606[9E00]04 <1> testopt [options3], opt3_r_highlight_full 1461 0000267B 7407 <1> jz @F 1462 0000267D 39C2 <1> cmp dx, ax 1463 0000267F 7403 <1> je @F 1464 00002681 E80C00 <1> call highlight 1465 <1> @@: 1466 00002684 E83700 <1> call hexword_diff ; store low word 1467 <1> 1468 00002687 E81D00 <1> call unhighlight 1469 <1> 1470 0000268A B020 <1> mov al, 32 1471 0000268C AA <1> stosb ; store space 1472 0000268D E295 <1> loop . 1473 0000268F C3 <1> retn 1474 <1> ; Note: This code doesn't use 386+ registers to display our internal 1475 <1> ; variables for these. Currently, setting the RX bit of options 1476 <1> ; will display the 32-bit variables even on non-386 machines. 1477 <1> ; Changing this code to require EAX would require changes to our 1478 <1> ; check too. 1479 <1> ; 32-bit code probably wouldn't be much shorter than the current 1480 <1> ; implementation as well. 1481 <1> 1482 <1> highlight: 1483 00002690 F606[CE00]01 <1> testopt [internalflags3], dif3_highlighting 1484 00002695 750F <1> jnz @F 1485 00002697 800E[CE00]01 <1> setopt [internalflags3], dif3_highlighting 1486 0000269C 56 <1> push si 1487 0000269D 51 <1> push cx 1488 0000269E BE[996D] <1> mov si, msg.highlight 1489 000026A1 E8F80A <1> call copy_single_counted_string 1490 000026A4 59 <1> pop cx 1491 000026A5 5E <1> pop si 1492 <1> @@: 1493 000026A6 C3 <1> retn 1494 <1> 1495 <1> unhighlight: 1496 000026A7 F606[CE00]01 <1> testopt [internalflags3], dif3_highlighting 1497 000026AC 740F <1> jz @F 1498 000026AE 8026[CE00]FE <1> clropt [internalflags3], dif3_highlighting 1499 000026B3 56 <1> push si 1500 000026B4 51 <1> push cx 1501 000026B5 BE[9E6D] <1> mov si, msg.unhighlight 1502 000026B8 E8E10A <1> call copy_single_counted_string 1503 000026BB 59 <1> pop cx 1504 000026BC 5E <1> pop si 1505 <1> @@: 1506 000026BD C3 <1> retn 1507 <1> 1508 <1> hexword_diff: 1509 000026BE F606[9E00]01 <1> testopt [options3], opt3_r_highlight_diff 1510 000026C3 7407 <1> jz @F 1511 000026C5 F606[9E00]04 <1> testopt [options3], opt3_r_highlight_full 1512 000026CA 7403 <1> jz @FF 1513 <1> @@: 1514 000026CC E97E87 <1> jmp hexword 1515 <1> 1516 <1> @@: 1517 <1> .hexword: 1518 000026CF 86C4 <1> xchg al, ah 1519 000026D1 86D6 <1> xchg dl, dh 1520 000026D3 E80400 <1> call .hexbyte 1521 000026D6 86C4 <1> xchg al, ah 1522 000026D8 86D6 <1> xchg dl, dh 1523 <1> 1524 <1> .hexbyte: 1525 000026DA 51 <1> push cx 1526 000026DB B104 <1> mov cl, 4 1527 000026DD D2C0 <1> rol al, cl 1528 000026DF D2C2 <1> rol dl, cl 1529 000026E1 E80500 <1> call .hexnyb 1530 000026E4 D2C0 <1> rol al, cl 1531 000026E6 D2C2 <1> rol dl, cl 1532 000026E8 59 <1> pop cx 1533 <1> 1534 <1> .hexnyb: 1535 000026E9 50 <1> push ax 1536 000026EA 88D4 <1> mov ah, dl 1537 000026EC 250F0F <1> and ax, 0F0Fh 1538 000026EF 38E0 <1> cmp al, ah 1539 000026F1 7405 <1> je .unhighlight 1540 <1> .highlight: 1541 000026F3 E89AFF <1> call highlight 1542 000026F6 EB03 <1> jmp .common 1543 <1> 1544 <1> .unhighlight: 1545 000026F8 E8ACFF <1> call unhighlight 1546 <1> .common: 1547 <1> ; INP: original ax on stack, then return near address 1548 <1> ; al = nybble value to display, 0..15 1549 <1> ; es:di -> where to store 1550 <1> ; OUT: es:di incremented 1551 <1> ; ax restored 1552 <1> ; return to near address that was on stack 1553 000026FB E96487 <1> jmp hexnyb.common 1554 <1> 1555 <1> 1556 <1> %if _RN 1557 <1> ; The layout for FSAVE/FRSTOR depends on mode and 16-/32-bit. 1558 <1> 1559 <1> %if 0 1560 <1> struc FPENV16 1561 <1> .cw: resw 1 ; 00h 1562 <1> .sw: resw 1 ; 02h 1563 <1> .tw: resw 1 ; 04h 1564 <1> .fip: resw 1 ; 06h IP offset 1565 <1> .opc: ; 08h RM: opcode (0-10), IP 16-19 in high bits 1566 <1> .fcs: resw 1 ; 08h PM: IP selector 1567 <1> .fop: resw 1 ; 0Ah operand pointer offset 1568 <1> .foph: ; 0Ch RM: operand pointer 16-19 in high bits 1569 <1> .fos: resw 1 ; 0Ch PM: operand pointer selector 1570 <1> endstruc; 0Eh 1571 <1> 1572 <1> struc FPENV32 1573 <1> .cw: resd 1 ; 00h 1574 <1> .sw: resd 1 ; 04h 1575 <1> .tw: resd 1 ; 08h 1576 <1> .fip: resd 1 ; 0Ch ip offset (RM: bits 0-15 only) 1577 <1> .fopcr: ; 10h (dword) RM: opcode (0-10), ip (12-27) 1578 <1> .fcs: resw 1 ; 10h PM: ip selector 1579 <1> .fopcp: resw 1 ; 12h PM: opcode (bits 0-10) 1580 <1> .foo: resd 1 ; 14h operand pointer offset (RM: bits 0-15 only) 1581 <1> .fooh: ; 18h (dword) RM: operand pointer (12-27) 1582 <1> .fos: resw 1 ; 18h PM: operand pointer selector 1583 <1> resw 1 ; 1Ah PM: not used 1584 <1> endstruc; 1Ch 1585 <1> %endif 1586 <1> 1587 <1> 1588 <1> usesection lDEBUG_DATA_ENTRY 1589 <1> 1590 <1> ; dumpregsFPU - Dump Floating Point Registers 1591 <1> fregnames: 1592 000084A8 435753575457 <1> db "CW", "SW", "TW" 1593 000084AE 4F50433D49503D4450- <1> db "OPC=", "IP=", "DP=" 1593 000084B7 3D <1> 1594 000084B8 656D707479 <1> msg.empty: db "empty" 1595 <1> endarea msg.empty 1596 000084BD 4E614E <1> msg.nan: db "NaN" 1597 <1> endarea msg.nan 1598 <1> 1599 <1> 1600 <1> usesection lDEBUG_CODE 1601 <1> 1602 <1> dumpregsFPU: 1603 000026FE E8B3DE <1> call guard_auxbuff 1604 00002701 8E06[2A0A] <1> mov es, word [auxbuff_segorsel] 1605 <1> ; => auxbuff 1606 00002705 31FF <1> xor di, di ; -> auxbuff 1607 00002707 B98000 <1> mov cx, 128 1608 0000270A 31C0 <1> xor ax, ax 1609 0000270C F3AB <1> rep stosw ; initialise auxbuff 1610 <1> %if _AUXBUFFSIZE < (128 * 2) 1611 <1> %error auxbuff not large enough for dumpregsFPU 1612 <1> %endif 1613 0000270E BF[AE07] <1> mov di, line_out 1614 00002711 BE[A884] <1> mov si, fregnames 1615 00002714 31DB <1> xor bx, bx ; es:bx -> auxbuff 1616 00002716 66 <1> _386_o32 1617 00002717 26DD37 <1> fnsave [es:bx] 1618 <1> 1619 <1> ; display CW, SW and TW 1620 0000271A 16 <1> push ss 1621 0000271B 07 <1> pop es ; es:di -> line_out 1622 0000271C B90300 <1> mov cx, 3 1623 <1> .nextfpr: 1624 0000271F A5 <1> movsw 1625 00002720 B03D <1> mov al, '=' 1626 00002722 AA <1> stosb 1627 00002723 87F3 <1> xchg si, bx 1628 00002725 8E1E[2A0A] <1> mov ds, word [auxbuff_segorsel] 1629 <1> ; ds:si -> auxbuff entry 1630 00002729 66 <1> _386_o32 ; lodsd 1631 0000272A AD <1> lodsw 1632 0000272B 16 <1> push ss 1633 0000272C 1F <1> pop ds ; ds:si -> fregnames entry 1634 0000272D 87F3 <1> xchg si, bx 1635 0000272F 50 <1> push ax 1636 00002730 E81A87 <1> call hexword 1637 00002733 B020 <1> mov al, 32 1638 00002735 AA <1> stosb 1639 00002736 E2E7 <1> loop .nextfpr 1640 <1> 1641 <1> ; display OPC 1642 <1> ; in 16-bit PM, there's no OPC 1643 <1> ; in 32-bit PM, there's one, but the location differs from RM 1644 00002738 53 <1> push bx 1645 <1> %if _PM 1646 <1> call ispm 1647 <1> jz .notpm_opc 1648 <1> add bx, byte 2 ; location of OPC in PM differs from RM 1649 <1> _no386 add si, byte 4 ; no OPC in 16-bit PM 1650 <1> _no386 jmp short .no_opc 1651 <1> .notpm_opc: 1652 <1> %endif 1653 00002739 A5 <1> movsw 1654 0000273A A5 <1> movsw 1655 0000273B 87F3 <1> xchg si, bx 1656 0000273D 8E1E[2A0A] <1> mov ds, word [auxbuff_segorsel] 1657 <1> ; ds:si -> auxbuff entry 1658 00002741 66 <1> _386_o32 ; lodsd 1659 00002742 AD <1> lodsw ; skip word/dword 1660 00002743 AD <1> lodsw 1661 00002744 16 <1> push ss 1662 00002745 1F <1> pop ds ; ds:si -> fregnames entry 1663 00002746 87F3 <1> xchg si, bx 1664 00002748 25FF07 <1> and ax, 07FFh ; bits 0-10 only 1665 0000274B E8FF86 <1> call hexword 1666 0000274E B020 <1> mov al, 32 1667 00002750 AA <1> stosb 1668 <1> .no_opc: 1669 00002751 5B <1> pop bx 1670 <1> 1671 <1> ; display IP and DP 1672 00002752 B102 <1> mov cl, 2 1673 <1> .nextfp: 1674 00002754 51 <1> push cx 1675 00002755 16 <1> push ss 1676 00002756 1F <1> pop ds ; ds:si -> fregnames entry 1677 00002757 A5 <1> movsw 1678 00002758 A4 <1> movsb 1679 00002759 87F3 <1> xchg si, bx 1680 0000275B 8E1E[2A0A] <1> mov ds, word [auxbuff_segorsel] 1681 <1> ; ds:si -> auxbuff entry 1682 0000275F 66 <1> _386_o32 ; lodsd 1683 00002760 AD <1> lodsw 1684 00002761 66 <1> _386_o32 ; mov edx, eax 1685 00002762 89C2 <1> mov dx, ax 1686 00002764 66 <1> _386_o32 ; lodsd 1687 00002765 AD <1> lodsw 1688 00002766 87F3 <1> xchg si, bx 1689 00002768 16 <1> push ss 1690 00002769 1F <1> pop ds ; ds:si -> fregnames entry 1691 <1> %if _PM 1692 <1> call ispm 1693 <1> jz .notpm_ipdp 1694 <1> call hexword 1695 <1> mov al, ':' 1696 <1> stosb 1697 <1> jmp short .fppm 1698 <1> .notpm_ipdp: 1699 <1> %endif 1700 0000276A B10C <1> mov cl, 12 1701 0000276C 66 <1> _386_o32 ; shr eax, cl 1702 0000276D D3E8 <1> shr ax, cl 1703 0000276F E8DB86 <1> _386 call hexword 1704 00002772 EB03 <1> _386 jmp short .fppm 1705 00002774 E8E886 <1> call hexnyb 1706 <1> .fppm: 1707 <1> _386_PM_o32 ; mov eax, edx 1708 00002777 89D0 <1> mov ax, dx 1709 <1> _386_PM call ispm 1710 <1> _386_PM jz .notpm_fppm 1711 <1> _386_PM call hexword_high 1712 <1> .notpm_fppm: 1713 00002779 E8D186 <1> call hexword 1714 0000277C B020 <1> mov al, 32 1715 0000277E AA <1> stosb 1716 0000277F 59 <1> pop cx 1717 00002780 E2D2 <1> loop .nextfp 1718 <1> 1719 00002782 87F3 <1> xchg si, bx 1720 00002784 16 <1> push ss 1721 00002785 1F <1> pop ds ; ds = es = ss 1722 00002786 E8F486 <1> call trimputs 1723 <1> 1724 <1> ; display ST0..7 1725 00002789 5D <1> pop bp ; TW 1726 0000278A 58 <1> pop ax ; SW 1727 0000278B 5A <1> pop dx ; CW (discarded here) 1728 <1> 1729 0000278C B10A <1> mov cl, 10 1730 0000278E D3E8 <1> shr ax, cl ; move TOP to bits 1..3 1731 00002790 240E <1> and al, 1110b ; separate TOP 1732 00002792 88C1 <1> mov cl, al 1733 00002794 D3CD <1> ror bp, cl ; adjust TW 1734 <1> 1735 00002796 B130 <1> mov cl, '0' 1736 <1> .nextst: 1737 00002798 BF[AE07] <1> mov di, line_out 1738 0000279B 51 <1> push cx 1739 0000279C B85354 <1> mov ax, "ST" 1740 0000279F AB <1> stosw 1741 000027A0 88C8 <1> mov al, cl 1742 000027A2 B43D <1> mov ah, '=' 1743 000027A4 AB <1> stosw 1744 000027A5 57 <1> push di 1745 000027A6 A801 <1> test al, 1 1746 000027A8 B020 <1> mov al, 32 1747 000027AA B91600 <1> mov cx, 22 1748 000027AD F3AA <1> rep stosb 1749 000027AF 7404 <1> jz .oddst 1750 000027B1 B80D0A <1> mov ax, 10<<8|13 1751 000027B4 AB <1> stosw 1752 <1> .oddst: 1753 000027B5 B000 <1> mov al, 0 1754 000027B7 AA <1> stosb ; make it an ASCIZ string 1755 000027B8 5F <1> pop di 1756 <1> 1757 000027B9 89E8 <1> mov ax, bp 1758 000027BB D1CD <1> ror bp, 1 1759 000027BD D1CD <1> ror bp, 1 1760 000027BF 2403 <1> and al, 3 ; 00b = valid, 01b = zero, 10b = NaN, 11b = empty 1761 000027C1 741F <1> jz .isvalid 1762 000027C3 56 <1> push si 1763 000027C4 16 <1> push ss 1764 000027C5 1F <1> pop ds ; ds = es = ss 1765 000027C6 BE[B884] <1> mov si, msg.empty 1766 000027C9 B105 <1> mov cl, msg.empty_size 1767 000027CB 3C03 <1> cmp al, 3 1768 000027CD 740E <1> je .gotst 1769 000027CF BE[BD84] <1> mov si, msg.nan 1770 000027D2 B103 <1> mov cl, msg.nan_size 1771 000027D4 3C02 <1> cmp al, 2 1772 000027D6 7405 <1> je .gotst 1773 000027D8 B030 <1> mov al, '0' 1774 000027DA AA <1> stosb 1775 000027DB 31C9 <1> xor cx, cx 1776 <1> .gotst: 1777 000027DD F3A4 <1> rep movsb 1778 000027DF 5E <1> pop si 1779 000027E0 EB34 <1> jmp short .regoutdone 1780 <1> 1781 <1> .isvalid: 1782 000027E2 8E1E[2A0A] <1> mov ds, word [auxbuff_segorsel] 1783 <1> ; ds:si -> auxbuff entry 1784 000027E6 36F606[9400]40 <1> testopt [ss:options], hexrn 1785 000027EC 7508 <1> jnz .hex 1786 000027EE 57 <1> push di ; -> buffer (first parameter; in es = ss) 1787 000027EF 1E <1> push ds 1788 000027F0 56 <1> push si ; -> auxbuff entry (second parameter) 1789 000027F1 E85E03 <1> call FloatToStr 1790 000027F4 EB20 <1> jmp short .regoutdone 1791 <1> 1792 <1> .hex: 1793 000027F6 8B4408 <1> mov ax, word [si+8] 1794 000027F9 E85186 <1> call hexword 1795 000027FC B02E <1> mov al, '.' 1796 000027FE AA <1> stosb 1797 000027FF 8B4406 <1> mov ax, word [si+6] 1798 00002802 E84886 <1> call hexword 1799 00002805 8B4404 <1> mov ax, word [si+4] 1800 00002808 E84286 <1> call hexword 1801 0000280B 8B4402 <1> mov ax, word [si+2] 1802 0000280E E83C86 <1> call hexword 1803 00002811 8B04 <1> mov ax, word [si+0] 1804 00002813 E83786 <1> call hexword 1805 <1> 1806 <1> .regoutdone: 1807 00002816 BA[AE07] <1> mov dx, line_out 1808 00002819 16 <1> push ss 1809 0000281A 1F <1> pop ds ; ds = es = ss 1810 0000281B E8E289 <1> call putsz 1811 0000281E 59 <1> pop cx 1812 <1> 1813 0000281F 83C60A <1> add si, byte 10 ; -> next ST 1814 00002822 FEC1 <1> inc cl 1815 00002824 80F938 <1> cmp cl, '8' 1816 00002827 7403E96CFF <1> jne .nextst 1817 0000282C 8E06[2A0A] <1> mov es, word [auxbuff_segorsel] 1818 <1> ; es => auxbuff 1819 00002830 66 <1> _386_o32 1820 00002831 26DD260000 <1> frstor [es:0] 1821 00002836 C3 <1> retn 1822 <1> %endif 1823 <1> 1824 <1> 1825 <1> ; DMPFLAGS - Dump flags output. 1826 <1> dmpflags: 1827 00002837 52 <1> push dx 1828 00002838 53 <1> push bx 1829 00002839 BE[6081] <1> mov si, flagbits 1830 0000283C B90800 <1> mov cx, 8 1831 0000283F AD <1> .loop: lodsw 1832 00002840 8B16[D80C] <1> mov dx, word [reg_efl - regs + regs_prior] 1833 00002844 21C2 <1> and dx, ax 1834 00002846 8B1E[980C] <1> mov bx, word [reg_efl] 1835 0000284A 21C3 <1> and bx, ax 1836 0000284C 39DA <1> cmp dx, bx 1837 0000284E 7411 <1> je @F 1838 00002850 F606[9E00]05 <1> testopt [options3], opt3_r_highlight_diff | opt3_r_highlight_full 1839 00002855 740A <1> jz @F 1840 00002857 F606[CE00]02 <1> testopt [internalflags3], dif3_do_not_highlight 1841 0000285C 7503 <1> jnz @F 1842 0000285E E82FFE <1> call highlight 1843 <1> @@: 1844 00002861 85DB <1> test bx, bx 1845 00002863 8B441E <1> mov ax, word [si+(flagsoff-flagbits)-2] 1846 00002866 7403 <1> jz .off ; if not set 1847 00002868 8B440E <1> mov ax, word [si+(flagson-flagbits)-2] 1848 0000286B AB <1> .off: stosw 1849 0000286C E838FE <1> call unhighlight 1850 0000286F B020 <1> mov al, 32 1851 00002871 AA <1> stosb 1852 00002872 E2CB <1> loop .loop 1853 00002874 4F <1> dec di ; -> last (unnecessary) blank 1854 00002875 5B <1> pop bx 1855 00002876 5A <1> pop dx 1856 00002877 C3 <1> retn 1857 <1> 1858 <1> 1859 <1> %if _OPTIONS || _VARIABLES 1860 <1> dumpvars: 1861 <1> %if _VARIABLES 1862 00002878 BE[1C0D] <1> mov si, vregs 1863 <1> %endif 1864 0000287B 31DB <1> xor bx, bx 1865 <1> .loop: 1866 0000287D BF[AE07] <1> mov di, line_out 1867 00002880 31D2 <1> xor dx, dx 1868 <1> %if _VARIABLES 1869 00002882 B90400 <1> mov cx, 4 1870 00002885 E88C00 <1> call .dump ; display four variables 1871 00002888 43 <1> inc bx ; (would be one off here) 1872 00002889 56 <1> push si 1873 <1> %else 1874 <1> add bx, byte 4 ; (no motivation to optimize that) 1875 <1> %endif 1876 <1> %if _OPTIONS 1877 <1> %if _VARIABLES 1878 0000288A B82020 <1> mov ax, 32<<8|32 1879 0000288D AB <1> stosw ; more blanks inbetween 1880 <1> %endif 1881 0000288E 80FB10 <1> cmp bl, 16 1882 00002891 7439 <1> je .3 1883 00002893 80FB08 <1> cmp bl, 8 1884 00002896 7721 <1> ja .2 1885 00002898 7411 <1> je .1 1886 <1> 1887 <1> ; First line, display DCO and DCS 1888 <1> .0: 1889 0000289A B8434F <1> mov ax, "CO" 1890 0000289D BE[9400] <1> mov si, options 1891 000028A0 E86200 <1> call .dump_option 1892 000028A3 B84353 <1> mov ax, "CS" 1893 000028A6 BE[AC00] <1> mov si, startoptions 1894 000028A9 EB36 <1> jmp short .next 1895 <1> 1896 <1> ; Second line, DAO and DAS 1897 <1> .1: 1898 000028AB B8414F <1> mov ax, "AO" 1899 000028AE BE[DC00] <1> mov si, asm_options 1900 000028B1 E85100 <1> call .dump_option 1901 000028B4 B84153 <1> mov ax, "AS" 1902 <1> ; asm_startoptions follows directly behind asm_options 1903 000028B7 EB28 <1> jmp short .next 1904 <1> 1905 <1> ; Third line, DIF and DPI 1906 <1> .2: 1907 000028B9 B84946 <1> mov ax, "IF" 1908 000028BC BE[C400] <1> mov si, internalflags 1909 000028BF E84300 <1> call .dump_option 1910 000028C2 B85049 <1> mov ax, "PI" 1911 000028C5 BE[FC0A] <1> mov si, psp22 1912 000028C8 42 <1> inc dx 1913 000028C9 42 <1> inc dx 1914 000028CA EB15 <1> jmp short .next 1915 <1> 1916 <1> ; Fourth line, DPR, DPS (if _PM) and DPP 1917 <1> .3: 1918 000028CC 42 <1> inc dx 1919 000028CD B85052 <1> mov ax, "PR" 1920 000028D0 BE[E00A] <1> mov si, pspdbg 1921 000028D3 E82F00 <1> call .dump_option 1922 <1> %if _PM 1923 <1> xor ax, ax 1924 <1> call ispm 1925 <1> jnz .3_rm 1926 <1> push ds 1927 <1> db __TEST_IMM8 ; (skip push) 1928 <1> .3_rm: 1929 <1> push ax 1930 <1> mov ax, "PS" 1931 <1> mov si, sp 1932 <1> call .dump_options 1933 <1> pop ax 1934 <1> %else 1935 000028D6 B82020 <1> mov ax, 32<<8|32 1936 000028D9 AB <1> stosw 1937 000028DA AB <1> stosw 1938 <1> %endif 1939 000028DB B85050 <1> mov ax, "PP" 1940 000028DE BE[000B] <1> mov si, parent 1941 <1> 1942 <1> .next: 1943 000028E1 E82100 <1> call .dump_options 1944 <1> %endif 1945 000028E4 53 <1> push bx 1946 000028E5 E89D85 <1> call putsline_crlf ; display line 1947 000028E8 5B <1> pop bx ; (retain counter) 1948 <1> %if _VARIABLES 1949 000028E9 5E <1> pop si ; (retain pointer to next variable) 1950 <1> %endif 1951 000028EA 80FB10 <1> cmp bl, 16 ; was end ? 1952 000028ED 758E <1> jne .loop ; no, loop --> 1953 <1> 1954 <1> ; done 1955 <1> .mode: 1956 000028EF BA[9C5D] <1> mov dx, msg.rv_mode.before 1957 000028F2 E80B89 <1> call putsz 1958 <1> %if _PM 1959 <1> call ispm 1960 <1> jnz .mode_86m 1961 <1> mov dx, msg.rv_mode_dpmi_16 1962 <1> mov bx, word [reg_cs] 1963 <1> call test_d_b_bit 1964 <1> jz @F 1965 <1> mov dx, msg.rv_mode_dpmi_32 1966 <1> jmp @F 1967 <1> 1968 <1> .mode_86m: 1969 <1> %endif 1970 000028F5 BA[AB5D] <1> mov dx, msg.rv_mode_r86m 1971 <1> ; (only 386+ has the V86M so even though smsw ax is a 1972 <1> ; 286 level instruction, so could be used without a 386, 1973 <1> ; we only really need it on a 386+.) 1974 000028F8 0F01E0 <1> _386 smsw ax 1975 000028FB A801 <1> _386 test al, 1 1976 000028FD 7403 <1> _386 jz @F 1977 000028FF BA[BA5D] <1> _386 mov dx, msg.rv_mode_v86m 1978 <1> @@: 1979 00002902 E9FB88 <1> jmp putsz 1980 <1> 1981 <1> 1982 <1> ; INP: ax = 2-byte option name ('N' will precede this) 1983 <1> ; d[si] = value 1984 <1> ; OUT: si-> behind value 1985 <1> ; cx = 0 1986 <1> ; CHG: ax 1987 <1> .dump_options: 1988 <1> %if _VARIABLES 1989 <1> .dump_option: 1990 00002905 C7052044 <1> mov word [di], " D" 1991 00002909 AF <1> scasw 1992 <1> %else 1993 <1> mov byte [di], ' ' 1994 <1> inc di 1995 <1> .dump_option: 1996 <1> mov byte [di], 'D' 1997 <1> inc di 1998 <1> %endif 1999 0000290A AB <1> stosw 2000 <1> %if _VARIABLES ; falls through otherwise, always count 1 2001 0000290B B90100 <1> mov cx, 1 2002 0000290E EB0C <1> jmp short .dump_one 2003 <1> %endif 2004 <1> 2005 <1> %if 0 2006 <1> PM && OPTIONS && VARIABLES 2007 <1> V0=00000000 V1=00000000 V2=00000000 V3=00000000 DCO=00000000 DCS=00000000 2008 <1> V4=00000000 V5=00000000 V6=00000000 V7=00000000 DAO=00000000 DAS=00000000 2009 <1> V8=00000000 V9=00000000 VA=00000000 VB=00000000 DIF=0000840D DPI=0616:01DE 2010 <1> VC=00000000 VD=00000000 VE=00000000 VF=00000000 DPR=0984 DPS=0000 DPP=0616 2011 <1> 2012 <1> !PM && OPTIONS && VARIABLES 2013 <1> V0=00000000 V1=00000000 V2=00000000 V3=00000000 DCO=00000000 DCS=00000000 2014 <1> V4=00000000 V5=00000000 V6=00000000 V7=00000000 DAO=00000000 DAS=00000000 2015 <1> V8=00000000 V9=00000000 VA=00000000 VB=00000000 DIF=0000840D DPI=0616:01DE 2016 <1> VC=00000000 VD=00000000 VE=00000000 VF=00000000 DPR=0984 DPP=0616 2017 <1> 2018 <1> !OPTIONS && VARIABLES 2019 <1> V0=00000000 V1=00000000 V2=00000000 V3=00000000 2020 <1> V4=00000000 V5=00000000 V6=00000000 V7=00000000 2021 <1> V8=00000000 V9=00000000 VA=00000000 VB=00000000 2022 <1> VC=00000000 VD=00000000 VE=00000000 VF=00000000 2023 <1> 2024 <1> !PM && OPTIONS && !VARIABLES 2025 <1> DCO=00000000 DCS=00000000 2026 <1> DAO=00000000 DAS=00000000 2027 <1> DIF=0000840D DPI=0616:01DE 2028 <1> DPR=0984 DPP=0616 2029 <1> 2030 <1> PM && OPTIONS && !VARIABLES 2031 <1> DCO=00000000 DCS=00000000 2032 <1> DAO=00000000 DAS=00000000 2033 <1> DIF=0000840D DPI=0616:01DE 2034 <1> DPR=0984 DPS=0000 DPP=0616 2035 <1> 2036 <1> !OPTIONS && !VARIABLES 2037 <1> %endif 2038 <1> %if 0 2039 <1> DCO Debugger Common Options 2040 <1> DCS Debugger Common Startup options 2041 <1> DIF Debugger Internal Flags 2042 <1> DPR Debugger Process (Real-mode segment) 2043 <1> DPS Debugger Process Selector, or zero 2044 <1> DPP Debugger Parent Process 2045 <1> DPI Debugger Parent Interrupt 22h 2046 <1> DAO Debugger Assembler/disassembler Options 2047 <1> DAS Debugger Assembler/disassembler Startup options 2048 <1> %endif 2049 <1> 2050 <1> %if _VARIABLES 2051 <1> .dump_loop: 2052 00002910 43 <1> inc bx 2053 00002911 B020 <1> mov al, 32 2054 00002913 AA <1> stosb 2055 <1> .dump: 2056 00002914 B056 <1> mov al, 'V' 2057 00002916 AA <1> stosb 2058 00002917 88D8 <1> mov al, bl 2059 00002919 E84385 <1> call hexnyb 2060 <1> %endif 2061 <1> .dump_one: 2062 0000291C B03D <1> mov al, '=' 2063 0000291E AA <1> stosb 2064 0000291F AD <1> lodsw 2065 00002920 80FA01 <1> cmp dl, 1 2066 00002923 740D <1> je .dumpw 2067 00002925 50 <1> push ax 2068 00002926 AD <1> lodsw 2069 00002927 9C <1> pushf 2070 00002928 E82285 <1> call hexword 2071 0000292B 9D <1> popf ; CF 2072 0000292C 7203 <1> jb .nocolon 2073 0000292E B03A <1> mov al, ':' 2074 00002930 AA <1> stosb 2075 <1> .nocolon: 2076 00002931 58 <1> pop ax 2077 <1> .dumpw: 2078 00002932 E81885 <1> call hexword 2079 <1> %if _VARIABLES 2080 00002935 E2D9 <1> loop .dump_loop 2081 <1> %endif 2082 00002937 C3 <1> retn 2083 <1> %endif 2084 <1> 2085 <1> 2086 <1> dumpallvars: 2087 00002938 AC <1> lodsb 2088 00002939 E82684 <1> call chkeol 2089 0000293C BE[1C0D] <1> mov si, vregs 2090 0000293F 31DB <1> xor bx, bx 2091 <1> .loop: 2092 00002941 BF[AE07] <1> mov di, line_out 2093 00002944 B90400 <1> mov cx, 4 2094 00002947 31D2 <1> xor dx, dx 2095 00002949 E81500 <1> call .dump ; display four variables 2096 0000294C 43 <1> inc bx ; (would be one off here) 2097 0000294D 85D2 <1> test dx, dx 2098 0000294F 7407 <1> jz @F 2099 00002951 56 <1> push si 2100 00002952 53 <1> push bx 2101 00002953 E82F85 <1> call putsline_crlf ; display line 2102 00002956 5B <1> pop bx ; (retain counter) 2103 00002957 5E <1> pop si ; (retain pointer to next variable) 2104 <1> @@: 2105 00002958 84DB <1> test bl, bl ; was end ? 2106 0000295A 75E5 <1> jnz .loop ; no, loop --> 2107 0000295C C3 <1> retn 2108 <1> 2109 <1> .dump_loop: 2110 0000295D 43 <1> inc bx 2111 0000295E B020 <1> mov al, 32 2112 00002960 AA <1> stosb 2113 <1> .dump: 2114 00002961 B056 <1> mov al, 'V' 2115 00002963 AA <1> stosb 2116 00002964 88D8 <1> mov al, bl 2117 00002966 E8EB84 <1> call hexbyte 2118 <1> .dump_one: 2119 00002969 B03D <1> mov al, '=' 2120 0000296B AA <1> stosb 2121 0000296C AD <1> lodsw 2122 0000296D 09C2 <1> or dx, ax 2123 0000296F 50 <1> push ax 2124 00002970 AD <1> lodsw 2125 00002971 09C2 <1> or dx, ax 2126 00002973 E8D784 <1> call hexword 2127 00002976 58 <1> pop ax 2128 00002977 E8D384 <1> call hexword 2129 0000297A E2E1 <1> loop .dump_loop 2130 0000297C C3 <1> retn 2131 <1> 2132 <1> 2133 <1> dumpmemory: 2134 0000297D AC <1> lodsb 2135 0000297E E8E183 <1> call chkeol 2136 <1> 2137 00002981 A1[0001] <1> mov ax, word [code_seg] 2138 <1> %if _PM 2139 <1> mov dx, word [code_sel] 2140 <1> %endif 2141 00002984 BE[F964] <1> mov si, msg.vm_codeseg 2142 00002987 E81F00 <1> call .line 2143 <1> 2144 <1> %if _PM 2145 <1> mov ax, word [pspdbg] 2146 <1> mov dx, ss 2147 <1> %else 2148 0000298A 8CD0 <1> mov ax, ss 2149 <1> %endif 2150 0000298C BE[0765] <1> mov si, msg.vm_dataseg 2151 0000298F E81700 <1> call .line 2152 <1> 2153 <1> %if _PM 2154 <1> mov ax, word [pspdbg] 2155 <1> mov dx, word [cssel] 2156 <1> %else 2157 00002992 8CD0 <1> mov ax, ss 2158 <1> %endif 2159 00002994 BE[1565] <1> mov si, msg.vm_entryseg 2160 00002997 E80F00 <1> call .line 2161 <1> 2162 <1> %if _PM 2163 <1> mov ax, word [auxbuff_segorsel + soaSegment] 2164 <1> mov dx, word [auxbuff_segorsel + soaSelector] 2165 <1> %else 2166 0000299A A1[2A0A] <1> mov ax, word [auxbuff_segorsel] 2167 <1> %endif 2168 0000299D BE[2465] <1> mov si, msg.vm_auxseg 2169 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 2170 000029A0 E80600 <1> call .line 2171 <1> 2172 <1> %if _PM 2173 <1> mov ax, word [history.segorsel + soaSegment] 2174 <1> mov dx, word [history.segorsel + soaSelector] 2175 <1> %else 2176 000029A3 A1[3C0B] <1> mov ax, word [history.segorsel] 2177 <1> %endif 2178 000029A6 BE[3565] <1> mov si, msg.vm_hisseg 2179 <1> %endif 2180 <1> 2181 <1> .line: 2182 000029A9 BF[AE07] <1> mov di, line_out 2183 000029AC E8ED07 <1> call copy_single_counted_string 2184 000029AF E89B84 <1> call hexword 2185 <1> %if _PM 2186 <1> call ispm 2187 <1> jnz @F 2188 <1> mov si, msg.vm_selector 2189 <1> call copy_single_counted_string 2190 <1> xchg ax, dx 2191 <1> call hexword 2192 <1> @@: 2193 <1> %endif 2194 000029B2 E9D084 <1> jmp putsline_crlf 2195 <1> 2196 <1> 2197 <1> dumpprocess: 2198 000029B5 AC <1> lodsb 2199 000029B6 E8A983 <1> call chkeol 2200 <1> 2201 000029B9 E8D878 <1> call var_psp_setup 2202 000029BC E8DF78 <1> call var_ppr_setup 2203 000029BF E8F278 <1> call var_ppi_setup 2204 <1> 2205 <1> %if _BOOTLDR 2206 000029C2 BA[9664] <1> mov dx, msg.rvp_boot 2207 000029C5 F606[C500]40 <1> testopt [internalflags], nodosloaded 2208 000029CA 7517 <1> jnz @F 2209 <1> %endif 2210 <1> %if _DEVICE 2211 000029CC BA[AA64] <1> mov dx, msg.rvp_device 2212 000029CF F606[DA00]40 <1> testopt [internalflags6], dif6_device_mode 2213 000029D4 750D <1> jnz @F 2214 <1> %endif 2215 <1> %if _TSR 2216 000029D6 BA[C064] <1> mov dx, msg.rvp_tsr 2217 000029D9 F606[C600]40 <1> testopt [internalflags], tsrmode 2218 000029DE 7503 <1> jnz @F 2219 <1> %endif 2220 000029E0 BA[E564] <1> mov dx, msg.rvp_application 2221 <1> @@: 2222 000029E3 E81A88 <1> call putsz 2223 <1> 2224 000029E6 BF[AE07] <1> mov di, line_out 2225 <1> 2226 000029E9 A1[6E94] <1> mov ax, word [psp_segment] 2227 000029EC BE[4665] <1> mov si, msg.vp_pspsegment 2228 000029EF E84800 <1> call .line 2229 <1> 2230 000029F2 A1[7094] <1> mov ax, word [psp_parent] 2231 000029F5 BE[6265] <1> mov si, msg.vp_parent 2232 000029F8 E83F00 <1> call .line 2233 <1> 2234 000029FB A1[7494] <1> mov ax, word [psp_pra + 2] 2235 000029FE BE[6B65] <1> mov si, msg.vp_pra 2236 00002A01 E83600 <1> call .line 2237 00002A04 B03A <1> mov al, ':' 2238 00002A06 AA <1> stosb 2239 00002A07 A1[7294] <1> mov ax, word [psp_pra] 2240 00002A0A E84084 <1> call hexword 2241 <1> 2242 <1> %if _PM 2243 <1> mov ax, word [pspdbe] 2244 <1> mov si, msg.vp_pspsel 2245 <1> call .line 2246 <1> %endif 2247 00002A0D E87584 <1> call putsline_crlf 2248 <1> 2249 00002A10 BF[AE07] <1> mov di, line_out 2250 <1> 2251 00002A13 A1[E00A] <1> mov ax, word [pspdbg] 2252 00002A16 BE[5465] <1> mov si, msg.vp_dpspsegment 2253 00002A19 E81E00 <1> call .line 2254 <1> 2255 00002A1C A1[000B] <1> mov ax, word [parent] 2256 00002A1F BE[6265] <1> mov si, msg.vp_dparent 2257 00002A22 E81500 <1> call .line 2258 <1> 2259 00002A25 A1[FE0A] <1> mov ax, word [psp22 + 2] 2260 00002A28 BE[6B65] <1> mov si, msg.vp_dpra 2261 00002A2B E80C00 <1> call .line 2262 00002A2E B03A <1> mov al, ':' 2263 00002A30 AA <1> stosb 2264 00002A31 A1[FC0A] <1> mov ax, word [psp22] 2265 00002A34 E81684 <1> call hexword 2266 <1> 2267 <1> %if _PM 2268 <1> mov ax, ss 2269 <1> mov si, msg.vp_dpspsel 2270 <1> call .line 2271 <1> %endif 2272 00002A37 E94B84 <1> jmp putsline_crlf 2273 <1> 2274 <1> .line: 2275 00002A3A E85F07 <1> call copy_single_counted_string 2276 00002A3D E90D84 <1> jmp hexword 2277 <1> 2278 <1> 2279 <1> dumpdevice: 2280 00002A40 AC <1> lodsb 2281 00002A41 E81E83 <1> call chkeol 2282 <1> 2283 <1> %if _DEVICE 2284 00002A44 F606[DA00]40 <1> testopt [internalflags6], dif6_device_mode 2285 00002A49 7507 <1> jnz @F 2286 <1> %endif 2287 00002A4B BA[8365] <1> mov dx, msg.rvd_not_device 2288 00002A4E E8AF87 <1> call putsz 2289 00002A51 C3 <1> retn 2290 <1> 2291 <1> %if _DEVICE 2292 <1> @@: 2293 00002A52 A1[100C] <1> mov ax, word [device_header_address + 2] 2294 00002A55 BE[A065] <1> mov si, msg.rvd_deviceheader 2295 00002A58 E81500 <1> call .line 2296 00002A5B B03A <1> mov al, ':' 2297 00002A5D AA <1> stosb 2298 00002A5E A1[0E0C] <1> mov ax, word [device_header_address] 2299 00002A61 E8E983 <1> call hexword 2300 <1> 2301 00002A64 A1[0C0C] <1> mov ax, word [device_mcb_paragraphs] 2302 00002A67 BE[B265] <1> mov si, msg.rvd_size 2303 00002A6A E80300 <1> call .line 2304 00002A6D E91584 <1> jmp putsline_crlf 2305 <1> 2306 <1> .line: 2307 00002A70 E82907 <1> call copy_single_counted_string 2308 00002A73 E9D783 <1> jmp hexword 2309 <1> %endif 2310 <1> 2311 <1> 2312 <1> %if _MMXSUPP 2313 <1> subcpu 586 2314 <1> dumpregsMMX: 2315 00002A76 E83BDB <1> call guard_auxbuff 2316 00002A79 8E1E[2A0A] <1> mov ds, word [auxbuff_segorsel] ; => auxbuff 2317 00002A7D 66 <1> o32 2318 00002A7E DD360000 <1> fnsave [0] 2319 00002A82 BE1C00 <1> mov si, 7*4 2320 00002A85 B130 <1> mov cl, '0' 2321 00002A87 BF[AE07] <1> mov di, line_out 2322 <1> .nextreg: 2323 00002A8A 8E1E[2A0A] <1> mov ds, word [auxbuff_segorsel] ; => auxbuff 2324 00002A8E B84D4D <1> mov ax, "MM" 2325 00002A91 AB <1> stosw 2326 00002A92 88C8 <1> mov al, cl 2327 00002A94 B43D <1> mov ah, '=' 2328 00002A96 AB <1> stosw 2329 00002A97 51 <1> push cx 2330 00002A98 B208 <1> mov dl, 8 2331 <1> .nextbyte: 2332 00002A9A AC <1> lodsb 2333 00002A9B E8B683 <1> call hexbyte 2334 00002A9E B020 <1> mov al, 32 2335 00002AA0 F6C201 <1> test dl, 1 2336 00002AA3 7402 <1> jz .oddbyte 2337 00002AA5 B02D <1> mov al, '-' 2338 <1> .oddbyte: 2339 00002AA7 AA <1> stosb 2340 00002AA8 FECA <1> dec dl 2341 00002AAA 75EE <1> jnz .nextbyte 2342 00002AAC 4F <1> dec di 2343 00002AAD B82020 <1> mov ax, 32<<8|32 2344 00002AB0 AB <1> stosw 2345 00002AB1 83C602 <1> add si, byte 2 2346 00002AB4 59 <1> pop cx 2347 00002AB5 F6C101 <1> test cl, 1 2348 00002AB8 740A <1> jz .oddreg 2349 00002ABA 51 <1> push cx 2350 00002ABB 16 <1> push ss 2351 00002ABC 1F <1> pop ds ; ds = es = ss 2352 00002ABD E8BD83 <1> call trimputs 2353 00002AC0 59 <1> pop cx 2354 00002AC1 BF[AE07] <1> mov di, line_out 2355 <1> .oddreg: 2356 00002AC4 FEC1 <1> inc cl 2357 00002AC6 80F938 <1> cmp cl, '8' 2358 00002AC9 75BF <1> jne .nextreg 2359 00002ACB 8E1E[2A0A] <1> mov ds, word [auxbuff_segorsel] ; => auxbuff 2360 00002ACF 66 <1> o32 2361 00002AD0 D9260000 <1> fldenv [0] 2362 00002AD4 C3 <1> retn 2363 <1> subcpureset 2364 <1> %endif 2350 %if _RN 2351 %include "fptostr.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> Copyright (C) 2008-2012 C. Masloch 5 <1> 6 <1> Usage of the works is permitted provided that this 7 <1> instrument is retained with the works, so that any entity 8 <1> that uses the works is notified of this instrument. 9 <1> 10 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 11 <1> 12 <1> %endif 13 <1> 14 <1> 15 <1> usesection lDEBUG_DATA_ENTRY 16 <1> 17 <1> ;--- defines procedures 18 <1> ;--- PowerOf10 19 <1> ;--- FloatToBCD 20 <1> ;--- FloatToStr 21 <1> 22 <1> ; These are bits in the FP status word. 23 <1> 24 <1> FP_LESSTHAN equ 01h 25 <1> FP_EQUALTO equ 40h 26 <1> 27 <1> align 8, db 0 28 000084C0 0000000000002440 <1> ten: dq 10.0 29 000084C8 0080E03779C34143 <1> ten16: dq 1.0e16 30 <1> ;rounder:dq 5.0e10 31 <1> 32 000084D0 00000000000000A002- <1> ten_1: dt 1.0e1 ; 10.0 32 000084D9 40 <1> 33 000084DA 00000000000000C805- <1> dt 1.0e2 ; 100.0 33 000084E3 40 <1> 34 000084E4 00000000000000FA08- <1> dt 1.0e3 ; 1,000.0 34 000084ED 40 <1> 35 000084EE 000000000000409C0C- <1> dt 1.0e4 ; 10,000.0 35 000084F7 40 <1> 36 000084F8 00000000000050C30F- <1> dt 1.0e5 ; 100,000.0 36 00008501 40 <1> 37 00008502 00000000000024F412- <1> dt 1.0e6 ; 1,000,000.0 37 0000850B 40 <1> 38 0000850C 000000000080969816- <1> dt 1.0e7 ; 10,000,000.0 38 00008515 40 <1> 39 00008516 000000000020BCBE19- <1> dt 1.0e8 ; 100,000,000.0 39 0000851F 40 <1> 40 00008520 0000000000286BEE1C- <1> dt 1.0e9 ; 1,000,000,000.0 40 00008529 40 <1> 41 0000852A 0000000000F9029520- <1> dt 1.0e10 ; 10,000,000,000.0 41 00008533 40 <1> 42 00008534 0000000040B743BA23- <1> dt 1.0e11 ; 100,000,000,000.0 42 0000853D 40 <1> 43 0000853E 0000000010A5D4E826- <1> dt 1.0e12 ; 1,000,000,000,000.0 43 00008547 40 <1> 44 00008548 000000002AE784912A- <1> dt 1.0e13 ; 10,000,000,000,000.0 44 00008551 40 <1> 45 00008552 00000080F420E6B52D- <1> dt 1.0e14 ; 100,000,000,000,000.0 45 0000855B 40 <1> 46 0000855C 000000A031A95FE330- <1> dt 1.0e15 ; 1,000,000,000,000,000.0 46 00008565 40 <1> 47 <1> 48 00008566 00000004BFC91B8E34- <1> ten_16: dt 1.0e16 48 0000856F 40 <1> 49 00008570 9EB5702BA8ADC59D69- <1> dt 1.0e32 49 00008579 40 <1> 50 0000857A D795430E058D29AF9E- <1> dt 1.0e48 50 00008583 40 <1> 51 00008584 D5A6CFFF491F78C2D3- <1> dt 1.0e64 51 0000858D 40 <1> 52 0000858E FCF7DA878F7AE7D708- <1> dt 1.0e80 52 00008597 41 <1> 53 00008598 A3149BC516ABB3EF3D- <1> dt 1.0e96 53 000085A1 41 <1> 54 000085A2 9E322399C0AD0F8573- <1> dt 1.0e112 54 000085AB 41 <1> 55 000085AC E08CE980C947BA93A8- <1> dt 1.0e128 55 000085B5 41 <1> 56 000085B6 E7A6D3A8C5B902A4DD- <1> dt 1.0e144 56 000085BF 41 <1> 57 000085C0 AA17E67F2BA116B612- <1> dt 1.0e160 57 000085C9 42 <1> 58 000085CA 93BF9B8591A228CA47- <1> dt 1.0e176 58 000085D3 42 <1> 59 000085D4 6B5527398DF770E07C- <1> dt 1.0e192 59 000085DD 42 <1> 60 000085DE 46618237350C2EF9B1- <1> dt 1.0e208 60 000085E7 42 <1> 61 000085E8 30C93CE3FF96528AE7- <1> dt 1.0e224 61 000085F1 42 <1> 62 000085F2 6617BFD6F3A691991C- <1> dt 1.0e240 62 000085FB 43 <1> 63 <1> 64 000085FC 8EDEF99DFBEB7EAA51- <1> ten_256:dt 1.0e256 64 00008605 43 <1> 65 <1> 66 <1> ; The remaining exponents are only necessary for 10-byte doubles. 67 <1> 68 00008606 C7910EA6AEA019E3A3- <1> dt 1.0e512 68 0000860F 46 <1> 69 00008610 8CA600CDA89C3F97F6- <1> dt 1.0e768 69 00008619 49 <1> 70 0000861A 170C7581867576C948- <1> dt 1.0e1024 70 00008623 4D <1> 71 00008624 CB6E85EB0E8C2C869B- <1> dt 1.0e1280 71 0000862D 50 <1> 72 0000862E E4A793393B35B8B2ED- <1> dt 1.0e1536 72 00008637 53 <1> 73 00008638 8CB84A9284DD0DEE3F- <1> dt 1.0e1792 73 00008641 57 <1> 74 00008642 E55D3DC55D3B8B9E92- <1> dt 1.0e2048 74 0000864B 5A <1> 75 0000864C 6F80F44132202ED3E4- <1> dt 1.0e2304 75 00008655 5D <1> 76 00008656 A6F0A120C054A58C37- <1> dt 1.0e2560 76 0000865F 61 <1> 77 00008660 CC77D99B9A0A57BB89- <1> dt 1.0e2816 77 00008669 64 <1> 78 0000866A 8B5A8BD8255D89F9DB- <1> dt 1.0e3072 78 00008673 67 <1> 79 00008674 45FE99567DEF30A62E- <1> dt 1.0e3328 79 0000867D 6B <1> 80 0000867E F8F327BFA2C85DDD80- <1> dt 1.0e3584 80 00008687 6E <1> 81 00008688 9B97208A025260C425- <1> dt 1.0e4096 81 00008691 75 <1> 82 00008692 B41CE17BE352C98278- <1> dt 1.0e4352 82 0000869B 78 <1> 83 0000869C F059D56E621135AECA- <1> dt 1.0e4608 83 000086A5 7B <1> 84 000086A6 6D6D14B97F380BE81C- <1> dt 1.0e4864 84 000086AF 7F <1> 85 <1> 86 <1> 87 <1> usesection lDEBUG_CODE 88 <1> 89 <1> ; Divide or multiply st0 to normalize it 90 <1> ; 91 <1> ; INP: ax = exponent word 92 <1> ; CHG: bx, dx, cl 93 <1> PowerOf10: 94 00002AD5 56 <1> push si 95 00002AD6 50 <1> push ax 96 00002AD7 85C0 <1> test ax, ax 97 00002AD9 7902 <1> jns .notnegative 98 00002ADB F7D8 <1> neg ax 99 <1> .notnegative: 100 00002ADD D9E8 <1> fld1 101 00002ADF 88C3 <1> mov bl, al 102 00002AE1 80E30F <1> and bl, 0Fh ; bits 0..3 103 00002AE4 7406 <1> je .0..3zero 104 00002AE6 BE[D084] <1> mov si, ten_1 105 00002AE9 E82B00 <1> call mul10 106 <1> .0..3zero: 107 00002AEC 88C3 <1> mov bl, al 108 00002AEE B104 <1> mov cl, 4 109 00002AF0 D2EB <1> shr bl, cl 110 00002AF2 80E30F <1> and bl, 0Fh ; bits 4..7 111 00002AF5 7406 <1> je .4..7zero 112 00002AF7 BE[6685] <1> mov si, ten_16 113 00002AFA E81A00 <1> call mul10 114 <1> .4..7zero: 115 00002AFD 88E3 <1> mov bl, ah 116 00002AFF 80E31F <1> and bl, 1Fh ; bits 8..12 117 00002B02 7406 <1> jz .8..12zero 118 00002B04 BE[FC85] <1> mov si, ten_256 119 00002B07 E80D00 <1> call mul10 120 <1> .8..12zero: 121 00002B0A 58 <1> pop ax 122 00002B0B 85C0 <1> test ax, ax 123 00002B0D 7904 <1> jns .notnegative2 124 00002B0F DEF9 <1> fdivp st1 125 00002B11 5E <1> pop si 126 00002B12 C3 <1> retn 127 <1> 128 <1> .notnegative2: 129 00002B13 DEC9 <1> fmulp st1 130 00002B15 5E <1> pop si 131 00002B16 C3 <1> retn 132 <1> 133 <1> mul10: 134 00002B17 FECB <1> dec bl 135 00002B19 B700 <1> mov bh, 0 136 00002B1B 50 <1> push ax 137 00002B1C 89D8 <1> mov ax, bx 138 00002B1E 01C0 <1> add ax, ax 139 00002B20 01C0 <1> add ax, ax ; *4 140 00002B22 01C3 <1> add bx, ax ; *5 141 00002B24 01DB <1> add bx, bx ; *10 142 00002B26 58 <1> pop ax 143 00002B27 DB28 <1> fld tword [bx + si] 144 00002B29 DEC9 <1> fmulp st1 145 00002B2B C3 <1> retn 146 <1> 147 <1> 148 <1> ; Convert a floating point register to ASCII. For internal use. 149 <1> ; The result always has exactly 18 digits, with zero padding 150 <1> ; on the left if required. 151 <1> ; 152 <1> ; INP: st0 = number to convert, 0 <= st0 < 1.0E19 153 <1> ; di-> 18-character output buffer 154 <1> ; CHG: si, di, cx, ax 155 <1> FloatToBCD: 156 00002B2C 55 <1> push bp 157 00002B2D 89E5 <1> mov bp, sp 158 00002B2F 83EC0C <1> sub sp, 12 159 <1> 160 <1> ; The fbstp instruction converts the top of the stack to 161 <1> ; a packed BCD form in ten bytes, with two digits per 162 <1> ; byte. The top byte has the sign, which we ignore. 163 00002B32 DF76F4 <1> fbstp [ bp-12 ] 164 <1> 165 <1> ; Now we need to unpack the BCD to ASCII. 166 00002B35 8D76FC <1> lea si, [ bp-4 ] 167 00002B38 B90900 <1> mov cx, 9 168 <1> .nextdigits: 169 00002B3B 8A04 <1> mov al, byte [ si ] ; xxxx xxxx AAAA BBBB 170 00002B3D 4E <1> dec si 171 <1> %if 1 172 00002B3E B400 <1> mov ah, 0 ; 0000 0000 AAAA BBBB 173 00002B40 51 <1> push cx 174 00002B41 B104 <1> mov cl, 4 175 00002B43 D3C8 <1> ror ax, cl ; BBBB xxxx xxxx AAAA 176 00002B45 D2C4 <1> rol ah, cl ; xxxx BBBB xxxx AAAA 177 00002B47 59 <1> pop cx 178 <1> ;and ax, 0F0Fh ; 0000 BBBB 0000 AAAA 179 <1> %else 180 <1> aam 16 ; 0000 AAAA 0000 BBBB 181 <1> xchg al, ah ; 0000 BBBB 0000 AAAA 182 <1> %endif 183 00002B48 053030 <1> add ax, "00" 184 00002B4B AB <1> stosw 185 00002B4C E2ED <1> loop .nextdigits 186 00002B4E 89EC <1> mov sp, bp 187 00002B50 5D <1> pop bp 188 00002B51 C3 <1> retn 189 <1> 190 <1> 191 <1> ; Convert a double precision number to a string. 192 <1> ; 193 <1> ; Entry: dword [far pfpin] -> 8-byte double to convert, non-zero 194 <1> ; es = ss : word [pszDbl] -> character buffer 195 <1> ; 196 <1> ; Exit: es = ss : word [pszDbl] -> converted value 197 <1> ; 198 <1> ; CHG: ax, bx, cx, dx 199 <1> ; 200 <1> ; The buffer at pszDbl should be at least 19 bytes long. 201 <1> ; The buffer needs to be initialized with blanks. 202 <1> 203 <1> ;FloatToStr PROC stdcall public USES si di pfpin: ptr TBYTE, pszDbl: PTR BYTE 204 <1> FloatToStr: 205 <1> lframe near 206 <1> lpar word, ??pszDbl ; pszDbl: PTR BYTE, near 207 <1> lpar dword, ??pfpin ; pfpin: ptr TBYTE, but far 208 <1> lvar word, ??iExp ; LOCAL iExp: WORD 209 <1> lvar word, ??mystat ; LOCAL mystat: WORD 210 <1> lvar 10, ??fpin ; LOCAL fpin: TBYTE 211 <1> lvar 22, ??szTemp ; LOCAL szTemp[22]: BYTE 212 00002B52 5589E58D66DC <1> lenter 213 <1> 214 <1> %define iExp bp+???%+%? 215 <1> %define mystat bp+???%+%? 216 <1> %define fpin bp+???%+%? 217 <1> %define szTemp bp+???%+%? 218 <1> %define pfpin bp+???%+%? 219 <1> %define pszDbl bp+???%+%? 220 <1> 221 00002B58 1E <1> push ds 222 00002B59 56 <1> push si ; USES si 223 00002B5A 06 <1> push es 224 00002B5B 57 <1> push di ; USES di 225 <1> 226 <1> ; Special case zero has been filtered already. (fxtract fails for zero.) 227 00002B5C C57604 <1> lds si, [pfpin] 228 00002B5F 16 <1> push ss 229 00002B60 07 <1> pop es 230 00002B61 8D7EF2 <1> lea di, [fpin] 231 00002B64 B90500 <1> mov cx, 5 232 00002B67 F3A5 <1> rep movsw ; store number in local buffer 233 00002B69 16 <1> push ss 234 00002B6A 1F <1> pop ds 235 <1> 236 00002B6B 8B7E08 <1> mov di, [pszDbl] ; -> output buffer 237 <1> 238 <1> ; Check for a negative number. 239 00002B6E F646FB80 <1> test byte [fpin+9], 80h 240 00002B72 7407 <1> jz .ispositive 241 00002B74 8066FB7F <1> and byte [fpin+9], ~80h ; change to positive 242 00002B78 B02D <1> mov al, '-' ; store a minus sign 243 00002B7A AA <1> stosb 244 <1> .ispositive: 245 <1> 246 <1> ; Load our value onto the stack two times. 247 00002B7B DB6EF2 <1> fld tword [fpin] 248 00002B7E D9C0 <1> fld st0 249 <1> 250 <1> ; Compute the closest power of 10 below the number. We can't get an 251 <1> ; exact value because of rounding. We could get close by adding in 252 <1> ; log10(mantissa), but it still wouldn't be exact. Since we'll have to 253 <1> ; check the result anyway, it's silly to waste cycles worrying about 254 <1> ; the mantissa. 255 <1> ; 256 <1> ; The exponent is basically log2(fpin). Those of you who remember 257 <1> ; algebra realize that log2(fpin) x log10(2) = log10(fpin), which is 258 <1> ; what we want. 259 <1> 260 00002B80 D9F4 <1> fxtract ; ST = mantissa, exponent, fpin 261 00002B82 DDD8 <1> fstp st0 ; discard the mantissa 262 00002B84 D9EC <1> fldlg2 ; push log10(2) 263 00002B86 DEC9 <1> fmulp st1, st0 ; ST = log10(fpin), fpin 264 00002B88 DF5EFE <1> fistp word [iExp] ; ST = fpin 265 <1> 266 <1> ; An 8-byte double can carry almost 16 digits of precision. Actually, it's 267 <1> ; 15.9 digits, so some numbers close to 1E17 will be wrong in the bottom 268 <1> ; digit. If this is a concern, change the 18 or 16 to a 15. 269 <1> ; 270 <1> ; A 10-byte double can carry almost 19 digits, but fbstp only stores the 271 <1> ; guaranteed 18. Since we're doing 10-byte doubles, we check for 18 instead of 16. 272 <1> 273 00002B8B 837EFE12 <1> cmp word [iExp], 18 274 00002B8F 7332 <1> jae .notbelow18 275 00002B91 D9C0 <1> fld st0 ; ST = fpin, fpin 276 00002B93 D9FC <1> frndint ; ST = int(fpin), fpin 277 00002B95 D8D9 <1> fcomp st1 ; ST = fpin, status set 278 00002B97 9BDD7EFC <1> fstsw word [mystat] 279 00002B9B 8B46FC <1> mov ax, word [mystat] 280 00002B9E 9E <1> sahf 281 00002B9F 7522 <1> jne .notequal 282 <1> 283 <1> ; We have an integer! Lucky day. Go convert it into a temp buffer. 284 <1> 285 00002BA1 57 <1> push di 286 00002BA2 8D7EDC <1> lea di, [szTemp] 287 00002BA5 E884FF <1> call FloatToBCD 288 00002BA8 5F <1> pop di 289 <1> 290 00002BA9 B81100 <1> mov ax, 16+1 291 00002BAC 8B4EFE <1> mov cx, word [iExp] 292 00002BAF 29C8 <1> sub ax, cx 293 00002BB1 41 <1> inc cx 294 00002BB2 8D76DC <1> lea si, [szTemp] 295 00002BB5 01C6 <1> add si, ax 296 <1> 297 <1> ; The off-by-one order of magnitude problem below can hit us here. 298 <1> ; We just trim off the possible leading zero. 299 <1> 300 00002BB7 803C30 <1> cmp byte [si], '0' 301 00002BBA 7502 <1> jnz .not0digit 302 00002BBC 46 <1> inc si 303 00002BBD 49 <1> dec cx 304 <1> .not0digit: 305 <1> 306 <1> ; Copy the rest of the converted BCD value to our buffer. 307 <1> 308 00002BBE F3A4 <1> rep movsb 309 00002BC0 E99800 <1> jmp .ftsExit 310 <1> 311 <1> .notequal: 312 <1> .notbelow18: 313 <1> 314 <1> ; Have fbstp round to 17 places. 315 <1> 316 00002BC3 B81000 <1> mov ax, 16 ; experiment 317 00002BC6 2B46FE <1> sub ax, word [iExp] ; adjust exponent to 17 318 00002BC9 E809FF <1> call PowerOf10 319 <1> 320 <1> ; Either we have exactly 17 digits, or we have exactly 16 digits. We can 321 <1> ; detect that condition and adjust now. 322 <1> 323 00002BCC DC16[C884] <1> fcom qword [ten16] 324 <1> ; x0xxxx00 means top of stack > ten16 325 <1> ; x0xxxx01 means top of stack < ten16 326 <1> ; x1xxxx00 means top of stack = ten16 327 00002BD0 9BDD7EFC <1> fstsw word [mystat] 328 00002BD4 8B46FC <1> mov ax, word [mystat] 329 00002BD7 F6C401 <1> test ah, 1 330 00002BDA 7407 <1> jz .notset1 331 00002BDC DC0E[C084] <1> fmul qword [ten] 332 00002BE0 FF4EFE <1> dec word [iExp] 333 <1> .notset1: 334 <1> 335 <1> ; Go convert to BCD. 336 <1> 337 00002BE3 57 <1> push di 338 00002BE4 8D7EDC <1> lea di, [szTemp] 339 00002BE7 E842FF <1> call FloatToBCD 340 00002BEA 5F <1> pop di 341 <1> 342 00002BEB 8D76DD <1> lea si, [szTemp+1] ; point to converted buffer 343 <1> 344 <1> ; If the exponent is between -15 and 16, we should express this as a number 345 <1> ; without scientific notation. 346 <1> 347 00002BEE 8B4EFE <1> mov cx, word [iExp] 348 00002BF1 51 <1> push cx 349 00002BF2 83C10F <1> add cx, 15 350 00002BF5 83F91F <1> cmp cx, 15+16 351 00002BF8 59 <1> pop cx 352 00002BF9 7734 <1> ja .fts6 353 <1> 354 <1> ; If the exponent is less than zero, we insert '0.', then -cx 355 <1> ; leading zeros, then 16 digits of mantissa. If the exponent is 356 <1> ; positive, we copy cx+1 digits, then a decimal point (maybe), then 357 <1> ; the remaining 16-cx digits. 358 <1> 359 00002BFB 41 <1> inc cx 360 00002BFC 83F900 <1> cmp cx, byte 0 361 00002BFF 7F0F <1> jg .ispos1 362 00002C01 B8302E <1> mov ax, "0." 363 00002C04 AB <1> stosw 364 00002C05 F7D9 <1> neg cx 365 00002C07 B030 <1> mov al, '0' 366 00002C09 F3AA <1> rep stosb 367 00002C0B B91000 <1> mov cx, 16 368 00002C0E EB0B <1> jmp short .fts3 369 <1> .ispos1: 370 00002C10 F3A4 <1> rep movsb 371 00002C12 B02E <1> mov al, '.' 372 00002C14 AA <1> stosb 373 00002C15 B91000 <1> mov cx, 16 374 00002C18 2B4EFE <1> sub cx, word [iExp] 375 <1> .fts3: 376 00002C1B F3A4 <1> rep movsb 377 <1> 378 <1> ; Trim off trailing zeros. 379 <1> 380 <1> .nextitem2: 381 00002C1D 807DFF30 <1> cmp byte [di-1], '0' 382 00002C21 7503 <1> jne .fts1 383 00002C23 4F <1> dec di 384 00002C24 EBF7 <1> jmp short .nextitem2 385 <1> .fts1: 386 <1> 387 <1> ; If we cleared out all the decimal digits, kill the decimal point, too. 388 <1> 389 00002C26 807DFF2E <1> cmp byte [di-1], '.' 390 00002C2A 7501 <1> jnz .fts2 391 00002C2C 4F <1> dec di 392 <1> .fts2: 393 <1> 394 <1> ; That's it. 395 <1> 396 00002C2D EB2C <1> jmp short .ftsExit 397 <1> .fts6: 398 <1> 399 <1> ; Now convert this to a standard, usable format. If needed, a minus 400 <1> ; sign is already present in the outgoing buffer, and di already points 401 <1> ; past it. 402 <1> 403 00002C2F A4 <1> movsb ; copy the first digit 404 00002C30 B02E <1> mov al, '.' 405 00002C32 AA <1> stosb ; plop in a decimal point 406 00002C33 A5 <1> movsw 407 00002C34 A5 <1> movsw 408 00002C35 A5 <1> movsw ; copy six more digits 409 <1> 410 <1> %if 0 411 <1> 412 <1> ; The printf %g specified trims off trailing zeros here. I dislike 413 <1> ; this, so I've disabled it. Comment out the %if 0 and %endif if you 414 <1> ; want this. 415 <1> 416 <1> .fts61: 417 <1> cmp byte [di-1], '0' 418 <1> je .fts62 419 <1> dec di 420 <1> jmp short .fts61 421 <1> .fts62: 422 <1> %endif 423 <1> 424 <1> ; Shove in the exponent. If you support 10-byte reals, remember to 425 <1> ; allow 4 digits for the exponent. 426 <1> 427 00002C36 B8652B <1> mov ax, "e+" 428 00002C39 8B56FE <1> mov dx, word [iExp] 429 00002C3C 85D2 <1> test dx, dx 430 00002C3E 7904 <1> jns .fts7 431 00002C40 F7DA <1> neg dx 432 00002C42 B42D <1> mov ah, '-' 433 <1> .fts7: 434 00002C44 AB <1> stosw 435 <1> 436 00002C45 92 <1> xchg ax, dx 437 00002C46 BE0A00 <1> mov si, 10 438 00002C49 B90400 <1> mov cx, 4 439 <1> .fts8: 440 00002C4C 31D2 <1> xor dx, dx 441 00002C4E F7F6 <1> div si 442 00002C50 52 <1> push dx 443 00002C51 E2F9 <1> loop .fts8 444 00002C53 B104 <1> mov cl, 4 445 <1> .fts9: 446 00002C55 58 <1> pop ax 447 00002C56 0430 <1> add al, '0' 448 00002C58 AA <1> stosb 449 00002C59 E2FA <1> loop .fts9 450 <1> 451 <1> %if 0 452 <1> add di, byte 4 ; -> terminator 453 <1> %endif 454 <1> 455 <1> ; Clean up and go home. 456 <1> 457 <1> .ftsExit: 458 <1> ; fldcw [stat] ; restore control word 459 <1> ; fwait 460 <1> %if 0 461 <1> mov ax, di 462 <1> sub ax, word [pszDbl] 463 <1> mov cx, 21 464 <1> sub cx, ax 465 <1> mov al, 32 466 <1> rep stosb 467 <1> %endif 468 00002C5B 5F <1> pop di 469 00002C5C 07 <1> pop es 470 00002C5D 5E <1> pop si 471 00002C5E 1F <1> pop ds 472 <1> 473 00002C5F 89EC5D <1> lleave 474 00002C62 C20600 <1> lret 475 <1> 476 <1> %undef pfpin 477 <1> %undef pszDbl 478 <1> %undef iExp 479 <1> %undef mystat 480 <1> %undef fpin 481 <1> %undef szTemp 2352 %endif 2353 %include "run.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug code and commands (P, T, G) to run debuggee code 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2012 C. Masloch 8 <1> 9 <1> Usage of the works is permitted provided that this 10 <1> instrument is retained with the works, so that any entity 11 <1> that uses the works is notified of this instrument. 12 <1> 13 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 14 <1> 15 <1> %endif 16 <1> 17 <1> 18 <1> usesection lDEBUG_CODE 19 <1> 20 <1> gg_repeat: 21 00002C65 E868D9 <1> call guard_re 22 00002C68 800E[C800]20 <1> setopt [internalflags2], dif2_gg_again 23 00002C6D EB17 <1> jmp @F 24 <1> 25 <1> ; G command - go. 26 <1> gg: 27 00002C6F 4E <1> dec si 28 00002C70 4E <1> dec si 29 00002C71 BA[3966] <1> mov dx, msg.goto 30 00002C74 E87780 <1> call isstring? 31 00002C77 7503E98894 <1> je cmd_goto 32 00002C7C 46 <1> inc si 33 00002C7D AC <1> lodsb 34 <1> 35 00002C7E E84FD9 <1> call guard_re 36 <1> 37 00002C81 8026[C800]DF <1> clropt [internalflags2], dif2_gg_again 38 <1> @@: 39 00002C86 C706[F000][3873] <1> mov word [gg_deferred_message], msg.empty_message 40 00002C8C 8326[F200]00 <1> and word [bb_deferred_message_in_lineout_behind], 0 41 <1> 42 00002C91 BB[4A04] <1> mov bx, dmycmd 43 00002C94 F606[9600]02 <1> testopt [options], gg_no_autorepeat 44 00002C99 7503 <1> jnz @F 45 00002C9B BB[652C] <1> mov bx, gg_repeat 46 <1> @@: 47 00002C9E 891E[D20B] <1> mov word [lastcmd], bx 48 <1> 49 00002CA2 800E[C800]08 <1> setopt [internalflags2], dif2_gg_is_gg 50 00002CA7 8026[C800]E8 <1> clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 53 <1> 54 00002CAC FF36[880C] <1> push word [reg_cs] ; save original CS 55 00002CB0 8F06[CE0B] <1> pop word [eqladdr+4] 56 00002CB4 E88C15 <1> call parseql ; process =addr 57 <1> 58 00002CB7 F606[9600]01 <1> testopt [options], gg_do_not_skip_bp 59 00002CBC 752A <1> jnz .do_not_skip_cseip 60 00002CBE 800E[C800]01 <1> setopt [internalflags2], dif2_gg_is_first 61 <1> 62 00002CC3 803E[C80B]00 <1> cmp byte [eqflag], 0 63 00002CC8 7507 <1> jne .cseip_take_eql 64 <1> 65 <1> _386_PM_o32 ; xor ecx, ecx 66 00002CCA 31C9 <1> xor cx, cx 67 00002CCC E81608 <1> call get_cseip_ecx_linear 68 00002CCF EB0B <1> jmp .got_cseip 69 <1> 70 <1> .cseip_take_eql: 71 00002CD1 8B1E[CE0B] <1> mov bx, word [eqladdr + 4] 72 <1> _386_PM_o32 ; mov edx, dword [eqladdr] 73 00002CD5 8B16[CA0B] <1> mov dx, word [eqladdr] 74 00002CD9 E81308 <1> call getlinear 75 <1> .got_cseip: 76 00002CDC 7303E9DB6B <1> jc error 77 00002CE1 A3[E400] <1> mov word [gg_first_cseip_linear], ax 78 00002CE4 8916[E600] <1> mov word [gg_first_cseip_linear + 2], dx 79 <1> .do_not_skip_cseip: 80 <1> 81 <1> %ifn _NUM_G_BP 82 <1> call chkeol 83 <1> 84 <1> testopt [options3], opt3_gg_no_paging 85 <1> jz @F 86 <1> clropt [internalflags], pagedcommand 87 <1> @@: 88 <1> call tpg_initialise_empty_auxbuff 89 <1> 90 <1> %if _BREAKPOINTS 91 <1> call bb_writepoints_init_reset 92 <1> %endif 93 <1> 94 <1> %else 95 00002CE8 4E <1> dec si 96 00002CE9 E88780 <1> call skipcomma 97 00002CEC 4E <1> dec si 98 00002CED BA[3E73] <1> mov dx, msg.again 99 00002CF0 E8FB7F <1> call isstring? 100 00002CF3 7531 <1> jne @F ; (after this, do not dec si!) 101 <1> 102 <1> gg_again: 103 <1> 104 <1> %if _AUXBUFFSIZE < (BPSIZE * _NUM_G_BP + 1) 105 <1> %error auxbuff not large enough for gg breakpoint list 106 <1> %endif 107 <1> 108 00002CF5 56 <1> push si 109 00002CF6 BE[4B07] <1> mov si, g_bplist.used_count 110 00002CF9 31C0 <1> xor ax, ax 111 00002CFB AC <1> lodsb ; ax = number of breakpoints set yet 112 00002CFC 4E <1> dec si ; -> gg breakpoint list 113 00002CFD 89C1 <1> mov cx, ax 114 00002CFF 01C9 <1> add cx, cx 115 00002D01 01C9 <1> add cx, cx ; * 4 116 <1> %if BPSIZE == 4 117 <1> %elif BPSIZE == 5 118 <1> add cx, ax ; * 5 119 <1> %elif BPSIZE == 6 120 00002D03 01C1 <1> add cx, ax ; * 5 121 00002D05 01C1 <1> add cx, ax ; * 6 122 <1> %elif BPSIZE == 9 123 <1> add cx, cx ; * 8 124 <1> add cx, ax ; * 9 125 <1> %else 126 <1> %error Unexpected breakpoint size 127 <1> %endif 128 00002D07 41 <1> inc cx ; include the count 129 00002D08 E8A9D8 <1> call guard_auxbuff 130 00002D0B 8E06[2A0A] <1> mov es, word [auxbuff_segorsel] 131 00002D0F 31FF <1> xor di, di ; es:di -> auxbuff 132 00002D11 F3A4 <1> rep movsb ; initialise auxbuff list 133 <1> 134 00002D13 5E <1> pop si ; si -> separator after "AGAIN" keyword 135 00002D14 BF0100 <1> mov di, 1 ; -> first point 136 00002D17 89C1 <1> mov cx, ax 137 00002D19 B0CC <1> mov al, 0CCh 138 00002D1B E306 <1> jcxz .end 139 <1> .loop: 140 00002D1D 83C705 <1> add di, BPSIZE - 1 ; -> point content 141 00002D20 AA <1> stosb ; initialise breakpoint content 142 00002D21 E2FA <1> loop .loop 143 <1> .end: 144 <1> ; es:di -> after last breakpoint in array 145 00002D23 E99600 <1> jmp gg3 ; parse additional points (do not dec si!) 146 <1> 147 <1> @@: 148 00002D26 F606[C800]20 <1> testopt [internalflags2], dif2_gg_again 149 00002D2B 75C8 <1> jnz gg_again 150 <1> 151 <1> 152 <1> gg_list: 153 00002D2D BA[3973] <1> mov dx, msg.list 154 00002D30 E8BB7F <1> call isstring? 155 00002D33 757B <1> jne .not 156 <1> 157 00002D35 AC <1> lodsb 158 00002D36 E82980 <1> call chkeol 159 <1> 160 00002D39 800E[C800]05 <1> setopt [internalflags2], dif2_gg_is_first | dif2_gg_skip_cseip 161 <1> 162 00002D3E BE[4C07] <1> mov si, g_bplist.bp 163 00002D41 31C9 <1> xor cx, cx 164 00002D43 8A4CFF <1> mov cl, byte [si - 1] 165 00002D46 31DB <1> xor bx, bx 166 00002D48 E360 <1> jcxz .none 167 <1> .loop: 168 00002D4A 43 <1> inc bx 169 00002D4B 51 <1> push cx 170 00002D4C 53 <1> push bx 171 <1> 172 00002D4D 89D8 <1> mov ax, bx ; 1-based index 173 00002D4F BF[AE07] <1> mov di, line_out 174 00002D52 E80007 <1> call ordinalbyte 175 <1> 176 00002D55 57 <1> push di 177 00002D56 81EF[B107] <1> sub di, line_out + 1 + 2 178 <1> ; 1 = a digit, 2 = ordinal suffix, 179 <1> ; result = how many additional digits are used 180 00002D5A BA[D472] <1> mov dx, msg.list_bp.first 181 00002D5D 01FA <1> add dx, di 182 00002D5F E89E84 <1> call putsz ; show blanks first 183 00002D62 5F <1> pop di 184 00002D63 E82381 <1> call putsline 185 <1> 186 00002D66 E85E04 <1> call gg_bb_lods_bp_linear 187 <1> ; BPSIZE implied 188 <1> 189 00002D69 BF[EE72] <1> mov di, msg.list_bp.address1 190 00002D6C 92 <1> xchg ax, dx 191 00002D6D E8DD80 <1> call hexword 192 00002D70 47 <1> inc di 193 <1> ; mov di, msg.list_bp.address2 194 00002D71 92 <1> xchg ax, dx 195 00002D72 E8D880 <1> call hexword 196 <1> 197 00002D75 E8A306 <1> call gg_bb_check_is_first 198 <1> ; we set up the dif2_gg_skip_cseip flag, 199 00002D78 B9[0577] <1> mov cx, msg.list_bp_not_cseip 200 <1> ; so if CY (do not skip), initialise this 201 00002D7B 7203 <1> jc .not_cseip 202 <1> ; if NC (do skip), use other string 203 <1> %if _PM 204 <1> push bx 205 <1> mov bx, word [reg_cs] 206 <1> cmp byte [eqflag], 0 207 <1> je @F 208 <1> mov bx, word [eqladdr + 4] 209 <1> @@: 210 <1> call test_d_b_bit 211 <1> pop bx 212 <1> mov cx, msg.list_bp_cseip_32 213 <1> jnz @F ; if 32-bit cs --> 214 <1> %endif 215 00002D7D B9[0573] <1> mov cx, msg.list_bp_csip_16 216 <1> @@: 217 <1> .not_cseip: 218 <1> %if BPSIZE == 6 || BPSIZE == 9 219 <1> ; INP: dx:ax = linear address 220 <1> ; si -> (d)word offset 221 <1> ; di -> where to store 222 <1> ; OUT: cx = length displayed 223 <1> ; si -> after offset 224 <1> ; di -> after stored string 225 <1> ; CHG: ax, dx 226 00002D80 51 <1> push cx 227 00002D81 BF[AE07] <1> mov di, line_out 228 00002D84 E8BA53 <1> call bp_display_offset ; BPSIZE implied 229 00002D87 57 <1> push di 230 <1> %endif 231 00002D88 BF[0273] <1> mov di, msg.list_bp.value 232 00002D8B AC <1> lodsb ; BPSIZE implied 233 00002D8C E8C580 <1> call hexbyte 234 <1> 235 00002D8F BA[D872] <1> mov dx, msg.list_bp.second 236 00002D92 E86B84 <1> call putsz 237 <1> 238 <1> %if BPSIZE == 6 || BPSIZE == 9 239 00002D95 5F <1> pop di 240 00002D96 E8F080 <1> call putsline 241 00002D99 59 <1> pop cx 242 <1> %endif 243 <1> 244 00002D9A BA[F872] <1> mov dx, msg.list_bp.third 245 00002D9D E86084 <1> call putsz 246 <1> 247 00002DA0 89CA <1> mov dx, cx 248 00002DA2 E85B84 <1> call putsz 249 <1> 250 00002DA5 5B <1> pop bx 251 00002DA6 59 <1> pop cx 252 00002DA7 E2A1 <1> loop .loop 253 <1> .end: 254 <1> ; mov dx, msg.list_bp_first_detected 255 <1> ; testopt [internalflags2], dif2_gg_first_detected 256 <1> ; jnz .putsz 257 00002DA9 C3 <1> retn 258 <1> 259 <1> .none: 260 00002DAA BA[1673] <1> mov dx, msg.list_bp_none 261 <1> .putsz: 262 00002DAD E95084 <1> jmp putsz 263 <1> 264 <1> .not: 265 <1> 266 <1> ; Store the address of each breakpoint into the buffer. We also 267 <1> ; make sure that there aren't too many breakpoints. (The user can 268 <1> ; specify them with 2 byte per breakpoints which gives about 128 269 <1> ; breakpoints with a full command line.) The breakpoints will only 270 <1> ; be set later when we have verified that the line contains no 271 <1> ; syntax errors and that there aren't too many breakpoints. 272 <1> ; 273 <1> ; Note: With "G AGAIN" (or the gg_repeat handler), the user 274 <1> ; can actually specify an arbitrary amount of 275 <1> ; breakpoints. However, we limit the amount. 276 <1> %if _AUXBUFFSIZE < (BPSIZE * _NUM_G_BP + 1) 277 <1> %error auxbuff not large enough for gg breakpoint list 278 <1> %endif 279 00002DB0 E801D8 <1> call guard_auxbuff 280 00002DB3 8E06[2A0A] <1> mov es, word [auxbuff_segorsel] 281 00002DB7 31FF <1> xor di, di ; es:di -> auxbuff 282 00002DB9 31C0 <1> xor ax, ax 283 00002DBB AA <1> stosb ; counter of saved breakpoints 284 <1> gg3: 285 <1> ; dec si ; don't use skipcomm0 instead - need to restore al 286 00002DBC E8B47F <1> call skipcomma 287 00002DBF E88B7F <1> call iseol? 288 00002DC2 744F <1> je gg4 ; if done --> 289 <1> 290 00002DC4 06 <1> push es 291 00002DC5 16 <1> push ss 292 00002DC6 07 <1> pop es ; set STT es = ds = ss 293 00002DC7 4E <1> dec si 294 00002DC8 BA[3066] <1> mov dx, msg.remember 295 00002DCB E8207F <1> call isstring? 296 00002DCE AC <1> lodsb 297 00002DCF 7517 <1> jne @F 298 <1> 299 00002DD1 E88E7F <1> call chkeol 300 00002DD4 89F9 <1> mov cx, di ; -> after last point, = size of list 301 00002DD6 1E <1> push ds 302 00002DD7 07 <1> pop es 303 00002DD8 1F <1> pop ds ; swap 304 00002DD9 31F6 <1> xor si, si ; ds:si -> auxbuff 305 00002DDB BF[4B07] <1> mov di, g_bplist.used_count 306 <1> ; es:di -> gg breakpoint list 307 00002DDE F3A4 <1> rep movsb ; copy list over 308 00002DE0 16 <1> push ss 309 00002DE1 1F <1> pop ds ; reset segregs 310 00002DE2 8026[CF00]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 311 00002DE7 C3 <1> retn 312 <1> 313 <1> @@: 314 00002DE8 8B1E[CE0B] <1> mov bx, word [eqladdr+4]; default segment 315 00002DEC E82307 <1> call getlinearaddr ; get linear address into bx:dx (CHG edx) 316 00002DEF 07 <1> pop es 317 00002DF0 7303E9C76A <1> jc error 318 00002DF5 26803E000010 <1> cmp byte [es:0], _NUM_G_BP 319 00002DFB 7203E9BC6A <1> jae error ; can't store another breakpoint, g_bplist is full --> 320 00002E00 92 <1> xchg ax, dx ; ax = low word 321 00002E01 AB <1> stosw 322 00002E02 93 <1> xchg ax, bx ; to store high byte/word 323 <1> %if _PM 324 <1> stosw 325 <1> %else 326 00002E03 AA <1> stosb ; bits 24-31 (dh) always zero in 21-bit addresses 327 <1> %endif 328 <1> ; BPSIZE implied 329 <1> %if BPSIZE == 6 330 00002E04 A1[B086] <1> mov ax, word [bp_offset] 331 00002E07 AB <1> stosw ; write offset (R86M-only 16-bit) 332 <1> %elif BPSIZE == 9 333 <1> mov ax, word [bp_offset] 334 <1> stosw 335 <1> mov ax, word [bp_offset + 2] 336 <1> stosw ; write offset (PM 32-bit) 337 <1> %endif 338 00002E08 B0CC <1> mov al, 0CCh 339 00002E0A AA <1> stosb ; later filled with the byte read from this address 340 00002E0B 26FE060000 <1> inc byte [es:0] ; increment count 341 00002E10 4E <1> dec si 342 00002E11 EBA9 <1> jmp short gg3 343 <1> 344 <1> gg4: 345 00002E13 89F9 <1> mov cx, di ; -> after last point, = size of list 346 00002E15 06 <1> push es 347 00002E16 1E <1> push ds 348 00002E17 07 <1> pop es 349 00002E18 1F <1> pop ds ; swap 350 00002E19 31F6 <1> xor si, si ; ds:si -> auxbuff 351 00002E1B BF[4B07] <1> mov di, g_bplist.used_count 352 <1> ; es:di -> gg breakpoint list 353 00002E1E F3A4 <1> rep movsb ; copy list over 354 00002E20 16 <1> push ss 355 00002E21 1F <1> pop ds ; reset segregs 356 00002E22 8026[CF00]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 357 <1> 358 00002E27 F606[9C00]08 <1> testopt [options3], opt3_gg_no_paging 359 00002E2C 7405 <1> jz @F 360 00002E2E 8026[C400]F7 <1> clropt [internalflags], pagedcommand 361 <1> @@: 362 <1> 363 <1> gg5: 364 00002E33 E80214 <1> call tpg_initialise_empty_auxbuff 365 <1> %if _BREAKPOINTS 366 00002E36 E81004 <1> call bb_writepoints_init_reset 367 <1> ; try to write bb points 368 <1> ; (detect and write to cseip point too) 369 <1> ; If this fails, it handles the errors and tries to restore 370 <1> ; all its own points, then aborts the command. 371 <1> 372 <1> ; This call might return modeswitched. 373 <1> %endif 374 00002E39 BE[4B07] <1> mov si, g_bplist.used_count 375 00002E3C 31C0 <1> xor ax, ax 376 00002E3E AC <1> lodsb ; si-> first point 377 00002E3F 89C1 <1> mov cx, ax ; cx = number of saved breakpoints 378 00002E41 51 <1> push cx 379 00002E42 E87A05 <1> call gg_writepoints ; Store breakpoint bytes in the given locations. 380 00002E45 5A <1> pop dx 381 <1> ; dx = number of points tried to write 382 <1> ; cx = number of points not written 383 00002E46 7342 <1> jnc .points_set ; successful --> 384 <1> 385 <1> 386 <1> ; Failure to write to a gg breakpoint. Now the fun starts! 387 00002E48 29CA <1> sub dx, cx ; = number of points written 388 00002E4A 89D1 <1> mov cx, dx 389 <1> ; We now first have to try restoring all the points we 390 <1> ; already set because they might be inside the DOS or 391 <1> ; BIOS handlers we would otherwise call. So instead of 392 <1> ; displaying errors as we detect them, all the intel is 393 <1> ; stored first until all points have been taken care of 394 <1> ; (if possible). We then display error messages. 395 <1> %if _BREAKPOINTS 396 00002E4C 83EC20 <1> sub sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 397 <1> ; reserve space for bb error info 398 <1> %endif 399 00002E4F 89E5 <1> mov bp, sp ; -> behind gg error info, -> bb error info 400 00002E51 01D2 <1> add dx, dx 401 00002E53 29D4 <1> sub sp, dx ; reserve space for gg error info 402 00002E55 50 <1> push ax ; store error info on point that failed to be written 403 <1> 404 <1> ; The gg points were written last, so restore them first. 405 00002E56 E86E04 <1> call gg_restorepoints_and_init_error_info 406 <1> %if _BREAKPOINTS 407 00002E59 51 <1> push cx 408 <1> ; Next, restore the bb points. 409 00002E5A B91000 <1> mov cx, _NUM_B_BP + _NUM_SYM_BP 410 <1> ; = index above last one to restore 411 00002E5D E8B704 <1> call bb_restorepoints_and_init_error_info 412 00002E60 59 <1> pop cx ; (preserve index of failed gg point) 413 <1> %endif 414 00002E61 58 <1> pop ax 415 <1> 416 00002E62 E88E01 <1> call put_deferred_message_silent 417 <1> ; CHG: dx 418 <1> 419 <1> ; ax = info on initially failed point 420 <1> ; cx = 0-based index of initially failed point 421 <1> ; = number of points tried to restore 422 00002E65 89CE <1> mov si, cx 423 00002E67 01F6 <1> add si, si 424 00002E69 01F6 <1> add si, si ; *4 425 <1> %if BPSIZE == 4 426 <1> %elif BPSIZE == 5 427 <1> add si, cx ; * 5 428 <1> %elif BPSIZE == 6 429 00002E6B 01CE <1> add si, cx ; * 5 430 00002E6D 01CE <1> add si, cx ; * 6 431 <1> %elif BPSIZE == 9 432 <1> add si, si ; * 8 433 <1> add si, cx ; * 9 434 <1> %else 435 <1> %error Unexpected breakpoint size 436 <1> %endif 437 00002E6F 81C6[4C07] <1> add si, g_bplist.bp 438 <1> 439 <1> ; si-> point 440 <1> ; ax = info (ah = reason, al = new value if reason 3) 441 <1> ; cx = 0-based index of initially failed point 442 00002E73 51 <1> push cx 443 00002E74 FF7402 <1> push word [si + 2] 444 00002E77 FF34 <1> push word [si] ; stack: linear address 445 00002E79 BB0080 <1> mov bx, 8000h ; bh = 80h (gg), 446 <1> ; bl = what we tried to restore (n/a) 447 00002E7C E8480E <1> call display_breakpoint_failure 448 00002E7F 59 <1> pop cx 449 00002E80 E82906 <1> call gg_handlefailedrestore 450 <1> %if _BREAKPOINTS 451 00002E83 E8F705 <1> call bb_handlefailedrestore 452 00002E86 8D6620 <1> lea sp, [bp + (_NUM_B_BP + _NUM_SYM_BP) * 2] 453 <1> %else 454 <1> mov sp, bp 455 <1> %endif 456 <1> ; (discard bb + gg error info) 457 00002E89 C3 <1> retn 458 <1> 459 <1> 460 <1> .points_set: 461 <1> ; All bb and gg points were successfully written. 462 <1> ; Next: Handle cseip case, if such a point has been detected. 463 <1> 464 <1> 465 <1> ; old cseip breakpoint handling comment: 466 <1> ; interrupt ? emuint : .isstdtrace (including DPMI hack, pushf handling) 467 <1> 468 <1> %endif ; _NUM_G_BP 469 <1> 470 <1> 471 <1> %if _NUM_G_BP || _BREAKPOINTS 472 00002E8A F606[C800]10 <1> testopt [internalflags2], dif2_gg_first_detected 473 00002E8F 7503E90901 <1> jz .only_run ; easy case, no cseip point detected --> 474 <1> 475 <1> 476 <1> ; Enter special mode: Restore cseip breakpoint content. 477 00002E94 800E[C800]02 <1> setopt [internalflags2], dif2_gg_skip_non_cseip 478 <1> 479 00002E99 89D1 <1> mov cx, dx ; = number of points set 480 <1> %if _BREAKPOINTS 481 00002E9B 83EC20 <1> sub sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 482 <1> %endif 483 00002E9E 89E5 <1> mov bp, sp ; -> behind error info 484 <1> %if _NUM_G_BP 485 00002EA0 89CA <1> mov dx, cx 486 00002EA2 01D2 <1> add dx, dx 487 00002EA4 29D4 <1> sub sp, dx 488 00002EA6 E81E04 <1> call gg_restorepoints_and_init_error_info 489 <1> 490 00002EA9 7326 <1> jnc .gg_restore_cseip_success 491 <1> 492 <1> 493 <1> ; Error in gg_restorepoints. Try to restore other gg, all bb. 494 <1> 495 <1> ; Exit special mode: Handle non-cseip breakpoints again. 496 00002EAB 8026[C800]FD <1> clropt [internalflags2], dif2_gg_skip_non_cseip 497 <1> 498 <1> ; Enter special mode: Skip cseip breakpoints. 499 00002EB0 800E[C800]04 <1> setopt [internalflags2], dif2_gg_skip_cseip 500 <1> 501 <1> ; As we already tried to restore all cseip gg points, 502 <1> ; here we skip these in the gg_restorepoints call. 503 00002EB5 E81204 <1> call gg_restorepoints 504 <1> 505 <1> ; Exit special mode: No longer skip cseip breakpoints. 506 00002EB8 8026[C800]FB <1> clropt [internalflags2], dif2_gg_skip_cseip 507 <1> 508 <1> ; Any cseip bb points aren't yet restored, so do not skip them. 509 <1> %if _BREAKPOINTS 510 00002EBD 51 <1> push cx 511 00002EBE B91000 <1> mov cx, _NUM_B_BP + _NUM_SYM_BP 512 00002EC1 E85304 <1> call bb_restorepoints_and_init_error_info 513 00002EC4 59 <1> pop cx 514 <1> %endif 515 <1> %else 516 <1> jmp .gg_restore_cseip_success 517 <1> %endif 518 <1> 519 <1> .gg_bb_cseip_fail_common: 520 <1> ; The failure that led us here is already noted in the info. 521 <1> %if _NUM_G_BP 522 00002EC5 E8E405 <1> call gg_handlefailedrestore 523 <1> %endif 524 <1> %if _BREAKPOINTS 525 00002EC8 E8B205 <1> call bb_handlefailedrestore 526 <1> %endif 527 <1> %if _NUM_G_BP 528 <1> %if _BREAKPOINTS 529 00002ECB 8D6620 <1> lea sp, [bp + (_NUM_B_BP + _NUM_SYM_BP) * 2] 530 <1> %else 531 <1> mov sp, bp 532 <1> %endif 533 <1> %elif _BREAKPOINTS 534 <1> add sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 535 <1> %endif 536 00002ECE E92FD1 <1> jmp cmd3 537 <1> 538 <1> .gg_restore_cseip_success: 539 <1> %if _BREAKPOINTS 540 00002ED1 B91000 <1> mov cx, (_NUM_B_BP + _NUM_SYM_BP) 541 <1> ; = index above last one to restore 542 00002ED4 E84004 <1> call bb_restorepoints_and_init_error_info 543 00002ED7 7322 <1> jnc @F ; no error ? --> 544 <1> 545 <1> ; Error in bb_restorepoints. Try to restore other gg, other bb. 546 <1> 547 <1> ; Exit special mode: Handle non-cseip breakpoints again. 548 00002ED9 8026[C800]FD <1> clropt [internalflags2], dif2_gg_skip_non_cseip 549 <1> 550 <1> ; Enter special mode: Skip cseip breakpoints. 551 00002EDE 800E[C800]04 <1> setopt [internalflags2], dif2_gg_skip_cseip 552 <1> 553 <1> ; As we already tried to restore all cseip gg and bb points, 554 <1> ; here we skip these in the bb_restorepoints call. 555 <1> %if _NUM_G_BP 556 00002EE3 31C9 <1> xor cx, cx 557 00002EE5 8A0E[4B07] <1> mov cl, byte [g_bplist.used_count] 558 00002EE9 E8DE03 <1> call gg_restorepoints 559 00002EEC 51 <1> push cx 560 <1> %endif 561 00002EED B91000 <1> mov cx, _NUM_B_BP + _NUM_SYM_BP 562 00002EF0 E82704 <1> call bb_restorepoints 563 <1> %if _NUM_G_BP 564 00002EF3 59 <1> pop cx 565 <1> %endif 566 <1> 567 <1> ; Exit special mode: No longer skip cseip breakpoints. 568 00002EF4 8026[C800]FB <1> clropt [internalflags2], dif2_gg_skip_cseip 569 <1> 570 00002EF9 EBCA <1> jmp .gg_bb_cseip_fail_common 571 <1> 572 <1> @@: 573 <1> ; Success! Now discard the reserved error info. 574 00002EFB 8D6620 <1> lea sp, [bp + (_NUM_B_BP + _NUM_SYM_BP) * 2] 575 <1> %else 576 <1> mov sp, bp 577 <1> %endif 578 <1> 579 <1> ; Special mode restoration handled. Now trace one instruction. 580 <1> ; (Proceed if repeated string op or interrupt.) 581 <1> %if _PM 582 <1> call resetmode 583 <1> %endif 584 00002EFE E86213 <1> call seteq ; make the = operand take effect 585 00002F01 BA0F00 <1> mov dx, 15 ; DL = number of bytes to go; DH = prefix flags. 586 00002F04 8B1E[880C] <1> mov bx, word [reg_cs] 587 <1> _386_PM_o32 ; mov esi, dword [reg_eip] 588 00002F08 8B36[940C] <1> mov si, word [reg_eip] 589 <1> .pp2: 590 00002F0C E8F60E <1> call pp16 ; get next instruction byte into AL 591 00002F0F BF[1C11] <1> mov di, ppbytes 592 00002F12 B91900 <1> mov cx, PPLEN_ONLY_STRING 593 <1> %if _SYMBOLIC 594 <1> mov byte [pp_instruction], al 595 <1> %endif 596 00002F15 F2AE <1> repne scasb 597 00002F17 7521 <1> jne .not_p ; if not one of these --> 598 00002F19 8A451F <1> mov al,byte [di+PPLEN-1]; get corresponding byte in ppinfo 599 00002F1C A880 <1> test al, PP_PREFIX ; prefix ? 600 00002F1E 740E <1> jz .pp3 ; no --> 601 00002F20 08C6 <1> or dh, al ; set the OSIZE or ASIZE flags if either of these 602 <1> ; Note: Multiple OSIZE in a 16-bit cs do not toggle 603 <1> ; between decoding as O32 and O16, they're always 604 <1> ; decoded as O32. The same is true for A32, and 605 <1> ; in a 32-bit cs for O16 and A16. 606 00002F22 FECA <1> dec dl 607 00002F24 75E6 <1> jnz .pp2 ; if not out of bytes --> 608 00002F26 C706[F000][AE74] <1> mov word [gg_deferred_message], msg.warnprefix 609 00002F2C EB0C <1> jmp .not_p 610 <1> 611 <1> ; A repeatable string instruction is to be decoded. 612 <1> ; Finish the decoding and skip the appropriate number 613 <1> ; of opcode bytes. 614 <1> .pp3: 615 <1> _386_PM call pp_fix32bitflags 616 00002F2E A847 <1> test al, PP_VARSIZ | PP_SIZ_MASK 617 00002F30 7403E98769 <1> jnz error 618 <1> %if 0 619 <1> test al, PP_VARSIZ ; different opcode length depends on OSIZE ? 620 <1> jz .ignoreosize ; no --> 621 <1> and dh, 2 622 <1> add al, dh 623 <1> .ignoreosize: 624 <1> and ax, PP_SIZ_MASK 625 <1> _386_PM movzx eax, ax ; clear high word (in case it counts) 626 <1> _386_PM_o32 ; add esi, eax 627 <1> add si, ax 628 <1> %endif 629 <1> ; pp10: 630 <1> %if _SYMBOLIC 631 <1> call pp3_check_symhints 632 <1> jc .not_p ; trace --> 633 <1> %endif 634 <1> ; jmp short pp11 ; we have a skippable instruction here 635 <1> ; pp11: 636 <1> _386_PM call test_d_b_bit 637 <1> _386_PM jnz .32 ; full 32-bit offset valid --> 638 <1> _386_PM movzx esi, si ; clear high word here 639 <1> .32: 640 00002F35 E8370E <1> call proceedbreakpoint ; run until the breakpoint is hit 641 <1> ; This call might return modeswitched. 642 00002F38 EB03 <1> jmp short @F 643 <1> 644 <1> .not_p: 645 00002F3A E8AA09 <1> call traceone ; call common code 646 <1> @@: 647 00002F3D 9C <1> pushf 648 <1> 649 <1> ; Exit special mode, do not skip non-cseip breakpoints anymore. 650 00002F3E 8026[C800]FD <1> clropt [internalflags2], dif2_gg_skip_non_cseip 651 <1> 652 <1> ; Enter special mode: Skip matching/restoring cseip breakpoint. 653 00002F43 800E[C800]04 <1> setopt [internalflags2], dif2_gg_skip_cseip 654 <1> 655 00002F48 F6C47F <1> test ah, 7Fh ; error happened during proceedbreakpoint ? 656 00002F4B 743D <1> jz @F ; no --> 657 <1> 658 00002F4D 59 <1> pop cx ; (discard flags on stack) 659 <1> 660 <1> %if _NUM_G_BP 661 00002F4E 31C9 <1> xor cx, cx 662 00002F50 8A0E[4B07] <1> mov cl, byte [g_bplist.used_count] 663 <1> %endif 664 <1> 665 <1> %if _BREAKPOINTS 666 00002F54 83EC20 <1> sub sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 667 <1> ; reserve space for bb error info 668 <1> %endif 669 00002F57 89E5 <1> mov bp, sp ; -> behind gg error info, -> bb error info 670 <1> %if _NUM_G_BP 671 00002F59 89CA <1> mov dx, cx 672 00002F5B 01D2 <1> add dx, dx 673 00002F5D 29D4 <1> sub sp, dx ; reserve space for gg error info 674 <1> %endif 675 00002F5F 50 <1> push ax 676 <1> %if _NUM_G_BP 677 00002F60 E86403 <1> call gg_restorepoints_and_init_error_info 678 <1> %endif 679 <1> %if _BREAKPOINTS 680 00002F63 51 <1> push cx 681 00002F64 B91000 <1> mov cx, _NUM_B_BP + _NUM_SYM_BP 682 00002F67 E8AD03 <1> call bb_restorepoints_and_init_error_info 683 00002F6A 59 <1> pop cx 684 <1> %endif 685 <1> ; Exit special mode: No longer skip cseip breakpoints. 686 00002F6B 8026[C800]FB <1> clropt [internalflags2], dif2_gg_skip_cseip 687 00002F70 58 <1> pop ax 688 00002F71 51 <1> push cx 689 <1> 690 <1> %if _PM 691 <1> call resetmode 692 <1> %endif 693 00002F72 E87E00 <1> call put_deferred_message_silent 694 <1> 695 00002F75 FF36[F600] <1> push word [tpg_proceed_bp + 2] 696 00002F79 FF36[F400] <1> push word [tpg_proceed_bp] 697 00002F7D 8A1E[F900] <1> mov bl, [tpg_proceed_bp + BPSIZE - 1] 698 00002F81 B700 <1> mov bh, 0 ; proceed breakpoint 699 00002F83 E8410D <1> call display_breakpoint_failure 700 00002F86 59 <1> pop cx 701 00002F87 E93BFF <1> jmp .gg_bb_cseip_fail_common 702 <1> 703 <1> 704 <1> @@: 705 00002F8A 9D <1> popf ; CF 706 <1> 707 00002F8B 7218 <1> jc .after_run ; an unexpected interrupt occured --> 708 <1> 709 00002F8D E83A00 <1> call .after_run_restore ; restore stuff 710 00002F90 E83B02 <1> call gg_bb_check_hit ; expected interrupt matches our gg or bb ? 711 00002F93 731E <1> jnc .expectedinterrupt ; yes, handle expected interrupt --> 712 <1> 713 <1> 714 <1> ; Clear all special modes. Stop specialcasing cseip breakpoint. 715 00002F95 8026[C800]E8 <1> clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 718 00002F9A E996FE <1> jmp gg5 ; next write all points and run --> 719 <1> %endif ; _NUM_G_BP || _BREAKPOINTS 720 <1> 721 <1> .only_run: 722 <1> ; Clear all special modes. Stop specialcasing cseip breakpoint. 723 00002F9D 8026[C800]E8 <1> clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 726 <1> 727 00002FA2 E8F00E <1> call run ; Now run the program. 728 <1> .after_run: 729 <1> %if _NUM_G_BP || _BREAKPOINTS 730 00002FA5 E82200 <1> call .after_run_restore 731 <1> 732 00002FA8 E82302 <1> call gg_bb_check_hit 733 <1> .after_gg_bb_check_hit: 734 00002FAB 7306 <1> jnc .expectedinterrupt 735 <1> %endif ; _NUM_G_BP || _BREAKPOINTS 736 <1> .unexpectedinterrupt: 737 <1> %if _PM 738 <1> call resetmode 739 <1> %endif 740 00002FAD E84300 <1> call put_deferred_message_silent 741 00002FB0 E9FE08 <1> jmp unexpectedinterrupt ; print messages for unexpected breakpoint and quit. 742 <1> 743 <1> %if _NUM_G_BP || _BREAKPOINTS 744 <1> .expectedinterrupt: 745 00002FB3 E85F00 <1> call adjust_cseip_after_breakpoint 746 <1> ; it's one of our breakpoints, adjust (e)ip 747 <1> 748 00002FB6 89C1 <1> mov cx, ax ; handle_bb_* expects flags in cx 749 00002FB8 50 <1> push ax 750 00002FB9 50 <1> push ax ; handle_bb_* expects dword counter on stack 751 00002FBA E8AC07 <1> call handle_bb_hit_pass_match 752 00002FBD 58 <1> pop ax 753 00002FBE 58 <1> pop ax ; discard 754 00002FBF 7203E96FFE <1> jnc gg5 ; if it was a pass non-hit or non-pass non-hit 755 <1> ; then jump back to do a subsequent G step 756 <1> ; If jumping, the function has set up gg_first_cseip_linear 757 <1> ; with the current CS:(E)IP so that the next step will start 758 <1> ; out with skipping past the breakpoint(s) on that address. 759 <1> ; Note that gg_bb_check_hit returns ax = 7 if a gg point is 760 <1> ; hit, so we always fall through to .actual_hit here. 761 <1> 762 <1> .actual_hit: 763 <1> %if _PM 764 <1> call resetmode 765 <1> %endif 766 00002FC4 E82C00 <1> call put_deferred_message_silent 767 <1> ; (put bb message after gg_bb_check_hit call) 768 00002FC7 E9D70B <1> jmp dumpregs_extended_silent 769 <1> ; (handles sf_(double_)ctrl_c) 770 <1> %endif 771 <1> 772 <1> 773 <1> .after_run_restore: 774 <1> %if _NUM_G_BP || _BREAKPOINTS 775 00002FCA 83EC20 <1> sub sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 776 <1> ; reserve space for bb error info 777 00002FCD 89E5 <1> mov bp, sp ; -> behind gg error info, -> bb error info 778 <1> %if _NUM_G_BP 779 00002FCF 31C9 <1> xor cx, cx 780 00002FD1 8A0E[4B07] <1> mov cl, byte [g_bplist.used_count] 781 00002FD5 89CA <1> mov dx, cx 782 00002FD7 01D2 <1> add dx, dx 783 00002FD9 29D4 <1> sub sp, dx ; reserve space for gg error info 784 00002FDB E8E902 <1> call gg_restorepoints_and_init_error_info 785 <1> ; try restoring gg points, and fill error info 786 <1> %endif 787 <1> %if _BREAKPOINTS 788 00002FDE 51 <1> push cx 789 00002FDF B91000 <1> mov cx, _NUM_B_BP + _NUM_SYM_BP 790 <1> ; = index above last one to restore 791 00002FE2 E83203 <1> call bb_restorepoints_and_init_error_info 792 <1> ; try restoring bb points, and fill error info 793 00002FE5 59 <1> pop cx 794 <1> %endif 795 <1> 796 <1> %if _PM 797 <1> call resetmode 798 <1> %endif 799 00002FE6 E80A00 <1> call put_deferred_message_silent 800 <1> 801 <1> %if _NUM_G_BP 802 00002FE9 E8C004 <1> call gg_handlefailedrestore 803 <1> ; handle gg point restore failures 804 <1> %endif 805 <1> %if _BREAKPOINTS 806 00002FEC E88E04 <1> call bb_handlefailedrestore 807 <1> ; handle bb point restore failures 808 <1> %endif 809 <1> %if _NUM_G_BP 810 <1> %if _BREAKPOINTS 811 00002FEF 8D6620 <1> lea sp, [bp + (_NUM_B_BP + _NUM_SYM_BP) * 2] 812 <1> %else 813 <1> mov sp, bp ; remove the stack frame 814 <1> %endif 815 <1> %else 816 <1> add sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 817 <1> %endif 818 <1> %endif ; _NUM_G_BP || _BREAKPOINTS 819 00002FF2 C3 <1> retn 820 <1> 821 <1> 822 <1> ; INP: word [gg_deferred_message] 823 <1> ; word [bb_deferred_message_in_lineout_behind] 824 <1> ; OUT: variables reset to msg.empty_message 825 <1> ; messages displayed; first the gg one then the bb one 826 <1> ; CHG: dx 827 <1> ; STT: ds = es = ss 828 <1> ; 829 <1> ; Note: Uses putsz_silent and putsline_silent, meaning 830 <1> ; if silent mode is enabled, the messages are 831 <1> ; written to the silent buffer instead of displayed. 832 <1> put_deferred_message_silent: 833 00002FF3 BA[3873] <1> mov dx, msg.empty_message 834 00002FF6 8716[F000] <1> xchg dx, word [gg_deferred_message] 835 00002FFA E85C08 <1> call putsz_silent 836 00002FFD BA[7538] <1> mov dx, putsline_silent 837 <1> 838 <1> ; INP: dx = puts function to call, CHG ax, bx, cx, dx, di 839 <1> ; CHG: dx 840 <1> ; STT: ds = es = ss 841 <1> put_bb_deferred_message_calling_dx: 842 00003000 57 <1> push di 843 00003001 31FF <1> xor di, di 844 00003003 873E[F200] <1> xchg di, word [bb_deferred_message_in_lineout_behind] 845 00003007 85FF <1> test di, di 846 00003009 7408 <1> jz @F 847 0000300B 50 <1> push ax 848 0000300C 53 <1> push bx 849 0000300D 51 <1> push cx 850 0000300E FFD2 <1> call dx 851 00003010 59 <1> pop cx 852 00003011 5B <1> pop bx 853 00003012 58 <1> pop ax 854 <1> @@: 855 00003013 5F <1> pop di 856 00003014 C3 <1> retn 857 <1> 858 <1> 859 <1> ; INP: [internalflags2] & dif2_tpg_adjusted_cseip 860 <1> ; [internalflags2] & dif2_tpg_do_not_adjust 861 <1> ; word [reg_cs] 862 <1> ; (d)word [reg_eip] 863 <1> ; OUT: If both flags clear on input, 864 <1> ; set [internalflags2] & dif2_tpg_adjusted_cseip 865 <1> ; cs:(e)ip adjusted by decrementing (e)ip 866 <1> ; (It is only decremented by the first call to this 867 <1> ; function, which sets the flag in dif2.) 868 <1> ; Else, 869 <1> ; do nothing 870 <1> ; CHG: bx 871 <1> ; STT: ds = ss = debugger data selector 872 <1> adjust_cseip_after_breakpoint: 873 00003015 F606[C900]06 <1> testopt [internalflags2], dif2_tpg_adjusted_cseip | dif2_tpg_do_not_adjust 875 0000301A 7509 <1> jnz .retn 876 0000301C 800E[C900]02 <1> setopt [internalflags2], dif2_tpg_adjusted_cseip 877 <1> _386_PM mov bx, word [reg_cs] 878 <1> _386_PM call resetmode_and_test_d_b_bit 879 <1> _386_PM jz .16 ; 16-bit cs --> 880 <1> _386_PM o32 ; dec dword [reg_eip] 881 <1> .16: 882 00003021 FF0E[940C] <1> dec word [reg_eip] ; re-execute (restored) opcode one byte in front of this 883 <1> .retn: 884 00003025 C3 <1> retn 885 <1> 886 <1> 887 <1> %ifn _BREAKPOINTS 888 <1> bb_check_hit: 889 <1> xor ax, ax 890 <1> stc 891 <1> retn 892 <1> %else 893 <1> ; INP: word [run_int] 894 <1> ; word [reg_cs] 895 <1> ; (d)word [reg_eip] 896 <1> ; bb breakpoints 897 <1> ; OUT: NC if a breakpoint was hit, 898 <1> ; (e)ip must be decremented by one 899 <1> ; word [bb_deferred_message_in_lineout_behind] set 900 <1> ; and line_out written if bb point matched 901 <1> ; (The bb point's index is already written to this msg.) 902 <1> ; ax & 1 set if non-pass match (actual hit), 903 <1> ; else ax & 2 set if pass match (consider as hit first, 904 <1> ; but dump registers next (not to silent buffer) 905 <1> ; and then continue execution) 906 <1> ; else ax & 4 always set, indicates any match 907 <1> ; (including matches that should merely continue) 908 <1> ; all pass points' counters stepped 909 <1> ; CY if no breakpoint was hit, 910 <1> ; ax = 0 911 <1> ; CHG: all 912 <1> ; STT: es = ds = ss 913 <1> bb_check_hit: 914 <1> lframe near 915 00003026 5589E5 <1> lenter 916 00003029 31C0 <1> xor ax, ax 917 <1> lequ 1, flag_trigger 918 <1> lequ 2, flag_pass 919 <1> lequ 4, flag_match 920 <1> lvar word, flags 921 0000302B 50 <1> push ax 922 <1> 923 <1> ; Finish up. Check if it was one of _our_ breakpoints. 924 0000302C 813E[D00B][547D] <1> cmp word [run_int], int3msg 925 00003032 7505 <1> jne @F ; if not interrupt 03h --> 926 <1> 927 <1> ; Get previous cs:eip (where breakpoint was executed if any at all). 928 00003034 E82905 <1> call get_cseip_of_possible_breakpoint 929 <1> ; dx:ax = linear address of previous cs:eip 930 <1> ; bx = reg_cs 931 00003037 EB15 <1> jmp .check 932 <1> 933 <1> @@: 934 <1> ; For T/TP/P: if trace interrupt fired just while 935 <1> ; pointing at a bb point, do match. 936 00003039 813E[D00B][317D] <1> cmp word [run_int], int1msg 937 0000303F 7403E95101 <1> jne .gg9 938 <1> 939 00003044 800E[C900]04 <1> setopt [internalflags2], dif2_tpg_do_not_adjust 940 <1> ; remember that we should not adjust 941 <1> _386_PM_o32 942 00003049 31C9 <1> xor cx, cx 943 0000304B E89704 <1> call get_cseip_ecx_linear 944 <1> ; get linear of this cs:(e)ip 945 <1> .check: 946 0000304E 7303E94201 <1> jc .gg9 947 <1> 948 <1> ; Store the matched address (if any) here in case of non-hit 949 <1> ; match. (Ie, non-hit pass match or non-hit non-pass match.) 950 00003053 A3[E800] <1> mov word [gg_next_cseip_linear], ax 951 00003056 8916[EA00] <1> mov word [gg_next_cseip_linear + 2], dx 952 <1> 953 0000305A 87DA <1> xchg bx, dx 954 0000305C 91 <1> xchg cx, ax ; bx:cx = linear address of previous cs:eip 955 0000305D 31C0 <1> xor ax, ax 956 <1> .loop: 957 0000305F 53 <1> push bx 958 00003060 50 <1> push ax 959 00003061 E84750 <1> call calcpointbit ; bx = index, ah = value 960 00003064 84A7[0201] <1> test byte [b_bplist.used_mask+bx], ah 961 <1> ; (NC) 962 00003068 7503E91601 <1> jz .next 963 0000306D 84A7[0401] <1> test byte [b_bplist.disabled_mask+bx], ah 964 <1> ; (NC) 965 00003071 7403E90D01 <1> jnz .next 966 00003076 58 <1> pop ax 967 00003077 5B <1> pop bx 968 00003078 53 <1> push bx 969 00003079 50 <1> push ax 970 0000307A 89C6 <1> mov si, ax 971 0000307C 01F6 <1> add si, si 972 0000307E 01F6 <1> add si, si 973 <1> %if BPSIZE == 4 974 <1> %elif BPSIZE == 5 975 <1> add si, ax 976 <1> %elif BPSIZE == 6 977 00003080 01C6 <1> add si, ax ; * 5 978 00003082 01C6 <1> add si, ax ; * 6 979 <1> %elif BPSIZE == 9 980 <1> add si, si ; * 8 981 <1> add si, ax ; * 9 982 <1> %else 983 <1> %error Unexpected breakpoint size 984 <1> %endif 985 00003084 81C6[0601] <1> add si, b_bplist.bp ; -> point 986 <1> 987 00003088 E83C01 <1> call gg_bb_lods_bp_linear 988 <1> 989 0000308B E88D03 <1> call gg_bb_check_is_first 990 0000308E 7203E9F000 <1> jnc .next 991 <1> 992 00003093 39C8 <1> cmp ax, cx 993 00003095 7403E9E900 <1> jne .next 994 0000309A 39DA <1> cmp dx, bx 995 0000309C 7403E9E200 <1> jne .next 996 <1> 997 <1> .hit: 998 000030A1 58 <1> pop ax 999 000030A2 50 <1> push ax 1000 <1> 1001 000030A3 804EFE04 <1> or byte [bp + ?flags], ?flag_match 1002 <1> 1003 <1> %if _SYMBOLIC 1004 <1> cmp ax, _NUM_B_BP ; is it a symbol breakpoint ? 1005 <1> jb @F ; no --> 1006 <1> 1007 <1> ; skip WHEN and counter handling for symbol breakpoints 1008 <1> test byte [bp + ?flags], ?flag_trigger 1009 <1> ; triggered yet ? 1010 <1> jz .setup_trigger ; no, trigger now --> 1011 <1> jmp .next ; yes, ignore --> 1012 <1> 1013 <1> @@: 1014 <1> %endif 1015 000030A7 89C7 <1> mov di, ax 1016 000030A9 01FF <1> add di, di 1017 <1> 1018 000030AB 8BB5[A601] <1> mov si, [b_bplist.when + di] 1019 <1> ; si -> condition 1020 000030AF 85F6 <1> test si, si ; any ? 1021 000030B1 741B <1> jz @F ; no --> 1022 <1> %if _PM 1023 <1> call resetmode 1024 <1> %endif 1025 000030B3 FF36[360B] <1> push word [rc] 1026 000030B7 8F06[380B] <1> pop word [priorrc] 1027 000030BB AC <1> lodsb 1028 000030BC E8A576 <1> call getexpression ; parse stored expression 1029 000030BF E8A07C <1> call chkeol 1030 000030C2 E86470 <1> call toboolean ; get boolean 1031 000030C5 85D2 <1> test dx, dx ; true ? 1032 000030C7 7503E9B700 <1> jz .next ; no, skip --> 1033 000030CC 58 <1> pop ax 1034 000030CD 50 <1> push ax 1035 <1> @@: 1036 <1> 1037 000030CE 8D9D[6601] <1> lea bx, [b_bplist.counter + di] 1038 <1> ; word [bx] = this matched point's counter 1039 <1> 1040 000030D2 F646FE03 <1> test byte [bp + ?flags], ?flag_trigger | ?flag_pass 1041 000030D6 7413 <1> jz @F ; none set yet ? --> 1042 000030D8 E8C900 <1> call step_pass_counter ; step counter even if already matched 1043 000030DB 7203E9A300 <1> jnc .next ; (either is already set, so additional 1044 <1> ; setting of ?flag_pass is skipped) 1045 000030E0 F646FE01 <1> test byte [bp + ?flags], ?flag_trigger 1046 000030E4 7403E99A00 <1> jnz .next ; (trigger is already set, so skip triggering) 1047 000030E9 EB05 <1> jmp .setup_trigger ; triggered (after previous pass match) 1048 <1> 1049 <1> @@: 1050 000030EB E8B600 <1> call step_pass_counter ; step counter of matched point, no flag yet 1051 000030EE 7340 <1> jnc .check_pass ; not triggered, check for pass match --> 1052 <1> 1053 <1> .setup_trigger: 1054 <1> ; Trigger! (And the first detected triggering point.) 1055 000030F0 804EFE01 <1> or byte [bp + ?flags], ?flag_trigger 1056 <1> 1057 000030F4 51 <1> push cx 1058 000030F5 BF[AE07] <1> mov di, line_out 1059 000030F8 BE[D870] <1> mov si, msg.bb_hit.1 1060 <1> %if _SYMBOLIC 1061 <1> cmp ax, _NUM_B_BP 1062 <1> jb @F 1063 <1> mov si, msg.bb_sym_hit.1 1064 <1> @@: 1065 <1> %endif 1066 000030FB E89E00 <1> call copy_single_counted_string 1067 <1> ; (If _SYMBOLIC=0) Now si -> msg.bb_hit.2.nocounter 1068 <1> ; (If _SYMBOLIC=1) Now si -> msg.bb_hit.2.nocounter 1069 <1> ; or si -> msg.bb_sym_hit.2.nocounter 1070 <1> 1071 <1> 1072 000030FE 89C2 <1> mov dx, ax 1073 <1> %if _SYMBOLIC 1074 <1> cmp ax, _NUM_B_BP 1075 <1> jb @F 1076 <1> sub ax, _NUM_B_BP 1077 <1> call hexbyte ; store index of this point 1078 <1> jmp @FF ; skip counter dump --> 1079 <1> 1080 <1> @@: 1081 <1> %endif 1082 <1> ; Store breakpoint index in message. 1083 00003100 E8517D <1> call hexbyte ; store index of this point 1084 <1> 1085 <1> ; Get counter of this breakpoint. 1086 00003103 8B07 <1> mov ax, word [bx] 1087 <1> 1088 <1> ; Is it equal to default ? 1089 00003105 3D0080 <1> cmp ax, 8000h 1090 00003108 7409 <1> je @F ; yes, skip --> 1091 <1> 1092 0000310A BE[1271] <1> mov si, msg.bb_hit.2.counter 1093 0000310D E88C00 <1> call copy_single_counted_string 1094 <1> ; Now si -> msg.bb_hit.3.counter.no_id 1095 <1> 1096 <1> ; Store counter in message. 1097 00003110 E83A7D <1> call hexword 1098 <1> 1099 <1> @@: 1100 00003113 F606[C800]08 <1> testopt [internalflags2], dif2_gg_is_gg 1101 00003118 7407 <1> jz @F 1102 0000311A F606[9600]08 <1> testopt [options], gg_bb_hit_no_repeat 1103 0000311F EB05 <1> jmp @FF 1104 <1> @@: 1105 00003121 F606[9600]10 <1> testopt [options], tp_bb_hit_no_repeat 1106 <1> @@: 1107 00003126 7406 <1> jz @F 1108 00003128 C706[D20B][4A04] <1> mov word [lastcmd], dmycmd 1109 <1> @@: 1110 0000312E EB1D <1> jmp .trigger_common 1111 <1> 1112 <1> 1113 <1> .check_pass: 1114 00003130 7451 <1> jz .next ; no pass match ? --> 1115 <1> 1116 00003132 804EFE02 <1> or byte [bp + ?flags], ?flag_pass 1117 <1> 1118 00003136 51 <1> push cx 1119 00003137 BF[AE07] <1> mov di, line_out 1120 0000313A BE[F570] <1> mov si, msg.bb_pass.1 1121 0000313D E85C00 <1> call copy_single_counted_string 1122 <1> ; Now si -> msg.bb_pass.2 1123 <1> 1124 00003140 89C2 <1> mov dx, ax 1125 <1> ; Store breakpoint index in message. 1126 00003142 E80F7D <1> call hexbyte ; store index of this point 1127 <1> 1128 00003145 E85400 <1> call copy_single_counted_string 1129 <1> ; Now si -> msg.bb_pass.3.no_id 1130 <1> 1131 <1> ; Get counter of this breakpoint. 1132 00003148 8B07 <1> mov ax, word [bx] 1133 <1> ; Store counter in message. 1134 0000314A E8007D <1> call hexword 1135 <1> 1136 <1> .trigger_common: 1137 0000314D 53 <1> push bx 1138 <1> %if _SYMBOLIC 1139 <1> cmp dx, _NUM_B_BP ; symbol breakpoint ? 1140 <1> jae @F ; yes, no ID --> 1141 <1> %endif 1142 0000314E BBFFFF <1> mov bx, -1 1143 00003151 E8634B <1> call get_set_id_offset_length 1144 00003154 F6C7FC <1> test bh, 63 << 2 ; length nonzero ? 1145 00003157 7421 <1> jz @F ; no --> 1146 <1> 1147 <1> ; The maximum length of a short ID is based on 1148 <1> ; how much space there is after the longest message 1149 <1> ; ("Passed ..., counter=XXXX") assuming 80 columns. 1150 00003159 BE[2871] <1> mov si, msg.bb_hitpass_id.short 1151 0000315C 80FF74 <1> cmp bh, 29 << 2 ; long ? 1152 0000315F 7203 <1> jb .trigger_short_id 1153 <1> ; This jump MUST be a jb, not jbe. The jbe 1154 <1> ; would not match ZR for words where the 1155 <1> ; idbuffer offset is a nonzero value. 1156 00003161 BE[2071] <1> mov si, msg.bb_hitpass_id.long 1157 <1> .trigger_short_id: 1158 <1> 1159 00003164 E83500 <1> call copy_single_counted_string 1160 00003167 88F9 <1> mov cl, bh 1161 00003169 D0E9 <1> shr cl, 1 1162 0000316B D0E9 <1> shr cl, 1 ; cx = length 1163 0000316D 81E3FF03 <1> and bx, 1023 ; bx = offset 1164 00003171 8DB7[CA01] <1> lea si, [b_bplist.idbuffer + bx] 1165 00003175 F3A4 <1> rep movsb 1166 <1> 1167 00003177 BE[1D71] <1> mov si, msg.bb_hitpass_id.after 1168 <1> 1169 <1> @@: 1170 0000317A 5B <1> pop bx 1171 0000317B E81E00 <1> call copy_single_counted_string 1172 <1> 1173 0000317E 893E[F200] <1> mov word [bb_deferred_message_in_lineout_behind], di 1174 00003182 59 <1> pop cx 1175 <1> 1176 <1> .next: 1177 00003183 58 <1> pop ax 1178 00003184 5B <1> pop bx 1179 <1> 1180 00003185 40 <1> inc ax 1181 00003186 83F810 <1> cmp ax, _NUM_B_BP + _NUM_SYM_BP 1182 00003189 7303E9D1FE <1> jb .loop 1183 <1> 1184 0000318E 8B46FE <1> mov ax, word [bp + ?flags] 1185 00003191 A807 <1> test al, ?flag_pass | ?flag_trigger | ?flag_match 1186 00003193 7503 <1> jnz .return ; (NC) 1187 <1> 1188 <1> .gg9: 1189 00003195 31C0 <1> xor ax, ax 1190 00003197 F9 <1> stc 1191 <1> .return: 1192 00003198 89EC5D <1> lleave 1193 0000319B C3 <1> retn 1194 <1> 1195 <1> 1196 <1> ; INP: byte [ds:si] = length of source string 1197 <1> ; ds:si + 1 -> source string 1198 <1> ; es:di -> destination buffer 1199 <1> ; OUT: cx = 0 1200 <1> ; ds:si -> after source string 1201 <1> ; es:di -> after written string 1202 <1> ; CHG: - 1203 <1> ; STT: UP 1204 <1> copy_single_counted_string: 1205 0000319C 91 <1> xchg ax, cx 1206 0000319D 31C0 <1> xor ax, ax 1207 0000319F AC <1> lodsb 1208 000031A0 91 <1> xchg ax, cx 1209 000031A1 F3A4 <1> rep movsb 1210 000031A3 C3 <1> retn 1211 <1> 1212 <1> 1213 <1> ; INP: word [bx] = pass counter of this breakpoint 1214 <1> ; OUT: NC if to proceed (no trigger), 1215 <1> ; ZR if no pass message display 1216 <1> ; NZ if pass message display 1217 <1> ; CY if to trigger 1218 <1> step_pass_counter: 1219 000031A4 F707FF3F <1> test word [bx], 3FFFh ; is it already at a terminal state ? 1220 000031A8 740A <1> jz .no_decrement ; yes, do not further decrement --> 1221 000031AA FF0F <1> dec word [bx] ; decrement (to 0/4000h/8000h/C000h) 1222 000031AC 7417 <1> jz .trigger ; case for decrementing 1 to 0 --> 1223 000031AE 813F0040 <1> cmp word [bx], 4000h 1224 000031B2 7411 <1> je .trigger ; case for decrementing 4001h to 4000h 1225 <1> .no_decrement: 1226 000031B4 813F0080 <1> cmp word [bx], 8000h ; decrement resulted in 8000h 1227 000031B8 740B <1> je .trigger ; or was already in that state? --> 1228 000031BA 813F00C0 <1> cmp word [bx], 0_C000h 1229 000031BE 7405 <1> je .trigger ; or C000h --> 1230 <1> .proceed: 1231 000031C0 F6470140 <1> test byte [bx + 1], 40h ; (NC) ZR if no pass message 1232 000031C4 C3 <1> retn 1233 <1> 1234 <1> .trigger: 1235 000031C5 F9 <1> stc 1236 000031C6 C3 <1> retn 1237 <1> %endif 1238 <1> 1239 <1> 1240 <1> ; INP: si -> linear address of breakpoint 1241 <1> ; (32 bits if _PM, else 24 bits) 1242 <1> ; OUT: dx:ax = linear address of breakpoint 1243 <1> ; si -> behind linear address 1244 <1> gg_bb_lods_bp_linear: 1245 000031C7 AD <1> lodsw 1246 000031C8 92 <1> xchg ax, dx 1247 <1> %if _PM 1248 <1> lodsw 1249 <1> %else 1250 000031C9 31C0 <1> xor ax, ax 1251 000031CB AC <1> lodsb 1252 <1> %endif 1253 000031CC 92 <1> xchg ax, dx 1254 000031CD C3 <1> retn 1255 <1> 1256 <1> 1257 <1> ; INP: word [run_int] 1258 <1> ; word [reg_cs] 1259 <1> ; (d)word [reg_eip] 1260 <1> ; gg/bb breakpoints 1261 <1> ; OUT: NC if a breakpoint was hit, 1262 <1> ; (e)ip must be decremented by one 1263 <1> ; word [bb_deferred_message_in_lineout_behind] set 1264 <1> ; and line_out written if bb point matched 1265 <1> ; (The bb point's index is already written to this msg.) 1266 <1> ; ax = 7 if non-bb match, else 1267 <1> ; ax & 1 set if non-pass match (actual hit), 1268 <1> ; else ax & 2 set if pass match (consider as hit first, 1269 <1> ; but dump registers next (not to silent buffer) 1270 <1> ; and then continue execution) 1271 <1> ; else ax & 4 always set, indicates any match 1272 <1> ; (including matches that should merely continue) 1273 <1> ; all pass points' counters stepped 1274 <1> ; CY if no breakpoint was hit, 1275 <1> ; ax = 0 1276 <1> ; CHG: all 1277 <1> ; STT: es = ds = ss 1278 <1> gg_bb_check_hit: 1279 000031CE E855FE <1> call bb_check_hit 1280 000031D1 720D <1> jc .gg_check_hit 1281 <1> 1282 000031D3 A801 <1> test al, 1 ; actual bb hit ? 1283 000031D5 7507 <1> jnz .ret_NC ; yes, return as hit 1284 <1> 1285 000031D7 50 <1> push ax ; bb is pass match or any other match, 1286 000031D8 E80500 <1> call gg_check_hit ; is gg a match ? 1287 000031DB 58 <1> pop ax 1288 000031DC 732D <1> jnc gg_check_hit.hit ; yes --> (set NC, ax = 7) 1289 <1> 1290 <1> ; Here, we return the flags 2 (set if pass match) and 1291 <1> ; 4 (always set, indicating any match). 1292 <1> 1293 <1> .ret_NC: 1294 000031DE F8 <1> clc 1295 000031DF C3 <1> retn 1296 <1> 1297 <1> .gg_check_hit: 1298 <1> ; (fall through) 1299 <1> 1300 <1> %ifn _NUM_G_BP 1301 <1> gg_check_hit: 1302 <1> stc 1303 <1> retn 1304 <1> %else 1305 <1> ; INP: word [run_int] 1306 <1> ; word [reg_cs] 1307 <1> ; (d)word [reg_eip] 1308 <1> ; bb breakpoints 1309 <1> ; OUT: NC if a breakpoint was hit, 1310 <1> ; (e)ip must be decremented by one 1311 <1> ; ax = 7 1312 <1> ; CY if no breakpoint was hit, 1313 <1> ; ax = 0 1314 <1> ; CHG: all 1315 <1> ; STT: es = ds = ss 1316 <1> gg_check_hit: 1317 <1> ; Finish up. Check if it was one of _our_ breakpoints. 1318 000031E0 813E[D00B][547D] <1> cmp word [run_int], int3msg 1319 000031E6 752D <1> jne .gg9 ; if not interrupt 03h --> 1320 <1> 1321 <1> ; Get previous cs:eip (where breakpoint was executed if any at all). 1322 000031E8 E87503 <1> call get_cseip_of_possible_breakpoint 1323 <1> ; dx:ax = linear address of previous cs:eip 1324 000031EB 7228 <1> jc .gg9 1325 000031ED BE[4C07] <1> mov si, g_bplist.bp 1326 000031F0 31C9 <1> xor cx, cx 1327 000031F2 8A4CFF <1> mov cl, byte [si-1] ; number of saved breakpoints 1328 000031F5 E31E <1> jcxz .gg9 ; none, so always unexpected --> 1329 <1> 1330 000031F7 89C7 <1> mov di, ax 1331 000031F9 89D3 <1> mov bx, dx ; bx:di = linear address of previous cs:(e)ip 1332 <1> 1333 <1> .loop_gg6: 1334 000031FB E8C9FF <1> call gg_bb_lods_bp_linear 1335 <1> 1336 000031FE E81A02 <1> call gg_bb_check_is_first 1337 00003201 730D <1> jnc .next 1338 <1> 1339 00003203 39DA <1> cmp dx, bx 1340 00003205 7509 <1> jne .next 1341 00003207 39F8 <1> cmp ax, di 1342 00003209 7505 <1> jne .next 1343 <1> 1344 <1> .hit: 1345 0000320B B80700 <1> mov ax, 7 1346 0000320E F8 <1> clc 1347 0000320F C3 <1> retn 1348 <1> 1349 <1> .next: 1350 <1> 1351 <1> %if BPSIZE == 4 || BPSIZE == 5 1352 <1> inc si ; skip saved (actually CCh) byte 1353 <1> %elif BPSIZE == 6 1354 00003210 83C603 <1> add si, 3 ; skip word offset and byte content 1355 <1> %elif BPSIZE == 9 1356 <1> add si, 5 ; skip dword offset and byte content 1357 <1> %endif 1358 <1> ; BPSIZE implied 1359 00003213 E2E6 <1> loop .loop_gg6 ; try next if there's any 1360 <1> 1361 <1> .gg9: 1362 00003215 31C0 <1> xor ax, ax 1363 00003217 F9 <1> stc 1364 00003218 C3 <1> retn 1365 <1> %endif 1366 <1> 1367 <1> 1368 <1> %if _DELAY_BEFORE_BP 1369 <1> delay_before_bp: 1370 00003219 F606[9F00]04 <1> testopt [options3], opt3_delay_before_bp 1371 0000321E 7428 <1> jz .ret 1372 00003220 F606[CE00]80 <1> testopt [internalflags3], dif3_delayed 1373 00003225 7521 <1> jnz .ret 1374 00003227 800E[CE00]80 <1> setopt [internalflags3], dif3_delayed 1375 0000322C 06 <1> push es 1376 0000322D 57 <1> push di 1377 0000322E 50 <1> push ax 1378 0000322F BF4000 <1> mov di, 40h ; dual mode segment/selector 1379 00003232 8EC7 <1> mov es, di 1380 00003234 268B3E6C00 <1> mov di, word [es:6Ch] 1381 <1> @@: 1382 00003239 263B3E6C00 <1> cmp di, word [es:6Ch] 1383 0000323E 7505 <1> jne @F 1384 00003240 E8D482 <1> call idle 1385 00003243 EBF4 <1> jmp @B 1386 <1> @@: 1387 00003245 58 <1> pop ax 1388 00003246 5F <1> pop di 1389 00003247 07 <1> pop es 1390 <1> .ret: 1391 00003248 C3 <1> retn 1392 <1> %endif 1393 <1> 1394 <1> 1395 <1> %if _BREAKPOINTS 1396 <1> bb_writepoints_init_reset: 1397 00003249 BF[0601] <1> mov di, b_bplist.bp 1398 0000324C B0CC <1> mov al, 0CCh 1399 0000324E B91000 <1> mov cx, _NUM_B_BP + _NUM_SYM_BP 1400 <1> .loop: 1401 00003251 83C705 <1> add di, BPSIZE - 1 1402 00003254 AA <1> stosb 1403 00003255 E2FA <1> loop .loop 1404 <1> 1405 <1> ; This is called first by gg before writing any of the 1406 <1> ; gg points. So, if it fails, it only needs to restore 1407 <1> ; its own points, not any of the gg points. 1408 <1> ; This is also called deep down in run_with_bb when called 1409 <1> ; from tt or pp. In this case, there may be a proceed 1410 <1> ; breakpoint already written. On failure, after having 1411 <1> ; restored all yet-written bb points, this proceed 1412 <1> ; breakpoint is restored too. 1413 <1> ; Symbolic branch: This initialises symbol breakpoints. 1414 <1> ; 1415 <1> ; INP: bb breakpoints 1416 <1> ; tpg_proceed_bp 1417 <1> ; OUT: does not return if an error occurred, 1418 <1> ; instead jumps to cmd3 1419 <1> ; STT: might return modeswitched 1420 <1> bb_writepoints_init: 1421 <1> %if _SYMBOLIC 1422 <1> call zz_detect_xms ; re-detect XMS if used after run 1423 <1> 1424 <1> mov dx, word [sym_storage.main.bb.first] 1425 <1> mov bx, b_bplist.bp + _NUM_B_BP * BPSIZE 1426 <1> mov cx, _NUM_B_BP 1427 <1> jmp .sym_condition 1428 <1> 1429 <1> .sym_loop: 1430 <1> cmp cx, _NUM_B_BP + _NUM_SYM_BP 1431 <1> jb .sym_enough 1432 <1> mov dx, msg.bb_sym_too_many 1433 <1> .sym_error_putsz: 1434 <1> call putsz_error 1435 <1> mov cx, (_NUM_B_BP + _NUM_SYM_BP) 1436 <1> xor ax, ax 1437 <1> @@: 1438 <1> push ax 1439 <1> loop @B ; dummy bb error info 1440 <1> mov bp, sp 1441 <1> dec cx ; no bb write/restore failure 1442 <1> push cx 1443 <1> push cx 1444 <1> jmp .sym_error_done ; handle error (including pp restore) --> 1445 <1> 1446 <1> .sym_enough: 1447 <1> push dx 1448 <1> push ax 1449 <1> call getfarpointer.main 1450 <1> pop di 1451 <1> pop es 1452 <1> 1453 <1> mov ax, word [es:di + smLinear] 1454 <1> mov word [bx], ax ; store low word of linear 1455 <1> inc bx 1456 <1> inc bx 1457 <1> mov ax, word [es:di + smLinear + 2] 1458 <1> %if BPSIZE == 5 || BPSIZE == 9 1459 <1> mov word [bx], ax ; store high word of linear 1460 <1> inc bx 1461 <1> inc bx 1462 <1> %else 1463 <1> mov byte [bx], al ; store high byte of linear 1464 <1> inc bx 1465 <1> mov dx, msg.bb_sym_beyond_linear 1466 <1> test ah, ah 1467 <1> jnz .sym_error_putsz 1468 <1> %endif 1469 <1> %if BPSIZE == 6 || BPSIZE == 9 1470 <1> mov ax, word [es:di + smOffset] 1471 <1> mov word [bx], ax ; store low word of offset 1472 <1> inc bx 1473 <1> inc bx 1474 <1> mov ax, word [es:di + smOffset + 2] 1475 <1> %if BPSIZE == 9 1476 <1> mov word [bx], ax ; store high word of offset 1477 <1> inc bx 1478 <1> inc bx 1479 <1> %else 1480 <1> mov dx, msg.bb_sym_beyond_offset 1481 <1> test ax, ax 1482 <1> jnz .sym_error_putsz 1483 <1> %endif 1484 <1> %endif 1485 <1> inc bx ; skip content byte 1486 <1> mov ax, cx 1487 <1> push bx 1488 <1> call calcpointbit 1489 <1> or byte [b_bplist.used_mask + bx], ah 1490 <1> pop bx 1491 <1> inc cx 1492 <1> mov dx, word [es:di + smSpecialNext] 1493 <1> 1494 <1> .sym_condition: 1495 <1> cmp dx, -1 1496 <1> jne .sym_loop 1497 <1> 1498 <1> jmp @FF 1499 <1> @@: 1500 <1> mov ax, cx 1501 <1> call calcpointbit 1502 <1> not ah 1503 <1> and byte [b_bplist.used_mask + bx], ah 1504 <1> inc cx 1505 <1> @@: 1506 <1> cmp cx, _NUM_B_BP + _NUM_SYM_BP 1507 <1> jb @BB 1508 <1> %endif 1509 <1> 1510 00003257 E8D500 <1> call bb_writepoints 1511 0000325A 735B <1> jnc .retn 1512 <1> 1513 0000325C 83EC20 <1> sub sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 1514 <1> ; reserve space for bb error info 1515 0000325F 89E5 <1> mov bp, sp 1516 <1> ; cx = index of failed point 1517 <1> ; = index above last one to restore 1518 <1> ; ax = error info of failed point 1519 00003261 50 <1> push ax 1520 00003262 51 <1> push cx 1521 00003263 E8B100 <1> call bb_restorepoints_and_init_error_info 1522 <1> .sym_error_done: 1523 <1> 1524 <1> bb_restorepoints_exit: equ $ 1525 <1> ; If this is not gg and T/P wrote a proceed breakpoint, 1526 <1> ; restore it here (after having restored bb points). 1527 00003266 E8F309 <1> call proceed_writepoint_restore 1528 <1> ; This call might return modeswitched. 1529 00003269 BB0000 <1> mov bx, 0 ; (preserve CF) 1530 0000326C 7305 <1> jnc @F 1531 0000326E 80CC80 <1> or ah, 80h ; mark error during restoration 1532 00003271 89C3 <1> mov bx, ax ; bx & 80h set: error restoring pp 1533 <1> @@: 1534 <1> 1535 00003273 59 <1> pop cx 1536 00003274 58 <1> pop ax ; error info + index of failed point 1537 <1> 1538 00003275 89CE <1> mov si, cx 1539 00003277 01F6 <1> add si, si 1540 00003279 01F6 <1> add si, si ; * 4 1541 <1> %if BPSIZE == 4 1542 <1> %elif BPSIZE == 5 1543 <1> add si, cx ; * 5 1544 <1> %elif BPSIZE == 6 1545 0000327B 01CE <1> add si, cx ; * 5 1546 0000327D 01CE <1> add si, cx ; * 6 1547 <1> %elif BPSIZE == 9 1548 <1> add si, si ; * 8 1549 <1> add si, cx ; * 9 1550 <1> %else 1551 <1> %error Unexpected breakpoint size 1552 <1> %endif 1553 0000327F 81C6[0601] <1> add si, b_bplist.bp ; -> point 1554 <1> 1555 00003283 53 <1> push bx 1556 <1> 1557 00003284 E86CFD <1> call put_deferred_message_silent 1558 <1> ; CHG: dx 1559 <1> 1560 00003287 83F9FF <1> cmp cx, -1 1561 0000328A 740B <1> je @F 1562 <1> 1563 <1> ; si-> point 1564 <1> ; ax = info (ah = reason, al = new value if reason 3) 1565 <1> ; cx = 0-based index of initially failed point 1566 0000328C FF7402 <1> push word [si + 2] 1567 0000328F FF34 <1> push word [si] ; stack: linear address 1568 00003291 BB0040 <1> mov bx, 4000h ; bh = 40h (bb), 1569 <1> ; bl = what we tried to restore (n/a) 1570 00003294 E8300A <1> call display_breakpoint_failure 1571 <1> ; This function calls resetmode. 1572 <1> 1573 <1> @@: 1574 00003297 E8E301 <1> call bb_handlefailedrestore 1575 <1> ; This function calls resetmode. 1576 <1> 1577 0000329A 58 <1> pop ax 1578 0000329B F6C480 <1> test ah, 80h ; pp failed to restore ? 1579 0000329E 7411 <1> jz @F 1580 <1> 1581 000032A0 FF36[F600] <1> push word [tpg_proceed_bp + 2] 1582 000032A4 FF36[F400] <1> push word [tpg_proceed_bp] 1583 000032A8 8A1E[F900] <1> mov bl, [tpg_proceed_bp + BPSIZE - 1] 1584 000032AC B700 <1> mov bh, 0 ; proceed breakpoint 1585 000032AE E8160A <1> call display_breakpoint_failure 1586 <1> @@: 1587 000032B1 83C420 <1> add sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 1588 <1> ; discard bb error info 1589 000032B4 E949CD <1> jmp cmd3 1590 <1> 1591 <1> .retn: 1592 000032B7 C3 <1> retn 1593 <1> %endif 1594 <1> 1595 <1> 1596 <1> %if _NUM_G_BP 1597 <1> ; INP: ss:bp -> behind gg error info space 1598 <1> ; cx = number of error info words on stack 1599 <1> ; OUT: error info space initialised to all zeros 1600 <1> ; CHG: ax, di, es 1601 <1> ; STT: sets es to ss 1602 <1> gg_restorepoints_init_error_info: 1603 000032B8 16 <1> push ss 1604 000032B9 07 <1> pop es 1605 000032BA 89EF <1> mov di, bp ; es:di -> behind error info 1606 000032BC 51 <1> push cx 1607 000032BD 4F <1> dec di 1608 000032BE 4F <1> dec di 1609 000032BF 31C0 <1> xor ax, ax 1610 000032C1 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND does not apply 1611 000032C2 F3AB <1> rep stosw ; initialize error info 1612 000032C4 FC <1> cld 1613 000032C5 59 <1> pop cx 1614 000032C6 C3 <1> retn 1615 <1> 1616 <1> 1617 <1> gg_restorepoints_and_init_error_info: 1618 000032C7 E8EEFF <1> call gg_restorepoints_init_error_info 1619 <1> 1620 <1> ; Restore gg breakpoints. 1621 <1> ; On errors remember failures but restore all remaining anyway. 1622 <1> ; 1623 <1> ; INP: cx = number of breakpoints to restore (<= 255), 1624 <1> ; assumed at beginning of g_bplist.bp 1625 <1> ; ss:bp -> behind cx words for error info 1626 <1> ; OUT: NC if all points restored successfully 1627 <1> ; CY if at least one point couldn't be restored, 1628 <1> ; error info filled, high byte: 1629 <1> ; reason = 0 = no error (this point didn't fail), 1630 <1> ; 1 = couldn't write, 1631 <1> ; 2 = unreachable, 1632 <1> ; 3 = overwritten), 1633 <1> ; low byte: new byte value (if reason 3) 1634 <1> ; CHG: ax, bx, (e)dx, si, di, es 1635 <1> ; STT: sets es to ss 1636 <1> ; might return modeswitched 1637 <1> ; 1638 <1> ; Note: The points are restored in reverse, from the last back 1639 <1> ; to the front. The first point is handled last. 1640 <1> gg_restorepoints: 1641 000032CA 89CE <1> mov si, cx 1642 000032CC 01F6 <1> add si, si 1643 000032CE 01F6 <1> add si, si ; * 4 1644 <1> %if BPSIZE == 4 1645 <1> %elif BPSIZE == 5 1646 <1> add si, cx ; * 5 1647 <1> %elif BPSIZE == 6 1648 000032D0 01CE <1> add si, cx ; * 5 1649 000032D2 01CE <1> add si, cx ; * 6 1650 <1> %elif BPSIZE == 9 1651 <1> add si, si ; * 8 1652 <1> add si, cx ; * 9 1653 <1> %else 1654 <1> %error Unexpected breakpoint size 1655 <1> %endif 1656 000032D4 81C6[4607] <1> add si, g_bplist.bp - BPSIZE ; -> last point in list (first to restore) 1657 <1> 1658 000032D8 F8 <1> clc ; assume success 1659 000032D9 51 <1> push cx 1660 000032DA 9C <1> pushf 1661 000032DB E329 <1> jcxz .done ; nothing to do --> 1662 <1> .loop: 1663 000032DD E8E300 <1> call gg_writepoints_restore ; Restore breakpoint bytes. 1664 000032E0 7324 <1> jnc .done ; successful --> 1665 000032E2 5A <1> pop dx ; discard flags 1666 000032E3 5B <1> pop bx 1667 000032E4 53 <1> push bx 1668 000032E5 9C <1> pushf ; store (CY) flags 1669 <1> 1670 000032E6 50 <1> push ax 1671 000032E7 89F7 <1> mov di, si 1672 000032E9 81EF[5207] <1> sub di, BPSIZE+g_bplist.bp 1673 <1> %if BPSIZE == 5 || BPSIZE == 6 || BPSIZE == 9 1674 000032ED 89F8 <1> mov ax, di 1675 000032EF 31D2 <1> xor dx, dx 1676 000032F1 BF0600 <1> mov di, BPSIZE 1677 000032F4 F7F7 <1> div di 1678 000032F6 89C7 <1> mov di, ax ; di = 0-based point index 1679 000032F8 D1E7 <1> shl di, 1 ; di = 0-based error info offset 1680 <1> %elif BPSIZE == 4 1681 <1> shr di, 1 ; di = 0-based error info offset 1682 <1> %else 1683 <1> %error "Unexpected BPSIZE" 1684 <1> %endif 1685 000032FA 29DF <1> sub di, bx 1686 000032FC 29DF <1> sub di, bx 1687 000032FE 8F03 <1> pop word [bp+di] ; store error info 1688 00003300 49 <1> dec cx ; exclude the failed point 1689 00003301 83EE0C <1> sub si, 2*BPSIZE ; -> the point _before_ failed one 1690 00003304 EBD7 <1> jmp short .loop 1691 <1> .done: 1692 00003306 9D <1> popf ; get flags. CY if any couldn't be restored 1693 00003307 59 <1> pop cx ; restore cx 1694 00003308 C3 <1> retn 1695 <1> %endif 1696 <1> 1697 <1> 1698 <1> %if _BREAKPOINTS 1699 <1> ; INP: ss:bp -> error info space (one word per bb breakpoint) 1700 <1> ; OUT: error info space initialised to all zeros 1701 <1> ; CHG: ax, di, es 1702 <1> ; STT: sets es to ss 1703 <1> ; 1704 <1> ; Note: This initialises words for all bb points. 1705 <1> ; While the value in cx is preserved, it is 1706 <1> ; assumed that space for all points is allocated. 1707 <1> bb_restorepoints_init_error_info: 1708 00003309 16 <1> push ss 1709 0000330A 07 <1> pop es 1710 0000330B 89EF <1> mov di, bp 1711 0000330D 31C0 <1> xor ax, ax 1712 0000330F 51 <1> push cx 1713 00003310 B91000 <1> mov cx, _NUM_B_BP + _NUM_SYM_BP 1714 00003313 F3AB <1> rep stosw 1715 00003315 59 <1> pop cx 1716 00003316 C3 <1> retn 1717 <1> 1718 <1> 1719 <1> bb_restorepoints_and_init_error_info: 1720 00003317 E8EFFF <1> call bb_restorepoints_init_error_info 1721 <1> 1722 <1> ; Restore bb breakpoints. 1723 <1> ; On errors remember failures but restore all remaining anyway. 1724 <1> ; 1725 <1> ; INP: cx = index above last one to restore 1726 <1> ; ss:bp -> error info space (one word per bb breakpoint) 1727 <1> ; OUT: NC if all points restored successfully 1728 <1> ; CY if at least one point couldn't be restored, 1729 <1> ; error info filled, high byte: 1730 <1> ; reason = 0 = no error (this point didn't fail), 1731 <1> ; 1 = couldn't write, 1732 <1> ; 2 = unreachable, 1733 <1> ; 3 = overwritten), 1734 <1> ; low byte: new byte value (if reason 3) 1735 <1> ; CHG: ax, bx, cx, (e)dx, si, di, es 1736 <1> ; STT: sets es to ss 1737 <1> ; might return modeswitched 1738 <1> ; 1739 <1> ; Note: The points are restored in reverse, from the list back 1740 <1> ; to the front. The first point is handled last. 1741 <1> bb_restorepoints: 1742 <1> 1743 0000331A F8 <1> clc ; assume success 1744 0000331B 9C <1> pushf 1745 0000331C E30F <1> jcxz .done 1746 <1> .loop: 1747 0000331E E81400 <1> call bb_writepoints_restore 1748 00003321 730A <1> jnc .done 1749 00003323 5A <1> pop dx ; (discard flags) 1750 00003324 9C <1> pushf ; store (CY) flags 1751 <1> ; cx = index of point that failed to write 1752 <1> ; ah = reason, al = new byte value (reason 3) 1753 00003325 89CF <1> mov di, cx 1754 00003327 01FF <1> add di, di 1755 00003329 8903 <1> mov word [bp + di], ax ; store error info 1756 0000332B EBF1 <1> jmp .loop 1757 <1> 1758 <1> .done: 1759 0000332D 9D <1> popf ; CF 1760 0000332E C3 <1> retn 1761 <1> 1762 <1> 1763 <1> ; Loop through bb breakpoints and exchange the saved 1764 <1> ; byte with that one at the actual address. Used to write 1765 <1> ; the breakpoints. 1766 <1> ; 1767 <1> ; INP: - 1768 <1> ; OUT: NC if successful 1769 <1> ; CY if error writing a point, 1770 <1> ; cx = index of point that failed to write 1771 <1> ; (all PRIOR points were processed successfully, 1772 <1> ; either written successfully or skipped) 1773 <1> ; CHG: ax, bx, (e)dx, si, cx, di 1774 <1> ; STT: might return modeswitched 1775 <1> bb_writepoints: 1776 0000332F 31C9 <1> xor cx, cx 1777 00003331 BF0100 <1> mov di, 1 1778 00003334 A9 <1> db __TEST_IMM16 ; (skip xor, NC) 1779 <1> 1780 <1> ; Same, but go through the breakpoints in reverse order 1781 <1> ; and check that what we overwrite is a 0CCh byte. If so, 1782 <1> ; restore the original value. (The 0CCh is discarded.) 1783 <1> ; 1784 <1> ; INP: cx = index *above* last to write 1785 <1> ; (_NUM_B_BP + _NUM_SYM_BP for all) 1786 <1> ; OUT: NC if successful 1787 <1> ; CY if error writing a point, 1788 <1> ; cx = index of point that failed to write 1789 <1> ; ah = 1 if error because point could not be written 1790 <1> ; ah = 2 if error because address is unreachable 1791 <1> ; ah = 3 if error because point contained non-0CCh value, 1792 <1> ; al = new byte 1793 <1> ; CHG: ax, bx, (e)dx, si, cx, di 1794 <1> ; STT: might return modeswitched 1795 <1> bb_writepoints_restore: 1796 00003335 31FF <1> xor di, di ; (NC) 1797 <1> bb_wp: 1798 <1> lframe near 1799 00003337 5589E5 <1> lenter 1800 <1> lvar word, is_write 1801 0000333A 57 <1> push di 1802 <1> 1803 0000333B F646FE01 <1> test byte [bp + ?is_write], 1 1804 <1> ; (NC) is it writing ? 1805 0000333F 7458 <1> jz .next ; no, is restoring, first decrement cx --> 1806 <1> 1807 <1> .loop: 1808 00003341 89C8 <1> mov ax, cx 1809 00003343 E8654D <1> call calcpointbit ; bx = index, ah = value 1810 00003346 84A7[0201] <1> test byte [b_bplist.used_mask+bx], ah 1811 <1> ; (NC) 1812 0000334A 744D <1> jz .next 1813 0000334C 84A7[0401] <1> test byte [b_bplist.disabled_mask+bx], ah 1814 <1> ; (NC) 1815 00003350 7547 <1> jnz .next 1816 <1> 1817 00003352 89CE <1> mov si, cx 1818 00003354 01F6 <1> add si, si 1819 00003356 01F6 <1> add si, si ; * 4 1820 <1> %if BPSIZE == 4 1821 <1> %elif BPSIZE == 5 1822 <1> add si, cx ; * 5 1823 <1> %elif BPSIZE == 6 1824 00003358 01CE <1> add si, cx ; * 5 1825 0000335A 01CE <1> add si, cx ; * 6 1826 <1> %elif BPSIZE == 9 1827 <1> add si, si ; * 8 1828 <1> add si, cx ; * 9 1829 <1> %else 1830 <1> %error Unexpected breakpoint size 1831 <1> %endif 1832 0000335C 81C6[0601] <1> add si, b_bplist.bp ; -> point 1833 <1> 1834 00003360 E864FE <1> call gg_bb_lods_bp_linear 1835 <1> ; dx:ax = linear address 1836 <1> 1837 00003363 E8B500 <1> call gg_bb_check_is_first 1838 00003366 7331 <1> jnc .next ; (NC) 1839 <1> 1840 00003368 E81502 <1> call getsegmented ; bx:(e)dx = segmented address 1841 <1> %if BPSIZE == 6 1842 0000336B AD <1> lodsw ; skip word offset 1843 <1> %elif BPSIZE == 9 1844 <1> lodsw 1845 <1> lodsw ; skip dword offset 1846 <1> %endif 1847 0000336C AC <1> lodsb ; get byte to write 1848 0000336D B402 <1> mov ah, 2 1849 0000336F 723E <1> jc .return ; not in PM anymore/address not available --> (CY) 1850 00003371 F646FE01 <1> test byte [bp + ?is_write], 1 1851 <1> ; writing? 1852 00003375 7517 <1> jnz .forward_nocheck ; yes --> 1853 <1> 1854 <1> .backward_check: 1855 00003377 50 <1> push ax 1856 00003378 E8E558 <1> call readmem ; read current byte 1857 0000337B 3CCC <1> cmp al, 0CCh ; is this still what we wrote? 1858 0000337D B483 <1> mov ah, 83h ; (80h = error occurred while restoring) 1859 0000337F F9 <1> stc 1860 00003380 752D <1> jne .return_discard ; nope --> (CY) 1861 00003382 58 <1> pop ax 1862 00003383 E8C858 <1> call writemem ; return the byte to its original value 1863 00003386 7211 <1> jc .next ; failed --> (CY, handled there) 1864 00003388 C644FFCC <1> mov byte [si-1], 0CCh ; reset stored point 1865 0000338C EB0B <1> jmp short .next 1866 <1> 1867 <1> .forward_nocheck: 1868 <1> %if _DELAY_BEFORE_BP 1869 0000338E E888FE <1> call delay_before_bp 1870 <1> %endif 1871 00003391 E8BA58 <1> call writemem 1872 00003394 7203 <1> jc .next 1873 00003396 8844FF <1> mov byte [si-1], al ; save the previous byte there 1874 <1> .next: 1875 00003399 B401 <1> mov ah, 1 ; (in case of error) 1876 0000339B 7212 <1> jc .return ; failed to write --> (CY) 1877 <1> 1878 0000339D F646FE01 <1> test byte [bp + ?is_write], 1 1879 000033A1 7505 <1> jnz .is_write_next 1880 000033A3 49 <1> dec cx ; restore: decrement index 1881 000033A4 799B <1> jns .loop ; decremented to 0FFFFh ? no, loop --> 1882 000033A6 EB06 <1> jmp .return_NC 1883 <1> 1884 <1> .is_write_next: 1885 000033A8 41 <1> inc cx ; write: increment index 1886 000033A9 83F910 <1> cmp cx, _NUM_B_BP + _NUM_SYM_BP 1887 <1> ; above last ? 1888 000033AC 7293 <1> jb .loop ; no, loop --> 1889 <1> .return_NC: 1890 000033AE F8 <1> clc 1891 <1> .return: 1892 <1> .return_discard: 1893 000033AF 730A <1> jnc .ret 1894 <1> 1895 000033B1 F646FE01 <1> test byte [bp + ?is_write], 1 1896 <1> ; restoring ? 1897 000033B5 7503 <1> jnz .ret_CY ; no --> 1898 000033B7 80CC80 <1> or ah, 80h ; error occurred while restoring 1899 <1> .ret_CY: 1900 000033BA F9 <1> stc 1901 <1> .ret: 1902 000033BB 89EC5D <1> lleave 1903 000033BE C3 <1> lret 1904 <1> %endif 1905 <1> 1906 <1> 1907 <1> %if _NUM_G_BP 1908 <1> ; Loop through saved breakpoints and exchange the saved 1909 <1> ; byte with that one at the actual address. Used to write 1910 <1> ; the breakpoints. 1911 <1> ; 1912 <1> ; INP: si-> current point 1913 <1> ; cx = number of points to write (might be zero) 1914 <1> ; OUT: NC if successful 1915 <1> ; CY if error writing a point, 1916 <1> ; cx = number of points still to write (including failed one) 1917 <1> ; (si-BPSIZE)-> point that failed 1918 <1> ; CHG: ax, bx, (e)dx, si, cx, di 1919 <1> gg_writepoints: 1920 000033BF BF0100 <1> mov di, 1 1921 000033C2 A9 <1> db __TEST_IMM16 ; (skip xor, NC) 1922 <1> 1923 <1> ; Same, but go through the breakpoints in reverse order 1924 <1> ; and check that what we overwrite is a 0CCh byte. If so, 1925 <1> ; restore the original value. (The 0CCh is discarded.) 1926 <1> ; 1927 <1> ; Additionally: 1928 <1> ; OUT: CY if error writing a point, 1929 <1> ; ah = 1 if error because point could not be written 1930 <1> ; ah = 2 if error because address is unreachable 1931 <1> ; ah = 3 if error because point contained non-0CCh value, 1932 <1> ; al = new byte 1933 <1> gg_writepoints_restore: 1934 000033C3 31FF <1> xor di, di ; (NC) 1935 <1> gg_wp: 1936 000033C5 E347 <1> jcxz .return ;if nothing to do --> (still NC from xor/test) 1937 <1> .loop: 1938 000033C7 E8FDFD <1> call gg_bb_lods_bp_linear 1939 <1> ; dx:ax = linear address 1940 <1> 1941 000033CA E84E00 <1> call gg_bb_check_is_first 1942 000033CD 7209 <1> jc @F ; if to handle this breakpoint --> 1943 <1> 1944 <1> ; Skip to next breakpoint. 1945 <1> %if BPSIZE == 4 || BPSIZE == 5 1946 <1> inc si ; -> after point 1947 <1> %elif BPSIZE == 6 1948 000033CF 83C603 <1> add si, 3 ; skip word offset and byte content 1949 <1> %elif BPSIZE == 9 1950 <1> add si, 5 ; skip dword offset and byte content 1951 <1> %endif 1952 <1> ; BPSIZE implied 1953 <1> 1954 000033D2 85FF <1> test di, di ; (NC) 1955 000033D4 7532 <1> jnz .next ; going forward --> 1956 000033D6 EB22 <1> jmp .next_lea_si ; (NC) 1957 <1> 1958 <1> ; Handle this breakpoint. 1959 <1> @@: 1960 000033D8 E8A501 <1> call getsegmented ; bx:(e)dx = segmented address 1961 <1> %if BPSIZE == 6 1962 000033DB AD <1> lodsw ; skip word offset 1963 <1> %elif BPSIZE == 9 1964 <1> lodsw 1965 <1> lodsw ; skip dword offset 1966 <1> %endif 1967 000033DC AC <1> lodsb ; get byte to write 1968 000033DD B402 <1> mov ah, 2 1969 000033DF 722D <1> jc .return ; not in PM anymore/address not available --> (CY) 1970 000033E1 85FF <1> test di, di ; writing? 1971 000033E3 751A <1> jnz .forward_nocheck ; yes --> 1972 <1> 1973 <1> .backward_check: 1974 000033E5 50 <1> push ax 1975 000033E6 E87758 <1> call readmem ; read current byte 1976 000033E9 3CCC <1> cmp al, 0CCh ; is this still what we wrote? 1977 000033EB B483 <1> mov ah, 83h ; (80h = error occurred while restoring) 1978 000033ED F9 <1> stc 1979 000033EE 7529 <1> jne .return_discard ; nope --> (CY) 1980 000033F0 58 <1> pop ax 1981 000033F1 E85A58 <1> call writemem ; return the byte to its original value 1982 000033F4 7212 <1> jc .next ; failed --> (CY, handled there) 1983 000033F6 C644FFCC <1> mov byte [si-1], 0CCh ; reset stored point 1984 <1> .next_lea_si: 1985 000033FA 8D74F4 <1> lea si, [si-2*BPSIZE] ; adjust (for reverse writing) 1986 000033FD EB09 <1> jmp short .next 1987 <1> 1988 <1> .forward_nocheck: 1989 <1> %if _DELAY_BEFORE_BP 1990 000033FF E817FE <1> call delay_before_bp 1991 <1> %endif 1992 00003402 E84958 <1> call writemem 1993 00003405 8844FF <1> mov byte [si-1], al ; save the previous byte there 1994 <1> .next: 1995 00003408 B401 <1> mov ah, 1 ; (in case of error) 1996 0000340A 7202 <1> jc .return ; failed to write --> (CY) 1997 0000340C E2B9 <1> loop .loop 1998 <1> .return: ; (NC) 1999 0000340E 730A <1> jnc .ret 2000 <1> 2001 00003410 85FF <1> test di, di ; restoring ? 2002 00003412 7503 <1> jnz .ret_CY ; no --> 2003 00003414 80CC80 <1> or ah, 80h ; error occurred while restoring 2004 <1> .ret_CY: 2005 00003417 F9 <1> stc 2006 00003418 52 <1> push dx ; (counteract effect of pop) 2007 <1> .return_discard: 2008 00003419 5A <1> pop dx 2009 <1> .ret: 2010 0000341A C3 <1> retn 2011 <1> %endif 2012 <1> 2013 <1> 2014 <1> ; INP: dx:ax = linear address of point to be (re)set 2015 <1> ; dword [internalflags2] 2016 <1> ; dword [gg_first_cseip_linear] 2017 <1> ; OUT: CY if to (re)set breakpoint 2018 <1> ; if: no flag set 2019 <1> ; or: dx:ax doesn't match, dif2_gg_skip_non_cseip clear 2020 <1> ; (setting non-cseip point) 2021 <1> ; or: dx:ax matches, dif2_gg_skip_cseip clear 2022 <1> ; (setting cseip point afterwards) 2023 <1> ; NC if to not (re)set breakpoint 2024 <1> ; if: dx:ax doesn't match, dif2_gg_skip_non_cseip set 2025 <1> ; (not setting non-cseip point afterwards) 2026 <1> ; or: dx:ax matches, dif2_gg_skip_cseip set 2027 <1> ; (not setting cseip point) 2028 <1> gg_bb_check_is_first: 2029 0000341B F606[C800]07 <1> testopt [internalflags2], dif2_gg_is_first | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 2031 00003420 7418 <1> jz .continue 2032 <1> 2033 00003422 3906[E400] <1> cmp [gg_first_cseip_linear], ax 2034 00003426 7514 <1> jne .is_not_first 2035 00003428 3916[E600] <1> cmp [gg_first_cseip_linear + 2], dx 2036 0000342C 750E <1> jne .is_not_first 2037 <1> 2038 <1> .is_first: 2039 0000342E 800E[C800]10 <1> setopt [internalflags2], dif2_gg_first_detected 2040 00003433 F606[C800]04 <1> testopt [internalflags2], dif2_gg_skip_cseip 2041 00003438 7509 <1> jnz .skip 2042 <1> .continue: 2043 0000343A F9 <1> stc 2044 0000343B C3 <1> retn 2045 <1> 2046 <1> .is_not_first: 2047 0000343C F606[C800]02 <1> testopt [internalflags2], dif2_gg_skip_non_cseip 2048 00003441 74F7 <1> jz .continue 2049 <1> .skip: 2050 00003443 F8 <1> clc 2051 00003444 C3 <1> retn 2052 <1> 2053 <1> 2054 <1> ; INP: al = number to put 2055 <1> ; OUT: putsline called with ordinal string 2056 <1> ; CHG: di, [line_out], ax 2057 <1> putordinalbyte: 2058 00003445 53 <1> push bx 2059 00003446 51 <1> push cx 2060 00003447 52 <1> push dx 2061 <1> 2062 <1> ; Note that trim_overflow in front of line_out is 2063 <1> ; initialised to '0', which we depend on here. 2064 <1> ; With the output from decbyte, at least two decimal 2065 <1> ; digits are always valid in the buffer. 2066 00003448 BF[AE07] <1> mov di, line_out 2067 0000344B E80700 <1> call ordinalbyte 2068 0000344E E8387A <1> call putsline 2069 00003451 5A <1> pop dx 2070 00003452 59 <1> pop cx 2071 00003453 5B <1> pop bx 2072 00003454 C3 <1> retn 2073 <1> 2074 <1> 2075 <1> ordinalbyte: 2076 00003455 E85C79 <1> call decbyte 2077 00003458 8B45FE <1> mov ax, [di - 2] ; al = lower address, higher decimal digit 2078 <1> ; ah = higher address, lower decimal digit 2079 0000345B 3C31 <1> cmp al, '1' 2080 0000345D 7417 <1> je .gotsuf_th ; 11th, 12th, 13th or other teen --> 2081 0000345F BA7374 <1> mov dx, "st" 2082 00003462 80FC31 <1> cmp ah, '1' 2083 00003465 7412 <1> je .gotsuf ; if low digit was one --> 2084 00003467 BA6E64 <1> mov dx, "nd" 2085 0000346A 80FC32 <1> cmp ah, '2' 2086 0000346D 740A <1> je .gotsuf ; if low digit was two --> 2087 0000346F B272 <1> mov dl, 'r' 2088 00003471 80FC33 <1> cmp ah, '3' 2089 00003474 7403 <1> je .gotsuf ; if low digit was three --> 2090 <1> .gotsuf_th: 2091 00003476 BA7468 <1> mov dx, "th" 2092 <1> .gotsuf: 2093 00003479 89D0 <1> mov ax, dx 2094 0000347B AB <1> stosw 2095 0000347C C3 <1> retn 2096 <1> 2097 <1> 2098 <1> %if _BREAKPOINTS 2099 <1> ; INP: ss:bp -> error info (points at first info word) 2100 <1> ; Each word provides information for one point we tried 2101 <1> ; to restore. The lowest info word corresponds to the 2102 <1> ; first bb breakpoint (bb 00), followed by the info word 2103 <1> ; for the second bb breakpoint (bb 01), and so on. 2104 <1> ; There are always as many info words as there are 2105 <1> ; bb breakpoints. 2106 <1> ; CHG: ax, bx, cx, dx, di, si 2107 <1> ; STT: sets es to ss 2108 <1> bb_handlefailedrestore: 2109 <1> %if _PM 2110 <1> call resetmode 2111 <1> %endif 2112 0000347D 31FF <1> xor di, di 2113 0000347F 31C9 <1> xor cx, cx 2114 00003481 16 <1> push ss 2115 00003482 07 <1> pop es 2116 00003483 BE[0601] <1> mov si, b_bplist.bp 2117 <1> .loop: 2118 00003486 8B03 <1> mov ax, word [bp + di] 2119 00003488 F6C47F <1> test ah, 7Fh ; failed ? 2120 0000348B 7414 <1> jz .next 2121 0000348D 51 <1> push cx 2122 0000348E 57 <1> push di 2123 <1> ; cx = 0-based index 2124 0000348F FF7402 <1> push word [si + 2] 2125 00003492 FF34 <1> push word [si] ; stack: linear address 2126 00003494 8A5C05 <1> mov bl, byte [si + BPSIZE - 1] 2127 <1> ; bl = what we tried to restore 2128 00003497 B740 <1> mov bh, 40h ; bh = 40h (bb) 2129 00003499 80CC80 <1> or ah, 80h ; ah & 80h = set (is restore) 2130 0000349C E82808 <1> call display_breakpoint_failure 2131 0000349F 5F <1> pop di 2132 000034A0 59 <1> pop cx 2133 <1> .next: 2134 000034A1 83C606 <1> add si, BPSIZE 2135 000034A4 AF <1> scasw ; di += 2 2136 000034A5 41 <1> inc cx 2137 000034A6 83F910 <1> cmp cx, _NUM_B_BP + _NUM_SYM_BP 2138 000034A9 72DB <1> jb .loop 2139 <1> .end: 2140 000034AB C3 <1> retn 2141 <1> %endif 2142 <1> 2143 <1> 2144 <1> %if _NUM_G_BP 2145 <1> ; INP: cx = number of restored points (number of info words) 2146 <1> ; ss:bp-> error info (points *behind* last info word) 2147 <1> ; Each word provides information for one point we tried 2148 <1> ; to restore. The lowest info word corresponds to the 2149 <1> ; first gg breakpoint, followed by the info word for 2150 <1> ; the second gg breakpoint (if any), and so on. 2151 <1> ; CHG: ax, bx, cx, dx, di, si 2152 <1> ; STT: sets es to ss 2153 <1> gg_handlefailedrestore: 2154 <1> %if _PM 2155 <1> call resetmode 2156 <1> %endif 2157 000034AC 89CF <1> mov di, cx 2158 000034AE 01FF <1> add di, di 2159 000034B0 F7DF <1> neg di 2160 000034B2 16 <1> push ss 2161 000034B3 07 <1> pop es 2162 000034B4 BB0000 <1> mov bx, 0 2163 000034B7 BE[4C07] <1> mov si, g_bplist.bp 2164 000034BA E325 <1> jcxz .end 2165 <1> .loop: 2166 000034BC 8B03 <1> mov ax, word [bp+di] 2167 000034BE F6C47F <1> test ah, 7Fh ; failed? 2168 000034C1 7416 <1> jz .next ; no --> 2169 <1> 2170 <1> ; si-> point 2171 <1> ; ax = info (ah = reason, al = new value if reason 3) 2172 <1> ; bx = point's 0-based index 2173 <1> .display: 2174 000034C3 53 <1> push bx 2175 000034C4 57 <1> push di 2176 000034C5 89D9 <1> mov cx, bx ; cx = 0-based index 2177 000034C7 FF7402 <1> push word [si + 2] 2178 000034CA FF34 <1> push word [si] ; stack: linear address 2179 000034CC 8A5C05 <1> mov bl, byte [si + BPSIZE - 1] 2180 <1> ; bl = what we tried to restore 2181 000034CF B780 <1> mov bh, 80h ; bh = 80h (gg) 2182 000034D1 80CC80 <1> or ah, 80h ; ah & 80h = set (is restore) 2183 000034D4 E8F007 <1> call display_breakpoint_failure 2184 000034D7 5F <1> pop di 2185 000034D8 5B <1> pop bx 2186 <1> .next: 2187 000034D9 43 <1> inc bx ; increment counter 2188 000034DA 83C606 <1> add si, BPSIZE ; -> next point 2189 000034DD 47 <1> inc di 2190 000034DE 47 <1> inc di ; di+bp-> next error info 2191 000034DF 75DB <1> jnz .loop ; not yet at end --> 2192 <1> .end: 2193 000034E1 C3 <1> retn 2194 <1> %endif ; _NUM_G_BP 2195 <1> 2196 <1> 2197 <1> ; INP: word [reg_cs] 2198 <1> ; (d)word [reg_eip] 2199 <1> ; OUT: bx = word [reg_cs] 2200 <1> ; CY if invalid address 2201 <1> ; NC if address is valid, 2202 <1> ; dx:ax = linear address 2203 <1> ; CHG: edx, ax, ecx 2204 <1> get_cseip_minus_1_linear: 2205 <1> _386_PM_o32 ; or ecx, byte -1 2206 000034E2 83C9FF <1> or cx, byte -1 2207 <1> 2208 <1> ; INP: word [reg_cs] 2209 <1> ; (d)word [reg_eip] 2210 <1> ; (e)cx = adjustment to (e)ip 2211 <1> ; OUT: bx = word [reg_cs] 2212 <1> ; CY if invalid address 2213 <1> ; NC if address is valid, 2214 <1> ; dx:ax = linear address 2215 <1> ; CHG: edx, ax 2216 <1> get_cseip_ecx_linear: 2217 000034E5 8B1E[880C] <1> mov bx, [reg_cs] ; bx = cs 2218 <1> _386_PM_o32 2219 000034E9 8B16[940C] <1> mov dx, [reg_eip] ; (e)dx = (e)ip 2220 <1> _386_PM_o32 2221 000034ED 01CA <1> add dx, cx ; bx:(e)dx = adjusted cs:(e)ip 2222 <1> ; (getlinear doesn't use the high word of edx if it's a 16-bit cs) 2223 <1> ; call getlinear ; dx:ax = linear address of this cs:eip 2224 <1> ; (fall through) 2225 <1> 2226 <1> ; INP: If currently in RM, 2227 <1> ; bx:dx = segment:offset of address 2228 <1> ; If currently in PM, 2229 <1> ; bx:(e)dx = selector:offset of address 2230 <1> ; OUT: bx = unchanged (selector/segment) 2231 <1> ; CY if address is invalid, 2232 <1> ; because Int31.0006 failed for bx or 2233 <1> ; because 32-bit address overflowed or 2234 <1> ; because A20 could not be switched on 2235 <1> ; NC if address is valid, 2236 <1> ; dx:ax = linear address 2237 <1> ; dh is always zero if the address is in RM address space 2238 <1> ; CHG: dx, ax 2239 <1> getlinear: 2240 <1> %if _PM 2241 <1> call resetmode 2242 <1> ; This must execute in the correct mode, 2243 <1> ; because we get the input from whatever 2244 <1> ; mode we were originally entered in. 2245 <1> %endif 2246 <1> %if _DEBUG1 2247 <1> call .do_not_use_test ; get linear address 2248 <1> jc @F ; already an error ? then return --> 2249 <1> push bx 2250 <1> push cx 2251 <1> mov bx, test_records_getLinear 2252 <1> call handle_test_case_multiple_16 2253 <1> ; check whether this should testcase the error 2254 <1> ; CY to indicate error from this call 2255 <1> pop cx 2256 <1> pop bx 2257 <1> @@: 2258 <1> retn 2259 <1> 2260 <1> %endif 2261 <1> .do_not_use_test: 2262 000034EF 53 <1> push bx 2263 <1> %if _PM 2264 <1> call ispm 2265 <1> jnz .rm 2266 <1> mov ax, 0006h 2267 <1> push cx 2268 <1> push dx 2269 <1> int 31h ; get selector base address into cx:dx 2270 <1> pop ax ; (edxh:)ax = offset, cx:dx = base 2271 <1> jc .return_cx_bx 2272 <1> 2273 <1> _386 call test_d_b_bit 2274 <1> _386 jz .16 2275 <1> _386 push edx 2276 <1> _386 pop bx 2277 <1> _386 pop bx ; bx = high word edx (in 32-bit PM segment) 2278 <1> _386 jmp .32 2279 <1> .16: ; bx:ax = offset 2280 <1> xor bx, bx ; 16-bit PM segment, clear offset high word 2281 <1> .32: 2282 <1> add ax, dx 2283 <1> adc bx, cx ; add the base 2284 <1> xchg bx, dx ; dx:ax = 32-bit linear address 2285 <1> clc 2286 <1> 2287 <1> .return_cx_bx: 2288 <1> pop cx 2289 <1> pop bx 2290 <1> retn 2291 <1> .rm: 2292 <1> %endif 2293 000034F0 89D8 <1> mov ax, bx 2294 000034F2 51 <1> push cx 2295 000034F3 B104 <1> mov cl, 4 2296 000034F5 D3C0 <1> rol ax, cl 2297 000034F7 59 <1> pop cx 2298 000034F8 BBF0FF <1> mov bx, 0FFF0h 2299 000034FB 21C3 <1> and bx, ax ; bx = low word adjustment 2300 000034FD 83E00F <1> and ax, byte 0Fh ; ax = higher bits which don't fit in the low word 2301 00003500 01DA <1> add dx, bx 2302 00003502 83D000 <1> adc ax, byte 0 2303 00003505 92 <1> xchg ax, dx ; dx:ax = 21-bit linear address 2304 00003506 F606[C500]10 <1> testopt [internalflags], debuggeeA20 2305 0000350B 7503 <1> jnz .return_bx ; A20 line enabled, no need to adjust (NC) 2306 0000350D 80E2EF <1> and dl, ~10h ; clear corresponding bit of the address if it was set (NC) 2307 <1> .return_bx: 2308 00003510 5B <1> pop bx 2309 00003511 C3 <1> retn 2310 <1> 2311 <1> 2312 <1> ; INP: bx = segment/selector to use by default 2313 <1> ; al = next character in input 2314 <1> ; si -> following character in input 2315 <1> ; OUT: NC if successful, 2316 <1> ; bx:dx = linear address 2317 <1> ; (if not _PM, this always fits in 24 bits) 2318 <1> ; al = next character 2319 <1> ; si -> following character 2320 <1> ; (d)word [bp_offset] = preferred offset, -1 if none 2321 <1> ; CY if error 2322 <1> ; CHG: edx, bx, ax, si, (d)word [bp_offset] 2323 <1> getlinearaddr: 2324 <1> %if _PM 2325 <1> call resetmode 2326 <1> %endif 2327 <1> _386_PM_o32 ; or dword 2328 00003512 830E[B086]FF <1> or word [bp_offset], strict byte -1 2329 00003517 E85A78 <1> call skipcomm0 2330 0000351A 3C40 <1> cmp al, '@' 2331 0000351C 7530 <1> jne .at_not 2332 0000351E AC <1> lodsb ; insure we have a blank or opening parens 2333 0000351F 3C28 <1> cmp al, '(' 2334 00003521 740A <1> je .at 2335 00003523 3C09 <1> cmp al, 9 2336 00003525 7406 <1> je .at 2337 00003527 3C20 <1> cmp al, 32 2338 00003529 7402 <1> je .at 2339 0000352B EB1E <1> jmp .at_not_reload ; assume the @ is part of a symbol 2340 <1> 2341 <1> .at: 2342 0000352D E87378 <1> call skipwh0 2343 00003530 3C28 <1> cmp al, '(' 2344 00003532 750D <1> jne .at_not_paren 2345 <1> 2346 00003534 E82D72 <1> call getdword 2347 00003537 E86978 <1> call skipwh0 2348 0000353A 3C29 <1> cmp al, ')' 2349 0000353C 7520 <1> jne .error 2350 0000353E AC <1> lodsb 2351 <1> 2352 0000353F EB03 <1> jmp .at_got 2353 <1> 2354 <1> .at_not_paren: 2355 00003541 E82072 <1> call getdword 2356 <1> .at_got: 2357 <1> %ifn _PM 2358 <1> ; test bh, bh 2359 <1> ; jnz .error 2360 00003544 83FB11 <1> cmp bx, 11h 2361 00003547 7315 <1> jae .error 2362 <1> %endif 2363 00003549 F8 <1> clc 2364 0000354A C3 <1> retn 2365 <1> 2366 <1> .at_not_reload: 2367 0000354B 4E <1> dec si 2368 0000354C 4E <1> dec si 2369 0000354D AC <1> lodsb 2370 <1> .at_not: 2371 0000354E E81268 <1> call getaddrX 2372 <1> %if _PM 2373 <1> _no386 and word [bp_offset + 2], 0 2374 <1> %endif 2375 <1> _386_PM_o32 ; mov dword [bp_offset], edx 2376 00003551 8916[B086] <1> mov word [bp_offset], dx 2377 00003555 50 <1> push ax 2378 00003556 E896FF <1> call getlinear 2379 00003559 93 <1> xchg bx, ax ; dx:bx = linear 2380 0000355A 87D3 <1> xchg dx, bx ; bx:dx = linear 2381 0000355C 58 <1> pop ax ; al = next character 2382 0000355D C3 <1> retn 2383 <1> 2384 <1> .error: 2385 0000355E F9 <1> stc 2386 0000355F C3 <1> retn 2387 <1> 2388 <1> 2389 <1> usesection lDEBUG_DATA_ENTRY 2390 <1> align 4, db 0 2391 000086B0 0000 <1> bp_offset: dw 0 2392 <1> %if _PM 2393 <1> dw 0 2394 <1> %endif 2395 <1> usesection lDEBUG_CODE 2396 <1> 2397 <1> 2398 <1> ; INP: word [reg_cs] 2399 <1> ; (d)word [reg_eip] 2400 <1> ; dword [tpg_possible_breakpoint] 2401 <1> ; [internalflags2] & dif2_tpg_have_bp 2402 <1> ; OUT: CY if invalid address 2403 <1> ; NC if address is valid, 2404 <1> ; dx:ax = linear address 2405 <1> ; CHG: edx, ax, ecx, bx 2406 <1> ; STT: ds = ss = debugger data selector 2407 <1> get_cseip_of_possible_breakpoint: 2408 00003560 A1[EC00] <1> mov ax, [tpg_possible_breakpoint] 2409 00003563 8B16[EE00] <1> mov dx, [tpg_possible_breakpoint + 2] 2410 <1> ; dx:ax = stored possible breakpoint address 2411 00003567 F606[C900]01 <1> testopt [internalflags2], dif2_tpg_have_bp 2412 0000356C 7511 <1> jnz .retn ; (NC) if already stored --> 2413 0000356E E871FF <1> call get_cseip_minus_1_linear 2414 <1> ; dx:ax = linear address at cs:(e)ip - 1 2415 00003571 720C <1> jc .retn ; (CY) if getlinear failed --> 2416 00003573 A3[EC00] <1> mov [tpg_possible_breakpoint], ax 2417 00003576 8916[EE00] <1> mov [tpg_possible_breakpoint + 2], dx 2418 <1> ; store for later use 2419 0000357A 800E[C900]01 <1> setopt [internalflags2], dif2_tpg_have_bp 2420 <1> ; (NC) 2421 <1> .retn: 2422 0000357F C3 <1> retn 2423 <1> 2424 <1> 2425 <1> %if _PM 2426 <1> 2427 <1> ; DEBUGX: when a mode switch from PM to RM did occur in the debuggee, 2428 <1> ; breakpoint addresses in non-RM address space are unreachable. 2429 <1> ; To enable the debugger to reset the breakpoints, it has to switch 2430 <1> ; temporarily to PM. (In DEBUG/X 1.19, a switch from RM to PM in the 2431 <1> ; debuggee will temporarily switch the debugger back to RM too. We 2432 <1> ; handle this case without a switch as the linear RM address can be 2433 <1> ; accessed directly in PM, assuming that the DPMI hosts linear-to- 2434 <1> ; physical mapping for the RM address space is the same as the one 2435 <1> ; we get in PM.) 2436 <1> 2437 <1> ; (To use mode switching in any case, the format the breakpoints are 2438 <1> ; stored in needs to be modified. Additionally, the mode switching 2439 <1> ; needs to be done elsewhere instead of in getsegmented. resetmode 2440 <1> ; can be used as is, even if a mode switch from PM to RM occured.) 2441 <1> 2442 <1> switchmode: 2443 <1> ;--- raw switch: 2444 <1> ;--- si:e/di: new cs:e/ip 2445 <1> ;--- dx:e/bx: new ss:e/sp 2446 <1> ;--- ax: new ds 2447 <1> ;--- cx: new es 2448 <1> _386 xor ebx, ebx ; clear ebxh 2449 <1> mov bx, sp 2450 <1> _386 xor edi, edi ; clear edih 2451 <1> mov di, .back_after_switch 2452 <1> call ispm 2453 <1> jz .pm 2454 <1> .r86m: 2455 <1> d4 call d4message 2456 <1> d4 asciz "In switchmode.r86m",13,10 2457 <1> mov ax, [dssel] ; switch rm -> pm 2458 <1> mov si, [code_sel] 2459 <1> mov dx, ax 2460 <1> mov cx, ax 2461 <1> jmp far [dpmi_rm2pm] 2462 <1> .pm: 2463 <1> d4 call d4message 2464 <1> d4 asciz "In switchmode.pm",13,10 2465 <1> mov ax, [pspdbg] ; switch pm -> rm 2466 <1> mov si, [code_seg] 2467 <1> mov dx, ax 2468 <1> mov cx, ax 2469 <1> _386_o32 ; jmp far dword [dpmi_pm2rm] 2470 <1> jmp far [dpmi_pm2rm] 2471 <1> 2472 <1> .back_after_switch: 2473 <1> xoropt [internalflags], protectedmode 2474 <1> d4 call d4message 2475 <1> d4 asciz "In switchmode.back_after_switch",13,10 2476 <1> retn 2477 <1> 2478 <1> 2479 <1> ; INP: al = direction, 0 = save state, 1 = restore state 2480 <1> ; [auxbuff] = state buffer 2481 <1> ; ES = debugger data selector 2482 <1> ; CHG: edi 2483 <1> sr_state: 2484 <1> testopt [internalflags], switchbuffer 2485 <1> jz .return ; no need to call --> 2486 <1> _386_o32 ; xor edi, edi 2487 <1> xor di, di 2488 <1> call ispm 2489 <1> jz .pm 2490 <1> .r86m: 2491 <1> d4 call d4message 2492 <1> d4 asciz "In sr_state.r86m",13,10 2493 <1> mov es, word [auxbuff_segorsel + soaSegment] 2494 <1> call far [dpmi_rmsav] 2495 <1> jmp .return 2496 <1> 2497 <1> .pm: 2498 <1> d4 call d4message 2499 <1> d4 asciz "In sr_state.pm",13,10 2500 <1> mov es, word [auxbuff_segorsel + soaSelector] 2501 <1> _386_o32 ; call far dword [dpmi_pmsav] 2502 <1> call far [dpmi_pmsav] 2503 <1> .return: 2504 <1> push ss 2505 <1> pop es 2506 <1> retn 2507 <1> 2508 <1> 2509 <1> ; INP: [internalflags] & modeswitched 2510 <1> ; OUT: flag cleared, mode switched back if had been switched 2511 <1> ; EI 2512 <1> ; CHG: - (not even flags!) 2513 <1> ; STT: es = ds = ss = gs = fs = debugger data segment/selector 2514 <1> ; 2515 <1> ; Switches back to RM if a mode switch to PM was done by getsegmented. 2516 <1> ; Does nothing otherwise. (Can be called multiple times.) 2517 <1> resetmode: 2518 <1> pushf 2519 <1> testopt [internalflags], modeswitched ; switched mode previously ? 2520 <1> jz .return ; no --> 2521 <1> d4 call d4message 2522 <1> d4 asciz "In resetmode (actually resetting)",13,10 2523 <1> subcpu 286 2524 <1> _386_o32 2525 <1> pusha 2526 <1> call switchmode ; switch back to the mode we were entered in (RM) 2527 <1> mov al, 1 2528 <1> call sr_state ; restore state 2529 <1> call handle_mode_changed ; ! called with flag set 2530 <1> clropt [internalflags], modeswitched ; reset the flag 2531 <1> _386 push ss 2532 <1> _386 pop gs 2533 <1> _386 push ss 2534 <1> _386 pop fs 2535 <1> _386_o32 2536 <1> popa 2537 <1> subcpureset 2538 <1> .return: 2539 <1> popf 2540 <1> sti 2541 <1> retn 2542 <1> %endif 2543 <1> 2544 <1> ; INP: dx:ax = linear address 2545 <1> ; OUT: CY if inaccessible 2546 <1> ; NC if accessible, 2547 <1> ; bx:(e)dx = segment:offset or selector:offset address 2548 <1> ; A temporary mode switch from RM to PM might have occured. 2549 <1> ; This has to be reset by calling resetmode. 2550 <1> ; CHG: (e)ax, (e)bx, (e)dx, fs, gs 2551 <1> ; STT: es = ds = ss = our segment/selector 2552 <1> ; 2553 <1> ; It is assumed that only one byte needs to be accessed. 2554 <1> ; (A workaround to access multiple bytes would be to access each 2555 <1> ; byte separately and call this function for each of the bytes.) 2556 <1> ; 2557 <1> ; The TSR command code assumes that getsegmented.pm does not switch 2558 <1> ; modes and that it will return an offset in (e)dx that allows 2559 <1> ; 16-bit access. Adjust that code if either is no longer true. 2560 <1> getsegmented: 2561 <1> %if _DEBUG1 2562 <1> push bx 2563 <1> push cx 2564 <1> mov bx, test_records_getSegmented 2565 <1> call handle_test_case_multiple_16 2566 <1> pop cx 2567 <1> pop bx 2568 <1> jnc @F 2569 <1> ; stc ; (already CY if the conditional didn't jump) 2570 <1> retn 2571 <1> 2572 <1> @@: 2573 <1> %endif 2574 <1> .do_not_use_test: 2575 <1> 2576 <1> %if _PM 2577 <1> call ispm 2578 <1> jnz .rm 2579 <1> .pm: 2580 <1> push cx 2581 <1> mov bx, word [scratchsel] 2582 <1> xchg ax, dx 2583 <1> xchg ax, cx ; cx:dx = linear address 2584 <1> mov ax, 0007h 2585 <1> int 31h ; set base to the address 2586 <1> pop cx 2587 <1> jc .invalid 2588 <1> %if 0 ; scratchsel is expected by other code to access arbitrary data ?? 2589 <1> push cx 2590 <1> mov ax, 0008h 2591 <1> xor cx, cx 2592 <1> xor dx, dx 2593 <1> int 31h ; set limit to zero (access to one byte only) 2594 <1> pop cx 2595 <1> jc .invalid 2596 <1> %endif 2597 <1> _386_o32 ; xor edx, edx 2598 <1> xor dx, dx ; bx:(e)dx = selector:offset (using scratchsel with the address as base) 2599 <1> retn ; (NC) 2600 <1> %endif 2601 <1> .rm: 2602 00003580 83FA10 <1> cmp dx, byte 10h ; check for address space 2603 00003583 7219 <1> jb .nothma ; below HMA, normal access --> 2604 00003585 7402 <1> je .checkhma ; possibly in HMA --> 2605 <1> .nonrmspace: ; above HMA 2606 <1> %if _PM 2607 <1> ; It's a PM address but we are in RM. 2608 <1> testopt [internalflags], canswitchmode 2609 <1> jz .invalid ; can't switch to PM --> 2610 <1> .switchmodes: 2611 <1> _386_o32 2612 <1> push si 2613 <1> _386_o32 2614 <1> push di 2615 <1> _386_o32 2616 <1> push cx 2617 <1> _386_o32 2618 <1> push bp 2619 <1> push dx 2620 <1> push ax 2621 <1> d4 call d4message 2622 <1> d4 asciz "In getsegmented.switchmodes (switching to access memory beyond 1088 KiB)",13,10 2623 <1> call remember_mode 2624 <1> setopt [internalflags], modeswitched ; set flag for resetmode 2625 <1> mov al, 0 2626 <1> call sr_state ; save state 2627 <1> call switchmode ; switch to PM 2628 <1> call handle_mode_changed ; ! called with flag set 2629 <1> pop ax 2630 <1> pop dx 2631 <1> _386_o32 2632 <1> pop bp 2633 <1> _386_o32 2634 <1> pop cx 2635 <1> _386_o32 2636 <1> pop di 2637 <1> _386_o32 2638 <1> pop si 2639 <1> jmp .pm 2640 <1> 2641 <1> .invalid: ; the address is inaccessible 2642 <1> %endif 2643 00003587 F9 <1> stc 2644 00003588 C3 <1> retn 2645 <1> 2646 <1> .checkhma: 2647 00003589 83F8F0 <1> cmp ax, -10h ; valid offset for HMA ? 2648 0000358C 73F9 <1> jae .nonrmspace ; no, above HMA --> 2649 0000358E F606[C500]20 <1> testopt [internalflags], debuggerA20 ; A20 on, HMA accessible ? 2650 00003593 74F2 <1> jz .nonrmspace ; no, treat as above HMA (DEBUGX) --> 2651 00003595 BBFFFF <1> mov bx, 0FFFFh ; the HMA must always be addressed by segment FFFFh 2652 00003598 83C010 <1> add ax, byte 10h ; and the offset is always at least 0010h (FFFFh:0010h = 00100000h) 2653 <1> ; (NC because we checked that this won't overflow) 2654 0000359B 92 <1> xchg ax, dx ; bx:dx = segment:offset 2655 0000359C EB11 <1> jmp .zero_edxh 2656 <1> 2657 <1> .nothma: 2658 0000359E 51 <1> push cx 2659 0000359F B104 <1> mov cl, 4 2660 000035A1 D3CA <1> ror dx, cl ; dx (high 4 bits) = high 4 bits of segment 2661 000035A3 89C3 <1> mov bx, ax 2662 000035A5 D3EB <1> shr bx, cl ; bx = low 12 bits of segment 2663 000035A7 09DA <1> or dx, bx ; dx = segment 2664 000035A9 83E00F <1> and ax, byte 0Fh ; ax = low 4 bits of linear, used as offset (NC) 2665 000035AC 92 <1> xchg ax, dx 2666 000035AD 93 <1> xchg ax, bx ; bx:dx = segment:offset 2667 000035AE 59 <1> pop cx 2668 <1> .zero_edxh: 2669 <1> _386_PM movzx edx, dx 2670 000035AF C3 <1> retn 2671 <1> 2672 <1> 2673 <1> ; T command - Trace. 2674 <1> tt: 2675 000035B0 88C4 <1> mov ah, al 2676 000035B2 80E4DF <1> and ah, TOUPPER 2677 000035B5 80FC4D <1> cmp ah, 'M' 2678 000035B8 7548 <1> jnz isnotmodeset 2679 000035BA E8B677 <1> call skipcomma 2680 000035BD E88D77 <1> call iseol? 2681 000035C0 741C <1> je ismodeget 2682 000035C2 E86776 <1> call getword 2683 000035C5 E89A77 <1> call chkeol ; expect end of line here 2684 000035C8 83FA01 <1> cmp dx, 1 2685 000035CB 7603E9EC62 <1> ja error 2686 000035D0 7407 <1> je .set ; selected 1 --> 2687 <1> .clear: ; selected 0 2688 000035D2 8026[9400]FD <1> clropt [options], traceints 2689 000035D7 EB05 <1> jmp short .get 2690 <1> .set: 2691 000035D9 800E[9400]02 <1> setopt [options], traceints 2692 <1> .get: 2693 <1> ismodeget: 2694 000035DE B030 <1> mov al, '0' 2695 000035E0 BE[E17C] <1> mov si, tmode0 2696 000035E3 F606[9400]02 <1> testopt [options], traceints 2697 000035E8 7404 <1> jz .zero 2698 000035EA 40 <1> inc ax 2699 000035EB BE[DA7C] <1> mov si, tmode1 2700 <1> .zero: 2701 000035EE A2[C67C] <1> mov byte [tmodev], al 2702 000035F1 BF[AE07] <1> mov di, line_out 2703 000035F4 56 <1> push si 2704 000035F5 BE[B87C] <1> mov si, tmodes 2705 000035F8 E8B377 <1> call showstring 2706 000035FB 5E <1> pop si 2707 000035FC E8AF77 <1> call showstring 2708 000035FF E98378 <1> jmp putsline_crlf 2709 <1> 2710 <1> isnotmodeset: 2711 <1> %if _TTEST 2712 00003602 50 <1> push ax 2713 00003603 80FC54 <1> cmp ah, 'T' 2714 00003606 7516 <1> jne @F 2715 00003608 8B04 <1> mov ax, word [si] 2716 0000360A 25DFDF <1> and ax, TOUPPER_W 2717 0000360D 3D4553 <1> cmp ax, "ES" 2718 00003610 750C <1> jne @F 2719 00003612 8A4402 <1> mov al, byte [si + 2] 2720 00003615 24DF <1> and al, TOUPPER 2721 00003617 3C54 <1> cmp al, 'T' 2722 00003619 7503E9B500 <1> je ttestcmd 2723 <1> @@: 2724 0000361E 58 <1> pop ax 2725 <1> %endif 2726 <1> %if _TSR 2727 0000361F 80FC53 <1> cmp ah, 'S' 2728 00003622 750D <1> jne @F 2729 00003624 50 <1> push ax 2730 00003625 8A04 <1> mov al, byte [si] 2731 00003627 24DF <1> and al, TOUPPER 2732 00003629 3C52 <1> cmp al, 'R' 2733 0000362B 58 <1> pop ax 2734 0000362C 7503E9AD01 <1> je tsr 2735 <1> %endif 2736 <1> @@: 2737 00003631 8026[C700]F7 <1> clropt [internalflags], tt_p 2738 00003636 80FC50 <1> cmp ah, 'P' 2739 00003639 7506 <1> jne @F 2740 0000363B AC <1> lodsb 2741 0000363C 800E[C700]08 <1> setopt [internalflags], tt_p 2742 <1> @@: 2743 <1> tt0: 2744 00003641 C706[D20B][4136] <1> mov word [lastcmd], tt0 2745 00003647 8026[C900]EF <1> clropt [internalflags2], dif2_is_pp 2746 0000364C E85E0A <1> call parse_pt ; process arguments 2747 <1> 2748 <1> ; Do it times. 2749 <1> tt1: 2750 0000364F 53 <1> push bx 2751 00003650 51 <1> push cx 2752 <1> 2753 00003651 F606[C700]08 <1> testopt [internalflags], tt_p 2754 00003656 7439 <1> jz .not_p 2755 <1> 2756 <1> %if _PM 2757 <1> call resetmode 2758 <1> %endif 2759 00003658 BA0F00 <1> mov dx, 15 ; DL = number of bytes to go; DH = prefix flags. 2760 0000365B 8B1E[880C] <1> mov bx, word [reg_cs] 2761 <1> _386_PM_o32 ; mov esi, dword [reg_eip] 2762 0000365F 8B36[940C] <1> mov si, word [reg_eip] 2763 <1> .pp2: 2764 00003663 E89F07 <1> call pp16 ; get next instruction byte into AL 2765 00003666 BF[1C11] <1> mov di, ppbytes 2766 00003669 B91900 <1> mov cx, PPLEN_ONLY_STRING 2767 <1> %if _SYMBOLIC 2768 <1> mov byte [pp_instruction], al 2769 <1> %endif 2770 0000366C F2AE <1> repne scasb 2771 0000366E 7521 <1> jne .not_p ; if not one of these --> 2772 00003670 8A451F <1> mov al,byte [di+PPLEN-1]; get corresponding byte in ppinfo 2773 00003673 A880 <1> test al, PP_PREFIX ; prefix ? 2774 00003675 740E <1> jz .pp3 ; no --> 2775 00003677 08C6 <1> or dh, al ; set the OSIZE or ASIZE flags if either of these 2776 <1> ; Note: Multiple OSIZE in a 16-bit cs do not toggle 2777 <1> ; between decoding as O32 and O16, they're always 2778 <1> ; decoded as O32. The same is true for A32, and 2779 <1> ; in a 32-bit cs for O16 and A16. 2780 00003679 FECA <1> dec dl 2781 0000367B 75E6 <1> jnz .pp2 ; if not out of bytes --> 2782 0000367D BA[AE74] <1> mov dx, msg.warnprefix 2783 00003680 E87D7B <1> call putsz 2784 00003683 EB0C <1> jmp .not_p 2785 <1> 2786 <1> ; A repeatable string instruction is to be decoded. 2787 <1> ; Finish the decoding and skip the appropriate number 2788 <1> ; of opcode bytes. 2789 <1> .pp3: 2790 <1> _386_PM call pp_fix32bitflags 2791 00003685 A847 <1> test al, PP_VARSIZ | PP_SIZ_MASK 2792 00003687 7403E93062 <1> jnz error 2793 <1> %if 0 2794 <1> test al, PP_VARSIZ ; different opcode length depends on OSIZE ? 2795 <1> jz .ignoreosize ; no --> 2796 <1> and dh, 2 2797 <1> add al, dh 2798 <1> .ignoreosize: 2799 <1> and ax, PP_SIZ_MASK 2800 <1> _386_PM movzx eax, ax ; clear high word (in case it counts) 2801 <1> _386_PM_o32 ; add esi, eax 2802 <1> add si, ax 2803 <1> %endif 2804 <1> ; pp10: 2805 <1> %if _SYMBOLIC 2806 <1> call pp3_check_symhints 2807 <1> jc .not_p ; trace --> 2808 <1> %endif 2809 <1> ; jmp short pp11 ; we have a skippable instruction here 2810 <1> ; pp11: 2811 <1> _386_PM call resetmode_and_test_d_b_bit 2812 <1> _386_PM jnz .32 ; full 32-bit offset valid --> 2813 <1> _386_PM movzx esi, si ; clear high word here 2814 <1> .32: 2815 0000368C E8E006 <1> call proceedbreakpoint ; run until the breakpoint is hit 2816 <1> ; This call might return modeswitched. 2817 0000368F EB03 <1> jmp short @F 2818 <1> 2819 <1> .not_p: 2820 00003691 E85302 <1> call traceone ; call common code 2821 <1> @@: 2822 00003694 7303E91802 <1> jc unexpectedinterrupt ; an unexpected interrupt occured --> 2823 <1> %if _BREAKPOINTS 2824 00003699 BA0000 <1> mov dx, 0 ; do not skip WHILE 2825 0000369C 7413 <1> jz @F ; (breakpoint after instruction was hit) 2826 <1> 2827 <1> ; bb breakpoint was hit. dumpregs, then return 2828 0000369E E8C800 <1> call handle_bb_hit_pass_match 2829 000036A1 7204 <1> jc .actual_hit ; actual match ? --> 2830 000036A3 7414 <1> jz tt2.nodump ; non-silent mode ? --> 2831 000036A5 EB0A <1> jmp tt2 ; silent mode --> 2832 <1> 2833 <1> .actual_hit: 2834 <1> %if _PM 2835 <1> call resetmode 2836 <1> %endif 2837 000036A7 E849F9 <1> call put_deferred_message_silent 2838 000036AA E8F404 <1> call dumpregs_extended_silent 2839 000036AD 59 <1> pop cx 2840 000036AE 5B <1> pop bx ; (discard counter) 2841 000036AF EB1B <1> jmp @FF 2842 <1> @@: 2843 <1> %endif 2844 <1> tt2: 2845 000036B1 52 <1> push dx 2846 <1> %if _PM 2847 <1> call resetmode 2848 <1> %endif 2849 000036B2 E83EF9 <1> call put_deferred_message_silent 2850 000036B5 E8E904 <1> call dumpregs_extended_silent 2851 <1> ; dump registers 2852 000036B8 5A <1> pop dx ; preserve skip WHILE flag 2853 <1> .nodump: 2854 <1> 2855 000036B9 E84F00 <1> call tt_handle_while 2856 000036BC 59 <1> pop cx 2857 000036BD 5B <1> pop bx 2858 <1> 2859 000036BE 83E901 <1> sub cx, 1 2860 000036C1 83DB00 <1> sbb bx, 0 ; decrement loop counter 2861 <1> 2862 000036C4 85DB <1> test bx, bx 2863 000036C6 7508 <1> jnz tt1_jmp ; loop --> 2864 000036C8 85C9 <1> test cx, cx 2865 000036CA 7504 <1> jnz tt1_jmp ; loop --> 2866 <1> 2867 <1> @@: 2868 <1> %if _PM 2869 <1> call resetmode 2870 <1> %endif 2871 000036CC E8717A <1> call silence_dump 2872 <1> 2873 000036CF C3 <1> retn 2874 <1> 2875 <1> tt1_jmp: 2876 000036D0 E97CFF <1> jmp tt1 2877 <1> 2878 <1> 2879 <1> %if _TTEST 2880 <1> ttestcmd: 2881 000036D3 58 <1> pop ax 2882 000036D4 46 <1> inc si 2883 000036D5 46 <1> inc si 2884 000036D6 46 <1> inc si 2885 000036D7 E8C876 <1> call skipwhite 2886 <1> 2887 <1> .tt0: 2888 000036DA C706[D20B][DA36] <1> mov word [lastcmd], .tt0 2889 000036E0 8026[C900]EF <1> clropt [internalflags2], dif2_is_pp 2890 000036E5 E8C509 <1> call parse_pt ; process arguments 2891 <1> 2892 <1> ; Do it times. 2893 <1> .tt1: 2894 000036E8 53 <1> push bx 2895 000036E9 51 <1> push cx 2896 <1> 2897 <1> .tt2: 2898 <1> %if _PM 2899 <1> call resetmode 2900 <1> %endif 2901 000036EA E806F9 <1> call put_deferred_message_silent 2902 000036ED E8B104 <1> call dumpregs_extended_silent 2903 <1> ; dump registers 2904 <1> .nodump: 2905 <1> 2906 000036F0 31D2 <1> xor dx, dx 2907 000036F2 E81600 <1> call tt_handle_while 2908 000036F5 59 <1> pop cx 2909 000036F6 5B <1> pop bx 2910 <1> 2911 000036F7 83E901 <1> sub cx, 1 2912 000036FA 83DB00 <1> sbb bx, 0 ; decrement loop counter 2913 <1> 2914 000036FD 85DB <1> test bx, bx 2915 000036FF 7508 <1> jnz .tt1_jmp ; loop --> 2916 00003701 85C9 <1> test cx, cx 2917 00003703 7504 <1> jnz .tt1_jmp ; loop --> 2918 <1> 2919 <1> @@: 2920 <1> %if _PM 2921 <1> call resetmode 2922 <1> %endif 2923 00003705 E8387A <1> call silence_dump 2924 <1> 2925 00003708 C3 <1> retn 2926 <1> 2927 <1> .tt1_jmp: 2928 00003709 EBDD <1> jmp .tt1 2929 <1> %endif 2930 <1> 2931 <1> 2932 <1> ; INP: dx = nonzero if to bypass while condition 2933 <1> tt_handle_while: 2934 0000370B 85D2 <1> test dx, dx 2935 0000370D 7538 <1> jnz @F 2936 0000370F F606[C700]04 <1> testopt [internalflags], tt_while 2937 00003714 7431 <1> jz @F 2938 <1> 2939 <1> %if _PM 2940 <1> call resetmode 2941 <1> %endif 2942 00003716 E82F00 <1> call .copy_condition_to_line_out 2943 <1> ; dx = si -> line_out with condition 2944 00003719 FF36[360B] <1> push word [rc] 2945 0000371D 8F06[380B] <1> pop word [priorrc] 2946 00003721 AC <1> lodsb 2947 00003722 E83F70 <1> call getexpression ; parse stored expression 2948 00003725 E83A76 <1> call chkeol 2949 00003728 E8FE69 <1> call toboolean ; get boolean 2950 0000372B 85D2 <1> test dx, dx ; true ? 2951 0000372D 7518 <1> jnz @F ; yes, continue --> 2952 <1> 2953 0000372F E80E7A <1> call silence_dump 2954 <1> 2955 00003732 BA[086B] <1> mov dx, msg.while_terminated_before 2956 00003735 E8C87A <1> call putsz 2957 00003738 E80D00 <1> call .copy_condition_to_line_out 2958 0000373B E8C27A <1> call putsz ; display condition 2959 0000373E BA[1A6B] <1> mov dx, msg.while_terminated_after 2960 00003741 E8BC7A <1> call putsz 2961 00003744 E9B9C8 <1> jmp cmd3 2962 <1> 2963 <1> @@: 2964 00003747 C3 <1> retn 2965 <1> 2966 <1> 2967 <1> .copy_condition_to_line_out: 2968 00003748 8E06[2A0A] <1> mov es, word [auxbuff_segorsel] 2969 0000374C 31FF <1> xor di, di ; -> stored expression (if not PM) 2970 <1> %if _PM 2971 <1> add di, word [auxbuff_switchbuffer_size] 2972 <1> ; -> stored expression 2973 <1> %endif 2974 0000374E 89FE <1> mov si, di 2975 00003750 B9FFFF <1> mov cx, -1 2976 00003753 B000 <1> mov al, 0 2977 00003755 F2AE <1> repne scasb 2978 00003757 F7D1 <1> not cx ; = length, including zero terminator 2979 00003759 06 <1> push es 2980 0000375A 1F <1> pop ds ; ds:si -> auxbuff stored expression 2981 0000375B 16 <1> push ss 2982 0000375C 07 <1> pop es 2983 0000375D BF[AE07] <1> mov di, line_out ; -> line_out 2984 00003760 57 <1> push di 2985 00003761 F3A4 <1> rep movsb ; move over 2986 00003763 5E <1> pop si 2987 <1> 2988 00003764 89F2 <1> mov dx, si 2989 00003766 16 <1> push ss 2990 00003767 1F <1> pop ds ; -> line_out 2991 00003768 C3 <1> retn 2992 <1> 2993 <1> 2994 <1> ; INP: cl = flags indicating what kind of bb match occurred 2995 <1> ; cl & 1 set if actual hit, 2996 <1> ; else cl & 2 set if pass match, 2997 <1> ; else it is a non-pass non-hit match 2998 <1> ; (cl & 4 always set (indicates any bb match)) 2999 <1> ; cl & 8 set if pp/tt breakpoint hit 3000 <1> ; dword [ss:sp] = command repetition counter 3001 <1> ; OUT: NC if pass match or non-pass non-hit match, 3002 <1> ; if pass match: deferred message output, dumpregs output 3003 <1> ; if cl & 8 set (pass/nonpass bb, tt/pp hit): 3004 <1> ; dx = 0 3005 <1> ; ZR if [internalflags] & tt_silent_mode clear 3006 <1> ; NZ if [internalflags] & tt_silent_mode set 3007 <1> ; if cl & 8 clear (pass/nonpass bb, no tt/pp hit): 3008 <1> ; ZR 3009 <1> ; dword [ss:sp] increased by 1 3010 <1> ; dx = 1 (indicates to skip WHILE condition) 3011 <1> ; CY if actual hit (hit bb), 3012 <1> ; dx = 0 3013 <1> ; ax = INP:cx 3014 <1> ; CHG: dx, bx, cx, si, di, all high words, fs, gs 3015 <1> ; STT: ds = es = ss 3016 <1> handle_bb_hit_pass_match: 3017 <1> d5 call d5message 3018 <1> d5 asciz "in handle_bb_hit_pass_match",13,10 3019 <1> 3020 00003769 91 <1> xchg ax, cx 3021 <1> 3022 0000376A F606[C900]08 <1> testopt [internalflags2], dif2_bp_failure 3023 0000376F 7569 <1> jnz .actual_hit ; after failure, handle as actual hit 3024 <1> 3025 00003771 A801 <1> test al, 1 ; actual hit ? else: non-hit, pass or non-pass 3026 00003773 7565 <1> jnz .actual_hit ; yes --> 3027 <1> 3028 00003775 A802 <1> test al, 2 ; at least pass match ? 3029 00003777 7415 <1> jz .nonpassnonhit ; no --> 3030 <1> 3031 <1> .passnonhit: 3032 <1> 3033 <1> d5 call d5message 3034 <1> d5 asciz "bb pass non-hit",13,10 3035 <1> 3036 <1> %if _PM 3037 <1> call resetmode 3038 <1> %endif 3039 <1> ; call put_deferred_message_loud 3040 00003779 BA[3873] <1> mov dx, msg.empty_message 3041 0000377C 8716[F000] <1> xchg dx, word [gg_deferred_message] 3042 00003780 E87D7A <1> call putsz 3043 00003783 BA[89AE] <1> mov dx, putsline 3044 00003786 E877F8 <1> call put_bb_deferred_message_calling_dx 3045 <1> 3046 00003789 50 <1> push ax 3047 <1> ; call dumpregs_extended_loud 3048 <1> ; (includes handle_serial_flags_ctrl_c) 3049 0000378A E8C1EC <1> call dumpregs_extended 3050 0000378D 58 <1> pop ax ; (preserve so the test al, 8 can use it) 3051 <1> .nonpassnonhit: 3052 0000378E E82E04 <1> call handle_serial_flags_ctrl_c 3053 <1> 3054 <1> ; al & 4 always set 3055 <1> 3056 00003791 8026[C800]E9 <1> clropt [internalflags2], dif2_gg_skip_non_cseip | dif2_gg_skip_cseip | dif2_gg_first_detected 3058 00003796 800E[C800]01 <1> setopt [internalflags2], dif2_gg_is_first 3059 <1> 3060 0000379B FF36[EA00] <1> push word [gg_next_cseip_linear + 2] 3061 0000379F FF36[E800] <1> push word [gg_next_cseip_linear] 3062 000037A3 8F06[E400] <1> pop word [gg_first_cseip_linear] 3063 000037A7 8F06[E600] <1> pop word [gg_first_cseip_linear + 2] 3064 <1> 3065 000037AB A808 <1> test al, 8 ; not bb hit, is tt/pp hit ? 3066 000037AD 751C <1> jnz @FF ; yes --> 3067 <1> 3068 000037AF F706[C800]8010 <1> testopt [internalflags2], dif2_is_pp | dif2_tpg_keep_proceed_bp, 1 3069 000037B5 7502 <1> jnz @F 3070 000037B7 EB12 <1> jmp @FF 3071 <1> 3072 <1> @@: 3073 <1> lframe near 3074 <1> lpar dword, counter 3075 <1> lpar_return 3076 000037B9 5589E5 <1> lenter 3077 000037BC 83460401 <1> add word [bp + ?counter], 1 3078 000037C0 83560600 <1> adc word [bp + ?counter + 2], 0 3079 000037C4 5D <1> lleave 3080 000037C5 BA0100 <1> mov dx, 1 ; skip WHILE 3081 000037C8 38C0 <1> cmp al, al ; (NC, ZR) 3082 000037CA C3 <1> retn 3083 <1> 3084 <1> @@: 3085 000037CB 31D2 <1> xor dx, dx ; no skip WHILE 3086 000037CD A802 <1> test al, 2 ; displayed pass point ? 3087 000037CF 7503 <1> jnz @F ; yes --> 3088 000037D1 A8FF <1> test al, -1 ; NC, NZ (do not skip dump) 3089 <1> ; al & 0Ch is set so this test is NZ 3090 000037D3 C3 <1> retn 3091 <1> 3092 <1> @@: 3093 000037D4 F606[C700]10 <1> testopt [internalflags], tt_silent_mode 3094 <1> ; (NC, ZF is ZR if to skip dump) 3095 000037D9 C3 <1> retn 3096 <1> 3097 <1> .actual_hit: 3098 <1> d5 call d5message 3099 <1> d5 asciz "bb hit",13,10 3100 <1> 3101 000037DA 31D2 <1> xor dx, dx ; no skip WHILE 3102 000037DC F9 <1> stc 3103 000037DD C3 <1> retn 3104 <1> 3105 <1> 3106 <1> %if _TSR 3107 <1> tsr: 3108 000037DE E8EFCD <1> call guard_re 3109 000037E1 46 <1> inc si 3110 000037E2 AC <1> lodsb 3111 000037E3 E87C75 <1> call chkeol 3112 000037E6 F606[C600]40 <1> testopt [internalflags], tsrmode 3113 000037EB 7405 <1> jz .try ; not yet resident --> 3114 000037ED BA[515F] <1> mov dx, msg.alreadytsr 3115 000037F0 EB38 <1> jmp short .putsz 3116 <1> .try: 3117 000037F2 8B16[DE0A] <1> mov dx, word [pspdbe] 3118 000037F6 8B1E[E00A] <1> mov bx, word [pspdbg] 3119 000037FA BF0A00 <1> mov di, 0Ah 3120 <1> .loop: 3121 <1> %if _PM 3122 <1> mov cx, dx ; = original segment address 3123 <1> call ispm 3124 <1> jnz .rm 3125 <1> push bx 3126 <1> mov ax, dx 3127 <1> [cpu 286] 3128 <1> shr dx, 12 3129 <1> shl ax, 4 ; shift to get a 32-bit linear address 3130 <1> __CPU__ 3131 <1> call getsegmented.pm ; set up selector for access 3132 <1> ; This call makes some assumptions: 3133 <1> ; - No mode switch occurs; we are still in PM. 3134 <1> ; Currently none is performed from PM. 3135 <1> ; - (e)dx isn't larger than about FFD0h. 3136 <1> ; Currently scratchsel with an offset of zero is returned. 3137 <1> mov di, dx ; -> PSP 3138 <1> mov dx, bx 3139 <1> pop bx 3140 <1> add di, byte 0Ah ; -> PSP termination vector 3141 <1> .rm: 3142 <1> %endif 3143 000037FD 8EC2 <1> mov es, dx 3144 000037FF 268B450C <1> mov ax, word [es:(di-0Ah)+16h] 3145 00003803 40 <1> inc ax 3146 00003804 741F <1> jz .pspnotfound 3147 00003806 48 <1> dec ax 3148 00003807 741C <1> jz .pspnotfound ; parent is invalid --> 3149 <1> %if _PM 3150 <1> cmp ax, cx 3151 <1> %else 3152 00003809 39D0 <1> cmp ax, dx 3153 <1> %endif 3154 0000380B 7418 <1> je .pspnotfound ; parent is the process itself --> 3155 0000380D 89C2 <1> mov dx, ax 3156 0000380F 39D8 <1> cmp ax, bx 3157 00003811 75EA <1> jne .loop ; parent is not us --> 3158 00003813 26813D[3787] <1> cmp word [es:di], int22 3159 00003818 7506 <1> jne .psphooked 3160 0000381A 26395D02 <1> cmp word [es:di+2], bx 3161 0000381E 740D <1> je .found ; correct vector --> (otherwise: hooked) 3162 <1> .psphooked: 3163 00003820 BA[F15E] <1> mov dx, msg.psphooked 3164 00003823 EB03 <1> jmp short .putsz_es 3165 <1> .pspnotfound: 3166 00003825 BA[C65E] <1> mov dx, msg.pspnotfound 3167 <1> .putsz_es: 3168 00003828 16 <1> push ss 3169 00003829 07 <1> pop es 3170 <1> .putsz: 3171 0000382A E9D379 <1> jmp putsz 3172 <1> 3173 <1> .found: 3174 0000382D BE[FC0A] <1> mov si, psp22 3175 00003830 A5 <1> movsw 3176 00003831 A5 <1> movsw ; write our parent's vector 3177 00003832 83C708 <1> add di, 16h-(0Ah+4) 3178 00003835 A5 <1> movsw ; write our parent 3179 00003836 800E[C600]40 <1> setopt [internalflags], tsrmode ; note that we are resident 3180 <1> %if _PM 3181 <1> push cx 3182 <1> %else 3183 0000383B 06 <1> push es 3184 <1> %endif 3185 0000383C BA[2F5F] <1> mov dx, msg.nowtsr1 3186 0000383F E8E6FF <1> call .putsz_es 3187 00003842 58 <1> pop ax 3188 00003843 BF[AE07] <1> mov di, line_out 3189 00003846 E80476 <1> call hexword 3190 00003849 E83D76 <1> call putsline 3191 0000384C BF[FC0A] <1> mov di, psp22 3192 0000384F 31C0 <1> xor ax, ax 3193 00003851 AB <1> stosw 3194 00003852 AB <1> stosw 3195 00003853 AB <1> stosw ; clear our parent/int22 fields 3196 00003854 BA[3F5F] <1> mov dx, msg.nowtsr2 3197 00003857 EBD1 <1> jmp short .putsz 3198 <1> %endif 3199 <1> 3200 <1> 3201 <1> ; INP: dx -> message, zero-terminated 3202 <1> ; CHG: - 3203 <1> ; OUT: message displayed or put into silent buffer 3204 <1> ; STT: ds = es = ss = debugger data selector 3205 <1> putsz_silent: 3206 00003859 F606[C700]10 <1> testopt [internalflags], tt_silent_mode 3207 0000385E 7405 <1> jz @F 3208 00003860 800E[C700]20 <1> setopt [internalflags], tt_silence 3209 <1> @@: 3210 00003865 E89879 <1> call putsz ; print string 3211 00003868 F606[C700]10 <1> testopt [internalflags], tt_silent_mode 3212 0000386D 7405 <1> jz @F 3213 0000386F 8026[C700]DF <1> clropt [internalflags], tt_silence 3214 <1> @@: 3215 00003874 C3 <1> retn 3216 <1> 3217 <1> 3218 <1> ; INP: es:di -> behind message in line_out 3219 <1> ; CHG: ax, bx, cx, dx 3220 <1> ; OUT: message displayed or put into silent buffer 3221 <1> ; STT: ds = es = ss = debugger data selector 3222 <1> putsline_silent: 3223 00003875 F606[C700]10 <1> testopt [internalflags], tt_silent_mode 3224 0000387A 7405 <1> jz @F 3225 0000387C 800E[C700]20 <1> setopt [internalflags], tt_silence 3226 <1> @@: 3227 00003881 E80576 <1> call putsline 3228 00003884 F606[C700]10 <1> testopt [internalflags], tt_silent_mode 3229 00003889 7405 <1> jz @F 3230 0000388B 8026[C700]DF <1> clropt [internalflags], tt_silence 3231 <1> @@: 3232 00003890 C3 <1> retn 3233 <1> 3234 <1> 3235 <1> ; INP: word [run_int] 3236 <1> ; InDOS status 3237 <1> ; STT: es = ds = ss 3238 <1> ; OUT: dx -> message 3239 <1> ; CHG: ax, di 3240 <1> getrunint: 3241 00003891 8B16[D00B] <1> mov dx, word [run_int] 3242 00003895 81FA[647E] <1> cmp dx, progtrm 3243 00003899 7515 <1> jne .ret 3244 <1> 3245 0000389B B8FFFF <1> mov ax, -1 3246 0000389E E8FC62 <1> call InDos 3247 000038A1 7504 <1> jnz .no_int21_4D 3248 <1> 3249 000038A3 B44D <1> mov ah, 4Dh 3250 000038A5 CD21 <1> int 21h 3251 <1> .no_int21_4D: 3252 000038A7 A3[B286] <1> mov word [usertermcode], ax 3253 000038AA BF[837E] <1> mov di, progexit 3254 000038AD E89D75 <1> call hexword 3255 <1> .ret: 3256 000038B0 C3 <1> retn 3257 <1> 3258 <1> 3259 <1> usesection lDEBUG_DATA_ENTRY 3260 <1> align 2, db 0 3261 000086B2 0000 <1> usertermcode: dw 0 3262 <1> usesection lDEBUG_CODE 3263 <1> 3264 <1> 3265 <1> ; Print message about unexpected interrupt, dump registers, and 3266 <1> ; end command. This code is also used by the G and P commands. 3267 <1> unexpectedinterrupt: 3268 <1> %if _PM 3269 <1> call resetmode 3270 <1> %endif 3271 000038B1 E8DDFF <1> call getrunint 3272 000038B4 E8A2FF <1> call putsz_silent 3273 <1> %if _CATCHINT19 3274 000038B7 81FA[2B7E] <1> cmp dx, int19msg 3275 000038BB 7409 <1> je .noregs ; if it terminated, skip the registers 3276 <1> %endif 3277 000038BD 81FA[647E] <1> cmp dx, progtrm 3278 000038C1 7403 <1> je .noregs ; if it terminated, skip the registers 3279 000038C3 E8DB02 <1> call dumpregs_extended_silent 3280 <1> .noregs: 3281 000038C6 E87778 <1> call silence_dump 3282 <1> 3283 000038C9 F606[C800]08 <1> testopt [internalflags2], dif2_gg_is_gg 3284 000038CE 7407 <1> jz @F 3285 000038D0 F606[9600]20 <1> testopt [options], gg_unexpected_no_repeat 3286 000038D5 EB05 <1> jmp @FF 3287 <1> @@: 3288 000038D7 F606[9600]40 <1> testopt [options], tp_unexpected_no_repeat 3289 <1> @@: 3290 000038DC 7406 <1> jz @F 3291 000038DE C706[D20B][4A04] <1> mov word [lastcmd], dmycmd 3292 <1> @@: 3293 <1> 3294 000038E4 E919C7 <1> jmp cmd3 ; back to the start 3295 <1> 3296 <1> 3297 <1> ; Trace an instruction. 3298 <1> ; INP: word [reg_cs], dword [reg_eip], other register values 3299 <1> ; OUT: NC if the breakpoint or trace interrupt was hit, 3300 <1> ; ah = 0 3301 <1> ; ch = 0 3302 <1> ; d[reg_eip] adjusted if a breakpoint (bb) hit 3303 <1> ; cx & 8 set if trace interrupt hit 3304 <1> ; (assumed to be the expected trace hit) 3305 <1> ; (ZF only set if _BREAKPOINTS) 3306 <1> ; ZR if trace interrupt was hit, 3307 <1> ; cx & 7 = 0 3308 <1> ; NZ if a breakpoint (bb) was hit (or both were hit), 3309 <1> ; cx & 1 set if non-pass match (actual hit), 3310 <1> ; else cx & 2 set if pass match (consider as hit first, 3311 <1> ; but dump registers next (not to silent buffer) 3312 <1> ; and then continue execution) 3313 <1> ; else cx & 4 always set, indicates any match 3314 <1> ; (including matches that should merely continue) 3315 <1> ; all pass points' counters stepped 3316 <1> ; CY if no breakpoint and no trace interrupt was hit, 3317 <1> ; cx = 0 3318 <1> ; If [internalflags2] & dif2_gg_is_gg is set: 3319 <1> ; ah & 7Fh = status = 0 = no error, 3320 <1> ; 1 = couldn't write, 3321 <1> ; 2 = unreachable, 3322 <1> ; 3 = overwritten, al = new value 3323 <1> ; ah & 80h = set if error restoring point, 3324 <1> ; else error writing point to begin with 3325 <1> ; If that flag is clear: 3326 <1> ; Does not return if a breakpoint cannot be written 3327 <1> ; or cannot be restored, jumps to cmd3 instead. 3328 <1> ; CHG: all 3329 <1> ; STT: ds = es = ss 3330 <1> ; might return modeswitched (if dif2_gg_is_gg) 3331 <1> ; might be called while modeswitched 3332 <1> traceone: 3333 000038E7 F606[C800]80 <1> testopt [internalflags2], dif2_tpg_keep_proceed_bp 3334 000038EC 7403E97D00 <1> jnz .proceedbreakpoint 3335 <1> 3336 <1> %if _PM 3337 <1> call resetmode 3338 <1> %endif 3339 000038F1 31C9 <1> xor cx, cx 3340 000038F3 E83853 <1> call getcseipbyte 3341 000038F6 3CCD <1> cmp al, 0CDh ; int opcode? 3342 000038F8 7577 <1> jne .isstdtrace ; no --> 3343 000038FA 41 <1> inc cx 3344 000038FB E83053 <1> call getcseipbyte 3345 000038FE 3C03 <1> cmp al, 3 3346 00003900 746F <1> je .isstdtrace ; int 3 opcode --> 3347 00003902 F606[9400]02 <1> testopt [options], traceints ; TM=1? 3348 00003907 7503E9AA00 <1> jz isstdtraceX 3349 0000390C 3C01 <1> cmp al, 1 3350 0000390E 7461 <1> je .isstdtrace ; int 1 opcode --> 3351 <1> 3352 <1> ; TM==1, single-step into the INT 3353 00003910 88C3 <1> mov bl, al 3354 <1> %if _PM 3355 <1> call ispm 3356 <1> jz .singlestep_into_interrupt_pm 3357 <1> %endif 3358 00003912 B700 <1> mov bh, 0 3359 00003914 1E <1> push ds 3360 00003915 31C0 <1> xor ax, ax 3361 00003917 8ED8 <1> mov ds, ax 3362 00003919 D1E3 <1> shl bx, 1 3363 0000391B D1E3 <1> shl bx, 1 3364 0000391D C537 <1> lds si, [bx] 3365 0000391F FA <1> cli 3366 00003920 8A04 <1> mov al, byte [si] 3367 00003922 FE04 <1> inc byte [si] 3368 00003924 3804 <1> cmp byte [si], al 3369 00003926 8804 <1> mov byte [si], al 3370 00003928 FB <1> sti 3371 00003929 8CDB <1> mov bx, ds ; bx:si-> interrupt handler (RM, 16 bit) 3372 0000392B 89D8 <1> mov ax, bx 3373 0000392D 1F <1> pop ds 3374 0000392E 753E <1> jne .singlestep_into_interrupt_setbp 3375 <1> 3376 <1> ; The interrupt handler is in a ROM. 3377 <1> %if 0 3378 <1> jmp short isstdtraceX 3379 <1> %else 3380 00003930 8736[940C] <1> xchg si, word [reg_eip] 3381 00003934 8706[880C] <1> xchg ax, word [reg_cs] ; get cs:ip, set interrupt handler address 3382 00003938 8B0E[980C] <1> mov cx, word [reg_efl] ; get flags 3383 0000393C 1E <1> push ds 3384 0000393D 8B1E[6C0C] <1> mov bx, word [reg_esp] 3385 00003941 8E1E[840C] <1> mov ds, word [reg_ss] ; ds:bx-> debuggee stack 3386 00003945 83EB06 <1> sub bx, byte 6 ; reserve enough space for flags, cs, ip 3387 00003948 46 <1> inc si 3388 00003949 46 <1> inc si ; skip CDh xxh opcode 3389 0000394A 894F04 <1> mov word [bx+4], cx 3390 0000394D 894702 <1> mov word [bx+2], ax 3391 00003950 8937 <1> mov word [bx+0], si ; save flags, cs, ip on stack 3392 00003952 1F <1> pop ds 3393 00003953 891E[6C0C] <1> mov word [reg_esp], bx ; update sp 3394 00003957 8026[990C]FC <1> and byte [reg_efl+1], ~(2|1) ; clear IF and TF (NC) 3395 <1> ; Note: If invalid flag values were previously set by the user 3396 <1> ; by directly accessing the FL or EFL register, these won't be 3397 <1> ; fixed by us now. This could be worked around by executing a 3398 <1> ; NOP in debuggee's environment (or only with debuggee's flags) 3399 <1> ; first, but I don't think it's much of an issue. 3400 0000395C C706[D00B][317D] <1> mov word [run_int], int1msg 3401 00003962 8126[C800]7FF8 <1> clropt [internalflags2], dif2_tpg_have_bp | dif2_tpg_adjusted_cseip | dif2_tpg_do_not_adjust | dif2_tpg_keep_proceed_bp, 1 3404 00003968 B90800 <1> mov cx, 8 3405 0000396B 31C0 <1> xor ax, ax ; NC, ZR 3406 0000396D C3 <1> retn 3407 <1> 3408 <1> %endif 3409 <1> %if _PM 3410 <1> .singlestep_into_interrupt_pm: 3411 <1> mov ax, 0204h 3412 <1> int 31h 3413 <1> mov bx, cx 3414 <1> _386_o32 ; mov esi, edx 3415 <1> mov si, dx ; bx:(e)si-> interrupt handler 3416 <1> test bl, 4 ; is it a LDT selector? (NC) 3417 <1> jz isstdtraceX ; no --> 3418 <1> %endif 3419 <1> .singlestep_into_interrupt_setbp: 3420 <1> .proceedbreakpoint: 3421 0000396E E9FE03 <1> jmp proceedbreakpoint 3422 <1> 3423 <1> .isstdtrace: 3424 <1> %if _PM 3425 <1> call ispm 3426 <1> jz .notdpmientry ; already in PM --> 3427 <1> mov ax, w[reg_eip] ; is this a switch to protected mode ? 3428 <1> cmp ax, w[dpmiwatch+0] 3429 <1> jne .notdpmientry 3430 <1> mov ax, w[reg_cs] 3431 <1> cmp ax, w[dpmiwatch+2] 3432 <1> je isdpmientry ; yes, catch it --> (this means really "go") 3433 <1> .notdpmientry: 3434 <1> %endif 3435 00003971 800E[990C]01 <1> or byte [reg_efl+1], 1 ; set single-step mode (cleared when returning into DEBUG) 3436 00003976 31C9 <1> xor cx, cx 3437 00003978 E85100 <1> call skipprefixes 3438 0000397B 3C9C <1> cmp al, 9Ch ; opcode "PUSHF"? 3439 0000397D 7517 <1> jnz .notpushf 3440 <1> %if _BREAKPOINTS 3441 0000397F E88904 <1> call run_with_bb 3442 00003982 B400 <1> mov ah, 0 3443 00003984 9C <1> pushf 3444 <1> %else 3445 <1> call run 3446 <1> xor cx, cx 3447 <1> xor ax, ax 3448 <1> %endif 3449 <1> ; Clear TF in the fl word or efl dword 3450 <1> ; pointed to by debuggee's ss:(e)sp 3451 00003985 06 <1> push es 3452 <1> %if _PM 3453 <1> mov bx, word [reg_ss] ; get ss selector into bx 3454 <1> mov es, bx 3455 <1> _386 call test_d_b_bit ; check whether a 32-bit ss 3456 <1> %else 3457 00003986 8E06[840C] <1> mov es, word [reg_ss] 3458 <1> %endif 3459 <1> _386_PM_o32 ; mov ebx, dword [reg_esp] 3460 0000398A 8B1E[6C0C] <1> mov bx, word [reg_esp] ; es:(e)bx-> debuggee's stack 3461 <1> _386_PM jz .pushf_16 3462 <1> _386_PM and byte [es:ebx+1], ~1 ; clear TF 3463 <1> _386_PM jmp short .pushf_common 3464 <1> .pushf_16: 3465 0000398E 26806701FE <1> and byte [es:bx+1], ~1 ; clear TF 3466 <1> .pushf_common: 3467 00003993 07 <1> pop es 3468 00003994 EB06 <1> jmp short .checkreturn 3469 <1> .notpushf: 3470 <1> %if _BREAKPOINTS 3471 00003996 E87204 <1> call run_with_bb 3472 00003999 B400 <1> mov ah, 0 3473 0000399B 9C <1> pushf 3474 <1> %else 3475 <1> call run 3476 <1> xor cx, cx 3477 <1> xor ax, ax 3478 <1> %endif 3479 <1> .checkreturn: 3480 0000399C 813E[D00B][317D] <1> cmp word [run_int], int1msg 3481 000039A2 7509 <1> jne .nomatch 3482 000039A4 80C908 <1> or cl, 8 3483 <1> %if _BREAKPOINTS 3484 000039A7 9D <1> popf ; CF 3485 000039A8 7308 <1> jnc .ret_NZ_NC 3486 <1> %endif 3487 000039AA 38C0 <1> cmp al, al ; if correct interrupt (ZR, NC) 3488 000039AC C3 <1> retn 3489 <1> 3490 <1> .nomatch: 3491 <1> %if _BREAKPOINTS 3492 000039AD 9D <1> popf ; CF 3493 000039AE 7302 <1> jnc .ret_NZ_NC 3494 <1> %endif 3495 000039B0 F9 <1> stc 3496 000039B1 C3 <1> retn 3497 <1> 3498 <1> %if _BREAKPOINTS 3499 <1> .ret_NZ_NC: 3500 000039B2 80C904 <1> or cl, 4 ; (NZ, NC) 3501 000039B5 C3 <1> retn 3502 <1> %endif 3503 <1> 3504 <1> 3505 <1> ; an INT is to be processed (TM is 0) 3506 <1> ; to avoid the nasty x86 bug which makes IRET 3507 <1> ; cause a debug exception 1 instruction too late 3508 <1> ; a breakpoint is set behind the INT 3509 <1> 3510 <1> isstdtraceX: 3511 000039B6 B90200 <1> mov cx, 2 3512 000039B9 E84600 <1> call iswriteablecseip ; is it ROM ? 3513 000039BC 72B3 <1> jc traceone.isstdtrace ; is read-only --> 3514 000039BE 8B1E[880C] <1> mov bx, word [reg_cs] 3515 <1> 3516 <1> ; (e)si = (e)ip + 2 3517 <1> ; We don't test whether it's a 32-bit code segment here. 3518 <1> ; The previous code would leave the high word of esi uninitialized then. 3519 <1> _386_PM_o32 ; mov esi, dword [reg_eip] 3520 000039C2 8B36[940C] <1> mov si, word [reg_eip] 3521 <1> _386_PM_o32 ; add esi, byte 2 3522 000039C6 83C602 <1> add si, byte 2 ; ! do not remove the byte override, else o32 won't work 3523 000039C9 E9A303 <1> jmp proceedbreakpoint ; set BP at BX:(E)SI and run debuggee 3524 <1> 3525 <1> ; Call getcseipbyte and loop while increasing cx if the returned 3526 <1> ; byte was a prefix. Returns the first non-prefix byte (an opcode) 3527 <1> ; in al. (WAIT or FWAIT is not considered a prefix because it's 3528 <1> ; really an opcode and we also trace it without executing a 3529 <1> ; following FPU opcode.) 3530 <1> skipprefixes: 3531 <1> .: 3532 000039CC E85F52 <1> call getcseipbyte 3533 000039CF 3C26 <1> cmp al, 26h 3534 000039D1 742A <1> je .prefix ; ES 3535 000039D3 3C2E <1> cmp al, 2Eh 3536 000039D5 7426 <1> je .prefix ; CS 3537 000039D7 3C36 <1> cmp al, 36h 3538 000039D9 7422 <1> je .prefix ; SS 3539 000039DB 3C3E <1> cmp al, 3Eh 3540 000039DD 741E <1> je .prefix ; DS 3541 000039DF 3CF0 <1> cmp al, 0F0h 3542 000039E1 741A <1> je .prefix ; LOCK 3543 000039E3 3CF3 <1> cmp al, 0F3h 3544 000039E5 7416 <1> je .prefix ; REPZ 3545 000039E7 3CF2 <1> cmp al, 0F2h 3546 000039E9 7412 <1> je .prefix ; REPNZ 3547 000039EB EB14 <1> _no386_jmps .noprefix ; no 386, following aren't prefixes (invalid opcodes on 186+) --> 3548 000039ED 3C64 <1> cmp al, 64h 3549 000039EF 740C <1> je .prefix ; FS 3550 000039F1 3C65 <1> cmp al, 65h 3551 000039F3 7408 <1> je .prefix ; GS 3552 000039F5 3C66 <1> cmp al, 66h 3553 000039F7 7404 <1> je .prefix ; o32/o16 3554 000039F9 3C67 <1> cmp al, 67h 3555 000039FB 7504 <1> jne .noprefix ; not a32/a16 3556 <1> .prefix: 3557 000039FD 41 <1> inc cx 3558 <1> ; jmp short . 3559 000039FE 79CC <1> jns . ; this is not correct but serves as hack to avoid an infinite loop 3560 <1> ; (note that getcseipbyte really uses cx as signed number) 3561 00003A00 49 <1> dec cx ; back to 07FFFh 3562 <1> .noprefix: 3563 00003A01 C3 <1> retn 3564 <1> 3565 <1> 3566 <1> ;--- test if memory at CS:E/IP can be written to 3567 <1> ;--- return C if not 3568 <1> 3569 <1> iswriteablecseip: 3570 00003A02 E82952 <1> call getcseipbyte ; get byte at CS:EIP+CX 3571 00003A05 88C4 <1> mov ah, al 3572 00003A07 34FF <1> xor al, 0FFh 3573 00003A09 E83252 <1> call setcseipbyte 3574 00003A0C 720E <1> jc .return 3575 00003A0E E81D52 <1> call getcseipbyte 3576 00003A11 38C4 <1> cmp ah, al ; is it ROM? 3577 00003A13 F9 <1> stc 3578 00003A14 7406 <1> jz .return 3579 00003A16 88E0 <1> mov al, ah 3580 00003A18 E82352 <1> call setcseipbyte 3581 00003A1B F8 <1> clc 3582 <1> .return: 3583 00003A1C C3 <1> retn 3584 <1> 3585 <1> 3586 <1> %if _PM 3587 <1> debuggerexception: 3588 <1> cld 3589 <1> push ss 3590 <1> pop ds 3591 <1> call unhack ; sets es to ss 3592 <1> call getrunint 3593 <1> call putsz ; print string 3594 <1> %if _EXCCSIP 3595 <1> mov di, exccsip 3596 <1> mov ax, word [exception_csip + 2] 3597 <1> call hexword 3598 <1> inc di 3599 <1> mov ax, word [exception_csip] 3600 <1> call hexword 3601 <1> 3602 <1> mov dx, excloc 3603 <1> call putsz 3604 <1> %endif 3605 <1> jmp cmd3 3606 <1> %endif 3607 <1> 3608 <1> 3609 <1> %if _PM 3610 <1> [cpu 386] 3611 <1> ; INP: dh = flags as for pp2,pp3,pp5 (1 = ASIZE, 2 = OSIZE) 3612 <1> ; OUT: dh = flags as used by pp3,pp5 (1 = A32, 2 = O32) 3613 <1> pp_fix32bitflags: 3614 <1> call test_d_b_bit 3615 <1> jz .16 3616 <1> xor dh, 1|2 ; toggle OSIZE and ASIZE (once) 3617 <1> .16: 3618 <1> retn 3619 <1> __CPU__ 3620 <1> %endif 3621 <1> 3622 <1> ; P command - proceed (i.e., skip over call/int/loop/string instruction). 3623 <1> pp: 3624 00003A1D C706[D20B][1D3A] <1> mov word [lastcmd], pp 3625 00003A23 800E[C900]10 <1> setopt [internalflags2], dif2_is_pp 3626 00003A28 E88206 <1> call parse_pt ; process arguments 3627 <1> 3628 <1> ; Do it times. First check the type of instruction. 3629 <1> pp1: 3630 00003A2B 53 <1> push bx 3631 00003A2C 51 <1> push cx ; save bx:cx 3632 <1> %if _PM 3633 <1> call resetmode 3634 <1> %endif 3635 00003A2D BA0F00 <1> mov dx, 15 ; DL = number of bytes to go; DH = prefix flags. 3636 00003A30 8B1E[880C] <1> mov bx, word [reg_cs] 3637 <1> _386_PM_o32 ; mov esi, dword [reg_eip] 3638 00003A34 8B36[940C] <1> mov si, word [reg_eip] 3639 <1> pp2: 3640 00003A38 E8CA03 <1> call pp16 ; get next instruction byte into AL 3641 00003A3B BF[1C11] <1> mov di, ppbytes 3642 00003A3E B92000 <1> mov cx, PPLEN 3643 00003A41 A2[FA00] <1> mov byte [pp_instruction], al 3644 00003A44 F2AE <1> repne scasb 3645 00003A46 752A <1> jne pp5 ; if not one of these --> 3646 00003A48 8A451F <1> mov al,byte [di+PPLEN-1]; get corresponding byte in ppinfo 3647 00003A4B A880 <1> test al, PP_PREFIX ; prefix ? 3648 00003A4D 740F <1> jz pp3 ; no --> 3649 00003A4F 08C6 <1> or dh, al ; set the OSIZE or ASIZE flags if either of these 3650 <1> ; Note: Multiple OSIZE in a 16-bit cs do not toggle 3651 <1> ; between decoding as O32 and O16, they're always 3652 <1> ; decoded as O32. The same is true for A32, and 3653 <1> ; in a 32-bit cs for O16 and A16. 3654 00003A51 FECA <1> dec dl 3655 00003A53 75E3 <1> jnz pp2 ; if not out of bytes --> 3656 00003A55 BA[AE74] <1> mov dx, msg.warnprefix 3657 00003A58 E8A577 <1> call putsz 3658 00003A5B E9B500 <1> jmp pp12 3659 <1> 3660 <1> ; A repeatable string, interrupt, call immediate or loop 3661 <1> ; instruction is to be decoded. Finish the decoding and 3662 <1> ; skip the appropriate number of opcode bytes. 3663 <1> pp3: 3664 <1> _386_PM call pp_fix32bitflags 3665 <1> _386_PM_o32 3666 00003A5E 8936[FC00] <1> mov word [pp_operand], si 3667 00003A62 A840 <1> test al, PP_VARSIZ ; different opcode length depends on OSIZE ? 3668 00003A64 7405 <1> jz .ignoreosize ; no --> 3669 00003A66 80E602 <1> and dh, 2 3670 00003A69 00F0 <1> add al, dh 3671 <1> .ignoreosize: 3672 00003A6B 83E007 <1> and ax, PP_SIZ_MASK 3673 <1> _386_PM movzx eax, ax ; clear high word (in case it counts) 3674 <1> _386_PM_o32 ; add esi, eax 3675 00003A6E 01C6 <1> add si, ax 3676 00003A70 EB55 <1> jmp pp10 3677 <1> 3678 <1> 3679 <1> pp5: 3680 <1> _386_PM call pp_fix32bitflags 3681 00003A72 3CFF <1> cmp al, 0FFh ; FF/2 or FF/3 indirect NEAR or FAR call ? 3682 00003A74 7403E99A00 <1> jne pp12 ; no, just an ordinary instruction --> 3683 00003A79 E88903 <1> call pp16 ; get MOD REG R/M byte 3684 00003A7C 24F7 <1> and al, ~ (1 << 3) ; clear lowest bit of REG field (/3 to /2) 3685 00003A7E 3410 <1> xor al, 2 << 3 ; /3 or /2 to /0 3686 00003A80 A838 <1> test al, 7 << 3 3687 00003A82 7403E98C00 <1> jnz pp12 ; if not FF/2 or FF/3 --> 3688 00003A87 3CC0 <1> cmp al, 0C0h ; mod = 3 ? 3689 00003A89 733C <1> jae .adjust0 ; if just a register --> 3690 00003A8B F6C601 <1> test dh, 1 3691 00003A8E 750E <1> jnz .a32 ; if 32-bit addressing --> 3692 00003A90 3C06 <1> cmp al, 6 ; mod = 0 r/m = 6 would encode bp ? 3693 00003A92 7431 <1> je .adjust2 ; if just plain disp16 --> 3694 00003A94 3C40 <1> cmp al, 40h 3695 00003A96 722F <1> jb .adjust0 ; if indirect register --> 3696 00003A98 3C80 <1> cmp al, 80h 3697 00003A9A 722A <1> jb .adjust1 ; if disp8[reg(s)] 3698 00003A9C EB27 <1> jmp short .adjust2 ; it's disp16[reg(s)] 3699 <1> 3700 <1> ; Handle 32-bit addressing (A32 ModR/M referencing memory) 3701 <1> .a32: 3702 00003A9E 3C05 <1> cmp al, 5 ; mod = 0 and r/m = 5 (would encode ebp) ? 3703 00003AA0 7421 <1> je .adjust4 ; if just plain disp32 --> 3704 00003AA2 3404 <1> xor al, 4 ; 4 to 0 (r/m 4 would encode esp) 3705 00003AA4 A807 <1> test al, 7 ; 0 if r/m would encode esp 3706 00003AA6 7513 <1> jnz .a32_nosib ; if no SIB byte --> 3707 00003AA8 86C4 <1> xchg al, ah 3708 00003AAA E85803 <1> call pp16 3709 00003AAD 86C4 <1> xchg al, ah ; load and skip the SIB byte 3710 <1> ; The SIB byte is only used here to detect the 3711 <1> ; special case encoding of disp32 with mod=0 3712 <1> ; and base=5. index=4 is also special but it 3713 <1> ; does not alter the size of the displacement 3714 <1> ; that we have to skip. 3715 00003AAF A8C0 <1> test al, 0C0h ; is it mod = 0 ? 3716 00003AB1 7508 <1> jnz @F ; no, not a special case --> 3717 00003AB3 80E407 <1> and ah, 7 3718 00003AB6 80FC05 <1> cmp ah, 5 ; is it base = 5 ? 3719 00003AB9 7408 <1> je .adjust4 ; yes, special case encoding of disp32 --> 3720 <1> @@: 3721 <1> .a32_nosib: 3722 00003ABB 3C40 <1> cmp al, 40h 3723 00003ABD 7208 <1> jb .adjust0 ; if indirect register --> 3724 00003ABF 3C80 <1> cmp al, 80h 3725 00003AC1 7203 <1> jb .adjust1 ; if disp8[reg(s)] --> 3726 <1> ; otherwise, it's disp32[reg(s)] 3727 <1> .adjust4: 3728 <1> _386_PM_o32 ; inc esi 3729 00003AC3 46 <1> inc si ; skip an instruction byte 3730 <1> _386_PM_o32 ; inc esi 3731 00003AC4 46 <1> inc si ; skip an instruction byte 3732 <1> .adjust2: 3733 <1> _386_PM_o32 ; inc esi 3734 00003AC5 46 <1> inc si ; skip an instruction byte 3735 <1> .adjust1: 3736 <1> _386_PM_o32 ; inc esi 3737 00003AC6 46 <1> inc si ; skip an instruction byte 3738 <1> .adjust0: 3739 <1> 3740 <1> pp10: 3741 <1> _386_PM_o32 3742 00003AC7 56 <1> push si 3743 <1> 3744 00003AC8 803E[FA00]E8 <1> cmp byte [pp_instruction], 0E8h 3745 00003ACD 7534 <1> jne .done 3746 <1> 3747 <1> _386_PM_o32 3748 00003ACF 8B36[FC00] <1> mov si, word [pp_operand] 3749 <1> 3750 <1> _386_PM xor eax, eax 3751 00003AD3 E82F03 <1> call pp16 3752 00003AD6 86C4 <1> xchg al, ah 3753 00003AD8 E82A03 <1> call pp16 3754 00003ADB 86C4 <1> xchg al, ah 3755 <1> _386_PM jmp @F 3756 00003ADD F6C602 <1> test dh, 2 3757 00003AE0 7521 <1> jnz .notcallrel16 3758 <1> @@: 3759 <1> _386_PM test dh, 2 3760 <1> _386_PM jz @F 3761 <1> 3762 <1> _386_PM rol eax, 16 3763 <1> _386_PM call pp16 3764 <1> _386_PM xchg al, ah 3765 <1> _386_PM call pp16 3766 <1> _386_PM xchg al, ah 3767 <1> _386_PM rol eax, 16 3768 <1> @@: 3769 <1> _386_PM_o32 3770 00003AE2 01C6 <1> add si, ax 3771 00003AE4 B20F <1> mov dl, 15 ; number of bytes to go 3772 <1> .loop: 3773 00003AE6 E81C03 <1> call pp16 3774 00003AE9 3CCB <1> cmp al, 0CBh ; retf ? 3775 00003AEB 7417 <1> je .trace 3776 00003AED 3CCA <1> cmp al, 0CAh ; retf imm16 ? 3777 00003AEF 7413 <1> je .trace 3778 00003AF1 3CCF <1> cmp al, 0CFh ; iret ? 3779 00003AF3 740F <1> je .trace 3780 00003AF5 BF[1C11] <1> mov di, ppbytes 3781 00003AF8 B90B00 <1> mov cx, PPLEN_ONLY_PREFIXES 3782 00003AFB F2AE <1> repne scasb 3783 00003AFD 7504 <1> jne .done 3784 <1> ; if one of the prefixes 3785 00003AFF FECA <1> dec dl 3786 00003B01 75E3 <1> jnz .loop ; if not out of bytes --> 3787 <1> 3788 <1> ; fall through: do not trace 3789 <1> .notcallrel16: 3790 <1> .done: 3791 00003B03 A8 <1> db __TEST_IMM8 ; (skip stc, NC) 3792 <1> .trace: 3793 00003B04 F9 <1> stc ; trace 3794 <1> _386_PM_o32 3795 00003B05 5E <1> pop si 3796 <1> 3797 00003B06 720B <1> jc pp12 ; trace --> 3798 <1> %if _SYMBOLIC 3799 <1> call pp3_check_symhints 3800 <1> jc pp12 ; trace --> 3801 <1> %endif 3802 <1> ; jmp pp11 ; we have a skippable instruction here 3803 <1> pp11: 3804 <1> _386_PM call test_d_b_bit 3805 <1> _386_PM jnz .32 ; full 32-bit offset valid --> 3806 <1> _386_PM movzx esi, si ; clear high word here 3807 <1> .32: 3808 <1> @@: 3809 00003B08 E86402 <1> call proceedbreakpoint ; run until the breakpoint is hit 3810 00003B0B 7254 <1> jc pp15 ; unexpected --> 3811 <1> %if _BREAKPOINTS 3812 00003B0D 7515 <1> jnz pp12.bb_hit 3813 <1> %endif 3814 00003B0F 31D2 <1> xor dx, dx ; do not skip WHILE 3815 00003B11 EB2C <1> jmp short pp13 3816 <1> 3817 <1> pp12: 3818 00003B13 F606[C800]80 <1> testopt [internalflags2], dif2_tpg_keep_proceed_bp 3819 00003B18 75EE <1> jnz @B 3820 <1> 3821 00003B1A E8CAFD <1> call traceone 3822 00003B1D 7242 <1> jc pp15 3823 <1> ; jc unexpectedinterrupt 3824 <1> 3825 <1> %if _BREAKPOINTS 3826 00003B1F BA0000 <1> mov dx, 0 ; do not skip WHILE 3827 00003B22 7413 <1> jz @F 3828 <1> 3829 <1> .bb_hit: 3830 00003B24 E842FC <1> call handle_bb_hit_pass_match 3831 00003B27 7204 <1> jc .actual_hit 3832 <1> d5 call d5message 3833 <1> d5 asciz "in pp12.bb_hit after non-hit",13,10 3834 00003B29 741C <1> jz pp13.nodump 3835 00003B2B EB12 <1> jmp pp13 3836 <1> 3837 <1> 3838 <1> .actual_hit: 3839 <1> %if _PM 3840 <1> call resetmode 3841 <1> %endif 3842 00003B2D E8C3F4 <1> call put_deferred_message_silent 3843 00003B30 E86E00 <1> call dumpregs_extended_silent 3844 00003B33 59 <1> pop cx 3845 00003B34 5B <1> pop bx ; (discard counter) 3846 00003B35 EB23 <1> jmp @FF 3847 <1> 3848 <1> @@: 3849 <1> %endif 3850 <1> 3851 <1> ; We could check here for the correct address too, but that 3852 <1> ; would require disassembling the instruction and correctly so. 3853 <1> ; (Disassembling it incorrectly would only result in spurious 3854 <1> ; "Unexpected single-step interrupt" messages aborting multi- 3855 <1> ; traces though, so it won't be fatal.) 3856 <1> ; Wouldn't really be useful though: Only the "int1" or "int 01h" 3857 <1> ; instructions should cause this, and their operation means we 3858 <1> ; might as well behave as if the breakpoint was expected. 3859 00003B37 813E[D00B][317D] <1> cmp word [run_int], int1msg 3860 00003B3D 7522 <1> jne pp15 ; if some other interrupt (unexpected) --> 3861 <1> 3862 <1> pp13: 3863 00003B3F 52 <1> push dx 3864 <1> %if _PM 3865 <1> call resetmode 3866 <1> %endif 3867 <1> ; An expected breakpoint. Dump registers, then loop. 3868 00003B40 E8B0F4 <1> call put_deferred_message_silent 3869 00003B43 E85B00 <1> call dumpregs_extended_silent 3870 00003B46 5A <1> pop dx ; preserve skip WHILE flag 3871 <1> 3872 <1> .nodump: 3873 00003B47 E8C1FB <1> call tt_handle_while 3874 00003B4A 59 <1> pop cx 3875 00003B4B 5B <1> pop bx 3876 <1> 3877 00003B4C 83E901 <1> sub cx, 1 3878 00003B4F 83DB00 <1> sbb bx, 0 3879 <1> 3880 00003B52 85DB <1> test bx, bx 3881 00003B54 7508 <1> jnz pp14 3882 00003B56 85C9 <1> test cx, cx 3883 00003B58 7504 <1> jnz pp14 ; back for more --> 3884 <1> 3885 <1> @@: 3886 <1> %if _PM 3887 <1> call resetmode 3888 <1> %endif 3889 00003B5A E8E375 <1> call silence_dump 3890 <1> 3891 00003B5D C3 <1> retn 3892 <1> 3893 <1> %if ($ - pp1 - 1) < 128 3894 <1> pp14: equ pp1 3895 <1> %else 3896 00003B5E E9CAFE <1> pp14: jmp pp1 3897 <1> %endif 3898 <1> 3899 <1> pp15: 3900 00003B61 E94DFD <1> jmp unexpectedinterrupt ; print message about unexpected interrupt 3901 <1> ; and quit 3902 <1> 3903 <1> 3904 <1> %if _SYMBOLIC 3905 <1> ; INP: bx:(e)si -> where to place breakpoint by default 3906 <1> ; byte [pp_instruction] = E8h if near immediate call, 3907 <1> ; bx:(d)word [pp_operand] -> rel16/rel32 3908 <1> ; word [reg_cs]:(d)word [reg_eip] = next CS:(E)IP 3909 <1> ; OUT: NC if no symhint detected or only skip symhints, 3910 <1> ; bx:(e)si -> where to place breakpoint 3911 <1> ; (will be modified if skip symhints occurred) 3912 <1> ; CY if trace symhints detected 3913 <1> pp3_check_symhints: 3914 <1> call zz_detect_xms ; re-detect XMS if used after run 3915 <1> 3916 <1> ; Check for ..@symhint_trace|skip_caller_* hint at called address. 3917 <1> pp3_check_trace_caller_or_skip_caller: 3918 <1> xor ax, ax 3919 <1> lframe 3920 <1> lenter 3921 <1> lvar word, segment 3922 <1> push bx 3923 <1> lvar dword, offset 3924 <1> %ifn _PM 3925 <1> push ax 3926 <1> %else 3927 <1> _no386 push ax 3928 <1> %endif 3929 <1> _386_PM_o32 3930 <1> push si 3931 <1> lvar word, skip 3932 <1> push ax 3933 <1> 3934 <1> mov al, byte [pp_instruction] 3935 <1> cmp al, 0E8h 3936 <1> jne .notcallrel16 3937 <1> _386_PM_o32 3938 <1> mov si, word [pp_operand] 3939 <1> 3940 <1> _386_PM movzx eax, ax 3941 <1> call pp16 3942 <1> xchg al, ah 3943 <1> call pp16 3944 <1> xchg al, ah 3945 <1> _386_PM jmp @F 3946 <1> test dh, 2 3947 <1> jnz .notcallrel16 3948 <1> @@: 3949 <1> _386_PM test dh, 2 3950 <1> _386_PM jz @F 3951 <1> 3952 <1> _386_PM rol eax, 16 3953 <1> _386_PM call pp16 3954 <1> _386_PM xchg al, ah 3955 <1> _386_PM call pp16 3956 <1> _386_PM xchg al, ah 3957 <1> _386_PM rol eax, 16 3958 <1> @@: 3959 <1> _386_PM_o32 3960 <1> add si, ax 3961 <1> _386_PM_o32 3962 <1> mov dx, si 3963 <1> call getlinear 3964 <1> jc @F 3965 <1> mov cx, dx 3966 <1> mov bx, ax 3967 <1> call binsearchmain ; search for matching symbol 3968 <1> jcxz @F 3969 <1> .loop_symbol: 3970 <1> push bx ; main index 3971 <1> push ax ; (reserve space, uninitialised) 3972 <1> call getfarpointer.main 3973 <1> pop di 3974 <1> pop es 3975 <1> 3976 <1> test byte [es:di + smFlags + 1], smfSymHint >> 8 3977 <1> jz .next_symbol 3978 <1> 3979 <1> call zz_copy_strings_to_str_buffer 3980 <1> 3981 <1> push cx 3982 <1> push ss 3983 <1> pop es 3984 <1> mov di, str_buffer + msg.symhint_size 3985 <1> mov si, msg.trace_caller 3986 <1> mov cx, msg.trace_caller_size 3987 <1> push di 3988 <1> repe cmpsb 3989 <1> pop di 3990 <1> pop cx 3991 <1> je pp3_trace 3992 <1> 3993 <1> push cx 3994 <1> mov si, msg.skip_caller 3995 <1> mov cx, msg.skip_caller_size 3996 <1> repe cmpsb 3997 <1> pop cx 3998 <1> jne .next_symbol 3999 <1> 4000 <1> call pp3_handle_skip_di 4001 <1> 4002 <1> .next_symbol: 4003 <1> inc bx 4004 <1> loop .loop_symbol 4005 <1> 4006 <1> @@: 4007 <1> .notcallrel16: 4008 <1> 4009 <1> 4010 <1> ; Check for ..@symhint_trace|skip_here_* hint at cs:eip address. 4011 <1> pp3_check_trace_here_or_skip_here: 4012 <1> mov bx, word [reg_cs] 4013 <1> _386_PM_o32 4014 <1> mov dx, word [reg_eip] 4015 <1> call getlinear 4016 <1> jc @F 4017 <1> mov cx, dx 4018 <1> mov bx, ax 4019 <1> call binsearchmain ; search for matching symbol 4020 <1> jcxz @F 4021 <1> .loop_symbol: 4022 <1> push bx ; main index 4023 <1> push ax ; (reserve space, uninitialised) 4024 <1> call getfarpointer.main 4025 <1> pop di 4026 <1> pop es 4027 <1> 4028 <1> test byte [es:di + smFlags + 1], smfSymHint >> 8 4029 <1> jz .next_symbol 4030 <1> 4031 <1> call zz_copy_strings_to_str_buffer 4032 <1> 4033 <1> push cx 4034 <1> push ss 4035 <1> pop es 4036 <1> mov di, str_buffer + msg.symhint_size 4037 <1> mov si, msg.trace_here 4038 <1> mov cx, msg.trace_here_size 4039 <1> push di 4040 <1> repe cmpsb 4041 <1> pop di 4042 <1> pop cx 4043 <1> je pp3_trace 4044 <1> 4045 <1> push cx 4046 <1> mov si, msg.skip_here 4047 <1> mov cx, msg.skip_here_size 4048 <1> repe cmpsb 4049 <1> pop cx 4050 <1> jne .next_symbol 4051 <1> 4052 <1> call pp3_handle_skip_di 4053 <1> 4054 <1> .next_symbol: 4055 <1> inc bx 4056 <1> loop .loop_symbol 4057 <1> 4058 <1> @@: 4059 <1> db __TEST_IMM8 ; skip stc, NC 4060 <1> pp3_trace: 4061 <1> stc 4062 <1> 4063 <1> push ss 4064 <1> pop es 4065 <1> push ss 4066 <1> pop ds 4067 <1> 4068 <1> mov word [stack_low_address], str_buffer 4069 <1> 4070 <1> pop dx ; ?skip 4071 <1> _386_PM_o32 4072 <1> pop si ; ?offset 4073 <1> %ifn _PM 4074 <1> pop ax ; ?offset high word 4075 <1> %else 4076 <1> _no386 pop ax ; ?offset high word (if it was not pop esi) 4077 <1> %endif 4078 <1> pop bx ; ?segment 4079 <1> ; restore bx:(e)si if proceeding, else discard 4080 <1> lleave code 4081 <1> lahf 4082 <1> _386_PM movzx edx, dx 4083 <1> _386_PM_o32 4084 <1> add si, dx 4085 <1> sahf 4086 <1> retn 4087 <1> 4088 <1> 4089 <1> ; INP: ds:di -> symbol with ASCIZ keyword or expression 4090 <1> ; word [bp + ?segment] = segment/selector of breakpoint 4091 <1> ; (d)word [bp + ?offset] = offset of breakpoint 4092 <1> ; OUT: word [bp + ?skip] = how far to skip 4093 <1> ; CHG: esi, dx, ax 4094 <1> ; STT: es = ds = ss 4095 <1> pp3_handle_skip_di: 4096 <1> push bx 4097 <1> push cx 4098 <1> 4099 <1> mov si, di 4100 <1> @@: 4101 <1> lodsb 4102 <1> cmp al, 0 4103 <1> je .expr_have 4104 <1> cmp al, '_' 4105 <1> jne @B 4106 <1> mov byte [si - 1], 0 4107 <1> .expr_have: 4108 <1> mov si, di 4109 <1> mov dx, msg.asciz 4110 <1> call isstring? 4111 <1> jne .expr_num 4112 <1> xor cx, cx 4113 <1> mov bx, word [bp + ?segment] 4114 <1> _386_PM_o32 4115 <1> mov si, word [bp + ?offset] 4116 <1> .expr_asciz_loop: 4117 <1> call pp16 4118 <1> test al, al 4119 <1> loopnz .expr_asciz_loop 4120 <1> jcxz .error 4121 <1> neg cx 4122 <1> mov dx, cx 4123 <1> jmp .expr_got 4124 <1> 4125 <1> .error: 4126 <1> mov si, line_in + 2 4127 <1> jmp error 4128 <1> 4129 <1> .expr_num: 4130 <1> lodsb 4131 <1> call getword 4132 <1> .expr_got: 4133 <1> mov word [bp + ?skip], dx 4134 <1> 4135 <1> pop cx 4136 <1> pop bx 4137 <1> retn 4138 <1> 4139 <1> lleave ctx 4140 <1> 4141 <1> 4142 <1> ; INP: bx = SYMMAIN index 4143 <1> ; CHG: es, di, si, dx, ax 4144 <1> ; STT: ss = ds 4145 <1> ; 4146 <1> ; Note: This invalidates the access slice. 4147 <1> zz_copy_strings_to_str_buffer: 4148 <1> mov word [stack_low_address], stack 4149 <1> 4150 <1> push cx 4151 <1> 4152 <1> push bx ; main index 4153 <1> push ax ; (reserve space, uninitialised) 4154 <1> call getfarpointer.main 4155 <1> pop di 4156 <1> pop es 4157 <1> push ds 4158 <1> ; Here we depend on str_buffer being 512-bytes long, 4159 <1> ; to allow storing both smName1 and smName2 contents 4160 <1> ; one after another in str_buffer. 4161 <1> call getstring1 4162 <1> push ss 4163 <1> pop es 4164 <1> mov si, dx 4165 <1> mov di, str_buffer 4166 <1> rep movsb 4167 <1> mov si, di 4168 <1> pop ds 4169 <1> push bx ; main index 4170 <1> push ax ; (reserve space, uninitialised) 4171 <1> call getfarpointer.main 4172 <1> pop di 4173 <1> pop es 4174 <1> push ds 4175 <1> call getstring2 4176 <1> push ss 4177 <1> pop es 4178 <1> mov di, si 4179 <1> mov si, dx 4180 <1> rep movsb 4181 <1> mov al, 0 4182 <1> stosb 4183 <1> pop ds 4184 <1> 4185 <1> pop cx 4186 <1> retn 4187 <1> %endif 4188 <1> 4189 <1> 4190 <1> terminate_silent_dump.if_nonnull: 4191 00003B64 F606[C700]10 <1> testopt [internalflags], tt_silent_mode 4192 00003B69 7435 <1> jz terminate_silent_dump.ret 4193 00003B6B 06 <1> push es 4194 00003B6C 57 <1> push di 4195 00003B6D 50 <1> push ax 4196 00003B6E 8E06[2A0A] <1> mov es, word [auxbuff_segorsel] 4197 00003B72 8B3E[2E0A] <1> mov di, word [auxbuff_behind_last_silent] 4198 00003B76 3B3E[2C0A] <1> cmp di, word [auxbuff_behind_while_condition] 4199 00003B7A 7421 <1> je terminate_silent_dump.done 4200 00003B7C 4F <1> dec di 4201 00003B7D B000 <1> mov al, 0 4202 00003B7F AE <1> scasb 4203 00003B80 741B <1> je terminate_silent_dump.done 4204 00003B82 EB14 <1> jmp @F 4205 <1> 4206 <1> terminate_silent_dump: 4207 00003B84 F606[C700]10 <1> testopt [internalflags], tt_silent_mode 4208 00003B89 7415 <1> jz .ret 4209 <1> .is_silent: 4210 00003B8B 06 <1> push es 4211 00003B8C 57 <1> push di 4212 00003B8D 50 <1> push ax 4213 00003B8E 8E06[2A0A] <1> mov es, word [auxbuff_segorsel] 4214 00003B92 8B3E[2E0A] <1> mov di, word [auxbuff_behind_last_silent] 4215 00003B96 B000 <1> mov al, 0 4216 <1> @@: 4217 00003B98 AA <1> stosb 4218 00003B99 FF06[2E0A] <1> inc word [auxbuff_behind_last_silent] 4219 <1> ; -> point past the NUL 4220 <1> .done: 4221 00003B9D 58 <1> pop ax 4222 00003B9E 5F <1> pop di 4223 00003B9F 07 <1> pop es 4224 <1> .ret: 4225 00003BA0 C3 <1> retn 4226 <1> 4227 <1> 4228 <1> dumpregs_extended_silent: 4229 <1> %if _PM 4230 <1> call resetmode 4231 <1> %endif 4232 00003BA1 F606[C700]10 <1> testopt [internalflags], tt_silent_mode 4233 00003BA6 7405 <1> jz @F 4234 00003BA8 800E[C700]20 <1> setopt [internalflags], tt_silence 4235 <1> ; Call dumpregs (trimputs, puts, putsline, disasm) with 4236 <1> ; "silence" flag (writes to auxbuff instead of terminal). 4237 <1> @@: 4238 00003BAD E89EE8 <1> call dumpregs_extended 4239 00003BB0 F606[C700]10 <1> testopt [internalflags], tt_silent_mode 4240 00003BB5 7408 <1> jz @F 4241 <1> ; Terminate the last dump's output with a NUL byte. 4242 00003BB7 E8D1FF <1> call terminate_silent_dump.is_silent 4243 00003BBA 8026[C700]DF <1> clropt [internalflags], tt_silence 4244 <1> @@: 4245 <1> 4246 <1> handle_serial_flags_ctrl_c: 4247 00003BBF 1E <1> push ds 4248 00003BC0 50 <1> push ax 4249 00003BC1 16 <1> push ss 4250 00003BC2 1F <1> pop ds 4251 00003BC3 F606[9F00]40 <1> testopt [options3], opt3_check_ctrlc_0bh 4252 00003BC8 7409 <1> jz @FF 4253 <1> ; The following DOS call originated in sleepcmd. 4254 <1> ; However, it is useful for all callers of this 4255 <1> ; function so put it here. 4256 00003BCA E8D05F <1> call InDos 4257 00003BCD 7504 <1> jnz @F 4258 00003BCF B40B <1> mov ah, 0Bh 4259 <1> doscall ; allow to break with Ctrl-C 2334 00003BD1 CD21 <2> int 21h 4260 <1> @@: 4261 <1> @@: 4262 00003BD3 F606[E50B]02 <1> testopt [serial_flags], sf_ctrl_c 4263 00003BD8 755B <1> jnz handle_ctrl_c 4264 00003BDA F606[9500]40 <1> testopt [options], enable_serial 4265 00003BDF 7551 <1> jnz .ret 4266 00003BE1 E8B95F <1> call InDos 4267 00003BE4 744C <1> jz .ret 4268 00003BE6 F606[9F00]20 <1> testopt [options3], opt3_check_ctrlc_keyb 4269 00003BEB 7445 <1> jz .ret 4270 <1> 4271 <1> .check_rombios_buffer: 4272 00003BED 53 <1> push bx 4273 00003BEE 52 <1> push dx 4274 00003BEF B84000 <1> mov ax, 40h ; dual mode segment/selector 4275 00003BF2 50 <1> push ax 4276 00003BF3 A1[F40B] <1> mov ax, word [io_end_buffer] 4277 00003BF6 8B16[F20B] <1> mov dx, word [io_start_buffer] 4278 00003BFA 1F <1> pop ds 4279 00003BFB 85C0 <1> test ax, ax 4280 00003BFD 7503 <1> jnz @F 4281 00003BFF A18200 <1> mov ax, word [82h] ; end of circular keypress buffer 4282 <1> @@: 4283 00003C02 85D2 <1> test dx, dx 4284 00003C04 7504 <1> jnz @F 4285 00003C06 8B168000 <1> mov dx, word [80h] ; start of circular buffer 4286 <1> @@: 4287 00003C0A 89C3 <1> mov bx, ax 4288 00003C0C 29D3 <1> sub bx, dx ; cmp end, start 4289 00003C0E 7620 <1> jbe .ret_dx_bx ; invalid --> 4290 00003C10 F6C301 <1> test bl, 1 ; even amount of bytes ? 4291 00003C13 751B <1> jnz .ret_dx_bx ; invalid --> 4292 00003C15 8B1E1A00 <1> mov bx, word [1Ah] ; current head of circular buffer 4293 <1> .loop: 4294 00003C19 3B1E1C00 <1> cmp bx, word [1Ch] ; equal to current tail ? 4295 00003C1D 7411 <1> je .ret_dx_bx ; yes, all entries checked --> 4296 00003C1F 803F03 <1> cmp byte [bx], 3 ; is it Ctrl-C ? 4297 00003C22 7411 <1> je handle_ctrl_c ; yes, handle --> 4298 00003C24 43 <1> inc bx 4299 00003C25 43 <1> inc bx ; -> next entry 4300 00003C26 39C3 <1> cmp bx, ax ; at end of buffer ? 4301 00003C28 72EF <1> jb .loop ; no, loop --> 4302 00003C2A 7704 <1> ja .ret_dx_bx ; invalid --> 4303 00003C2C 89D3 <1> mov bx, dx ; reset to start of buffer 4304 00003C2E EBE9 <1> jmp .loop ; then loop --> 4305 <1> 4306 <1> .ret_dx_bx: 4307 00003C30 5A <1> pop dx 4308 00003C31 5B <1> pop bx 4309 <1> 4310 <1> .ret: 4311 00003C32 58 <1> pop ax 4312 00003C33 1F <1> pop ds 4313 00003C34 C3 <1> retn 4314 <1> 4315 <1> 4316 <1> handle_ctrl_c: 4317 00003C35 16 <1> push ss 4318 00003C36 1F <1> pop ds 4319 00003C37 16 <1> push ss 4320 00003C38 07 <1> pop es 4321 00003C39 8026[E50B]F9 <1> clropt [serial_flags], sf_ctrl_c | sf_double_ctrl_c 4322 <1> %if _PM 4323 <1> call resetmode 4324 <1> %endif 4325 00003C3E E823FF <1> call terminate_silent_dump.if_nonnull 4326 00003C41 E8FC74 <1> call silence_dump 4327 00003C44 BA[365D] <1> mov dx, msg.ctrlc 4328 00003C47 E8B675 <1> call putsz 4329 <1> 4330 00003C4A 800E[CC00]10 <1> setopt [internalflags3], dif3_input_terminal_override 4331 <1> ; make sure we drain terminal input 4332 <1> @@: 4333 00003C4F E8ED77 <1> call getc_if_any ; drain the buffer 4334 00003C52 75FB <1> jnz @B ; if any was available --> 4335 <1> 4336 00003C54 8026[CC00]EF <1> clropt [internalflags3], dif3_input_terminal_override 4337 00003C59 E988C7 <1> jmp cmd2_reset_re 4338 <1> 4339 <1> 4340 <1> ; INP: bp [tpg_proceed_bp], 4341 <1> ; linear address and point content to write 4342 <1> ; opt [internalflags2] & dif2_tpg_proceed_bp_set 4343 <1> ; set if a breakpoint was written 4344 <1> ; OUT: CY if error, 4345 <1> ; bp [tpg_proceed_bp] = has point content to restore 4346 <1> ; ah = reason = 0 = no error (never), 4347 <1> ; 1 = couldn't write, 4348 <1> ; 2 = unreachable, 4349 <1> ; 3 = overwritten, al = new byte value 4350 <1> ; NC if no error, 4351 <1> ; ah = 0 4352 <1> ; opt [internalflags2] & dif2_tpg_proceed_bp_set 4353 <1> ; cleared 4354 <1> ; CHG: di, (e)dx, ax, bx 4355 <1> ; STT: might switch modes due to getsegmented call 4356 <1> proceed_writepoint_restore: 4357 00003C5C B400 <1> mov ah, 0 4358 00003C5E F606[C800]40 <1> testopt [internalflags2], dif2_tpg_proceed_bp_set 4359 00003C63 7461 <1> jz proceed_wp.retn ; (NC) 4360 00003C65 BF0100 <1> mov di, 1 4361 00003C68 EB05 <1> jmp proceed_wp 4362 <1> 4363 <1> ; INP: bp [tpg_proceed_bp], 4364 <1> ; linear address and point content to write (0CCh) 4365 <1> ; OUT: CY if error, 4366 <1> ; bp [tpg_proceed_bp] = has point content 0CCh 4367 <1> ; ah = reason = 0 = no error (never), 4368 <1> ; 1 = couldn't write, 4369 <1> ; 2 = unreachable, 4370 <1> ; 3 = overwritten (never) 4371 <1> ; NC if no error (either flag not set or point restored), 4372 <1> ; ah = 0 4373 <1> ; opt [internalflags2] & dif2_tpg_proceed_bp_set 4374 <1> ; set 4375 <1> ; CHG: di, (e)dx, ax, bx 4376 <1> ; STT: might switch modes due to getsegmented call 4377 <1> proceed_writepoint: 4378 <1> %if _DELAY_BEFORE_BP 4379 00003C6A E8ACF5 <1> call delay_before_bp 4380 <1> %endif 4381 00003C6D 31FF <1> xor di, di 4382 <1> proceed_wp: 4383 <1> lframe near 4384 00003C6F 5589E5 <1> lenter 4385 00003C72 83F701 <1> xor di, 1 4386 <1> lvar word, is_write 4387 00003C75 57 <1> push di 4388 <1> 4389 00003C76 A1[F400] <1> mov ax, word [tpg_proceed_bp] 4390 <1> %if _PM 4391 <1> mov dx, word [tpg_proceed_bp + 2] 4392 <1> %else 4393 00003C79 31D2 <1> xor dx, dx 4394 00003C7B 8A16[F600] <1> mov dl, byte [tpg_proceed_bp + 2] 4395 <1> %endif 4396 00003C7F E8FEF8 <1> call getsegmented 4397 00003C82 A0[F900] <1> mov al, byte [tpg_proceed_bp + BPSIZE - 1] 4398 <1> ; al = byte to restore 4399 00003C85 B402 <1> mov ah, 2 ; error reason: unreachable 4400 00003C87 723A <1> jc .return 4401 <1> 4402 00003C89 F646FE01 <1> test byte [bp + ?is_write], 1 4403 <1> ; (NC) is it writing ? 4404 00003C8D 7518 <1> jnz .write 4405 <1> .restore: 4406 00003C8F 50 <1> push ax 4407 00003C90 E8CD4F <1> call readmem ; read current byte 4408 00003C93 3CCC <1> cmp al, 0CCh ; is this still what we wrote? 4409 00003C95 B403 <1> mov ah, 3 ; error reason: overwritten, al = new value 4410 00003C97 F9 <1> stc 4411 00003C98 7529 <1> jne .return_discard ; nope --> (CY) 4412 00003C9A 58 <1> pop ax 4413 00003C9B E8B04F <1> call writemem ; return the byte to its original value 4414 00003C9E 720D <1> jc .next ; failed --> (CY, handled there) 4415 00003CA0 C606[F900]CC <1> mov byte [tpg_proceed_bp + BPSIZE - 1], 0CCh 4416 <1> ; reset stored point 4417 00003CA5 EB06 <1> jmp short .next 4418 <1> 4419 <1> .write: 4420 00003CA7 E8A44F <1> call writemem 4421 00003CAA A2[F900] <1> mov byte [tpg_proceed_bp + BPSIZE - 1], al 4422 <1> ; save the previous byte there 4423 <1> .next: 4424 00003CAD B401 <1> mov ah, 1 ; (in case of error) error reason: cannot write 4425 00003CAF 7212 <1> jc .return ; failed to write --> (CY) 4426 00003CB1 B400 <1> mov ah, 0 ; (no error) 4427 <1> 4428 00003CB3 800E[C800]40 <1> setopt [internalflags2], dif2_tpg_proceed_bp_set 4429 <1> ; set flag in case of successful writing 4430 00003CB8 F646FE01 <1> test byte [bp + ?is_write], 1 4431 <1> ; (NC) is it writing ? 4432 00003CBC 7505 <1> jnz .return ; yes, leave flag set --> 4433 00003CBE 8026[C800]BF <1> clropt [internalflags2], dif2_tpg_proceed_bp_set 4434 <1> ; (NC) clear flag in case of successful restoring 4435 <1> .return: 4436 <1> .return_discard: 4437 00003CC3 89EC5D <1> lleave 4438 <1> .retn: 4439 00003CC6 C3 <1> retn 4440 <1> 4441 <1> 4442 <1> ; INP: ah & 7Fh = status = 0 = no error, 4443 <1> ; 1 = couldn't write, 4444 <1> ; 2 = unreachable, 4445 <1> ; 3 = overwritten, al = new value 4446 <1> ; ah & 80h = set if error restoring point, 4447 <1> ; else error writing point 4448 <1> ; bh & 80h = set if gg breakpoint, 4449 <1> ; cx = index (0-based) 4450 <1> ; bh & 40h = set if bb breakpoint, 4451 <1> ; cx = index (0-based) 4452 <1> ; bh & C0h = clear if proceed breakpoint 4453 <1> ; bl = what we tried to restore, only set if ah & 80h set 4454 <1> ; dword [ss:sp] = linear address (24 bit if non-_PM) 4455 <1> ; CHG: ax, bx, cx, dx, di 4456 <1> ; STT: ds = es = ss = debugger data selector 4457 <1> display_breakpoint_failure: 4458 <1> %if _PM 4459 <1> call resetmode 4460 <1> %endif 4461 <1> 4462 00003CC7 50 <1> push ax 4463 00003CC8 53 <1> push bx 4464 00003CC9 51 <1> push cx 4465 00003CCA 56 <1> push si 4466 00003CCB E87274 <1> call silence_dump ; do away with silent mode 4467 00003CCE 5E <1> pop si 4468 00003CCF 59 <1> pop cx 4469 00003CD0 5B <1> pop bx 4470 00003CD1 58 <1> pop ax 4471 <1> 4472 00003CD2 800E[C900]08 <1> setopt [internalflags2], dif2_bp_failure 4473 <1> 4474 <1> lframe near 4475 <1> lpar dword, linear 4476 00003CD7 5589E5 <1> lenter 4477 <1> lvar word, input_ax 4478 00003CDA 50 <1> push ax 4479 <1> 4480 00003CDB BA[AC71] <1> mov dx, msg.cant_bp_the 4481 00003CDE E81F75 <1> call putsz 4482 00003CE1 F6C780 <1> test bh, 80h 4483 00003CE4 740B <1> jz @F 4484 <1> 4485 00003CE6 89C8 <1> mov ax, cx 4486 00003CE8 40 <1> inc ax ; make it 1-based 4487 00003CE9 E859F7 <1> call putordinalbyte 4488 <1> 4489 00003CEC BA[DC71] <1> mov dx, msg.cant_bp_type_gg 4490 00003CEF EB15 <1> jmp .got_type 4491 <1> 4492 <1> @@: 4493 00003CF1 F6C740 <1> test bh, 40h 4494 00003CF4 740D <1> jz @F 4495 <1> 4496 00003CF6 89C8 <1> mov ax, cx 4497 00003CF8 BF[D971] <1> mov di, msg.cant_bp_type_permanent.index 4498 00003CFB E85671 <1> call hexbyte ; (0-based index) 4499 <1> 4500 00003CFE BA[C471] <1> mov dx, msg.cant_bp_type_permanent 4501 <1> %if _SYMBOLIC 4502 <1> sub ax, _NUM_B_BP 4503 <1> jb .got_type 4504 <1> 4505 <1> mov di, msg.cant_bp_type_symbol.index 4506 <1> call hexbyte ; (0-based index) 4507 <1> 4508 <1> mov dx, msg.cant_bp_type_symbol 4509 <1> %endif 4510 00003D01 EB03 <1> jmp .got_type 4511 <1> 4512 <1> @@: 4513 00003D03 BA[B171] <1> mov dx, msg.cant_bp_type_proceed 4514 <1> 4515 <1> .got_type: 4516 00003D06 E8F774 <1> call putsz 4517 <1> 4518 00003D09 BF[F371] <1> mov di, msg.cant_bp_linear.address1 4519 00003D0C 8B4606 <1> mov ax, word [bp + ?linear + 2] 4520 <1> %ifn _PM 4521 00003D0F B400 <1> mov ah, 0 4522 <1> %endif 4523 00003D11 E83971 <1> call hexword 4524 00003D14 47 <1> inc di 4525 <1> ; mov di, msg.cant_bp_linear.address2 4526 00003D15 8B4604 <1> mov ax, word [bp + ?linear] 4527 00003D18 E83271 <1> call hexword 4528 <1> 4529 00003D1B BA[EA71] <1> mov dx, msg.cant_bp_linear 4530 00003D1E E8DF74 <1> call putsz 4531 <1> 4532 00003D21 BF[2872] <1> mov di, msg.cant_bp_restore.value 4533 00003D24 89D8 <1> mov ax, bx 4534 00003D26 E82B71 <1> call hexbyte 4535 <1> 4536 00003D29 BA[FF71] <1> mov dx, msg.cant_bp_write 4537 00003D2C 8B46FE <1> mov ax, word [bp + ?input_ax] 4538 00003D2F F6C480 <1> test ah, 80h 4539 00003D32 7406 <1> jz @F 4540 00003D34 80E47F <1> and ah, ~80h 4541 00003D37 BA[1272] <1> mov dx, msg.cant_bp_restore 4542 <1> @@: 4543 00003D3A E8C374 <1> call putsz 4544 <1> 4545 00003D3D BF[A372] <1> mov di, msg.cant_bp_reason3.value 4546 00003D40 E81171 <1> call hexbyte 4547 <1> 4548 00003D43 BA[2C72] <1> mov dx, msg.cant_bp_reason 4549 00003D46 E8B774 <1> call putsz 4550 <1> 4551 00003D49 BA[3872] <1> mov dx, msg.cant_bp_reason0 4552 00003D4C 80FC01 <1> cmp ah, 1 4553 00003D4F 7215 <1> jb @F 4554 00003D51 BA[5E72] <1> mov dx, msg.cant_bp_reason1 4555 00003D54 7410 <1> je @F 4556 00003D56 BA[7172] <1> mov dx, msg.cant_bp_reason2 4557 00003D59 80FC03 <1> cmp ah, 3 4558 00003D5C 7208 <1> jb @F 4559 00003D5E BA[8672] <1> mov dx, msg.cant_bp_reason3 4560 00003D61 7403 <1> je @F 4561 00003D63 BA[A972] <1> mov dx, msg.cant_bp_reasonu 4562 <1> @@: 4563 00003D66 E89774 <1> call putsz 4564 <1> 4565 00003D69 89EC5D <1> lleave 4566 00003D6C C20400 <1> lret 4567 <1> 4568 <1> 4569 <1> %if _PM 4570 <1> isdpmientry: 4571 <1> testopt [internalflags4], dif4_int_2F_hooked 4572 <1> jz @F 4573 <1> testopt [internalflags], nohook2F 4574 <1> jz .stdhook 4575 <1> @@: 4576 <1> mov word [reg_eip], mydpmientry 4577 <1> mov word [reg_cs], ds ; if Int2F not hooked, point to the hook here 4578 <1> ; ds => lDEBUG_DATA_ENTRY 4579 <1> .stdhook: 4580 <1> ; Run code until it returned far. 4581 <1> mov bx, word [reg_esp] 4582 <1> push ds 4583 <1> mov ds, word [reg_ss] ; ds:bx-> (16-bit) stack 4584 <1> mov si, word [bx+0] 4585 <1> mov bx, word [bx+2] ; get (16-bit) far return address 4586 <1> pop ds 4587 <1> %endif 4588 <1> ; Proceed over an instruction 4589 <1> ; INP: bx:(e)si-> where to write the breakpoint 4590 <1> ; OUT: NC if the breakpoint was hit, 4591 <1> ; ah = 0 4592 <1> ; ch = 0 4593 <1> ; d[reg_eip] adjusted 4594 <1> ; cx & 8 set if proceed point hit 4595 <1> ; (ZF only set if _BREAKPOINTS) 4596 <1> ; ZR if breakpoint after instruction was hit, 4597 <1> ; cx & 7 = 0 4598 <1> ; NZ if another breakpoint (bb) was hit (or both), 4599 <1> ; cx & 1 set if non-pass match (actual hit), 4600 <1> ; else cx & 2 set if pass match (consider as hit first, 4601 <1> ; but dump registers next (not to silent buffer) 4602 <1> ; and then continue execution) 4603 <1> ; else cx & 4 always set, indicates any match 4604 <1> ; (including matches that should merely continue) 4605 <1> ; all pass points' counters stepped 4606 <1> ; CY if the breakpoint was not hit, 4607 <1> ; cx = 0 4608 <1> ; If [internalflags2] & dif2_gg_is_gg is set: 4609 <1> ; ah & 7Fh = status = 0 = no error, 4610 <1> ; 1 = couldn't write, 4611 <1> ; 2 = unreachable, 4612 <1> ; 3 = overwritten, al = new value 4613 <1> ; ah & 80h = set if error restoring point, 4614 <1> ; else error writing point to begin with 4615 <1> ; If that flag is clear: 4616 <1> ; Does not return if a breakpoint cannot be written 4617 <1> ; or cannot be restored, jumps to cmd3 instead. 4618 <1> ; CHG: all 4619 <1> ; STT: ds = es = ss 4620 <1> ; might return modeswitched (if dif2_gg_is_gg) 4621 <1> ; might be called while modeswitched 4622 <1> proceedbreakpoint: 4623 00003D6F F606[C800]80 <1> testopt [internalflags2], dif2_tpg_keep_proceed_bp 4624 00003D74 750C <1> jnz @F 4625 <1> 4626 <1> _386_PM_o32 ; mov edx, esi 4627 00003D76 89F2 <1> mov dx, si ; bx:(e)dx = segmented 4628 00003D78 E874F7 <1> call getlinear ; dx:ax = linear 4629 <1> 4630 00003D7B A3[F400] <1> mov word [tpg_proceed_bp], ax 4631 <1> ; The following two instructions must be in this order. 4632 <1> ; For the non-_PM build, writing to the second word 4633 <1> ; of the breakpoint also writes to the content byte. 4634 00003D7E 8916[F600] <1> mov word [tpg_proceed_bp + 2], dx 4635 <1> ; store in point 4636 <1> @@: 4637 00003D82 C606[F900]CC <1> mov byte [tpg_proceed_bp + BPSIZE - 1], 0CCh 4638 <1> ; initialise content 4639 00003D87 E8E0FE <1> call proceed_writepoint 4640 <1> ; This call might return modeswitched. 4641 00003D8A 7308 <1> jnc @F 4642 <1> 4643 00003D8C 80E47F <1> and ah, ~80h ; mark error during writing 4644 <1> 4645 00003D8F 31C9 <1> xor cx, cx ; cx = 0 in case of branching 4646 00003D91 51 <1> push cx ; put the zero on the stack 4647 <1> 4648 00003D92 EB0E <1> jmp .failure 4649 <1> 4650 <1> @@: 4651 <1> ; The run functions call resetmode. 4652 <1> %if _BREAKPOINTS 4653 00003D94 E87400 <1> call run_with_bb 4654 00003D97 89C8 <1> mov ax, cx 4655 <1> %else 4656 <1> call run 4657 <1> xor ax, ax 4658 <1> %endif 4659 00003D99 50 <1> push ax 4660 <1> 4661 <1> ; It's important to keep the linear address saved inbetween, 4662 <1> ; even though we save by value (as opposed to DEBUG/X G's saving 4663 <1> ; of the reference) because the selector that we used for the 4664 <1> ; access might now be invalid or (worse) point elsewhere, or 4665 <1> ; a mode change might have occured. (The latter is sometimes 4666 <1> ; handled by a specific kludge in DEBUG/X, but not always.) 4667 <1> 4668 00003D9A E8BFFE <1> call proceed_writepoint_restore 4669 <1> ; This call might return modeswitched. 4670 00003D9D 7326 <1> jnc @F 4671 <1> 4672 00003D9F 80CC80 <1> or ah, 80h ; mark error during restoration 4673 <1> 4674 <1> .failure: 4675 <1> ; Here we may be modeswitched. 4676 00003DA2 F606[C800]08 <1> testopt [internalflags2], dif2_gg_is_gg 4677 <1> ; is it from gg ? 4678 00003DA7 7559 <1> jnz .return_CY_pop_cx ; (CY) yes, return to gg 4679 <1> ; This branch may be taken while modeswitched. 4680 <1> 4681 <1> %if _PM 4682 <1> call resetmode 4683 <1> %endif 4684 <1> 4685 00003DA9 E847F2 <1> call put_deferred_message_silent 4686 <1> 4687 00003DAC 50 <1> push ax 4688 00003DAD E89073 <1> call silence_dump 4689 00003DB0 58 <1> pop ax 4690 <1> 4691 00003DB1 FF36[F600] <1> push word [tpg_proceed_bp + 2] 4692 00003DB5 FF36[F400] <1> push word [tpg_proceed_bp] 4693 00003DB9 8A1E[F900] <1> mov bl, [tpg_proceed_bp + BPSIZE - 1] 4694 00003DBD B700 <1> mov bh, 0 4695 00003DBF E805FF <1> call display_breakpoint_failure 4696 <1> ; This function calls resetmode. 4697 00003DC2 E93BC2 <1> jmp cmd3 4698 <1> 4699 <1> @@: 4700 00003DC5 E898F7 <1> call get_cseip_of_possible_breakpoint 4701 <1> ; dx:ax = linear address 1 before cs:(e)ip 4702 00003DC8 7236 <1> jc .return_CY_pop_cx_ax_zero 4703 <1> 4704 00003DCA 59 <1> pop cx 4705 <1> %if _PM 4706 <1> cmp word [tpg_proceed_bp + 2], dx 4707 <1> %else 4708 00003DCB 84F6 <1> test dh, dh ; (bits 24 to 31 set. shouldn't happen) 4709 00003DCD 7517 <1> jnz .not_pp 4710 00003DCF 3816[F600] <1> cmp byte [tpg_proceed_bp + 2], dl 4711 <1> %endif 4712 00003DD3 7511 <1> jne .not_pp 4713 00003DD5 3906[F400] <1> cmp word [tpg_proceed_bp], ax 4714 00003DD9 750B <1> jne .not_pp ; is unexpected (not behind the breakpoint) --> 4715 <1> 4716 <1> ; Need to check this here, because we have to 4717 <1> ; decrement (e)ip if the breakpoint was hit. 4718 00003DDB 813E[D00B][547D] <1> cmp word [run_int], int3msg 4719 00003DE1 7503 <1> jne .not_pp ; is unexpected (not returned by interrupt 03h) --> 4720 00003DE3 80C908 <1> or cl, 8 ; set flag: pp hit 4721 <1> 4722 <1> .not_pp: 4723 00003DE6 B400 <1> mov ah, 0 ; set error to "no error" 4724 <1> 4725 00003DE8 E319 <1> jcxz .return_CY ; bb hit/pass/nonpass or pp hit ? if no --> 4726 <1> 4727 00003DEA E828F2 <1> call adjust_cseip_after_breakpoint 4728 <1> ; decrement (e)ip to point at the instruction 4729 <1> 4730 00003DED F6C101 <1> test cl, 1 ; bb hit ? 4731 00003DF0 750A <1> jnz .return ; yes, return (NC, NZ) --> 4732 <1> 4733 00003DF2 F6C108 <1> test cl, 8 ; proceed point matched ? 4734 00003DF5 7506 <1> jnz @F ; yes --> 4735 <1> 4736 00003DF7 800E[C800]80 <1> setopt [internalflags2], dif2_tpg_keep_proceed_bp 4737 <1> ; flag that we should keep this proceed point 4738 <1> ; (NC, NZ) 4739 <1> .return: 4740 00003DFC C3 <1> retn 4741 <1> 4742 <1> @@: 4743 <1> ; return with ax = 0, NC, ZR 4744 <1> ; 4745 <1> ; (hit proceed point, no hit bb (possibly pass/non-pass bb) 4746 00003DFD 31C0 <1> xor ax, ax ; ah = 0 (NC, ZR) 4747 00003DFF C3 <1> retn 4748 <1> 4749 <1> ; set ax = 0, pop cx, CY 4750 <1> .return_CY_pop_cx_ax_zero: 4751 00003E00 31C0 <1> xor ax, ax 4752 <1> 4753 <1> ; pop cx, CY (preserve ax) 4754 <1> .return_CY_pop_cx: 4755 00003E02 59 <1> pop cx 4756 <1> .return_CY: 4757 00003E03 F9 <1> stc 4758 00003E04 C3 <1> retn 4759 <1> 4760 <1> 4761 <1> ; PPX - Get next byte in instruction stream. 4762 <1> ; INP: bx:(e)si-> next byte 4763 <1> ; OUT: al = next byte 4764 <1> ; (e)si incremented 4765 <1> pp16: 4766 <1> %if _PM 4767 <1> call resetmode_and_test_d_b_bit 4768 <1> %endif 4769 00003E05 1E <1> push ds 4770 00003E06 8EDB <1> mov ds, bx 4771 <1> %if _PM 4772 <1> jz .16 4773 <1> a32 ; use esi for lodsb 4774 <1> .16: 4775 <1> %endif 4776 00003E08 AC <1> lodsb 4777 00003E09 1F <1> pop ds 4778 00003E0A C3 <1> retn 4779 <1> ; begin loop over instruction bytes. 4780 <1> 4781 <1> 4782 <1> %if _BREAKPOINTS 4783 <1> ; Run with bb breakpoints 4784 <1> ; 4785 <1> ; OUT: CY if another breakpoint (not a bb one) or trace hit, 4786 <1> ; cx = 0 4787 <1> ; NC if a bb breakpoint hit, 4788 <1> ; cx & 1 set if it is an actual hit 4789 <1> ; else cx & 2 set if it is a pass match, 4790 <1> ; else it is a non-pass non-match 4791 <1> ; (cx & 4 always set) 4792 <1> ; STT: might return modeswitched 4793 <1> run_with_bb: 4794 00003E0B F606[C800]08 <1> testopt [internalflags2], dif2_gg_is_gg 4795 00003E10 750C <1> jnz .no_bb 4796 <1> 4797 00003E12 F606[C700]C0 <1> testopt [internalflags], tt_no_bb | tt_no_bb_first 4798 00003E17 740C <1> jz @F 4799 <1> 4800 00003E19 8026[C700]7F <1> clropt [internalflags], tt_no_bb_first 4801 <1> 4802 <1> .no_bb: 4803 00003E1E E87400 <1> call run 4804 00003E21 31C9 <1> xor cx, cx 4805 00003E23 F9 <1> stc 4806 00003E24 C3 <1> retn 4807 <1> 4808 <1> @@: 4809 <1> .gg5: 4810 <1> %if _BREAKPOINTS 4811 00003E25 E821F4 <1> call bb_writepoints_init_reset 4812 <1> %endif 4813 <1> 4814 00003E28 F606[C800]10 <1> testopt [internalflags2], dif2_gg_first_detected 4815 00003E2D 7436 <1> jz .only_run ; easy case, no cseip point detected --> 4816 <1> 4817 <1> 4818 <1> ; Enter special mode: Restore cseip breakpoint content. 4819 00003E2F 800E[C800]02 <1> setopt [internalflags2], dif2_gg_skip_non_cseip 4820 <1> 4821 00003E34 83EC20 <1> sub sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 4822 00003E37 89E5 <1> mov bp, sp ; -> error info 4823 <1> 4824 00003E39 B91000 <1> mov cx, _NUM_B_BP + _NUM_SYM_BP 4825 <1> ; = index above last one to restore 4826 00003E3C E8D8F4 <1> call bb_restorepoints_and_init_error_info 4827 00003E3F 7317 <1> jnc @F ; no error ? --> 4828 <1> 4829 <1> ; Error in bb_restorepoints. Try to restore other bb. 4830 <1> 4831 <1> ; Exit special mode: Handle non-cseip breakpoints again. 4832 00003E41 8026[C800]FD <1> clropt [internalflags2], dif2_gg_skip_non_cseip 4833 <1> 4834 <1> ; Enter special mode: Skip cseip breakpoints. 4835 00003E46 800E[C800]04 <1> setopt [internalflags2], dif2_gg_skip_cseip 4836 <1> 4837 <1> ; As we already tried to restore all cseip bb points, 4838 <1> ; here we skip these in the bb_restorepoints call. 4839 00003E4B B91000 <1> mov cx, _NUM_B_BP + _NUM_SYM_BP 4840 00003E4E E8C9F4 <1> call bb_restorepoints 4841 <1> 4842 <1> ; Exit special mode: No longer skip cseip breakpoints. 4843 00003E51 8026[C800]FB <1> clropt [internalflags2], dif2_gg_skip_cseip 4844 <1> 4845 <1> ; The failure that led us here is already noted in the info. 4846 00003E56 EB1D <1> jmp .bb_exit 4847 <1> 4848 <1> 4849 <1> @@: 4850 <1> ; Success! Now discard the reserved error info. 4851 00003E58 83C420 <1> add sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 4852 <1> 4853 <1> ; Exit special mode, do not skip non-cseip breakpoints anymore. 4854 00003E5B 8026[C800]FD <1> clropt [internalflags2], dif2_gg_skip_non_cseip 4855 <1> 4856 <1> ; Enter special mode: Skip matching/restoring cseip breakpoint. 4857 00003E60 800E[C800]04 <1> setopt [internalflags2], dif2_gg_skip_cseip 4858 <1> 4859 <1> .only_run: 4860 00003E65 E82D00 <1> call run 4861 <1> .after_run: 4862 <1> 4863 <1> %if _BREAKPOINTS 4864 00003E68 83EC20 <1> sub sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 4865 00003E6B 89E5 <1> mov bp, sp 4866 <1> 4867 00003E6D B91000 <1> mov cx, _NUM_B_BP + _NUM_SYM_BP 4868 <1> ; = index above last one to restore 4869 00003E70 E8A4F4 <1> call bb_restorepoints_and_init_error_info 4870 00003E73 7308 <1> jnc @F 4871 <1> 4872 <1> .bb_exit: 4873 00003E75 B8FFFF <1> mov ax, -1 4874 00003E78 50 <1> push ax ; (unused: ax error info) 4875 00003E79 50 <1> push ax ; cx error point index, -1 = invalid 4876 <1> 4877 00003E7A E9E9F3 <1> jmp bb_restorepoints_exit 4878 <1> 4879 <1> 4880 <1> @@: 4881 00003E7D 83C420 <1> add sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 4882 <1> 4883 00003E80 E8A3F1 <1> call bb_check_hit 4884 00003E83 89C1 <1> mov cx, ax 4885 00003E85 9C <1> pushf 4886 <1> ; Clear all special modes. Stop specialcasing cseip breakpoint. 4887 <1> ; 4888 <1> ; This resets all the special flags for subsequent calls. 4889 00003E86 8026[C800]E8 <1> clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 4892 00003E8B 9D <1> popf ; CF 4893 00003E8C 7302 <1> jnc @F 4894 <1> 4895 00003E8E F9 <1> stc 4896 <1> ; cx = flags as returned by bb_check_hit 4897 00003E8F C3 <1> retn 4898 <1> 4899 <1> @@: 4900 00003E90 E882F1 <1> call adjust_cseip_after_breakpoint 4901 <1> ; re-execute (restored) opcode one byte in front of this 4902 00003E93 F8 <1> clc ; (NC) 4903 <1> ; cx = flags as returned by bb_check_hit 4904 00003E94 C3 <1> retn 4905 <1> %endif 4906 <1> %endif 4907 <1> 4908 <1> 4909 <1> ; Run - Start up the running program. 4910 <1> ; 4911 <1> ; INP: b[eqflag], a[eqladdr] = address given behind '=' for command 4912 <1> ; w[pspdbe] = process of debuggee 4913 <1> ; [run2324] = interrupt handlers 23h and 24h to set 4914 <1> ; values for registers in d[reg_eax] etc 4915 <1> ; OUT: (_DEBUG && _DEBUGUPDATESAVE) 4916 <1> ; interrupt handlers' ieNext fields updated 4917 <1> ; d[reg_eax] etc updated 4918 <1> ; w[run_int]-> message of how execution returned 4919 <1> ; UP, EI, high word efl = 0, es = ds = ss 4920 <1> ; CHG: all 4921 <1> ; STT: ds = ss 4922 <1> ; UP 4923 <1> ; (INP:es ignored) 4924 <1> run: 4925 00003E95 16 <1> push ss 4926 00003E96 07 <1> pop es 4927 <1> %if _PM 4928 <1> call resetmode 4929 <1> call remember_mode 4930 <1> %endif 4931 <1> %if _DELAY_BEFORE_BP 4932 00003E97 8026[CE00]7F <1> clropt [internalflags3], dif3_delayed 4933 <1> %endif 4934 00003E9C 8126[C800]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 4938 00003EA2 E8BE03 <1> call seteq ; set CS:IP to '=' address 4939 <1> 4940 <1> %if _VXCHG 4941 00003EA5 B000 <1> mov al, 0 ; restore debuggee screen 4942 00003EA7 E82A5B <1> call swapscreen 4943 <1> %endif 4944 <1> 4945 <1> ; For DDebugX: Do this before we install our 4946 <1> ; exception handlers. So if an exception 4947 <1> ; is raised then it is handled by the outer 4948 <1> ; instance instead of our handler. 4949 <1> ; (The actual problem may be that we don't 4950 <1> ; restore the handlers in the entrypoint 4951 <1> ; that leads to debuggerexception.) 4952 <1> ; Also, for non-_DEBUG DebugX too, check the 4953 <1> ; validity before setting debuggee PSP and 4954 <1> ; int 23h, 24h so they needn't be reset. 4955 <1> %if _PM 4956 <1> ; Load segreg values into es to make sure 4957 <1> ; they're valid. (Previously done with 4958 <1> ; the stack pointing into the reg array. 4959 <1> ; Better to do it now with a valid stack.) 4960 <1> ; Only done if we may be in Protected Mode. 4961 <1> ; 86 Mode allows any value to be loaded. 4962 <1> mov es, word [reg_ds] 4963 <1> mov es, word [reg_ss] 4964 <1> _386 mov es, word [reg_fs] 4965 <1> _386 mov es, word [reg_gs] 4966 <1> %endif 4967 00003EAA 8E06[800C] <1> mov es, word [reg_es] ; last one: actual es value 4968 <1> 4969 00003EAE 8B1E[DE0A] <1> mov bx, word [pspdbe] 4970 00003EB2 E83E48 <1> call setpsp ; set debuggee's PSP 4971 00003EB5 E83C5C <1> call setint2324 ; set debuggee's int 23/24 4972 <1> 4973 <1> %if _DEBUG ; set this copy's divide/trace/breakpoint ints 4974 <1> %if _TSR || _BOOTLDR || _DEVICE 4975 <1> ..@patch_tsr_quit_run: 4976 00003EB8 A9 <1> db __TEST_IMM16 4977 00003EB9 5E00 <1> dw __REL16__(.skipints) 4978 <1> %endif 4979 <1> %if _DEBUG_COND 4980 00003EBB F606[D900]01 <1> testopt [internalflags6], dif6_debug_mode 4981 00003EC0 7457 <1> jz .skipints 4982 00003EC2 E80200 <1> call set_interrupts 4983 00003EC5 EB52 <1> jmp .skipints 4984 <1> 4985 <1> set_interrupts: equ $ 4986 <1> %endif 4987 00003EC7 51 <1> push cx 4988 00003EC8 56 <1> push si 4989 00003EC9 50 <1> push ax 4990 00003ECA 52 <1> push dx 4991 00003ECB 06 <1> push es 4992 00003ECC 53 <1> push bx 4993 00003ECD 55 <1> push bp 4994 00003ECE 57 <1> push di 4995 <1> 4996 <1> %if _PM 4997 <1> call ispm 4998 <1> jz @F ; in PM --> 4999 <1> testopt [internalflags], canswitchmode 5000 <1> jz @FF ; in 86 Mode and cannot switch to PM --> 5001 <1> 5002 <1> d4 call d4message 5003 <1> d4 asciz "In run (switch mode before calling pm_set_handlers)",13,10 5004 <1> setopt [internalflags], modeswitched ; set flag for resetmode 5005 <1> mov al, 0 5006 <1> call sr_state ; save state 5007 <1> call switchmode ; switch to PM 5008 <1> ; ! handle_mode_changed not called here ! 5009 <1> ; do not call InDos or other functions using seg/sels 5010 <1> @@: 5011 <1> call pm_set_handlers 5012 <1> ; ! this calls resetmode 5013 <1> @@: 5014 <1> %endif 5015 <1> 5016 00003ECF B90600 <1> mov cx, inttab_number 5017 00003ED2 BE[280C] <1> mov si, inttab 5018 <1> .intloop: 5019 00003ED5 AC <1> lodsb 5020 00003ED6 92 <1> xchg ax, dx 5021 00003ED7 AD <1> lodsw ; get address 5022 00003ED8 92 <1> xchg ax, dx 5023 <1> %if _DEBUGUPDATESAVE 5024 00003ED9 89D7 <1> mov di, dx ; -> IISP header 5025 <1> %endif 5026 <1> 5027 00003EDB E8BF5C <1> call InDos 5028 00003EDE 7420 <1> jz .int21_25 5029 <1> 5030 00003EE0 31DB <1> xor bx, bx 5031 <1> %if _PM 5032 <1> call ispm 5033 <1> jnz @F 5034 <1> push dx 5035 <1> mov dx, bx ; set segment to access (= 0) 5036 <1> call setrmsegm ; get bx = selector configured to this 5037 <1> pop dx 5038 <1> @@: 5039 <1> %endif 5040 00003EE2 8EC3 <1> mov es, bx ; => 86 Mode IVT (segment or selector) 5041 <1> %if _PM 5042 <1> xor bx, bx ; bh = 0 5043 <1> %endif 5044 00003EE4 88C3 <1> mov bl, al 5045 00003EE6 01DB <1> add bx, bx 5046 00003EE8 01DB <1> add bx, bx 5047 <1> 5048 <1> %if _DEBUGUPDATESAVE 5049 00003EEA 26FF7702 <1> push word [ es:bx + 2 ] 5050 00003EEE 26FF37 <1> push word [ es:bx ] ; get vector 5051 00003EF1 8F4502 <1> pop word [ di + ieNext ] 5052 00003EF4 8F4504 <1> pop word [ di + ieNext + 2] 5053 <1> %endif 5054 <1> 5055 00003EF7 268917 <1> mov word [ es:bx ], dx 5056 <1> %if _PM 5057 <1> push word [ pspdbg ] ; => lDEBUG_DATA_ENTRY (86 Mode seg) 5058 <1> pop word [ es:bx + 2 ] 5059 <1> %else 5060 00003EFA 268C5F02 <1> mov word [ es:bx + 2 ], ds ; => lDEBUG_DATA_ENTRY 5061 <1> %endif 5062 00003EFE EB0E <1> jmp short .intset 5063 <1> 5064 <1> .int21_25: 5065 <1> 5066 <1> %if _PM 5067 <1> %if _DEBUGUPDATESAVE 5068 <1> mov ah, 35h ; get interrupt vector 5069 <1> push word [pspdbg] ; => lDEBUG_DATA_ENTRY 5070 <1> call _doscall_return_es_parameter_es_ds 5071 <1> mov word [ di + ieNext ], bx 5072 <1> pop word [ di + ieNext + 2 ] 5073 <1> %endif 5074 <1> mov ah, 25h ; set interrupt vector 5075 <1> push word [pspdbg] ; => lDEBUG_DATA_ENTRY 5076 <1> call _doscall_return_es_parameter_es_ds 5077 <1> pop ax ; (discard returned parameter) 5078 <1> %else 5079 <1> %if _DEBUGUPDATESAVE 5080 00003F00 B435 <1> mov ah, 35h 5081 00003F02 CD21 <1> int 21h ; get vector 5082 00003F04 895D02 <1> mov word [ di + ieNext ], bx 5083 00003F07 8C4504 <1> mov word [ di + ieNext + 2 ], es 5084 <1> %endif 5085 00003F0A B425 <1> mov ah, 25h ; set interrupt vector 5086 00003F0C CD21 <1> int 21h ; ds => lDEBUG_DATA_ENTRY 5087 <1> %endif 5088 <1> .intset: 5089 00003F0E E2C5 <1> loop .intloop 5090 <1> 5091 00003F10 5F <1> pop di 5092 00003F11 5D <1> pop bp 5093 00003F12 5B <1> pop bx 5094 00003F13 07 <1> pop es 5095 00003F14 5A <1> pop dx 5096 00003F15 58 <1> pop ax 5097 00003F16 5E <1> pop si 5098 00003F17 59 <1> pop cx 5099 <1> %if _DEBUG_COND 5100 00003F18 C3 <1> retn 5101 <1> %endif 5102 <1> .skipints: 5103 <1> %endif 5104 <1> 5105 <1> .2: 5106 00003F19 8926[D80A] <1> mov word [run_sp], sp ; save stack position 5107 <1> 5108 <1> ; Disable this for now. The debugger uses its ss 5109 <1> ; for 86 Mode and Protected Mode at the same area 5110 <1> ; so it should always be valid to adjust SPSAV with 5111 <1> ; the current run_sp, regardless of current mode. 5112 <1> ; Update: SPSAV should always hold a 86 Mode address. 5113 <1> ; So check for our segment, not the current ss. (But 5114 <1> ; for _PM=0 ss is always equal to word [pspdbg].) 5115 <1> ; I assume that the original fix was intended for cases 5116 <1> ; where the segment doesn't match our 86 Mode ss, that 5117 <1> ; is the word [pspdbg]. 5118 <1> %if 1 5119 <1> ; 16.2.2021: check if saved SS is debugger's SS. If no, don't adjust saved SP. 5120 <1> ; SS may be != saved SS if debugger is stopped in protected-mode - then the 5121 <1> ; current DPMI real-mode stack may be stored in SPSAV. 5122 <1> %if _PM 5123 <1> mov ax, word [pspdbg] 5124 <1> %else 5125 00003F1D 8CD0 <1> mov ax, ss 5126 <1> %endif 5127 00003F1F 3B063000 <1> cmp ax, word [SPSAV + 2] 5128 00003F23 7508 <1> jne @F 5129 <1> %endif 5130 00003F25 2B26[DC0A] <1> sub sp, word [spadjust] 5131 00003F29 89262E00 <1> mov word [SPSAV], sp 5132 <1> @@: 5133 00003F2D FA <1> cli 5134 <1> 5135 00003F2E BC[5C0C] <1> mov sp, regs 5136 <1> %ifn _ONLY386 5137 00003F31 EB11 <1> _386_jmps .386 ; --> 5138 00003F33 58 <1> pop ax 5139 00003F34 58 <1> pop ax ; discard all high words 5140 00003F35 5B <1> pop bx 5141 00003F36 58 <1> pop ax 5142 00003F37 59 <1> pop cx 5143 00003F38 58 <1> pop ax 5144 00003F39 5A <1> pop dx 5145 00003F3A 58 <1> pop ax 5146 00003F3B 58 <1> pop ax ; we'll get esp later 5147 00003F3C 58 <1> pop ax 5148 00003F3D 5D <1> pop bp 5149 00003F3E 58 <1> pop ax 5150 00003F3F 5E <1> pop si 5151 00003F40 58 <1> pop ax 5152 00003F41 5F <1> pop di 5153 <1> ; ds, ss, cs loaded later 5154 <1> ; es already loaded 5155 <1> %endif 5156 <1> %ifn _ONLYNON386 5157 <1> %ifn _ONLY386 5158 00003F42 EB18 <1> jmp short .common 5159 <1> %endif 5160 <1> 5161 <1> .386: 5162 <1> [cpu 386] 5163 00003F44 6658 <1> pop eax 5164 00003F46 665B <1> pop ebx 5165 00003F48 6659 <1> pop ecx 5166 00003F4A 665A <1> pop edx 5167 00003F4C 58 <1> pop ax 5168 00003F4D 58 <1> pop ax ; we'll get esp later 5169 00003F4E 665D <1> pop ebp 5170 00003F50 665E <1> pop esi 5171 00003F52 665F <1> pop edi 5172 <1> ; pop ax ; get ds later 5173 <1> ; pop ax ; discard high words of segment registers 5174 <1> ; pop ax ; es already loaded 5175 <1> ; pop ax 5176 <1> ; pop ax ; get ss later 5177 <1> ; pop ax 5178 <1> ; pop ax ; get cs later 5179 <1> ; pop ax 5180 00003F54 83C410 <1> add sp, byte 8 * 2 5181 00003F57 0FA1 <1> pop fs 5182 00003F59 58 <1> pop ax 5183 00003F5A 0FA9 <1> pop gs 5184 <1> __CPU__ 5185 <1> .common: 5186 <1> %endif 5187 00003F5C A1[5C0C] <1> mov ax, word [reg_eax] ; restore ax (used to discard words) 5188 00003F5F 8E16[840C] <1> mov ss, word [reg_ss] 5189 <1> %if _ONLYNON386 5190 <1> mov sp, word [reg_esp] 5191 <1> %else 5192 <1> ..@patch_no386_ds: 5193 00003F63 66 <1> o32 ; mov esp, dword [reg_esp] 5194 00003F64 8B26[6C0C] <1> mov sp, word [reg_esp] ; restore program stack 5195 <1> %endif 5196 00003F68 C606[2B0B]00 <1> mov byte [bInDbg], 0 5197 00003F6D 66 <1> _386_o32 ; push dword [reg_efl] 5198 00003F6E FF36[980C] <1> push word [reg_efl] 5199 00003F72 66 <1> _386_o32 ; push dword [reg_cs] ; high word is zero 5200 00003F73 FF36[880C] <1> push word [reg_cs] 5201 00003F77 66 <1> _386_o32 ; push dword [reg_eip] 5202 00003F78 FF36[940C] <1> push word [reg_eip] 5203 00003F7C F606[990C]02 <1> test byte [reg_efl+1], 2 ; IF set? 5204 00003F81 8E1E[7C0C] <1> mov ds, word [reg_ds] ; restore ds 5205 00003F85 7401 <1> jz .di 5206 00003F87 FB <1> sti ; required for ring3 protected mode if IOPL==0 5207 <1> .di: 5208 <1> %if _ONLYNON386 5209 <1> iret 5210 <1> %else 5211 <1> ..@patch_no386_iret: 5212 00003F88 66 <1> o32 ; iretd 5213 00003F89 CF <1> iret ; jump to program 5214 <1> %endif 5215 <1> 5216 <1> ; The byte at ..@patch_no386_ds will be adjusted to a ds prefix on non-386 processors. 5217 <1> ; This does not change the following instruction's behaviour (aside from changing it 5218 <1> ; to a 16-bit instruction as intended) and insures that sp is set in the instruction 5219 <1> ; right behind the instruction that sets ss. 5220 <1> 5221 <1> ; The byte at ..@patch_no386_iret will be adjusted to an iret instruction on non-386 processors. 5222 <1> ; This avoids the NOP that would be written there if _386_o32 was used, because the iret 5223 <1> ; should follow right behind the sti instruction. 5224 <1> 5225 <1> 5226 <1> usesection lDEBUG_DATA_ENTRY 5227 <1> 5228 <1> %if _CATCHINT08 5229 000086B4 CB90EB10000000004B- <1> iispentry intr8, 0 5229 000086BD 4200EBF300 <1> 5230 <1> intr8_original: equ intr8.next 5231 000086C8 9C <1> pushf 5232 000086C9 2EFF1E[B886] <1> call far [cs:intr8_original] 5233 000086CE 9C <1> pushf 5234 000086CF 53 <1> push bx 5235 000086D0 1E <1> push ds 5236 <1> 5237 000086D1 0E <1> push cs 5238 000086D2 1F <1> pop ds 5239 <1> 5240 000086D3 803E[2B0B]00 <1> cmp byte [bInDbg], 0 ; in debugger ? 5241 000086D8 7554 <1> jne .reset ; yes --> 5242 <1> 5243 000086DA F606[E50B]04 <1> testopt [serial_flags], sf_double_ctrl_c 5244 000086DF 7408 <1> jz @F 5245 <1> 5246 000086E1 C706[D00B][E87D] <1> mov word [run_int], runint_ctrlc_msg 5247 000086E7 EB3F <1> jmp @FF 5248 <1> 5249 <1> @@: 5250 000086E9 BB4000 <1> mov bx, 40h 5251 000086EC 8EDB <1> mov ds, bx 5252 000086EE F606170004 <1> test byte [17h], 4 ; CTRL currently pressed ? 5253 000086F3 0E <1> push cs 5254 000086F4 1F <1> pop ds 5255 000086F5 7437 <1> jz .reset ; no --> 5256 <1> 5257 000086F7 8B1E[DE0B] <1> mov bx, word [intr8_limit] 5258 000086FB 85DB <1> test bx, bx ; enabled ? 5259 000086FD 7434 <1> jz .return ; no --> 5260 000086FF FF06[DC0B] <1> inc word [intr8_counter] 5261 00008703 391E[DC0B] <1> cmp word [intr8_counter], bx ; default is ca 5 seconds 5262 00008707 722A <1> jb .return 5263 <1> 5264 00008709 C706[D00B][877D] <1> mov word [run_int], int8msg 5265 0000870F F606[9500]80 <1> testopt [options], int8_disable_serial 5266 00008714 7412 <1> jz @F 5267 00008716 F606[9500]40 <1> testopt [options], enable_serial 5268 0000871B 740B <1> jz @F 5269 <1> 5270 0000871D 8026[9500]BF <1> clropt [options], enable_serial 5271 00008722 C706[D00B][AE7D] <1> mov word [run_int], int8_kbd_msg 5272 <1> 5273 <1> @@: 5274 00008728 1F <1> pop ds 5275 00008729 5B <1> pop bx 5276 0000872A 9D <1> popf ; (in 86 Mode) 5277 0000872B E9F800 <1> jmp intrtn 5278 <1> 5279 <1> .reset: 5280 0000872E 8326[DC0B]00 <1> and word [intr8_counter], 0 5281 <1> .return: 5282 00008733 1F <1> pop ds 5283 00008734 5B <1> pop bx 5284 00008735 9D <1> popf ; (in 86 Mode) 5285 00008736 CF <1> iret 5286 <1> %endif 5287 <1> 5288 <1> 5289 <1> ; Interrupt 22h (program termination) handler. 5290 <1> int22: 5291 00008737 FA <1> cli 5292 <1> .cleartraceflag: 5293 00008738 0E <1> push cs 5294 00008739 1F <1> pop ds 5295 0000873A 0E <1> push cs 5296 0000873B 17 <1> pop ss 5297 0000873C 8B26[D80A] <1> mov sp, word [run_sp] ; restore running stack 5298 00008740 C706[D00B][647E] <1> mov word [run_int], progtrm ; set interrupt message 5299 00008746 C706[D20B][4A04] <1> mov word [lastcmd], dmycmd ; disable T/P/G auto-repeat 5300 <1> %if _PM 5301 <1> clropt [internalflags], protectedmode ; reset PM flag 5302 <1> %endif 5303 0000874C 90 <1> times 1 - (($ - $$) & 1) nop ; align in-code parameter 5304 0000874D E8E3FA <1> call entry_to_code_seg 5305 00008750 [ED3F] <1> dw intrtn1_code 5306 <1> ; jump to register saving routine 5307 <1> 5308 <1> 5309 <1> sharedentry1.hwreset: 5310 00008752 CB <1> retf 5311 <1> 5312 <1> 5313 <1> ; Interrupt 01h (single-step interrupt) handler. 5314 00008753 90EB10000000004B42- <1> iispentry intr1, 0, sharedentry1 5314 0000875C 00EBF300 <1> 5315 <1> lframe int 5316 00008766 5589E5 <1> lenter 5317 00008769 50 <1> push ax 5318 <1> 5319 <1> %ifn _PASSTF 5320 0000876A 806607FE <1> clropt [bp + ?frame_fl], 100h ; clear TF (always) 5321 <1> %endif 5322 <1> 5323 0000876E 8CC8 <1> mov ax, cs 5324 00008770 394604 <1> cmp word [bp + ?frame_cs], ax ; entry segment ? 5325 00008773 750C <1> jne .if_ZR ; no --> (NZ) 5326 <1> %if _PM 5327 <1> cmp word [bp + ?frame_ip], getline_extra_int22.cleartraceflag 5328 <1> je .if_ZR ; that one --> (ZR) 5329 <1> %endif 5330 00008775 817E02[3887] <1> cmp word [bp + ?frame_ip], int22.cleartraceflag 5331 0000877A 7405 <1> je .if_ZR ; that one --> (ZR) 5332 0000877C 817E02[5D82] <1> cmp word [bp + ?frame_ip], debug22.cleartraceflag 5333 <1> .if_ZR: 5334 00008781 58 <1> pop ax 5335 <1> 5336 <1> %if _PASSTF 5337 <1> jnz @F ; handle trace entry --> 5338 <1> clropt [bp + ?frame_fl], 100h ; clear TF (only if we continue) 5339 <1> lleave code, optimiserestoresp ; restore bp 5340 <1> iret ; continue run if matched 5341 <1> 5342 <1> @@: 5343 <1> lleave , optimiserestoresp ; restore bp 5344 <1> %else 5345 00008782 5D <1> lleave , optimiserestoresp ; restore bp (common before branch) 5346 00008783 7501 <1> jnz @F ; handle trace entry --> 5347 00008785 CF <1> iret ; continue run if matched 5348 <1> 5349 <1> @@: 5350 <1> %endif 5351 <1> 5352 00008786 2EC706[D00B][317D] <1> mov word [cs:run_int], int1msg ; remember interrupt type 5353 0000878D E99600 <1> jmp intrtn ; jump to register saving routine 5354 <1> 5355 <1> 5356 <1> ; Interrupt 00h (divide error) handler. 5357 00008790 EB10000000004B4200- <1> iispentry intr0, 0, sharedentry1 5357 00008799 EBB700 <1> 5358 000087A2 2EC706[D00B][227D] <1> mov word [cs:run_int], int0msg ; remember interrupt type 5359 000087A9 EB7B <1> jmp intrtn ; jump to register saving routine 5360 <1> 5361 <1> 5362 <1> 5363 <1> ; Interrupt 03h (breakpoint interrupt) handler. 5364 000087AB 90EB10000000004B42- <1> iispentry intr3, 0, sharedentry1 5364 000087B4 00EB9B00 <1> 5365 000087BE 2EC706[D00B][547D] <1> mov word [cs:run_int], int3msg ; remember interrupt type 5366 <1> %if _CATCHINT06 5367 000087C5 EB5F <1> jmp intrtn ; jump to register saving routine 5368 <1> 5369 <1> 5370 <1> ; Interrupt 06h (invalid opcode) handler. 5371 000087C7 90EB10000000004B42- <1> iispentry intr6, 0, sharedentry2 5371 000087D0 00EB7500 <1> 5372 000087DA 2EC706[D00B][767D] <1> mov word [cs:run_int], int6msg ; remember interrupt type 5373 <1> %endif 5374 <1> %if _CATCHINT18 5375 000087E1 EB43 <1> jmp intrtn ; jump to register saving routine 5376 <1> 5377 <1> 5378 <1> ; Interrupt 18h (diskless boot hook) handler. 5379 000087E3 90EB10000000004B42- <1> iispentry intr18, 0, sharedentry2 5379 000087EC 00EB5900 <1> 5380 000087F6 2EC706[D00B][0F7E] <1> mov word [cs:run_int], int18msg ; remember interrupt type 5381 <1> %endif 5382 <1> %if _CATCHINT19 5383 000087FD EB27 <1> jmp intrtn ; jump to register saving routine 5384 <1> 5385 <1> 5386 <1> ; Interrupt 19h (boot load) handler. 5387 000087FF 90EB10000000004B42- <1> iispentry intr19, 0, sharedentry2 5387 00008808 00EB3D00 <1> 5388 00008812 2EC706[D00B][2B7E] <1> mov word [cs:run_int], int19msg ; remember interrupt type 5389 00008819 2EC706[D20B][4A04] <1> mov word [cs:lastcmd], dmycmd ; disable T/P/G auto-repeat 5390 00008820 2E8026[CB00]FE <1> clropt [cs:internalflags2], dif2_boot_loaded_kernel 5391 <1> %endif 5392 <1> 5393 <1> ; Common interrupt routine. 5394 <1> 5395 <1> ; Housekeeping. 5396 <1> intrtn: 5397 00008826 FA <1> cli ; just in case 5398 00008827 2E8F06[940C] <1> pop word [cs:reg_eip] ; recover things from stack 5399 0000882C 2E8F06[880C] <1> pop word [cs:reg_cs] 5400 00008831 2E8F06[980C] <1> pop word [cs:reg_efl] 5401 00008836 2E8C1E[7C0C] <1> mov word [cs:reg_ds], ds ; ! word-aligned (AC flag) 5402 0000883B 2EA3[5C0C] <1> mov word [cs:reg_eax], ax ; ! word-aligned (AC flag) 5403 0000883F 8CC8 <1> mov ax, cs 5404 00008841 8ED8 <1> mov ds, ax ; => lDEBUG_DATA_ENTRY 5405 <1> times 1 - (($ - $$) & 1) nop ; align in-code parameter 5406 00008843 E8EDF9 <1> call entry_to_code_seg 5407 00008846 [8A3F] <1> dw intrtn_code 5408 <1> ; To avoid delaying the code segment switch, we use the client's 5409 <1> ; stack here to call (jump) via entry_to_code_seg. 5410 <1> 5411 <1> 5412 <1> sharedentry2.hwreset: 5413 00008848 CB <1> retf 5414 <1> 5415 <1> 5416 <1> usesection lDEBUG_CODE 5417 <1> 5418 <1> code_insure_low_byte_not_0CCh 5419 <1> intrtn_code: 5420 <1> %if _PM 5421 <1> clropt [internalflags], protectedmode ; reset PM flag 5422 <1> .from_installdpmi: 5423 <1> %endif 5424 00003F8A 8C16[840C] <1> mov word [reg_ss], ss ; save stack position 5425 00003F8E 8326[960C]00 <1> _386 and word [reg_eip+2], byte 0 ; we're from real mode 5426 00003F93 66 <1> _386_o32 ; mov dword [reg_esp], esp 5427 00003F94 8926[6C0C] <1> mov word [reg_esp], sp 5428 00003F98 8ED0 <1> mov ss, ax ; mov ss, cs ; (don't use the stack here) 5429 <1> 5430 <1> %if _PM 5431 <1> jmp @F 5432 <1> 5433 <1> intrtn2_code: ; <--- entry protected mode 5434 <1> mov word [ss:reg_ds], ds ; ! word-aligned (AC flag) 5435 <1> mov word [ss:reg_eax], ax ; ! word-aligned (AC flag) 5436 <1> mov ax, ss 5437 <1> mov ds, ax ; mov ds, ss 5438 <1> @@: 5439 <1> %endif 5440 00003F9A B80200 <1> mov ax, 2 5441 <1> %ifn _ONLY386 5442 00003F9D EB1A <1> _386_jmps .386 ; --> 5443 00003F9F BC[820C] <1> mov sp, reg_es+2 5444 00003FA2 06 <1> push es 5445 <1> ; sub sp, ax 5446 <1> ; sub sp, ax ; ds already saved 5447 <1> ; sub sp, ax ; don't overwrite high word of di 5448 00003FA3 83EC06 <1> sub sp, byte 3*2 5449 00003FA6 57 <1> push di 5450 00003FA7 29C4 <1> sub sp, ax 5451 00003FA9 56 <1> push si 5452 00003FAA 29C4 <1> sub sp, ax 5453 00003FAC 55 <1> push bp 5454 <1> ; sub sp, ax 5455 <1> ; sub sp, ax ; sp already saved 5456 <1> ; sub sp, ax 5457 00003FAD 83EC06 <1> sub sp, byte 3*2 5458 00003FB0 52 <1> push dx 5459 00003FB1 29C4 <1> sub sp, ax 5460 00003FB3 51 <1> push cx 5461 00003FB4 29C4 <1> sub sp, ax 5462 00003FB6 53 <1> push bx 5463 <1> %endif 5464 <1> %ifn _ONLYNON386 5465 <1> %ifn _ONLY386 5466 00003FB7 EB34 <1> jmp short .common 5467 <1> %endif 5468 <1> 5469 <1> .386: 5470 <1> [cpu 386] 5471 00003FB9 66BC[920C0000] <1> mov esp, reg_gs+2 5472 00003FBF 0FA8 <1> push gs 5473 00003FC1 29C4 <1> sub sp, ax ; don't overwrite high words of segments 5474 00003FC3 0FA0 <1> push fs 5475 <1> ; sub sp, ax 5476 <1> ; sub sp, ax ; cs already saved 5477 <1> ; sub sp, ax 5478 <1> ; sub sp, ax ; ss already saved 5479 <1> ; sub sp, ax 5480 00003FC5 83EC0A <1> sub sp, byte 5*2 5481 00003FC8 06 <1> push es 5482 <1> ; sub sp, ax 5483 <1> ; sub sp, ax ; ds already saved 5484 00003FC9 83EC04 <1> sub sp, byte 2*2 5485 00003FCC 6657 <1> push edi 5486 00003FCE 6656 <1> push esi 5487 00003FD0 6655 <1> push ebp 5488 <1> ; sub sp, ax 5489 <1> ; sub sp, ax ; sp already saved 5490 00003FD2 83EC04 <1> sub sp, byte 2*2 5491 00003FD5 6652 <1> push edx 5492 00003FD7 6651 <1> push ecx 5493 00003FD9 669C <1> pushfd ; (this overwrites reg_ebx) 5494 00003FDB 01C4 <1> add sp, ax ; discard low word of efl 5495 00003FDD 8F06[9A0C] <1> pop word [reg_efl+2] 5496 00003FE1 6A00 <1> push 0 5497 00003FE3 9C <1> pushf ; (this also overwrites reg_ebx) 5498 00003FE4 669D <1> popfd ; clear high word of efl inside debugger (resets AC flag) 5499 00003FE6 6653 <1> push ebx 5500 00003FE8 A1[5C0C] <1> mov ax, word [reg_eax] ; restore ax 5501 00003FEB 6650 <1> push eax ; so we don't overwrite it with 2 here 5502 <1> __CPU__ 5503 <1> .common: 5504 <1> %endif 5505 <1> 5506 <1> code_insure_low_byte_not_0CCh 5507 <1> ; Clean up. 5508 <1> intrtn1_code: 5509 00003FED 66 <1> _386_o32 ; mov esp, dword [run_sp] 5510 00003FEE 8B26[D80A] <1> mov sp, word [run_sp] ; restore running stack 5511 00003FF2 FC <1> cld ; clear direction flag 5512 00003FF3 FB <1> sti ; interrupts back on 5513 <1> 5514 <1> %if _SYMBOLIC 5515 <1> clropt [internalflags2], dif2_xms_detection_done 5516 <1> ; Re-detect XMS after running. 5517 <1> ; 5518 <1> ; The actual detection is done in symbol access functions, 5519 <1> ; which are only called once all breakpoints are restored. 5520 <1> %endif 5521 <1> 5522 <1> 5523 <1> %if _PM 5524 <1> call handle_mode_changed 5525 <1> %endif 5526 <1> 5527 00003FF4 E869F5 <1> call get_cseip_of_possible_breakpoint 5528 <1> ; Initialise this here. This means we do not need to call 5529 <1> ; resetmode between proceed_wp and bb_wp and gg_wp. If 5530 <1> ; more than one point needs to switch modes this avoids 5531 <1> ; repeated modeswitching back and forth. 5532 <1> 5533 <1> %if _DEBUG ; reset to next copy's divide/trace/breakpoint ints 5534 <1> %if _DEBUG_COND 5535 00003FF7 F606[D900]01 <1> testopt [internalflags6], dif6_debug_mode 5536 00003FFC 7429 <1> jz .skipints 5537 00003FFE E80200 <1> call reset_interrupts 5538 00004001 EB24 <1> jmp .skipints 5539 <1> 5540 <1> reset_interrupts: equ $ 5541 <1> %endif 5542 00004003 51 <1> push cx 5543 00004004 56 <1> push si 5544 00004005 57 <1> push di 5545 00004006 50 <1> push ax 5546 00004007 53 <1> push bx 5547 00004008 52 <1> push dx 5548 00004009 55 <1> push bp 5549 <1> 5550 <1> %if _PM 5551 <1> call ispm 5552 <1> jz @F ; in PM --> 5553 <1> testopt [internalflags], canswitchmode 5554 <1> jz @FF ; in 86 Mode and cannot switch to PM --> 5555 <1> 5556 <1> d4 call d4message 5557 <1> d4 asciz "In intrtn1_code (switch mode before calling pm_reset_handlers)",13,10 5558 <1> setopt [internalflags], modeswitched ; set flag for resetmode 5559 <1> mov al, 0 5560 <1> call sr_state ; save state 5561 <1> call switchmode ; switch to PM 5562 <1> ; ! handle_mode_changed not called here ! 5563 <1> ; do not call InDos or other functions using seg/sels 5564 <1> @@: 5565 <1> call pm_reset_handlers 5566 <1> ; ! this calls resetmode 5567 <1> @@: 5568 <1> 5569 <1> numdef OVERRIDE_BUILD_PM_DEBUG, 0 5570 <1> %if ! _CATCHPMINT214C && ! _OVERRIDE_BUILD_PM_DEBUG 5571 <1> %fatal Cannot build DDEBUGX: handler switching without Int21.4C hook untested 5572 <1> %endif 5573 <1> %endif 5574 <1> 5575 <1> %if CATCHINTAMOUNT 5576 0000400A B90600 <1> mov cx, inttab_number 5577 0000400D BE[280C] <1> mov si, inttab 5578 00004010 BAFFFF <1> mov dx, -1 ; always force 5579 <1> .nextint: 5580 00004013 AC <1> lodsb 5581 00004014 93 <1> xchg ax, bx ; bl = number 5582 00004015 AD <1> lodsw ; si -> list 5583 00004016 96 <1> xchg ax, si ; si -> entry, ax -> list 5584 00004017 93 <1> xchg ax, bx ; al = number, bx -> list 5585 00004018 E82685 <1> call UnhookInterruptForce 5586 0000401B 87DE <1> xchg bx, si ; si -> list 5587 0000401D E2F4 <1> loop .nextint 5588 <1> %endif 5589 <1> 5590 0000401F 5D <1> pop bp 5591 00004020 5A <1> pop dx 5592 00004021 5B <1> pop bx 5593 00004022 58 <1> pop ax 5594 00004023 5F <1> pop di 5595 00004024 5E <1> pop si 5596 00004025 59 <1> pop cx 5597 <1> %if _DEBUG_COND 5598 00004026 C3 <1> retn 5599 <1> %endif 5600 <1> .skipints: 5601 <1> %endif 5602 <1> 5603 00004027 8026[990C]FE <1> clropt [reg_efl], 100h ; clear TF 5604 <1> 5605 0000402C E8E746 <1> call getpsp 5606 0000402F 891E[DE0A] <1> mov word [pspdbe], bx 5607 <1> 5608 00004033 E8DA5A <1> call getint2324 ; save debuggee's int 23/24, set debugger's int 23/24 5609 <1> 5610 00004036 16 <1> push ss 5611 00004037 07 <1> pop es 5612 00004038 E8B646 <1> call setpspdbg ; set PSP of debugger 5613 <1> 5614 0000403B 800E[C500]30 <1> setopt [internalflags], debuggerA20|debuggeeA20 ; assume A20 is on 5615 <1> %if _PM 5616 <1> call ispm 5617 <1> jz .a20done ; assume A20 on. (is this the right thing to do?) 5618 <1> %endif 5619 00004040 06 <1> push es 5620 00004041 1E <1> push ds 5621 00004042 57 <1> push di 5622 00004043 56 <1> push si 5623 00004044 51 <1> push cx 5624 00004045 31F6 <1> xor si, si 5625 00004047 8EDE <1> mov ds, si ; ds = 0000h 5626 00004049 4E <1> dec si 5627 0000404A 8EC6 <1> mov es, si ; es = FFFFh 5628 0000404C 46 <1> inc si ; ds:si = 0000h:0000h = 00000h 5629 0000404D BF1000 <1> mov di, 0010h ; es:di = FFFFh:0010h = 100000h (same address if it overflows) 5630 00004050 89F9 <1> mov cx, di ; 32 byte (16 = 10h word) 5631 00004052 F3A7 <1> repe cmpsw ; compare them and assume A20 line switched off if same 5632 00004054 59 <1> pop cx 5633 00004055 5E <1> pop si 5634 00004056 5F <1> pop di 5635 00004057 1F <1> pop ds 5636 00004058 07 <1> pop es 5637 00004059 7505 <1> jne .a20done ; not equal, A20 line is switched on --> 5638 <1> ; if equal, the A20 line is probably switched off 5639 0000405B 8026[C500]CF <1> clropt [internalflags], debuggerA20|debuggeeA20 ; assume A20 is off 5640 <1> 5641 <1> %if 0 ;_LOCALENABLEA20 5642 <1> ; This doesn't serve any particular reason if we have no business accessing the HMA. 5643 <1> ; What's more important is that the dump, assemble, and disassemble commands *should* 5644 <1> ; use a disabled A20 if it is disabled to the debuggee. Thus, enabling A20 belongs, if 5645 <1> ; at all, into getsegmented (similar to the switch to PM) as there may be breakpoints in 5646 <1> ; the HMA that we need to reset. 5647 <1> %if _GUARD_86M_INT2F 5648 <1> push es 5649 <1> xor ax, ax 5650 <1> mov es, ax ; (only used in 86 Mode) 5651 <1> mov ax, [es:2Fh * 4] 5652 <1> cmp ax, -1 5653 <1> je @F ; --> (ZR) 5654 <1> or ax, [es:2Fh * 4 + 2] 5655 <1> @@: 5656 <1> pop es 5657 <1> jz @F 5658 <1> %endif 5659 <1> mov ax, 4300h 5660 <1> int 2Fh ; XMS v2 installation check 5661 <1> cmp al, 80h ; installed ? 5662 <1> jne .a20done ; no --> 5663 <1> mov ax, 4310h 5664 <1> int 2Fh ; get entry 5665 <1> mov ah, 05h 5666 <1> push cs 5667 <1> call callfaresbx ; local enable A20 5668 <1> push ds 5669 <1> pop es 5670 <1> dec ax 5671 <1> jnz .a20done ; not able to enable A20 --> 5672 <1> ; actually check here to insure it is on? 5673 <1> setopt [internalflags], debuggerA20 ; our A20 is on 5674 <1> @@: 5675 <1> %endif 5676 <1> .a20done: 5677 <1> 5678 00004060 C606[2B0B]01 <1> mov byte [bInDbg], 1 5679 <1> %if _CATCHINT19 5680 00004065 813E[D00B][2B7E] <1> cmp word [run_int], int19msg 5681 0000406B 7505 <1> jne @F 5682 0000406D 800E[CE00]20 <1> setopt [internalflags3], dif3_gotint19 5683 <1> %endif 5684 <1> @@: 5685 00004072 813E[D00B][647E] <1> cmp word [run_int], progtrm 5686 00004078 7505 <1> jnz @F 5687 0000407A 800E[C600]80 <1> setopt [internalflags], attachedterm 5688 <1> @@: 5689 <1> 5690 <1> %if _VXCHG 5691 0000407F B001 <1> mov al, 1 ; restore debugger screen 5692 00004081 E85059 <1> call swapscreen 5693 00004084 06 <1> push es 5694 00004085 B84000 <1> mov ax, 0040h 5695 00004088 8EC0 <1> mov es, ax 5696 0000408A 26A08400 <1> mov al, [es:84h] ; did the number of screen rows change? 5697 0000408E 3A06[2A0B] <1> cmp al, [vrows] 5698 00004092 A2[2A0B] <1> mov [vrows], al 5699 00004095 7414 <1> jz @F 5700 00004097 88C6 <1> mov dh, al ; yes. we cannot fully restore, but at least 5701 00004099 B200 <1> mov dl, 0 ; clear bottom line to ensure the debugger displays 5702 0000409B 2689165000 <1> mov [es:50h], dx ; will be seen. 5703 000040A0 BB0700 <1> mov bx, 0007h ; BH=video page, BL=attribute 5704 000040A3 B95000 <1> mov cx, 80 ; CX=columns 5705 000040A6 B82009 <1> mov ax, 0920h ; AL=char to display 5706 000040A9 CD10 <1> int 10h 5707 <1> @@: 5708 000040AB 07 <1> pop es 5709 <1> %endif 5710 <1> 5711 000040AC C3 <1> retn 5712 <1> 5713 <1> %if 0 ;_LOCALENABLEA20 5714 <1> callfaresbx: 5715 <1> push es 5716 <1> push bx 5717 <1> retf 5718 <1> %endif 5719 <1> 5720 <1> 5721 <1> %if _PM 5722 <1> ; INP: flag for PM 5723 <1> ; flag for prior PM (from remember_mode) 5724 <1> ; flag for modeswitched (set if in modeswitching) 5725 <1> ; OUT: seg/sels initialised for new mode, if changed 5726 <1> handle_mode_changed: 5727 <1> mov si, convsegs 5728 <1> mov cx, convsegs.amount 5729 <1> 5730 <1> call ispm 5731 <1> jz .now_pm 5732 <1> [cpu 286] 5733 <1> .now_86m: 5734 <1> testopt [internalflags3], dif3_prior_pm 5735 <1> jz .from_no_change 5736 <1> .from_pm_now_86m: 5737 <1> .from_pm_now_86m.loop: 5738 <1> lodsw 5739 <1> xchg ax, di 5740 <1> cmp si, convsegs.end_fixed 5741 <1> ja @F 5742 <1> mov dx, word [di + soaSegment] 5743 <1> mov word [di + soaSegSel], dx 5744 <1> loop .from_pm_now_86m.loop 5745 <1> jmp .from_done_change 5746 <1> 5747 <1> @@: 5748 <1> ; We want to switch modes to get the segment bases. 5749 <1> ; First check we aren't already modeswitched. 5750 <1> testopt [internalflags], modeswitched 5751 <1> jnz .from_done_change ; cancel this --> 5752 <1> 5753 <1> testopt [internalflags], canswitchmode 5754 <1> jnz @FF 5755 <1> jmp @F 5756 <1> 5757 <1> .from_pm_now_86m.loop.nonfixed.nomodeswitch: 5758 <1> lodsw 5759 <1> xchg ax, di 5760 <1> @@: 5761 <1> xor dx, dx 5762 <1> mov word [di + soaSegment], dx 5763 <1> mov word [di + soaSegSel], dx 5764 <1> loop .from_pm_now_86m.loop.nonfixed.nomodeswitch 5765 <1> jmp .from_done_change 5766 <1> 5767 <1> @@: 5768 <1> push cx 5769 <1> push di 5770 <1> push si 5771 <1> d4 call d4message 5772 <1> d4 asciz "In intrtn1_code.from_pm_now_86m (switching modes to access selectors)",13,10 5773 <1> setopt [internalflags], modeswitched ; set flag for resetmode 5774 <1> mov al, 0 5775 <1> call sr_state ; save state 5776 <1> call switchmode ; switch to PM 5777 <1> ; ! handle_mode_changed not called here ! 5778 <1> ; do not call InDos or other functions using seg/sels 5779 <1> pop si 5780 <1> pop di 5781 <1> jmp @F 5782 <1> 5783 <1> .from_pm_now_86m.loop.nonfixed: 5784 <1> lodsw 5785 <1> xchg ax, di 5786 <1> push cx 5787 <1> @@: 5788 <1> xor bx, bx 5789 <1> xchg bx, word [di + soaSelector] 5790 <1> mov ax, 0006h 5791 <1> int 31h 5792 <1> jc @F 5793 <1> test dl, 15 5794 <1> jnz @F 5795 <1> test cx, 0FFF0h 5796 <1> jnz @F 5797 <1> shr dx, 4 5798 <1> shl cx, 12 5799 <1> or dx, cx 5800 <1> mov word [di + soaSegment], dx 5801 <1> pop cx 5802 <1> mov word [di + soaSegSel], dx 5803 <1> loop .from_pm_now_86m.loop.nonfixed 5804 <1> call resetmode ; ! only if we did the switch 5805 <1> ; Note: This recursively calls this function, 5806 <1> ; handle_mode_changed. Because the modeswitched 5807 <1> ; flag is set during this call, this only re- 5808 <1> ; initialises the fixed seg/sels with the segment 5809 <1> ; values. That is redundant but does no harm. 5810 <1> jmp .from_done_change 5811 <1> __CPU__ 5812 <1> 5813 <1> .now_pm: 5814 <1> testopt [internalflags3], dif3_prior_pm 5815 <1> jnz .from_no_change 5816 <1> .from_86m_now_pm: 5817 <1> .from_86m_now_pm.loop: 5818 <1> lodsw 5819 <1> xchg ax, di 5820 <1> cmp si, convsegs.end_fixed 5821 <1> ja @F 5822 <1> 5823 <1> mov ax, word [di + soaSelector] 5824 <1> test ax, ax 5825 <1> jnz .no_dosdata_change 5826 <1> mov bx, word [di + soaSegment] 5827 <1> mov ax, 0002h 5828 <1> int 31h 5829 <1> mov word [di + soaSelector], ax 5830 <1> 5831 <1> .no_dosdata_change: 5832 <1> mov word [di + soaSegSel], ax 5833 <1> jmp @FFF 5834 <1> 5835 <1> @@: 5836 <1> ; Magic: Do not modify if called during modeswitching. 5837 <1> testopt [internalflags], modeswitched 5838 <1> jnz .from_done_change ; cancel this --> 5839 <1> 5840 <1> mov bx, word [di + soaSegment] 5841 <1> mov ax, 0002h 5842 <1> int 31h 5843 <1> jnc @F 5844 <1> xor ax, ax 5845 <1> @@: 5846 <1> mov word [di + soaSegSel], ax 5847 <1> mov word [di + soaSelector], ax 5848 <1> and word [di + soaSegment], 0 5849 <1> @@: 5850 <1> %if $ - .from_86m_now_pm.loop > 126 5851 <1> loop .from_86m_now_pm.loop_j 5852 <1> jmp .from_done_change 5853 <1> 5854 <1> .from_86m_now_pm.loop_j: 5855 <1> jmp .from_86m_now_pm.loop 5856 <1> %else 5857 <1> loop .from_86m_now_pm.loop 5858 <1> %endif 5859 <1> .from_done_change: 5860 <1> .from_no_change: 5861 <1> 5862 <1> 5863 <1> remember_mode: 5864 <1> call ispm 5865 <1> jnz .from_86m 5866 <1> .from_pm: 5867 <1> setopt [internalflags3], dif3_prior_pm 5868 <1> jmp @F 5869 <1> 5870 <1> .from_86m: 5871 <1> clropt [internalflags3], dif3_prior_pm 5872 <1> @@: 5873 <1> retn 5874 <1> %endif 5875 <1> 5876 <1> 5877 <1> %if _PM && _DEBUG 5878 <1> ; INP: - 5879 <1> ; OUT: es = ds 5880 <1> ; CHG: eax, edx, bx, cx, bp, si, di 5881 <1> ; STT: in PM 5882 <1> ; do not call InDos or other functions using seg/sels 5883 <1> pm_set_handlers: 5884 <1> xor bp, bp ; = 0 if no 386 5885 <1> _386 inc bp 5886 <1> _386 inc bp ; = 2 if 386 5887 <1> 5888 <1> push ds 5889 <1> pop es 5890 <1> 5891 <1> mov si, exctab ; hook several exceptions 5892 <1> %if _DEBUGUPDATESAVE 5893 <1> mov di, excsave 5894 <1> %endif 5895 <1> _386 xor edx, edx ; clear edxh 5896 <1> mov dx, exc_first 5897 <1> .loopexc: 5898 <1> lodsb 5899 <1> mov bl, al 5900 <1> 5901 <1> %if _DEBUGUPDATESAVE 5902 <1> _386_o32 ; push edx 5903 <1> push dx ; preserve excXX pointer 5904 <1> mov ax, 0202h 5905 <1> ; (edxh is zero) 5906 <1> int 31h ; cx:(e)dx -> prior handler 5907 <1> _386_o32 ; xchg eax, edx 5908 <1> xchg ax, dx 5909 <1> _386_o32 ; stosd 5910 <1> stosw ; store offset (dword on 386+, else word) 5911 <1> xchg ax, cx 5912 <1> stosw ; store selector 5913 <1> mov ax, 4 5914 <1> sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 5915 <1> add di, ax ; -> next entry of excsave 5916 <1> _386_o32 ; pop edx 5917 <1> pop dx 5918 <1> %endif 5919 <1> 5920 <1> mov cx, word [cssel] ; -> our handler for this exception 5921 <1> mov ax, 0203h 5922 <1> int 31h ; set our handler 5923 <1> add dx, byte exc_second - exc_first 5924 <1> ; -> next handler 5925 <1> cmp si, endexctab ; if another to go --> 5926 <1> jb .loopexc 5927 <1> 5928 <1> %if _CATCHPMINT214C 5929 <1> mov si, pminttab ; ds:si -> pminttab 5930 <1> %if _DEBUGUPDATESAVE 5931 <1> mov di, pmintsave ; es:di -> pmintsave 5932 <1> %endif 5933 <1> .loopint: 5934 <1> lodsb ; get interrupt number 5935 <1> mov bl, al ; bl = interrupt number 5936 <1> 5937 <1> %if _DEBUGUPDATESAVE 5938 <1> _386 xor edx, edx ; clear edxh 5939 <1> mov ax, 0204h 5940 <1> int 31h ; cx:(e)dx -> prior handler 5941 <1> _386_o32 ; xchg eax, edx 5942 <1> xchg ax, dx ; (e)ax = offset 5943 <1> _386_o32 ; stosd 5944 <1> stosw ; store offset (dword on 386+, else word) 5945 <1> xchg ax, cx 5946 <1> stosw ; store selector 5947 <1> mov ax, 4 5948 <1> sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 5949 <1> add di, ax ; -> next entry of pmintsave 5950 <1> %endif 5951 <1> 5952 <1> lodsw ; ax -> our handler 5953 <1> _386 xor edx, edx 5954 <1> xchg ax, dx ; (e)dx -> our handler 5955 <1> mov cx, word [cssel] ; cx:(e)dx -> our handler 5956 <1> mov ax, 0205h 5957 <1> int 31h 5958 <1> cmp si, pminttab.end 5959 <1> jb .loopint 5960 <1> %endif 5961 <1> 5962 <1> jmp resetmode 5963 <1> %endif 5964 <1> 5965 <1> 5966 <1> %if _PM && (_DEBUG || 1 || _CATCHPMINT214C) 5967 <1> ; INP: - 5968 <1> ; OUT: - 5969 <1> ; CHG: eax, edx, bx, cx, bp, si, di 5970 <1> ; STT: in PM 5971 <1> ; do not call InDos or other functions using seg/sels 5972 <1> pm_reset_handlers: 5973 <1> xor bp, bp ; = 0 if no 386 5974 <1> _386 inc bp 5975 <1> _386 inc bp ; = 2 if 386 5976 <1> 5977 <1> 5978 <1> %if CATCHEXCAMOUNT 5979 <1> ; unhook exceptions 5980 <1> mov di, exctab 5981 <1> mov si, excsave 5982 <1> .loopexc: 5983 <1> mov bl, [di] ; bl = exception number 5984 <1> inc di 5985 <1> _386_o32 ; lodsd 5986 <1> lodsw ; load offset (dword on 386+, else word) 5987 <1> _386_o32 ; xchg eax, edx 5988 <1> xchg ax, dx 5989 <1> lodsw ; load selector 5990 <1> xchg ax, cx ; cx:(e)dx -> prior handler 5991 <1> mov ax, 4 5992 <1> sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 5993 <1> add si, ax ; -> next entry of excsave 5994 <1> mov ax, 0203h 5995 <1> int 31h ; set previous handler 5996 <1> cmp di, endexctab ; if another to go --> 5997 <1> jb .loopexc 5998 <1> %endif 5999 <1> 6000 <1> 6001 <1> %if CATCHPMINTAMOUNT 6002 <1> ; unhook interrupts 6003 <1> mov di, pminttab ; ds:di -> pminttab 6004 <1> mov si, pmintsave ; ds:si -> pmintsave 6005 <1> .loopint: 6006 <1> mov bl, [di] ; bl = interrupt number 6007 <1> add di, 3 ; -> after this pminttab entry 6008 <1> _386_o32 ; lodsd 6009 <1> lodsw ; load offset (dword on 386+, else word) 6010 <1> _386_o32 ; xchg eax, edx 6011 <1> xchg ax, dx 6012 <1> lodsw ; load selector 6013 <1> xchg ax, cx ; cx:(e)dx -> prior handler 6014 <1> mov ax, 4 6015 <1> sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 6016 <1> add si, ax ; -> next entry of pmintsave 6017 <1> mov ax, 0205h 6018 <1> int 31h ; set previous handler 6019 <1> cmp di, pminttab.end ; if another to go --> 6020 <1> jb .loopint 6021 <1> %endif 6022 <1> 6023 <1> jmp resetmode 6024 <1> %endif 6025 <1> 6026 <1> 6027 <1> %if _DEBUG1 6028 <1> ; INP: bx -> dword address, word counter 6029 <1> ; dx:ax = linear address to check 6030 <1> ; OUT: NC if to proceed as usual 6031 <1> ; CY if address matched and counter indicates trigger 6032 <1> ; (ie, this should cause the caller to fail) 6033 <1> ; If the address matched, the counter has been stepped. 6034 <1> ; (The result of that step indicates whether to trigger.) 6035 <1> ; STT: ds = ss = debugger data selector 6036 <1> handle_test_case: 6037 <1> cmp word [bx], ax 6038 <1> jne .proceed 6039 <1> cmp word [bx + 2], dx 6040 <1> jne .proceed 6041 <1> 6042 <1> test word [bx + 4], 7FFFh ; is it already at a terminal state ? 6043 <1> jz .no_decrement ; yes, do not further decrement --> 6044 <1> dec word [bx + 4] ; decrement (towards 0 or 8000h) 6045 <1> jz .trigger ; case for decrementing 1 to 0 --> 6046 <1> .no_decrement: 6047 <1> cmp word [bx + 4], 8000h ; decrement resulted in 8000h 6048 <1> je .trigger ; or was already in that state? --> 6049 <1> .proceed: 6050 <1> clc 6051 <1> retn 6052 <1> 6053 <1> .trigger: 6054 <1> stc 6055 <1> retn 6056 <1> 6057 <1> 6058 <1> ; INP: bx -> first test record (dword address, word counter) 6059 <1> ; dx:ax = linear address to check 6060 <1> ; cx = number of consecutive test records to check 6061 <1> ; OUT: NC if to proceed as usual 6062 <1> ; CY if address matched and counter indicates trigger 6063 <1> ; (ie, this should cause the caller to fail) 6064 <1> ; CHG: bx, cx 6065 <1> ; STT: ds = ss = debugger data selector 6066 <1> ; 6067 <1> ; Note that all test cases are tried and, if the address 6068 <1> ; matches, their counters are stepped. In particular, 6069 <1> ; a trigger no longer causes us to skip all further 6070 <1> ; test cases that may have the same address. 6071 <1> ; If at least one of the matching test cases indicates a 6072 <1> ; trigger condition after its stepping, the return is CY. 6073 <1> handle_test_case_multiple_16: 6074 <1> mov cx, 16 6075 <1> handle_test_case_multiple: 6076 <1> clc 6077 <1> pushf ; initialise flags on stack with NC 6078 <1> jcxz .end 6079 <1> .loop: 6080 <1> call handle_test_case 6081 <1> jnc .next 6082 <1> popf ; (discard) 6083 <1> stc 6084 <1> pushf ; new flags on stack with CY 6085 <1> .next: 6086 <1> add bx, 6 6087 <1> loop .loop 6088 <1> .end: 6089 <1> popf ; CF 6090 <1> retn 6091 <1> %endif 6092 <1> 6093 <1> 6094 <1> usesection lDEBUG_DATA_ENTRY 6095 00008849 00 <1> align 4, db 0 6096 0000884C 01000000 <1> default_pp_count: dd 1 6097 00008850 01000000 <1> default_tp_count: dd 1 6098 00008854 01000000 <1> default_tt_count: dd 1 6099 <1> 6100 <1> 6101 <1> usesection lDEBUG_CODE 6102 <1> ; PARSE_PT - Parse 'p' or 't' command. Also resets pagedcommand flag. 6103 <1> ; Entry AL First character of command 6104 <1> ; SI Address of next character 6105 <1> ; [internalflags2] & dif2_is_pp = set if P 6106 <1> ; [internalflags] & tt_p = set if TP 6107 <1> ; both clear if T 6108 <1> ; Exit BX:CX Number of times to repeat 6109 <1> ; Uses AH,BX,CX,DX. 6110 <1> 6111 <1> parse_pt: 6112 000040AD E820C5 <1> call guard_re 6113 000040B0 C706[F000][3873] <1> mov word [gg_deferred_message], msg.empty_message 6114 000040B6 8326[F200]00 <1> and word [bb_deferred_message_in_lineout_behind], 0 6115 000040BB 8026[C800]F7 <1> clropt [internalflags2], dif2_gg_is_gg 6116 000040C0 8026[C700]2B <1> clropt [internalflags], tt_while | tt_silent_mode | tt_no_bb | tt_no_bb_first 6118 000040C5 8326[300A]00 <1> and word [tt_silent_mode_number], 0 6119 <1> 6120 <1> ; TP.NB, T.NB, P.NB: trace/proceed without bb breakpoints 6121 <1> ; 6122 <1> ; Note that when such a command is repeated through lastcmd, 6123 <1> ; it gets an empty line, thus tt_no_bb remains clear, and 6124 <1> ; the corresponding command without .NB is run. 6125 000040CA 3C2E <1> cmp al, '.' 6126 000040CC 7520 <1> jne .no_dot 6127 <1> 6128 000040CE AD <1> lodsw 6129 000040CF 25DFDF <1> and ax, TOUPPER_W 6130 000040D2 3D4E42 <1> cmp ax, "NB" 6131 000040D5 7411 <1> je .dot_nb 6132 <1> ; TP.SB, T.SB, P.SB: trace/proceed without bb for first step 6133 000040D7 3D5342 <1> cmp ax, "SB" 6134 000040DA 7405 <1> je .dot_sb 6135 000040DC 4E <1> dec si 6136 000040DD 4E <1> dec si 6137 000040DE E9DB57 <1> jmp error 6138 <1> 6139 <1> .dot_sb: 6140 000040E1 800E[C700]80 <1> setopt [internalflags], tt_no_bb_first 6141 000040E6 EB05 <1> jmp .dot_common 6142 <1> 6143 <1> .dot_nb: 6144 000040E8 800E[C700]40 <1> setopt [internalflags], tt_no_bb 6145 <1> .dot_common: 6146 000040ED AC <1> lodsb 6147 <1> .no_dot: 6148 000040EE E85201 <1> call parseql ; process =addr 6149 000040F1 E8806C <1> call skipcomm0 ; skip any white space 6150 <1> 6151 000040F4 BA0400 <1> mov dx, opt3_pp_no_paging 6152 000040F7 8B1E[4E88] <1> mov bx, word [default_pp_count + 2] 6153 000040FB 8B0E[4C88] <1> mov cx, word [default_pp_count] 6154 000040FF F606[C900]10 <1> testopt [internalflags2], dif2_is_pp 6155 00004104 751D <1> jnz @F 6156 00004106 BA0200 <1> mov dx, opt3_tp_no_paging 6157 00004109 8B1E[5288] <1> mov bx, word [default_tp_count + 2] 6158 0000410D 8B0E[5088] <1> mov cx, word [default_tp_count] 6159 00004111 F606[C700]08 <1> testopt [internalflags], tt_p 6160 00004116 750B <1> jnz @F 6161 00004118 BA0100 <1> mov dx, opt3_tt_no_paging 6162 0000411B 8B1E[5688] <1> mov bx, word [default_tt_count + 2] 6163 0000411F 8B0E[5488] <1> mov cx, word [default_tt_count] 6164 <1> @@: ; bx:cx = default count 6165 <1> 6166 00004123 8516[9C00] <1> test word [options3], dx 6167 00004127 7405 <1> jz @F 6168 00004129 8026[C400]F7 <1> clropt [internalflags], pagedcommand 6169 <1> @@: 6170 <1> 6171 <1> ; Initialise auxbuff pointers in case there is no WHILE clause. 6172 0000412E E80701 <1> call tpg_initialise_empty_auxbuff 6173 <1> 6174 00004131 E8196C <1> call iseol? 6175 00004134 7503E99300 <1> je .ppt1 ; if no count given --> (uses bx:cx = default) 6176 00004139 E82866 <1> call getdword ; bx:dx = given count 6177 <1> 6178 0000413C 53 <1> push bx 6179 0000413D 52 <1> push dx ; push count 6180 0000413E E8626C <1> call skipwh0 6181 00004141 E8096C <1> call iseol? 6182 00004144 7503E98100 <1> je .no_while 6183 00004149 4E <1> dec si 6184 0000414A BA[376A] <1> mov dx, msg.while 6185 0000414D E89E6B <1> call isstring? 6186 00004150 7408 <1> je .found_while 6187 <1> 6188 00004152 E85FC4 <1> call guard_auxbuff 6189 00004155 E8BD00 <1> call .handle_silent ; (error if no SILENT keyword) 6190 <1> 6191 00004158 EB70 <1> jmp .no_while 6192 <1> 6193 <1> 6194 <1> .found_while: 6195 0000415A E857C4 <1> call guard_auxbuff 6196 0000415D E8136C <1> call skipcomma 6197 00004160 4E <1> dec si 6198 00004161 89F1 <1> mov cx, si 6199 00004163 AC <1> lodsb 6200 00004164 E8FD65 <1> call getexpression 6201 00004167 E8BF5F <1> call toboolean 6202 0000416A E8366C <1> call skipwh0 6203 0000416D 52 <1> push dx 6204 0000416E 56 <1> push si 6205 0000416F E8DB6B <1> call iseol? ; expect end of line here 6206 00004172 7404 <1> je .no_while_silent 6207 <1> 6208 00004174 4E <1> dec si 6209 00004175 E89D00 <1> call .handle_silent 6210 <1> 6211 <1> .no_while_silent: 6212 00004178 5E <1> pop si 6213 00004179 5A <1> pop dx 6214 0000417A 85D2 <1> test dx, dx ; condition true now ? 6215 0000417C 7509 <1> jnz @F 6216 <1> 6217 0000417E BA[E16A] <1> mov dx, msg.while_not_true 6218 00004181 E87C70 <1> call putsz 6219 00004184 E979BE <1> jmp cmd3 6220 <1> 6221 <1> @@: 6222 <1> %if _PM 6223 <1> mov bx, word [auxbuff_switchbuffer_size] 6224 <1> %else 6225 00004187 31DB <1> xor bx, bx 6226 <1> %endif 6227 <1> ; (si + 1) -> line terminator (13, ';', 0) or next keyword 6228 <1> @@: 6229 00004189 4E <1> dec si ; -> terminator, or blank 6230 0000418A 807CFF20 <1> cmp byte [si - 1], 32 ; another blank at end ? 6231 0000418E 74F9 <1> je @B ; yes --> 6232 00004190 807CFF09 <1> cmp byte [si - 1], 9 6233 00004194 74F3 <1> je @B ; yes --> 6234 00004196 89F0 <1> mov ax, si 6235 00004198 29C8 <1> sub ax, cx ; ax = length of expression 6236 0000419A 53 <1> push bx 6237 0000419B 01C3 <1> add bx, ax 6238 0000419D 81FB0F20 <1> cmp bx, _AUXBUFFSIZE - 1 6239 000041A1 7603E91657 <1> ja error 6240 000041A6 8E06[2A0A] <1> mov es, word [auxbuff_segorsel] 6241 <1> ; => auxbuff 6242 000041AA 5B <1> pop bx ; -> behind switchbuffer 6243 000041AB 89CE <1> mov si, cx ; -> expression start 6244 000041AD 89C1 <1> mov cx, ax ; = length of expression 6245 <1> .loop: 6246 000041AF AC <1> lodsb 6247 000041B0 268807 <1> mov byte [es:bx], al 6248 000041B3 43 <1> inc bx ; store expression 6249 000041B4 E2F9 <1> loop .loop 6250 000041B6 26C60700 <1> mov byte [es:bx], 0 ; terminate string 6251 000041BA 43 <1> inc bx 6252 000041BB 891E[2C0A] <1> mov word [auxbuff_behind_while_condition], bx 6253 000041BF 891E[2E0A] <1> mov word [auxbuff_behind_last_silent], bx 6254 000041C3 16 <1> push ss 6255 000041C4 07 <1> pop es 6256 <1> 6257 000041C5 800E[C700]04 <1> setopt [internalflags], tt_while 6258 <1> .no_while: 6259 000041CA 59 <1> pop cx 6260 000041CB 5B <1> pop bx ; bx:cx = given count 6261 <1> 6262 <1> .ppt1: 6263 000041CC 85DB <1> test bx, bx 6264 000041CE 7507 <1> jnz @F 6265 000041D0 85C9 <1> test cx, cx 6266 000041D2 7503E9E556 <1> jz error ; must be at least 1, else error --> 6267 <1> @@: 6268 000041D7 53 <1> push bx 6269 000041D8 51 <1> push cx 6270 <1> 6271 000041D9 8026[C800]E8 <1> clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 6274 <1> 6275 000041DE F606[9600]04 <1> testopt [options], tp_do_not_skip_bp 6276 000041E3 752A <1> jnz .do_not_skip_cseip 6277 000041E5 800E[C800]01 <1> setopt [internalflags2], dif2_gg_is_first 6278 <1> 6279 000041EA 803E[C80B]00 <1> cmp byte [eqflag], 0 6280 000041EF 7507 <1> jne .cseip_take_eql 6281 <1> 6282 <1> _386_PM_o32 ; xor ecx, ecx 6283 000041F1 31C9 <1> xor cx, cx 6284 000041F3 E8EFF2 <1> call get_cseip_ecx_linear 6285 000041F6 EB0B <1> jmp .got_cseip 6286 <1> 6287 <1> .cseip_take_eql: 6288 000041F8 8B1E[CE0B] <1> mov bx, word [eqladdr + 4] 6289 <1> _386_PM_o32 ; mov edx, dword [eqladdr] 6290 000041FC 8B16[CA0B] <1> mov dx, word [eqladdr] 6291 00004200 E8ECF2 <1> call getlinear 6292 <1> .got_cseip: 6293 00004203 7303E9B456 <1> jc error 6294 00004208 A3[E400] <1> mov word [gg_first_cseip_linear], ax 6295 0000420B 8916[E600] <1> mov word [gg_first_cseip_linear + 2], dx 6296 <1> .do_not_skip_cseip: 6297 <1> 6298 0000420F 59 <1> pop cx 6299 00004210 5B <1> pop bx 6300 <1> 6301 00004211 E84F00 <1> call seteq ; make the = operand take effect 6302 00004214 C3 <1> retn 6303 <1> 6304 <1> 6305 <1> .handle_silent: 6306 00004215 BA[3D6A] <1> mov dx, msg.silent 6307 00004218 E8D36A <1> call isstring? 6308 0000421B 7403E99C56 <1> jne error 6309 00004220 E8506B <1> call skipcomma 6310 00004223 E8276B <1> call iseol? 6311 00004226 740A <1> je .no_silent_mode_number 6312 <1> 6313 00004228 E8016A <1> call getword 6314 0000422B 8916[300A] <1> mov word [tt_silent_mode_number], dx 6315 0000422F E8306B <1> call chkeol 6316 <1> 6317 <1> .no_silent_mode_number: 6318 00004232 800E[C700]10 <1> setopt [internalflags], tt_silent_mode 6319 00004237 C3 <1> retn 6320 <1> 6321 <1> 6322 <1> ; INP: (_PM) word [auxbuff_switchbuffer_size] 6323 <1> ; OUT: word [auxbuff_behind_while_condition] 6324 <1> ; word [auxbuff_behind_last_silent] 6325 <1> ; CHG: dx 6326 <1> tpg_initialise_empty_auxbuff: 6327 <1> %if _PM 6328 <1> mov dx, word [auxbuff_switchbuffer_size] 6329 <1> %else 6330 00004238 31D2 <1> xor dx, dx 6331 <1> %endif 6332 0000423A 8916[2C0A] <1> mov word [auxbuff_behind_while_condition], dx 6333 0000423E 8916[2E0A] <1> mov word [auxbuff_behind_last_silent], dx 6334 00004242 C3 <1> retn 6335 <1> 6336 <1> 6337 <1> ; PARSEQL - Parse `=' operand for `g', 'p' and `t' commands. 6338 <1> ; Entry AL First character of command 6339 <1> ; SI Address of next character 6340 <1> ; Exit AL First character beyond range 6341 <1> ; SI Address of the character after that 6342 <1> ; eqflag Nonzero if an `=' operand was present 6343 <1> ; eqladdr Address, if one was given 6344 <1> ; Uses AH,BX,CX,DX. 6345 <1> 6346 <1> parseql: 6347 00004243 C606[C80B]00 <1> mov byte [eqflag], 0 ; mark '=' as absent 6348 00004248 3C3D <1> cmp al, '=' 6349 0000424A 7516 <1> jne peq1 ; if no '=' operand 6350 0000424C E8536B <1> call skipwhite 6351 0000424F 8B1E[880C] <1> mov bx, word [reg_cs] ; default segment 6352 00004253 E80D5B <1> call getaddrX ; get the address into bx:(e)dx 6353 <1> %if _PM 6354 <1> mov word [eqladdr+2], 0 6355 <1> cmp byte [bAddr32], 0 6356 <1> jz .nohighofs 6357 <1> o32 ; mov dword [eqladdr], edx 6358 <1> .nohighofs: 6359 <1> %endif 6360 00004256 8916[CA0B] <1> mov word [eqladdr+0], dx 6361 0000425A 891E[CE0B] <1> mov word [eqladdr+4], bx 6362 0000425E FE06[C80B] <1> inc byte [eqflag] 6363 <1> peq1: 6364 00004262 C3 <1> retn 6365 <1> 6366 <1> 6367 <1> ; SETEQ - Copy the = arguments to their place, if appropriate. 6368 <1> ; (This is not done immediately, because the command may have 6369 <1> ; a syntax error.) 6370 <1> ; Uses AX. 6371 <1> seteq: 6372 00004263 803E[C80B]00 <1> cmp byte [eqflag], 0 6373 00004268 7411 <1> je .return ; if no `=' operand 6374 0000426A A1[CA0B] <1> mov ax, word [eqladdr+0] 6375 0000426D A3[940C] <1> mov word [reg_eip], ax 6376 <1> %if _PM 6377 <1> mov ax, word [eqladdr+2] 6378 <1> mov word [reg_eip+2], ax 6379 <1> %endif 6380 00004270 A1[CE0B] <1> mov ax, word [eqladdr+4] 6381 00004273 A3[880C] <1> mov word [reg_cs], ax 6382 00004276 C606[C80B]00 <1> mov byte [eqflag], 0 ; clear the flag 6383 <1> .return: 6384 0000427B C3 <1> retn 2354 %include "uu.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug U command - Disassembler 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2012 C. Masloch 8 <1> 9 <1> Usage of the works is permitted provided that this 10 <1> instrument is retained with the works, so that any entity 11 <1> that uses the works is notified of this instrument. 12 <1> 13 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 14 <1> 15 <1> %endif 16 <1> 17 <1> 18 <1> usesection lDEBUG_CODE 19 <1> 20 <1> ; U command - disassemble. 21 <1> uu: 22 0000427C C706[D20B][8742] <1> mov word [lastcmd], lastuu 23 00004282 E8C86A <1> call iseol? 24 00004285 7510 <1> jne uu1 ; if an address was given 25 <1> 26 <1> lastuu: 27 <1> _386_PM_o32 ; mov ecx, dword [u_addr] 28 00004287 8B0E[540B] <1> mov cx, word [u_addr] 29 <1> _386_PM_o32 ; mov edx, ecx 30 0000428B 89CA <1> mov dx, cx 31 <1> _386_PM_o32 ; add ecx, byte 1Fh 32 0000428D 83C11F <1> add cx, byte 1Fh 33 00004290 7303 <1> jnc .no_overflow ; if no overflow --> 34 <1> _386_PM_o32 ; or ecx, byte -1 35 00004292 83C9FF <1> or cx, byte -1 ; til end of segment 36 <1> .no_overflow: 37 00004295 EB15 <1> jmp short uu2 38 <1> 39 <1> uu1: 40 00004297 B92000 <1> mov cx, 20h ; default length 41 0000429A 8B1E[880C] <1> mov bx, word [reg_cs] 42 0000429E E80E5A <1> call getrangeX ; get address range into bx:(e)dx 43 000042A1 E8BE6A <1> call chkeol ; expect end of line here 44 000042A4 891E[580B] <1> mov word [u_addr + saSegSel], bx 45 <1> %if _PM 46 <1> call ispm 47 <1> jnz .86m 48 <1> .pm: 49 <1> mov word [u_addr + saSelector], bx 50 <1> jmp @F 51 <1> .86m: 52 <1> mov word [u_addr + saSegment], bx 53 <1> @@: 54 <1> %endif 55 <1> _386_PM_o32 ; mov dword [u_addr], edx 56 000042A8 8916[540B] <1> mov word [u_addr], dx 57 <1> 58 <1> ; (d)word [u_addr] = offset start address 59 <1> ; word [u_addr + saSegSel] = segment start address 60 <1> ; (e)cx = end address 61 <1> ; (e)dx = start adddress (same as [u_addr]) 62 <1> uu2: 63 <1> _386_PM_o32 ; inc ecx 64 000042AC 41 <1> inc cx 65 <1> uu3: 66 000042AD E80FF9 <1> call handle_serial_flags_ctrl_c 67 <1> _386_PM_o32 ; push ecx 68 000042B0 51 <1> push cx 69 <1> _386_PM_o32 ; push edx 70 000042B1 52 <1> push dx 71 000042B2 8326[3689]00 <1> and word [disflags], 0 72 000042B7 E81000 <1> call disasm ; do it 73 <1> _386_PM_o32 ; pop ebx 74 000042BA 5B <1> pop bx 75 <1> _386_PM_o32 ; pop ecx 76 000042BB 59 <1> pop cx 77 <1> _386_PM_o32 ; mov eax, dword [u_addr] 78 000042BC A1[540B] <1> mov ax, word [u_addr] 79 <1> _386_PM_o32 ; mov edx, eax 80 000042BF 89C2 <1> mov dx, ax 81 <1> _386_PM_o32 ; sub eax, ecx 82 000042C1 29C8 <1> sub ax, cx ; current position - end 83 <1> _386_PM_o32 ; sub ebx, ecx 84 000042C3 29CB <1> sub bx, cx ; previous position - end 85 <1> _386_PM_o32 ; cmp eax, ebx 86 000042C5 39D8 <1> cmp ax, bx 87 000042C7 73E4 <1> jnb uu3 ; if we haven't reached the goal 88 000042C9 C3 <1> retn 89 <1> 90 <1> 91 <1> usesection lDEBUG_DATA_ENTRY 92 <1> 93 <1> ; Jump table for displaying sized operands. 94 <1> ; Entries are defined in the debug.asm opsizeditem list. 95 <1> align 2, db 0 96 <1> disjmp2: 97 00008858 [704A][A14A][D14C]- <1> dw DISJMP2_OPSIZEDITEMS 97 0000885E [DE4C][924A][E74C]- <1> 97 00008864 [214D][264D] <1> 98 <1> .end: 99 <1> 100 <1> ; Jump table for displaying operands. 101 <1> ; Entries are defined in the debug.asm opitem list. 102 <1> align 2, db 0 103 <1> optab: 104 00008868 [3A44] <1> dw da_internal_error ; entry for OP_END 105 0000886A [2A4D][2E4D][3F4D]- <1> dw OPTAB_OPITEMS 105 00008870 [5C4D][724D][844D]- <1> 105 00008876 [1E4E][5C4E][0550]- <1> 105 0000887C [1550][2B50][4B50]- <1> 105 00008882 [5650][7550][9650]- <1> 105 00008888 [9650][A850][BC50]- <1> 105 0000888E [AE50][C750][CF50]- <1> 105 00008894 [9051][BA51][D551]- <1> 105 0000889A [E151][E851][9951]- <1> 105 000088A0 [A051][A751][B351]- <1> 105 000088A6 [AE51][E050][0851]- <1> 105 000088AC [3951][3A44]310033- <1> 105 000088B3 004458434C53544353- <1> 105 000088BC 445345534653475353- <1> 105 000088C5 53 <1> 106 <1> 107 <1> 108 <1> %if _MEMREF_AMOUNT 109 000088C6 00 <1> align 16, db 0 110 000088D0 00 <1> memrefs: times MEMREF_size * _MEMREF_AMOUNT db 0 111 00008910 0000 <1> .free: dw 0 112 <1> 113 00008912 00 <1> align 4, db 0 114 <1> string_memref_counter: 115 00008914 00000000 <1> dd 0 116 <1> %endif 117 <1> 118 <1> 119 <1> ; DISASM - Disassemble. 120 <1> 121 <1> %if _SYMBOLIC 122 <1> align 4, db 0 123 <1> u_lin_start: dd 0 124 <1> %endif 125 <1> align 2, db 0 126 00008918 0000 <1> dis_n: dw 0 ; number of bytes in instruction so far 127 0000891A 0000 <1> dw 0 128 0000891C 00 <1> preflags: db 0 ; flags for prefixes found so far (includes OSIZE,ASIZE) 129 0000891D 00 <1> preused: db 0 ; flags for prefixes used so far 130 <1> %if _PM 131 <1> presizeflags: db 0 ; O32,A32 flags = (OSIZE,ASIZE) XOR (32-bit cs?) 132 <1> %else 133 <1> presizeflags: equ preflags ; O32,A32 flags are always equal to OSIZE,ASIZE 134 <1> %endif 135 <1> 136 <1> PRESEG equ 1 ; segment prefix 137 <1> PREREP equ 2 ; rep prefixes 138 <1> PREREPZ equ 4 ; F3h, not F2h 139 <1> PRELOCK equ 8 ; lock prefix 140 <1> PREOSIZE equ 10h ; flag for OSIZE prefix 141 <1> PREASIZE equ 20h ; flag for ASIZE prefix 142 <1> PRE32D equ 10h ; flag for 32-bit data 143 <1> PRE32A equ 20h ; flag for 32-bit addressing 144 <1> PREWAIT equ 40h ; prefix wait (not really a prefix) 145 <1> GOTREGM equ 80h ; set if we have the reg/mem part 146 <1> 147 0000891E 00 <1> instru: db 0 ; the main instruction byte 148 0000891F 00 <1> disp8: db 0 149 <1> align 2, db 0 150 00008920 0000 <1> index: dw 0 ; index of the instruction (unsqueezed) 151 00008922 380339033C03 <1> obsinst:dw SFPGROUP3, SFPGROUP3+1, SFPGROUP3+4 152 00008928 04020602 <1> dw SPARSE_BASE+24h, SPARSE_BASE+26h ; obsolete-instruction values 153 <1> ; This is used to search for obsolete instructions: 154 <1> ; DBE0h: feni 155 <1> ; DBE1h: fdisi 156 <1> ; DBE4h: fsetpm 157 <1> ; 124h: mov trX, reg 158 <1> ; 126h: mov reg, trX 159 <1> 160 0000892C 00 <1> rmsize: db 0 ; <0 or 0 or >0 means mod r/m is 8 or 16 or 32 161 0000892D 00 <1> segmnt: db 0 ; segment determined by prefix (or otherwise) 162 0000892E 00 <1> align 4, db 0 163 00008930 00000000 <1> addrr: dd 0 ; address in mod r/m byte 164 00008934 0000 <1> savesp2:dw 0 ; save the stack pointer here (used in disasm) 165 <1> 166 <1> align 2, db 0 167 00008936 0000 <1> disflags: dw 0 ; flags for the disassembler 168 <1> 169 <1> ;--- equates for disflags: 170 <1> 171 <1> DIS_F_REPT equ 1 ; repeat after pop ss, etc. 172 <1> DIS_F_SHOW equ 2 ; show memory contents 173 <1> DIS_I_SHOW equ 4 ; there are memory contents to show 174 <1> DIS_I_UNUSED equ 8 ; (internal) print " (unused)" 175 <1> DIS_I_SHOWSIZ equ 10h ; (internal) always show the operand size 176 <1> DIS_I_KNOWSIZ equ 20h ; (internal) we know the operand size of instr. 177 <1> DIS_I_MOV_SS equ 40h ; (internal) note for repetition: mov ss 178 <1> DIS_I_DONTSHOW equ 80h ; do not show memory contents override 179 <1> DIS_I_NOSIZ equ 100h ; do not show size 180 <1> DIS_I_FAR_M equ 200h ; far memory reference, show segment word contents 181 <1> DIS_I_DOUBLE_M equ 400h ; double memory reference, show second item contents 182 <1> DIS_I_SHOW_A32 equ 800h ; memory contents to show are 32-bit addressed 183 <1> DIS_I_M_SRC equ 1000h ; memory operand is source 184 <1> DIS_I_M_DST equ 2000h ; memory operand is destination 185 <1> ; both of the above may be set 186 <1> 187 00008938 00 <1> disflags2: db 0 ; another copy of DIS_I_KNOWSIZ 188 00008939 00 <1> disrepeatcount: db 0 189 <1> 190 <1> align 2, db 0 191 0000893A 0000 <1> sizeloc: dw 0 ; address of size words in output line 192 <1> %if _COND 193 0000893C 0000 <1> condmsg: dw 0 ; -> conditionals message to display (if R and no mem) 194 <1> %endif 195 <1> 196 <1> ; Jump table for a certain place. 197 <1> ; The size of this table matches OPTYPES_BASE. 198 <1> align 2, db 0 199 <1> disjmp: 200 0000893E [0852] <1> dw disbad ; illegal instruction 201 00008940 [5C43] <1> dw da_twobyte ; two-byte instruction 202 00008942 [6843] <1> dw da_insgrp ; instruction group 203 00008944 [6F43] <1> dw da_fpuins ; coprocessor instruction 204 00008946 [8A43] <1> dw da_fpugrp ; coprocessor instruction group 205 00008948 [9343] <1> dw da_insprf ; instruction prefix (including 66h/67h) 206 <1> %if ($ - disjmp) != OPTYPES_BASE 207 <1> %error Wrong length of table disjmp 208 <1> %endif 209 <1> 210 <1> ; Table for 16-bit mod r/m addressing. 8 = BX, 4 = BP, 2 = SI, 1 = DI. 211 0000894A 0A09060502010408 <1> rmtab: db 8+2, 8+1, 4+2, 4+1, 2, 1, 4, 8 212 <1> 213 <1> 214 <1> %macro defgpr 1.nolist 215 <1> REG_ %+ %1: equ ($ - rgnam816) / 2 216 <1> %defstr %%string %1 217 <1> db %%string 218 <1> %endmacro 219 <1> %macro defsr 1.nolist 220 <1> REG_ %+ %1: equ REG_NO_GPR + ($ - segrgnam) / 2 221 <1> %defstr %%string %1 222 <1> db %%string 223 <1> %endmacro 224 <1> 225 <1> REG_NO_GPR equ 24 ; 16..23 are registers eax..edi 226 <1> 227 <1> align 2, db 0 228 <1> ; Tables of register names. 229 <1> ; rgnam816/rgnam16/segrgnam/xregnam must be consecutive. 230 <1> rgnam816: 231 00008952 414C <1> defgpr AL 232 00008954 434C <1> defgpr CL 233 00008956 444C <1> defgpr DL 234 00008958 424C <1> defgpr BL 235 0000895A 4148 <1> defgpr AH 236 0000895C 4348 <1> defgpr CH 237 0000895E 4448 <1> defgpr DH 238 00008960 4248 <1> defgpr BH ; 0..7 239 <1> rgnam16: 240 00008962 4158 <1> defgpr AX 241 00008964 4358 <1> defgpr CX 242 00008966 4458 <1> defgpr DX 243 00008968 4258 <1> defgpr BX 244 0000896A 5350 <1> defgpr SP 245 0000896C 4250 <1> defgpr BP 246 0000896E 5349 <1> defgpr SI 247 00008970 4449 <1> defgpr DI ; 8..15 (16-bit), 16..23 (32-bit) 248 <1> N_REGS16 equ ($ - rgnam16) >> 1 249 <1> segrgnam: 250 00008972 4553 <1> defsr ES 251 00008974 4353 <1> defsr CS 252 00008976 5353 <1> defsr SS 253 00008978 4453 <1> defsr DS 254 0000897A 4653 <1> defsr FS 255 0000897C 4753 <1> defsr GS ; 24..29 256 <1> N_SEGREGS equ ($ - segrgnam) >> 1 257 <1> xregnam: 258 0000897E 5354 <1> defsr ST 259 00008980 4D4D <1> defsr MM 260 00008982 4352 <1> defsr CR 261 00008984 4452 <1> defsr DR 262 00008986 5452 <1> defsr TR ; 30..34 263 <1> N_ALLREGS equ ($ - rgnam816) >> 1 264 <1> 265 <1> 266 <1> align 2, db 0 267 00008988 [5C0C][640C][680C]- <1> reg32addr: dw reg_eax, reg_ecx, reg_edx, reg_ebx 267 0000898E [600C] <1> 268 00008990 [6C0C][700C][740C]- <1> dw reg_esp, reg_ebp, reg_esi, reg_edi 268 00008996 [780C] <1> 269 <1> 270 <1> align 2, db 0 271 00008998 [800C][880C][840C]- <1> segrgaddr: dw reg_es,reg_cs,reg_ss,reg_ds,reg_fs,reg_gs 271 0000899E [7C0C][8C0C][900C] <1> 272 <1> 273 <1> ; Tables for handling of named prefixes. 274 <1> 275 000089A4 262E363E6465 <1> prefixlist: db 26h,2Eh,36h,3Eh,64h,65h ; segment prefixes (in order) 276 000089AA 9BF0F2F3 <1> db 9Bh,0F0h,0F2h,0F3h ; WAIT,LOCK,REPNE,REPE 277 000089AE 6667 <1> db 066h,067h ; OSIZE, ASIZE 278 <1> N_PREFIX: equ $ - prefixlist 279 <1> 280 <1> align 2, db 0 281 000089B0 C309F90535082F08 <1> prefixmnem: dw MN_WAIT,MN_LOCK,MN_REPNE,MN_REPE 282 000089B8 0C000200 <1> dw MN_O32,MN_A32 ; in 16-bit CS, OSIZE is O32 and ASIZE is A32 283 <1> %if _PM 284 <1> dw MN_O16,MN_A16 ; in 32-bit CS, OSIZE is O16 and ASIZE is A16 285 <1> %endif 286 <1> 287 <1> %if _COND 288 <1> align 2, db 0 289 <1> cond_table: 290 000089BC 0008 <1> dw 800h ; OF 291 000089BE 0100 <1> dw 1 ; CF 292 000089C0 4000 <1> dw 40h ; ZF 293 000089C2 4100 <1> dw 41h ; CF | ZF 294 000089C4 8000 <1> dw 80h ; SF 295 000089C6 0400 <1> dw 4 ; PF 296 <1> ; dw cond_L_GE ; handled specifically 297 <1> ; dw cond_LE_G ; handled specifically 298 <1> %endif 299 <1> 300 <1> single_byte_opcodes_repeat_disassembly: 301 <1> .: 302 000089C8 17 <1> db 17h ; pop ss 303 000089C9 E6 <1> db 0E6h ; out imm8, al 304 000089CA E7 <1> db 0E7h ; out imm8, (e)ax 305 000089CB EE <1> db 0EEh ; out dx, al 306 000089CC EF <1> db 0EFh ; out dx, (e)ax 307 000089CD 6E <1> db 06Eh ; outsb 308 000089CE 6F <1> db 06Fh ; outsw/outsd 309 000089CF E4 <1> db 0E4h ; in al, imm8 310 000089D0 E5 <1> db 0E5h ; in (e)ax, imm8 311 000089D1 EC <1> db 0ECh ; in al, dx 312 000089D2 ED <1> db 0EDh ; in (e)ax, dx 313 000089D3 6C <1> db 06Ch ; insb 314 000089D4 6D <1> db 06Dh ; insw/insd 315 000089D5 F4 <1> db 0F4h ; hlt 316 000089D6 FB <1> db 0FBh ; sti 317 <1> .length: equ $ - . 318 <1> 319 <1> 320 <1> usesection lDEBUG_CODE 321 <1> 322 <1> disasm: 323 000042CA C606[3989]00 <1> mov byte [disrepeatcount], 0 ; number of repeated disassembly lines 324 <1> 325 <1> %if _MEMREF_AMOUNT 326 000042CF B90400 <1> mov cx, _MEMREF_AMOUNT 327 000042D2 BF[D088] <1> mov di, memrefs 328 <1> @@: 329 000042D5 E89A0C <1> call init_one_memref 330 000042D8 E2FB <1> loop @B 331 000042DA AB <1> stosw ; memrefs.free 332 <1> %endif 333 <1> 334 <1> .preserve_disrepeatcount: 335 <1> %if _COND 336 000042DB 8326[3C89]00 <1> and word [condmsg], 0 ; initialize conditions message 337 <1> %endif 338 <1> .preserve_condmsg_and_disrepeatcount: 339 000042E0 8926[3489] <1> mov word [savesp2], sp 340 <1> _386_PM_o32 ; xor eax, eax 341 000042E4 31C0 <1> xor ax, ax 342 <1> _386_PM_o32 ; mov dword [dis_n], eax 343 000042E6 A3[1889] <1> mov word [dis_n], ax 344 000042E9 A2[1F89] <1> mov byte [disp8], al 345 000042EC A3[1C89] <1> mov word [preflags], ax ; clear preflags and preused 346 000042EF C606[2D89]03 <1> mov byte [segmnt], 3 ; initially use DS segment 347 000042F4 C606[2C89]80 <1> mov byte [rmsize], 80h ; don't display any memory 348 000042F9 A3[2283] <1> mov word [dismach], ax ; no special machine needed, so far 349 000042FC 8B1E[580B] <1> mov bx, word [u_addr + saSegSel] 350 <1> %if _PM 351 <1> mov byte [bCSAttr], al 352 <1> call test_d_b_bit 353 <1> jz .16 354 <1> mov byte [bCSAttr], 40h 355 <1> .16: 356 <1> %endif 357 <1> 358 <1> %if _SYMBOLIC 359 <1> call zz_detect_xms ; re-detect XMS if used after run 360 <1> 361 <1> _386_PM_o32 362 <1> mov dx, word [u_addr] 363 <1> call getlinear 364 <1> jc @F 365 <1> 366 <1> mov word [u_lin_start], ax 367 <1> mov word [u_lin_start + 2], dx 368 <1> 369 <1> mov cx, dx 370 <1> mov bx, ax 371 <1> call binsearchmain ; search for matching symbol 372 <1> jcxz .no_symbol 373 <1> .loop_symbol: 374 <1> push bx 375 <1> call displaystring 376 <1> push bx 377 <1> push ax 378 <1> call getfarpointer.main 379 <1> pop di 380 <1> pop es 381 <1> xor dx, dx 382 <1> _386_PM test byte [bCSAttr], 40h 383 <1> _386_PM jz @F 384 <1> _386_PM mov dx, word [u_addr + 2] 385 <1> @@: 386 <1> mov ax, word [u_addr] 387 <1> cmp dx, word [es:di + smOffset + 2] 388 <1> mov dx, msg.uu_after_symbol.non_wrt 389 <1> jne .wrt_symbol 390 <1> cmp ax, word [es:di + smOffset] 391 <1> je .non_wrt_symbol 392 <1> .wrt_symbol: 393 <1> mov dx, msg.uu_between_symbol.wrt 394 <1> call disp_message 395 <1> push ss 396 <1> pop es 397 <1> mov di, line_out 398 <1> mov ax, word [u_addr + 4] 399 <1> call hexword 400 <1> push bx 401 <1> push cx 402 <1> call putsline 403 <1> pop cx 404 <1> pop bx 405 <1> mov dx, msg.uu_after_symbol.wrt 406 <1> .non_wrt_symbol: 407 <1> call disp_message 408 <1> .next_symbol: 409 <1> inc bx 410 <1> loop .loop_symbol 411 <1> 412 <1> .no_symbol: 413 <1> push ss 414 <1> pop es 415 <1> push ss 416 <1> pop ds 417 <1> %endif 418 <1> 419 00004300 E8DB10 <1> call disgetbyte ; get a byte of the instruction 420 00004303 3C9B <1> cmp al, 9Bh ; wait instruction (must be the first prefix) 421 00004305 7508 <1> jne da2 ; if not --> 422 <1> 423 <1> ; The wait instruction is actually a separate instruction as far as 424 <1> ; the x86 is concerned, but we treat it as a prefix since there are 425 <1> ; some mnemonics that incorporate it. But it has to be treated specially 426 <1> ; since you can't do, e.g., seg cs wait ... but must do wait seg cs ... 427 <1> ; instead. We'll catch it later if the wait instruction is not going to 428 <1> ; be part of a shared mnemonic. 429 <1> 430 00004307 800E[1C89]40 <1> or byte [preflags], PREWAIT 431 <1> 432 <1> ; If we've found a prefix, we return here for the actual instruction 433 <1> ; (or another prefix). 434 <1> 435 <1> da1: 436 0000430C E8CF10 <1> call disgetbyte 437 <1> da2: 438 0000430F A2[1E89] <1> mov [instru],al ; save away the instruction 439 00004312 B400 <1> mov ah,0 440 <1> 441 <1> ; Now we have the sequence number of the instruction in AX. Look it up. 442 <1> 443 <1> da3: 444 00004314 89C3 <1> mov bx,ax 445 00004316 A3[2089] <1> mov [index],ax ; save the compressed index 446 00004319 3DE001 <1> cmp ax,SPARSE_BASE 447 0000431C 720A <1> jb da4 ; if it's not from the squeezed part of the table 448 0000431E 8A9F[5012] <1> mov bl,[sqztab+bx-SPARSE_BASE] 449 00004322 B700 <1> mov bh,0 450 00004324 81C3E001 <1> add bx,SPARSE_BASE ; bx = compressed index 451 <1> 452 <1> da4: 453 00004328 8A8F[580C] <1> mov cl, [optypes+bx]; cx = opcode type 454 0000432C B500 <1> mov ch, 0 455 0000432E D1E3 <1> shl bx, 1 456 00004330 8B9F[F60E] <1> mov bx, [opinfo+bx] ; bx = other info (usually the mnemonic) 457 00004334 89CE <1> mov si, cx 458 00004336 89D8 <1> mov ax, bx 459 00004338 B10C <1> mov cl, 12 460 0000433A D3E8 <1> shr ax, cl 461 0000433C 3A06[2283] <1> cmp al, [dismach] 462 00004340 7203 <1> jb da5 ; if a higher machine is already required 463 00004342 A2[2283] <1> mov [dismach], al ; set machine type 464 <1> da5: 465 00004345 80E70F <1> and bh, 0Fh ; remove the machine field 466 00004348 83FE0C <1> cmp si, OPTYPES_BASE 467 0000434B 7360 <1> jae da13_unp ; if this is an actual instruction 468 0000434D F7C60100 <1> test si, 1 ; check whether valid displacement 469 00004351 7403E9E400 <1> jnz da_internal_error ; if not --> 470 00004356 FF94[3E89] <1> call [disjmp+si] ; otherwise, do more specific processing 471 0000435A EBB8 <1> jmp s da3 ; back for more 472 <1> 473 <1> ; Two-byte instruction. 474 <1> 475 <1> da_twobyte: 476 0000435C E87F10 <1> call disgetbyte 477 0000435F A2[1E89] <1> mov [instru],al 478 00004362 B400 <1> mov ah,0 479 00004364 05E001 <1> add ax,SPARSE_BASE 480 00004367 C3 <1> ret 481 <1> 482 <1> ; Instruction group. 483 <1> 484 <1> da_insgrp: 485 00004368 E8F50E <1> call getregmem_r ; get the middle 3 bits of the R/M byte 486 0000436B 98 <1> cbw 487 0000436C 01D8 <1> add ax,bx ; offset 488 0000436E C3 <1> ret 489 <1> 490 <1> ; Coprocessor instruction. 491 <1> 492 <1> da_fpuins: 493 0000436F 800E[3689]10 <1> or byte [disflags],DIS_I_SHOWSIZ 494 00004374 800E[2383]01 <1> or byte [dmflags],DM_COPR 495 00004379 E8EE0E <1> call getregmem 496 0000437C 3CC0 <1> cmp al,0c0h 497 0000437E 72E8 <1> jb da_insgrp ;range 00-bfh is same as an instruction group 498 00004380 B103 <1> mov cl,3 499 00004382 D2E8 <1> shr al,cl ;C0h --> 18h 500 00004384 2C10 <1> sub al,18h-8 ;18h --> 8 501 00004386 98 <1> cbw 502 00004387 01D8 <1> add ax,bx ;offset 503 00004389 C3 <1> ret 504 <1> 505 <1> ; Coprocessor instruction group. 506 <1> 507 <1> da_fpugrp: 508 0000438A A0[1C83] <1> mov al,[regmem] 509 0000438D 2407 <1> and al,7 510 0000438F 98 <1> cbw 511 00004390 01D8 <1> add ax,bx 512 00004392 C3 <1> ret 513 <1> 514 <1> ; Instruction prefix. At this point, bl = prefix bits; bh = segment 515 <1> 516 <1> da_insprf: 517 00004393 841E[1C89] <1> test bl,[preflags] 518 00004397 7511 <1> jnz da12 ; if there are duplicates 519 00004399 081E[1C89] <1> or [preflags],bl 520 0000439D F6C301 <1> test bl,PRESEG 521 000043A0 7404 <1> jz da11 ; if not a segment 522 000043A2 883E[2D89] <1> mov [segmnt],bh ; save the segment 523 <1> da11: 524 000043A6 58 <1> pop ax ; discard return address 525 000043A7 E962FF <1> jmp da1 526 <1> 527 <1> da12: 528 000043AA E95B0E <1> jmp disbad ; we don't allow duplicate prefixes 529 <1> 530 <1> ; si = index into table opindex, + OPTYPES_BASE 531 <1> da13_unp: 532 000043AD 83EE0C <1> sub si, OPTYPES_BASE ; = offset into opindex 533 000043B0 31C0 <1> xor ax, ax 534 000043B2 8A84[3416] <1> mov al, [si + opindex] ; ax = adjustment (from opindex) 535 000043B6 01F6 <1> add si, si ; take offset twice 536 000043B8 4E <1> dec si ; subtract one 537 000043B9 01C6 <1> add si, ax ; add in the adjustment 538 <1> 539 <1> ; OK. Here we go. This is an actual instruction. 540 <1> ; bx = offset of mnemonic in mnlist 541 <1> ; si = offset of operand list in oplists 542 <1> ; First print the op mnemonic. 543 <1> 544 <1> da13: 545 <1> %if _PM 546 <1> mov al, byte [preflags] 547 <1> and al, PREOSIZE | PREASIZE ; get OSIZE,ASIZE status (= O32,A32 in 16-bit cs) 548 <1> _386 test byte [bCSAttr], 40h ; in a 32-bit segment? 549 <1> _386 jz .16 ; no --> 550 <1> _386 xor al, PRE32D | PRE32A ; OSIZE,ASIZE present means O16,A16 551 <1> .16: 552 <1> mov byte [presizeflags], al ; set O32,A32 status 553 <1> %endif 554 000043BB 56 <1> push si 555 000043BC 8DB7[9C01] <1> lea si,[mnlist+bx] ; offset of mnemonic 556 000043C0 81FE[F301] <1> cmp si,mnlist+MN_BSWAP 557 000043C4 7505 <1> jne da13a ; if not BSWAP 558 000043C6 E8AB0F <1> call dischk32d 559 000043C9 74DF <1> jz da12 ; if no operand-size prefix --> 560 <1> da13a: 561 000043CB E8E40E <1> call showop ; print out the op code (at line_out+28) 562 000043CE 8326[3A89]00 <1> and word [sizeloc], 0 ; clear out this flag 563 000043D3 5E <1> pop si ; recover list of operands (offset in oplists) 564 000043D4 81C6[0000] <1> add si, oplists ; -> actual oplist entry 565 <1> 566 <1> da14_check_end: 567 000043D8 803C00 <1> cmp byte [si], OP_END 568 000043DB 7503E98400 <1> je da_op_end_e ; if we're done --> 569 <1> 570 <1> ; Loop over operands. si-> next operand type. 571 <1> ; Fortunately the operands appear in the instruction in the same 572 <1> ; order as they appear in the disassembly output. 573 <1> 574 <1> da14: 575 000043E0 C606[3889]00 <1> mov byte [disflags2], 0 ; clear out size-related flags 576 000043E5 AC <1> lodsb ; get the operand type 577 000043E6 3C40 <1> cmp al,OP_SIZE 578 000043E8 7259 <1> jb da18 ; if it's not size dependent 579 000043EA C606[3889]20 <1> mov byte [disflags2],DIS_I_KNOWSIZ ;indicate variable size 580 000043EF 3CA0 <1> cmp al,OP_1632_DEFAULT 581 000043F1 7313 <1> jae da15_default 582 000043F3 3C60 <1> cmp al,OP_8 583 000043F5 7329 <1> jae da16 ; if the size is fixed (8, 16, 32, 64) 584 000043F7 3C50 <1> cmp al,OP_1632 585 000043F9 7317 <1> jae da15 ; if word or dword 586 <1> ; OP_ALL here. This has a width of 2. 587 <1> ; If the low bit is clear, this means 588 <1> ; 8 bit, else 16/32 bits. 589 000043FB B4FF <1> mov ah,-1 590 000043FD F606[1E89]01 <1> test byte [instru],1 591 00004402 7424 <1> jz da17 ; if byte --> 592 00004404 EB0C <1> jmp da15 593 <1> da15_default: 594 00004406 F606[1C89]10 <1> test byte [preflags], PREOSIZE 595 0000440B 7505 <1> jnz da15 596 0000440D 800E[3789]01 <1> setopt [disflags], DIS_I_NOSIZ 597 <1> da15: 598 00004412 800E[1D89]10 <1> or byte [preused],PRE32D; mark this flag as used 599 00004417 8A26[1C89] <1> mov ah,[presizeflags] 600 0000441B 80E410 <1> and ah,PRE32D ;this will be 10h for dword, 00h for word 601 0000441E EB08 <1> jmp s da17 ;done 602 <1> 603 <1> da16: 604 00004420 88C4 <1> mov ah,al ;OP_8, OP_16, OP_32 or OP_64 (we know which) 605 00004422 80E4F0 <1> and ah,0f0h ;this converts ah to <0 for byte, =0 for word, 606 00004425 80EC70 <1> sub ah,OP_16 ;and >0 for dword (byte=F0h, word=00h, dword=10h, qword=20h) 607 <1> 608 <1> ; Now we know the size (in ah); branch off to do the operand itself. 609 <1> 610 <1> da17: 611 00004428 88C3 <1> mov bl, al 612 0000442A 83E30F <1> and bx, 0Fh ; 8 entries (IMM, RM, M, R_MOD, M_OFFS, R, R_ADD, AX) 613 0000442D D1E3 <1> shl bx, 1 614 0000442F 83FB10 <1> cmp bx, disjmp2.end - disjmp2 615 00004432 7306 <1> jae @F 616 00004434 FF97[5888] <1> call [disjmp2 + bx] ; print out the operand 617 00004438 EB27 <1> jmp short da20 ; done with operand 618 <1> 619 <1> @@: 620 <1> da_internal_error: 621 0000443A BA[6E73] <1> mov dx, msg.uu_internal_error 622 0000443D E8C06D <1> call putsz 623 00004440 E9BDBB <1> jmp cmd3 624 <1> 625 <1> 626 <1> ; Sizeless operands. 627 <1> 628 <1> da18: 629 00004443 98 <1> cbw 630 00004444 93 <1> xchg ax, bx ; bx = index 631 00004445 D1E3 <1> shl bx, 1 632 00004447 8B87[6888] <1> mov ax, [optab + bx] 633 0000444B 83FB48 <1> cmp bx, OP_FIRST_STRING << 1 634 0000444E 720F <1> jb da19 ; if it's not a string 635 00004450 83FB5E <1> cmp bx, OP_AFTER_LAST << 1 636 00004453 73E5 <1> jae @B 637 00004455 E8B10E <1> call dis_stosw_lowercase 638 00004458 84E4 <1> test ah, ah 639 0000445A 7505 <1> jnz da20 ; if it's two characters 640 0000445C 4F <1> dec di 641 0000445D EB02 <1> jmp s da20 ; done with operand 642 <1> 643 <1> da19: 644 0000445F FFD0 <1> call ax ; otherwise, do something else 645 <1> 646 <1> ; Operand done, check if there's another one. 647 <1> da20: 648 00004461 803C00 <1> cmp byte [si], OP_END 649 <1> da_op_end_e: 650 00004464 7410 <1> je da_op_end ; if we're done --> 651 00004466 B02C <1> mov al,',' 652 00004468 AA <1> stosb 653 00004469 F606[DC00]02 <1> testopt [asm_options], disasm_commablank 654 0000446E 7403 <1> jz .nospace 655 00004470 B020 <1> mov al, 32 656 00004472 AA <1> stosb 657 <1> .nospace: 658 00004473 E96AFF <1> jmp da14 ;another operand 659 <1> 660 <1> 661 <1> ; All operands done. Now handle prefixes: 662 <1> ; OPSIZE (66h), ADDRSIZE (67h), WAIT, segment, REP, LOCK 663 <1> da_op_end: 664 <1> 665 <1> ; Now check whether O32 or A32 modifies the opcode. 666 <1> da_modify_opcode_osize_asize: 667 00004476 B90200 <1> mov cx, N_LTABO 668 00004479 BB[CC15] <1> mov bx, ltabo1 669 0000447C BA0200 <1> mov dx, 2*N_LTABO-2 670 0000447F B410 <1> mov ah, PRE32D 671 00004481 E86C00 <1> call da23_osize_asize 672 <1> 673 00004484 B90100 <1> mov cx, N_LTABA 674 00004487 BB[D415] <1> mov bx, ltaba1 675 0000448A BA0000 <1> mov dx, 2*N_LTABA-2 676 0000448D B420 <1> mov ah, PRE32A 677 0000448F E85E00 <1> call da23_osize_asize 678 <1> 679 <1> ; Now check and loop for unused prefixes. 680 <1> da21: 681 00004492 A0[1D89] <1> mov al, [preused] ; = flags that are used 682 00004495 F6D0 <1> not al ; = flags that are not used 683 00004497 2206[1C89] <1> and al, [preflags] ; = flags that are not used but present 684 0000449B 7503E91A01 <1> jz da28 ; if all present flags were used --> 685 <1> 686 000044A0 B90B00 <1> mov cx, N_WTAB 687 000044A3 BB[A015] <1> mov bx, wtab1 688 000044A6 BA1400 <1> mov dx, 2*N_WTAB-2 689 000044A9 B440 <1> mov ah, PREWAIT 690 000044AB 84E0 <1> test al, ah 691 000044AD 7407 <1> jz @F 692 <1> ; if there's a WAIT prefix hanging 693 000044AF E83E00 <1> call da23_wait 694 000044B2 7561 <1> jne disbad2 695 000044B4 EBDC <1> jmp da21 696 <1> 697 <1> @@: 698 000044B6 B420 <1> mov ah, PREASIZE 699 000044B8 84E0 <1> test al, ah 700 000044BA 745C <1> jz da24 ; if it isn't a 67h prefix --> 701 <1> 702 <1> ; check whether ASIZE applies to an implicit operand 703 000044BC 57 <1> push di 704 000044BD 50 <1> push ax 705 000044BE A1[2089] <1> mov ax, [index] 706 000044C1 84E4 <1> test ah, ah 707 000044C3 750D <1> jnz .nota32prfx_nz ; opcode index > FF, not in this list --> 708 000044C5 BF[6411] <1> mov di, a32prfxtab 709 000044C8 AE <1> scasb ; xlatb ? 710 000044C9 7407 <1> je @F ; yes --> (ZR) 711 000044CB 24FE <1> and al, ~1 ; clear the low bit (MOVSW -> MOVSB) 712 000044CD B90700 <1> mov cx, A32P_LEN - 1 713 000044D0 F2AE <1> repne scasb ; scan table (low bit cleared) 714 <1> @@: 715 <1> .nota32prfx_nz: 716 000044D2 58 <1> pop ax 717 000044D3 5F <1> pop di 718 000044D4 753F <1> jne .nota32prfx ; not in the list --> 719 <1> 720 000044D6 0826[1D89] <1> or [preused], ah ; mark it as used 721 000044DA B104 <1> mov cl, 4 ; (ch = 0 because A32P_LEN < 256) 722 000044DC E8420F <1> call moveover ; make space for "A32 " 723 000044DF B84133 <1> mov ax, "A3" 724 000044E2 E8A20D <1> call dis_lowercase ; al = "a" if lowercase option specified 725 000044E5 A3[CA07] <1> mov word [line_out+MNEMONOFS], ax 726 000044E8 C706[CC07]3220 <1> mov word [line_out+MNEMONOFS+2], "2 " 727 <1> _386_PM test byte [presizeflags], PRE32A 728 <1> _386_PM ; do we have 32-bit ASIZE ? 729 <1> _386_PM jnz da21_j0 ; yes, keep a32 (in 16-bit cs) --> 730 <1> _386_PM mov word [line_out + MNEMONOFS + 1], "16" 731 <1> ; no, make it a16 (in 32-bit cs) 732 <1> da21_j0: equ $ 733 000044EE EBA2 <1> jmp s da21 734 <1> 735 <1> .nota32prfx: equ disbad2 736 <1> 737 <1> 738 <1> da23_osize_asize: equ da23 739 <1> 740 <1> da23_wait: 741 <1> %if _PM 742 <1> or byte [presizeflags], ah 743 <1> ; Fake that this flag is set for da23's check. 744 <1> ; If not _PM then presizeflags == preflags and 745 <1> ; PREWAIT is already set in that variable. 746 <1> %endif 747 <1> 748 <1> ; INP: bx -> array of words to match against word [index] 749 <1> ; cx = number of array entries 750 <1> ; ah = preused flag to mark as used if match 751 <1> ; ah = presizeflags flag to check if in use 752 <1> ; dx = offset to add to di -> behind matched word 753 <1> ; OUT: ZR if one of the array entries matched, 754 <1> ; byte [preused] |= INP:ah 755 <1> ; if also flag in byte [presizeflags] was set, 756 <1> ; mnemonic replaced 757 <1> ; NZ if no entry matched 758 <1> ; CHG: ax, cx, si 759 <1> ; 760 <1> ; Note: If this is called with a 32-bit CS then the 761 <1> ; OSIZE/ASIZE value in the byte [preflags] is 762 <1> ; inverted to that in the byte [presizeflags]. 763 <1> ; As we check the latter, for O16/A16 we will 764 <1> ; not modify the mnemonics (keeping the 16-bit 765 <1> ; default mnemonics) but will mark the prefix 766 <1> ; as used by setting the flag in byte [preused]. 767 <1> ; If there is no OSIZE/ASIZE in 32-bit CS then 768 <1> ; the preused flag is also set (which does no 769 <1> ; harm) and the 32-bit mnemonic is selected. 770 <1> ; Operation in 16-bit CS has the same result as 771 <1> ; the prior handling, though it will always 772 <1> ; scan for the affected opcodes, and set the 773 <1> ; preused flag even if no prefix is used. 774 <1> da23: 775 000044F0 57 <1> push di 776 000044F1 89DF <1> mov di, bx 777 000044F3 50 <1> push ax 778 000044F4 A1[2089] <1> mov ax, [index] 779 000044F7 F2AF <1> repne scasw 780 000044F9 58 <1> pop ax 781 000044FA 7517 <1> jne .ret ; if not found in the list --> (NZ) 782 000044FC 0826[1D89] <1> or byte [preused], ah ; mark this (OSIZE, ASIZE or WAIT) prefix as used 783 00004500 8426[1C89] <1> test byte [presizeflags], ah 784 <1> ; is it O32, A32, or is WAIT present ? 785 00004504 740D <1> jz .ret ; no, do not modify mnemonic --> 786 00004506 01D7 <1> add di, dx ; replace the mnemonic with the modified name 787 00004508 8B35 <1> mov si, [di] 788 0000450A 81C6[9C01] <1> add si, mnlist 789 0000450E E8A10D <1> call showop ; copy instruction mnemonic 790 00004511 38C0 <1> cmp al, al ; ZR 791 <1> .ret: 792 00004513 5F <1> pop di 793 00004514 C3 <1> retn 794 <1> 795 <1> 796 <1> da21_j1: equ da21_j0 797 <1> 798 <1> disbad2: 799 00004515 E9F00C <1> jmp disbad 800 <1> 801 <1> da24: 802 00004518 A801 <1> test al, PRESEG 803 0000451A 7434 <1> jz da25 ; if not because of a segment prefix --> 804 0000451C A1[2089] <1> mov ax, [index] 805 0000451F 84E4 <1> test ah, ah 806 00004521 75F2 <1> jnz disbad2 ; if index > 256, it's none of these --> 807 00004523 57 <1> push di 808 00004524 B90900 <1> mov cx, SEGP_LEN 809 00004527 BF[5C11] <1> mov di, segprfxtab 810 0000452A F2AE <1> repne scasb 811 0000452C 5F <1> pop di 812 0000452D 75E6 <1> jne disbad2 ; if it's not on the list --> 813 0000452F B90300 <1> mov cx, 3 814 00004532 E8EC0E <1> call moveover 815 00004535 57 <1> push di 816 00004536 BF[CA07] <1> mov di, line_out+MNEMONOFS 817 00004539 E8CA0D <1> call showseg ; show segment register 818 0000453C B03A <1> mov al, ':' 819 0000453E F606[DC00]04 <1> testopt [asm_options], disasm_nasm 820 00004543 7402 <1> jz .notnasm 821 00004545 B020 <1> mov al, 32 822 <1> .notnasm: 823 00004547 AA <1> stosb 824 00004548 5F <1> pop di 825 00004549 800E[1D89]01 <1> or byte [preused], PRESEG ; mark it as used 826 <1> da21_j2: 827 0000454E EB9E <1> jmp s da21_j1 828 <1> 829 <1> da25: 830 00004550 A802 <1> test al, PREREP 831 00004552 7435 <1> jz da26 ; if not a REP prefix 832 00004554 2406 <1> and al, PREREP|PREREPZ 833 00004556 0806[1D89] <1> or [preused], al 834 0000455A A1[2089] <1> mov ax, [index] 835 0000455D 84E4 <1> test ah, ah 836 0000455F 7525 <1> jnz disbad3 ; if not in the first 256 bytes 837 00004561 24FE <1> and al, ~1 ; clear the low bit (MOVSW -> MOVSB) 838 00004563 57 <1> push di 839 00004564 BF[6511] <1> mov di, replist 840 00004567 B90500 <1> mov cx, REP_SAME_LEN; scan those for REP first 841 0000456A F2AE <1> repne scasb 842 0000456C BE[B909] <1> mov si, mnlist+MN_REP 843 0000456F 7439 <1> je da27 ; if one of the REP instructions --> 844 00004571 B102 <1> mov cl, REP_DIFF_LEN; (ch = 0) 845 00004573 F2AE <1> repne scasb 846 00004575 750F <1> jne disbad3 ; if not one of the REPE/REPNE instructions 847 00004577 BE[CB09] <1> mov si, mnlist+MN_REPE 848 0000457A F606[1D89]04 <1> test byte [preused], PREREPZ 849 0000457F 7529 <1> jnz da27 ; if REPE 850 00004581 BE[D109] <1> mov si, mnlist+MN_REPNE 851 00004584 EB24 <1> jmp s da27 ; it's REPNE 852 <1> 853 <1> disbad3: 854 00004586 E97F0C <1> jmp disbad 855 <1> 856 <1> da26: 857 00004589 A808 <1> test al, PRELOCK 858 0000458B 74F9 <1> jz disbad3 ; if not a lock prefix, either --> 859 0000458D 57 <1> push di 860 0000458E A1[2089] <1> mov ax, [index] 861 00004591 BF[D815] <1> mov di, locktab 862 00004594 B92E00 <1> mov cx, N_LOCK 863 00004597 F2AF <1> repne scasw 864 00004599 75EB <1> jne disbad3 ; if not in the approved list --> 865 0000459B F606[1D89]01 <1> test byte [preused], PRESEG 866 000045A0 74E4 <1> jz disbad3 ; if memory was not accessed --> 867 000045A2 BE[9507] <1> mov si, mnlist+MN_LOCK 868 000045A5 800E[1D89]08 <1> or byte [preused], PRELOCK 869 <1> 870 <1> ; Slip in another mnemonic (REP or LOCK). 871 <1> ; SI = offset of mnemonic, what should be 872 <1> ; DI is on the stack. 873 <1> 874 <1> da27: 875 000045AA 5F <1> pop di 876 000045AB B90800 <1> mov cx, 8 877 000045AE 56 <1> push si 878 000045AF E86F0E <1> call moveover 879 000045B2 5E <1> pop si 880 000045B3 57 <1> push di 881 000045B4 E8FB0C <1> call showop 882 000045B7 5F <1> pop di 883 000045B8 EB94 <1> jmp s da21_j2 884 <1> 885 <1> ; Done with instruction. Erase the size indicator, if appropriate. 886 <1> 887 <1> da28: 888 000045BA 8B0E[3A89] <1> mov cx, [sizeloc] 889 000045BE E324 <1> jcxz da28b ;if there was no size given 890 000045C0 A0[3689] <1> mov al,[disflags] 891 000045C3 A810 <1> test al,DIS_I_SHOWSIZ 892 000045C5 751D <1> jnz da28b ;if we need to show the size 893 000045C7 A820 <1> test al,DIS_I_KNOWSIZ 894 000045C9 7419 <1> jz da28b ;if the size is not known already 895 000045CB 87CF <1> xchg cx,di 896 000045CD 89FE <1> mov si,di ;save old di 897 000045CF B020 <1> mov al, 32 898 <1> da28a: 899 000045D1 AE <1> scasb ;skip size name 900 000045D2 75FD <1> jne da28a ;if not done yet 901 <1> ;(The above is the same as repne scasb, but 902 <1> ;has no effect on cx.) 903 000045D4 F606[DC00]04 <1> testopt [asm_options], disasm_nasm 904 000045D9 7503 <1> jnz .nasm 905 000045DB 83C704 <1> add di, byte 4 ;skip 'PTR ' 906 <1> .nasm: 907 000045DE 87F7 <1> xchg si,di 908 000045E0 29F1 <1> sub cx,si 909 000045E2 F3A4 <1> rep movsb ;move the line 910 <1> 911 <1> ; Now we're really done. Print out the bytes on the left. 912 <1> 913 <1> da28b: 914 000045E4 57 <1> push di ;print start of disassembly line 915 000045E5 BF[AE07] <1> mov di,line_out 916 000045E8 A1[580B] <1> mov ax,[u_addr + saSegSel] 917 <1> ; print address 918 000045EB E85F68 <1> call hexword 919 000045EE B03A <1> mov al,':' 920 000045F0 AA <1> stosb 921 <1> _386_PM_o32 ; mov eax, dword [u_addr] 922 000045F1 A1[540B] <1> mov ax, word [u_addr] 923 <1> %if _PM 924 <1> test byte [bCSAttr], 40h 925 <1> jz .16 926 <1> call hexword_high 927 <1> .16: 928 <1> %endif 929 000045F4 E85668 <1> call hexword 930 000045F7 B020 <1> mov al, 32 931 000045F9 AA <1> stosb 932 000045FA 8B1E[1889] <1> mov bx, [dis_n] 933 <1> da28c: 934 000045FE BE[C907] <1> mov si,line_out+MNEMONOFS - 1 935 00004601 29FE <1> sub si, di 936 00004603 D1EE <1> shr si, 1 937 00004605 39F3 <1> cmp bx, si 938 00004607 7619 <1> jbe da29 ; if it's a short instruction which fits in one line 939 00004609 29F3 <1> sub bx, si 940 0000460B 53 <1> push bx 941 0000460C 89F3 <1> mov bx, si 942 0000460E 57 <1> push di 943 0000460F E8F90D <1> call disshowbytes 944 00004612 E87068 <1> call putsline_crlf 945 00004615 59 <1> pop cx 946 00004616 5B <1> pop bx 947 00004617 BF[AE07] <1> mov di, line_out 948 0000461A 29F9 <1> sub cx, di 949 0000461C B020 <1> mov al, 32 950 0000461E F3AA <1> rep stosb 951 00004620 EBDC <1> jmp short da28c 952 <1> da29: 953 00004622 E8E60D <1> call disshowbytes 954 <1> da30: 955 00004625 B020 <1> mov al, 32 ; pad to op code 956 00004627 B9[CA07] <1> mov cx,line_out+MNEMONOFS 957 0000462A 29F9 <1> sub cx,di 958 0000462C 7202 <1> jc da30_1 959 0000462E F3AA <1> rep stosb 960 <1> da30_1: 961 00004630 5F <1> pop di 962 00004631 F606[3689]08 <1> test byte [disflags],DIS_I_UNUSED 963 00004636 740D <1> jz da32 ; if we don't print ` (unused)' 964 00004638 BE[EB7C] <1> mov si,unused 965 0000463B 807DFF20 <1> cmp byte [di-1], 32 966 0000463F 7501 <1> jne da31 ; if there's already a space here 967 00004641 46 <1> inc si 968 <1> da31: 969 00004642 E86967 <1> call showstring 970 <1> 971 <1> ; Print info on minimal processor needed. 972 <1> 973 <1> da32: 974 00004645 A0[2283] <1> mov al, [dismach] 975 00004648 3A06[E00B] <1> cmp al, [maxmachinetype] 976 0000464C 7603 <1> jbe @F 977 0000464E A2[E00B] <1> mov [maxmachinetype], al 978 <1> @@: 979 00004651 57 <1> push di 980 00004652 BF[2289] <1> mov di, obsinst 981 00004655 8B0E[2089] <1> mov cx, word [index] 982 00004659 E8230D <1> call showmach ;show the machine type, if needed 983 0000465C 5F <1> pop di 984 0000465D E30F <1> jcxz da32f_j1 ; if no message --> 985 <1> 986 <1> ; Print a message on the far right. 987 <1> 988 <1> da32_tabto: 989 0000465F B8[FD07] <1> mov ax, line_out+79 990 00004662 29C8 <1> sub ax, cx 991 00004664 51 <1> push cx 992 00004665 E80268 <1> call tab_to ; tab out to the location 993 00004668 59 <1> pop cx 994 00004669 F3A4 <1> rep movsb ; copy the string 995 <1> da32z_j1: 996 0000466B E96302 <1> jmp da32z ; done 997 <1> 998 <1> da32f_j1: 999 0000466E EB72 <1> jmp da32f 1000 <1> 1001 <1> %if _COND 1002 <1> ; Try dumping a condition status. 1003 <1> da32_cond: 1004 <1> %if _COND_RDUMP_ONLY 1005 00004670 A802 <1> test al, DIS_F_SHOW ; (! DIS_F_SHOW|DIS_I_SHOW is negated here) 1006 00004672 75F7 <1> jnz da32z_j1 ; not showing conditionals message --> 1007 <1> %endif 1008 00004674 8B36[3C89] <1> mov si, word [condmsg] 1009 00004678 85F6 <1> test si, si ; stored a message here ? 1010 0000467A 74EF <1> jz da32z_j1 ; no --> 1011 0000467C 57 <1> push di 1012 0000467D 89F7 <1> mov di, si 1013 0000467F B9FFFF <1> mov cx, -1 1014 00004682 31C0 <1> xor ax, ax 1015 00004684 F2AE <1> repne scasb 1016 00004686 F7D1 <1> not cx 1017 00004688 49 <1> dec cx ; get string length 1018 00004689 5F <1> pop di 1019 0000468A EBD3 <1> jmp short da32_tabto 1020 <1> %else 1021 <1> da32_cond: equ da32z_j1 1022 <1> %endif 1023 <1> 1024 <1> da32_xlatb: 1025 0000468C A802 <1> test al, DIS_F_SHOW ; (! DIS_F_SHOW|DIS_I_SHOW is negated here) 1026 0000468E 75E0 <1> jnz da32_cond 1027 00004690 803E[2D89]03 <1> _no386 cmp byte [segmnt], 3 1028 00004695 77D9 <1> _no386 ja da32_cond ; if FS or GS on non-386 --> (invalid) 1029 00004697 F606[1C89]20 <1> _no386 test byte [presizeflags], PRE32A 1030 0000469C 75D2 <1> _no386 jnz da32_cond 1031 0000469E 803E[2D89]05 <1> cmp byte [segmnt], 5 1032 000046A3 77CB <1> ja da32_cond ; if invalid segment --> 1033 000046A5 813E[2089]D700 <1> cmp word [index], 0D7h ; xlatb ? 1034 000046AB 75C3 <1> jne da32_cond 1035 000046AD A1[600C] <1> mov ax, word [reg_ebx] 1036 000046B0 A3[3089] <1> mov word [addrr], ax 1037 000046B3 A1[620C] <1> mov ax, word [reg_ebx + 2] 1038 000046B6 A3[3289] <1> mov word [addrr + 2], ax; get address in (e)bx 1039 000046B9 A0[5C0C] <1> mov al, byte [reg_eax] 1040 000046BC 0006[3089] <1> add byte [addrr], al 1041 000046C0 8016[3189]00 <1> adc byte [addrr + 1], 0 1042 000046C5 8316[3289]00 <1> adc word [addrr + 2], 0 ; add al 1043 000046CA C606[2C89]80 <1> mov byte [rmsize], 80h ; byte size 1044 <1> %if _MEMREF_AMOUNT 1045 000046CF 800E[3789]10 <1> setopt [disflags], DIS_I_M_SRC 1046 <1> %endif 1047 000046D4 F606[1C89]20 <1> test byte [presizeflags], PRE32A 1048 000046D9 7425 <1> jz @F 1049 000046DB 800E[3789]08 <1> setopt [disflags], DIS_I_SHOW_A32 1050 <1> ; set flag if 32-bit 1051 000046E0 EB1E <1> jmp @F 1052 <1> 1053 <1> 1054 <1> ; Dump referenced memory location. 1055 <1> 1056 <1> da32f: 1057 000046E2 A0[3689] <1> mov al,[disflags] 1058 000046E5 3406 <1> xor al, DIS_F_SHOW | DIS_I_SHOW 1059 000046E7 A886 <1> test al, DIS_F_SHOW | DIS_I_SHOW | DIS_I_DONTSHOW 1060 <1> ; (NZ if either _SHOW is clear, or _DONTSHOW is set) 1061 000046E9 75A1 <1> jnz da32_xlatb ; if there is no memory location to show --> 1062 000046EB 803E[2D89]03 <1> _no386 cmp byte [segmnt], 3 1063 000046F0 779A <1> _no386 ja da32_xlatb ; if FS or GS on non-386 --> (invalid) 1064 000046F2 F606[3789]08 <1> _no386 testopt [disflags], DIS_I_SHOW_A32 1065 000046F7 7593 <1> _no386 jnz da32_xlatb 1066 000046F9 803E[2D89]05 <1> cmp byte [segmnt], 5 1067 000046FE 778C <1> ja da32_xlatb ; if invalid segment --> 1068 <1> @@: 1069 <1> %if _PM 1070 <1> push ax 1071 <1> %endif 1072 00004700 A0[2D89] <1> mov al, [segmnt] ; segment number 1073 00004703 98 <1> cbw 1074 00004704 D1E0 <1> shl ax, 1 1075 00004706 93 <1> xchg ax, bx ; mov bx, ax 1076 00004707 8B9F[9889] <1> mov bx, [segrgaddr + bx]; get address of value 1077 <1> %if _PM 1078 <1> pop ax 1079 <1> call ispm 1080 <1> jnz @F ; if 86 Mode, all segments readable --> 1081 <1> [cpu 286] 1082 <1> verr word [bx] 1083 <1> jnz da32_cond ; (NOT to da32_xlatb) 1084 <1> __CPU__ 1085 <1> @@: 1086 <1> %endif 1087 0000470B 53 <1> push bx 1088 <1> %if _MEMREF_AMOUNT 1089 0000470C FF37 <1> push word [bx] ; = segment/selector value 1090 0000470E E81508 <1> call get_free_memref ; memrefs + bx -> the memref structure 1091 00004711 8F87[D888] <1> pop word [memrefs + bx + mrSegmentSelector] 1092 00004715 808F[DA88]02 <1> or byte [memrefs + bx + mrFlags], mrfMem 1093 0000471A F606[3789]10 <1> testopt [disflags], DIS_I_M_SRC 1094 0000471F 7405 <1> jz @F 1095 00004721 808F[DA88]04 <1> or byte [memrefs + bx + mrFlags], mrfMemSource 1096 <1> @@: 1097 00004726 F606[3789]20 <1> testopt [disflags], DIS_I_M_DST 1098 0000472B 7405 <1> jz @F 1099 0000472D 808F[DA88]08 <1> or byte [memrefs + bx + mrFlags], mrfMemDest 1100 <1> @@: 1101 <1> %endif 1102 <1> 1103 00004732 B8[F407] <1> mov ax, line_out + 79 - 9 1104 <1> ; 9 is composed of: 1105 <1> ; 1 additional blank (added to the one that is 1106 <1> ; already given by tab_to in any case) 1107 <1> ; 3 segreg name + colon 1108 <1> ; 4 low word offset 1109 <1> ; 1 equals sign 1110 <1> ; 79 means we write to the very right of an 80-columns 1111 <1> ; display, up to the second-to-last column. 1112 00004735 B90200 <1> mov cx, 2 ; if byte then content uses 2 digits 1113 <1> %if _MEMREF_AMOUNT 1114 00004738 C687[DC88]01 <1> mov byte [memrefs + bx + mrLength], 1 1115 <1> ; if byte then length = 1 1116 <1> %endif 1117 0000473D 803E[2C89]00 <1> cmp byte [rmsize],0 1118 00004742 7C10 <1> jl da32h ; if byte 1119 00004744 7408 <1> jz da32g ; if word 1120 <1> %if _MEMREF_AMOUNT 1121 00004746 8087[DC88]02 <1> add byte [memrefs + bx + mrLength], 2 1122 <1> ; add 2 bytes to length for high half of dword 1123 <1> %endif 1124 0000474B 83C104 <1> add cx, byte 4 ; add 4 digits for high half of dword 1125 <1> da32g: 1126 <1> %if _MEMREF_AMOUNT 1127 0000474E FE87[DC88] <1> inc byte [memrefs + bx + mrLength] 1128 <1> ; add 1 byte to length for the high byte 1129 <1> %endif 1130 00004752 41 <1> inc cx 1131 00004753 41 <1> inc cx ; add 2 digits for the high byte 1132 <1> da32h: 1133 00004754 F606[3789]04 <1> testopt [disflags], DIS_I_DOUBLE_M 1134 00004759 740B <1> jz @F 1135 <1> %if _MEMREF_AMOUNT 1136 0000475B 8A97[DC88] <1> mov dl, byte [memrefs + bx + mrLength] 1137 0000475F 0097[DC88] <1> add byte [memrefs + bx + mrLength], dl 1138 <1> ; double the amount of bytes 1139 <1> %endif 1140 00004763 01C9 <1> add cx, cx ; double the amount of digits 1141 00004765 41 <1> inc cx ; plus one slot for the comma 1142 <1> @@: 1143 00004766 F606[3789]02 <1> testopt [disflags], DIS_I_FAR_M 1144 0000476B 7408 <1> jz @F 1145 <1> %if _MEMREF_AMOUNT 1146 0000476D 8087[DC88]02 <1> add byte [memrefs + bx + mrLength], 2 1147 <1> ; add 2 bytes to the length for the segment 1148 <1> %endif 1149 00004772 83C105 <1> add cx, 5 ; 4 digits for segment plus 1 colon 1150 <1> @@: 1151 <1> %if _MEMREF_AMOUNT 1152 00004775 FF36[3089] <1> push word [addrr] 1153 00004779 8F87[D488] <1> pop word [memrefs + bx + mrOffset] 1154 <1> %endif 1155 0000477D F606[3789]08 <1> testopt [disflags], DIS_I_SHOW_A32 1156 00004782 7410 <1> jz @F 1157 <1> %if _MEMREF_AMOUNT 1158 00004784 FF36[3289] <1> push word [addrr + 2] 1159 00004788 8F87[D688] <1> pop word [memrefs + bx + mrOffset + 2] 1160 0000478C 808F[DA88]10 <1> or byte [memrefs + bx + mrFlags], mrfA32 1161 <1> %endif 1162 00004791 83C104 <1> add cx, 4 ; add 4 digits for high word offset 1163 <1> @@: 1164 <1> %if _MEMREF_AMOUNT 1165 00004794 E8AA07 <1> call calc_linear_memref_and_mark_nonfree 1166 <1> %endif 1167 00004797 29C8 <1> sub ax, cx 1168 00004799 E8CE66 <1> call tab_to ; CHG: ax, bx, cx, dx, di 1169 0000479C B020 <1> mov al, 32 1170 0000479E AA <1> stosb 1171 0000479F E8580B <1> call showseg_uppercase_ax 1172 <1> ; ax = segment register name 1173 000047A2 E8F40A <1> call dis_lowercase_refmem_w 1174 000047A5 AB <1> stosw 1175 000047A6 B03A <1> mov al, ':' 1176 000047A8 AA <1> stosb 1177 000047A9 F606[3789]08 <1> testopt [disflags], DIS_I_SHOW_A32 1178 000047AE 7406 <1> jz @F 1179 000047B0 A1[3289] <1> mov ax, [addrr + 2] 1180 000047B3 E89766 <1> call hexword ; show high word of offset 1181 <1> @@: 1182 000047B6 A1[3089] <1> mov ax, [addrr] 1183 000047B9 E89166 <1> call hexword ; show offset 1184 000047BC B03D <1> mov al,'=' 1185 000047BE AA <1> stosb 1186 000047BF 5B <1> pop bx 1187 000047C0 06 <1> push es 1188 000047C1 8E07 <1> mov es, [bx] 1189 000047C3 66 <1> _386_o32 1190 000047C4 8B1E[3089] <1> mov bx, [addrr] 1191 <1> 1192 000047C8 F606[3789]02 <1> testopt [disflags], DIS_I_FAR_M 1193 000047CD 743D <1> jz .no_far_m 1194 000047CF BE0100 <1> mov si, 1 1195 000047D2 803E[2C89]00 <1> cmp byte [rmsize], 0 1196 000047D7 7C08 <1> jl @F 1197 000047D9 BE0200 <1> mov si, 2 1198 000047DC 7403 <1> jz @F 1199 000047DE BE0400 <1> mov si, 4 1200 <1> @@: 1201 000047E1 F606[3789]08 <1> testopt [disflags], DIS_I_SHOW_A32 1202 000047E6 7411 <1> jz @F 1203 <1> [cpu 386] 1204 000047E8 660FB7F6 <1> movzx esi, si 1205 000047EC 26678A0433 <1> mov al, byte [es:ebx + esi] 1206 000047F1 26678A643301 <1> mov ah, byte [es:ebx + esi + 1] 1207 <1> __CPU__ 1208 000047F7 EB07 <1> jmp @FF 1209 <1> @@: 1210 000047F9 268A00 <1> mov al, byte [es:bx + si] 1211 000047FC 268A6001 <1> mov ah, byte [es:bx + si + 1] 1212 <1> @@: 1213 00004800 8CC6 <1> mov si, es 1214 00004802 07 <1> pop es 1215 00004803 06 <1> push es 1216 00004804 E84666 <1> call hexword 1217 00004807 B03A <1> mov al, ':' 1218 00004809 AA <1> stosb 1219 0000480A 8EC6 <1> mov es, si 1220 <1> .no_far_m: 1221 <1> 1222 0000480C 8CC6 <1> mov si, es 1223 0000480E F606[3789]08 <1> testopt [disflags], DIS_I_SHOW_A32 1224 00004813 741E <1> jz @F 1225 <1> [cpu 386] 1226 00004815 26678A03 <1> mov al, [es:ebx] ; avoid a "mov ax,[-1]" 1227 00004819 803E[2C89]00 <1> cmp byte [rmsize], 0 1228 0000481E 7C38 <1> jl .displaybyte ; if byte --> 1229 00004820 26678A6301 <1> mov ah, [es:ebx + 1] 1230 00004825 742B <1> jz .displayword ; if word --> 1231 00004827 26678A5302 <1> mov dl, [es:ebx + 2] ; avoid a "mov dx,[-1]" 1232 0000482C 26678A7303 <1> mov dh, [es:ebx + 3] 1233 <1> __CPU__ 1234 00004831 EB18 <1> jmp .displaydword ; is dword --> 1235 <1> @@: 1236 00004833 268A07 <1> mov al, [es:bx] ; avoid a "mov ax,[-1]" 1237 00004836 803E[2C89]00 <1> cmp byte [rmsize], 0 1238 0000483B 7C1B <1> jl .displaybyte ; if byte 1239 0000483D 268A6701 <1> mov ah, [es:bx + 1] 1240 00004841 740F <1> jz .displayword ; if word 1241 00004843 268A5702 <1> mov dl, [es:bx + 2] ; avoid a "mov dx,[-1]" 1242 00004847 268A7703 <1> mov dh, [es:bx + 3] 1243 <1> .displaydword: 1244 0000484B 07 <1> pop es 1245 0000484C 92 <1> xchg ax, dx 1246 0000484D E8FD65 <1> call hexword 1247 00004850 92 <1> xchg ax, dx 1248 00004851 A8 <1> db __TEST_IMM8 ; (skip pop) 1249 <1> .displayword: 1250 00004852 07 <1> pop es 1251 00004853 E8F765 <1> call hexword 1252 00004856 EB04 <1> jmp short .displayed ; done 1253 <1> .displaybyte: 1254 00004858 07 <1> pop es 1255 00004859 E8F865 <1> call hexbyte ; display byte 1256 <1> .displayed: 1257 <1> 1258 0000485C F606[3789]04 <1> testopt [disflags], DIS_I_DOUBLE_M 1259 00004861 746E <1> jz .no_double_m 1260 <1> 1261 00004863 B02C <1> mov al, ',' 1262 00004865 AA <1> stosb 1263 <1> 1264 00004866 06 <1> push es 1265 00004867 8EC6 <1> mov es, si 1266 <1> 1267 00004869 BE0100 <1> mov si, 1 1268 0000486C 803E[2C89]00 <1> cmp byte [rmsize], 0 1269 00004871 7C08 <1> jl @F 1270 00004873 BE0200 <1> mov si, 2 1271 00004876 7403 <1> jz @F 1272 00004878 BE0400 <1> mov si, 4 1273 <1> @@: 1274 0000487B F606[3789]08 <1> testopt [disflags], DIS_I_SHOW_A32 1275 00004880 7426 <1> jz @F 1276 <1> [cpu 386] 1277 00004882 660FB7F6 <1> movzx esi, si 1278 00004886 26678A0433 <1> mov al, [es:ebx + esi] ; avoid a "mov ax,[-1]" 1279 0000488B 803E[2C89]00 <1> cmp byte [rmsize], 0 1280 00004890 7C3B <1> jl .double_displaybyte ; if byte --> 1281 00004892 26678A643301 <1> mov ah, [es:ebx + esi + 1] 1282 00004898 742D <1> jz .double_displayword ; if word --> 1283 0000489A 26678A543302 <1> mov dl, [es:ebx + esi + 2] 1284 <1> ; avoid a "mov dx,[-1]" 1285 000048A0 26678A743303 <1> mov dh, [es:ebx + esi + 3] 1286 <1> __CPU__ 1287 000048A6 EB18 <1> jmp .double_displaydword 1288 <1> @@: 1289 000048A8 268A00 <1> mov al, [es:bx + si] ; avoid a "mov ax,[-1]" 1290 000048AB 803E[2C89]00 <1> cmp byte [rmsize], 0 1291 000048B0 7C1B <1> jl .double_displaybyte ; if byte --> 1292 000048B2 268A6001 <1> mov ah, [es:bx + si + 1] 1293 000048B6 740F <1> jz .double_displayword ; if word --> 1294 000048B8 268A5002 <1> mov dl, [es:bx + si + 2]; avoid a "mov dx,[-1]" 1295 000048BC 268A7003 <1> mov dh, [es:bx + si + 3] 1296 <1> .double_displaydword: 1297 000048C0 07 <1> pop es 1298 000048C1 92 <1> xchg ax, dx 1299 000048C2 E88865 <1> call hexword 1300 000048C5 92 <1> xchg ax, dx 1301 000048C6 A8 <1> db __TEST_IMM8 ; (skip pop) 1302 <1> .double_displayword: 1303 000048C7 07 <1> pop es 1304 000048C8 E88265 <1> call hexword 1305 000048CB EB04 <1> jmp short .double_displayed 1306 <1> .double_displaybyte: 1307 000048CD 07 <1> pop es 1308 000048CE E88365 <1> call hexbyte ; display byte 1309 <1> .double_displayed: 1310 <1> .no_double_m: 1311 <1> 1312 <1> da32z: 1313 000048D1 E8A965 <1> call trimputs ; done with operand list 1314 <1> 1315 <1> %if _MEMREF_AMOUNT 1316 <1> set_string_memref: 1317 000048D4 A1[2089] <1> mov ax, [index] 1318 000048D7 84E4 <1> test ah, ah 1319 000048D9 7403E9F100 <1> jnz .none 1320 000048DE BF[2711] <1> mov di, ppbytes.string ; list of string opcodes 1321 000048E1 B90E00 <1> mov cx, ppbytes.string_amount 1322 000048E4 F2AE <1> repne scasb 1323 000048E6 7403E9E400 <1> jne .none ; if not one of these --> 1324 <1> ; last entries are: 0A6h,0A7h,0AEh,0AFh 1325 <1> ; corresponding to cmpsb, cmpsw/d, scasb, scasw/d 1326 <1> ; so cx = 0 means scasw, = 1 scasb, = 2 cmpsw, = 3 cmpsb 1327 000048EB 8A451F <1> mov al,byte [di+PPLEN-1]; get corresponding byte in ppinfo 1328 <1> 1329 000048EE 31D2 <1> xor dx, dx 1330 000048F0 FF36[640C] <1> push word [reg_ecx] 1331 000048F4 8F06[1489] <1> pop word [string_memref_counter] 1332 000048F8 F606[1C89]20 <1> test byte [presizeflags], PRE32A 1333 000048FD 7404 <1> jz @F ; if 16-bit addressing --> 1334 000048FF 8B16[660C] <1> mov dx, [reg_ecx + 2] ; = ecxh value 1335 <1> @@: 1336 00004903 8916[1689] <1> mov word [string_memref_counter + 2], dx 1337 <1> 1338 00004907 80F904 <1> cmp cl, 4 ; repetition differs for memory content ? 1339 0000490A 737B <1> jae @F ; no --> 1340 0000490C F606[1C89]02 <1> test byte [preflags], PREREP 1341 00004911 7474 <1> jz @F ; if not repeated --> 1342 <1> 1343 00004913 01C9 <1> add cx, cx ; 0 = scasd, 2 = scasb, 4 = cmpsd, 6 = cmpsb 1344 00004915 F606[1C89]10 <1> test byte [presizeflags], PRE32D 1345 0000491A 7501 <1> jnz .iso32 1346 0000491C 41 <1> inc cx ; point to word entry, not dword 1347 <1> .iso32: 1348 <1> 1349 0000491D 01C9 <1> add cx, cx ; table entries are words, so 0..14 1350 <1> 1351 0000491F F606[1C89]04 <1> test byte [preflags], PREREPZ 1352 00004924 7403 <1> jz .isrepne 1353 00004926 83C110 <1> add cx, simulate_rep_sca_cmp.table_repe_offset 1354 <1> ; from 0..14 to 16..30 1355 <1> .isrepne: 1356 <1> 1357 00004929 89CB <1> mov bx, cx ; = index into table 1358 0000492B 8B97[D889] <1> mov dx, word [bx + simulate_rep_sca_cmp.table] 1359 <1> ; function to call 1360 0000492F F606[1C89]20 <1> test byte [presizeflags], PRE32A 1361 00004934 7401 <1> jz .isa16 ; if 16-bit addressing --> 1362 00004936 4A <1> dec dx ; a32 prefix is 1 byte lower than table entry 1363 <1> .isa16: 1364 <1> 1365 00004937 66 <1> _386_o32 1366 00004938 8B36[740C] <1> mov si, word [reg_esi] 1367 0000493C 66 <1> _386_o32 1368 0000493D 8B3E[780C] <1> mov di, word [reg_edi] 1369 00004941 66 <1> _386_o32 1370 00004942 8B0E[640C] <1> mov cx, word [reg_ecx] 1371 00004946 8E06[800C] <1> mov es, word [reg_es] 1372 0000494A 50 <1> push ax 1373 0000494B A810 <1> test al, PP_STRSRC ; cmps ? 1374 0000494D 740D <1> jz .issca ; no, no need to load ds --> 1375 <1> 1376 0000494F A0[2D89] <1> mov al, [segmnt] ; segment number 1377 00004952 98 <1> cbw 1378 00004953 D1E0 <1> shl ax, 1 1379 00004955 93 <1> xchg ax, bx ; mov bx, ax 1380 00004956 8B9F[9889] <1> mov bx, word [segrgaddr + bx] 1381 <1> ; si = address of segment/selector reg 1382 0000495A 8E1F <1> mov ds, [bx] 1383 <1> 1384 <1> .issca: 1385 0000495C 66 <1> _386_o32 1386 0000495D 36A1[5C0C] <1> mov ax, word [ss:reg_eax] 1387 <1> 1388 00004961 36F606[990C]04 <1> testopt [ss:reg_efl], 400h 1389 <1> ; DF set ? 1390 00004967 7401 <1> jz .up 1391 00004969 FD <1> std 1392 <1> .up: 1393 0000496A FFD2 <1> call dx ; simulate the repeated string op 1394 0000496C FC <1> cld 1395 0000496D 16 <1> push ss 1396 0000496E 1F <1> pop ds 1397 0000496F 16 <1> push ss 1398 00004970 07 <1> pop es 1399 <1> 1400 00004971 6651 <1> _386 push ecx 1401 00004973 59 <1> _386 pop cx 1402 00004974 5A <1> _386 pop dx 1403 <1> 1404 00004975 F606[1C89]20 <1> _386 test byte [presizeflags], PRE32A 1405 0000497A 7502 <1> _386 jnz .count32 ; if 32-bit addressing --> 1406 0000497C 31D2 <1> xor dx, dx 1407 <1> .count32: 1408 0000497E 290E[1489] <1> sub word [string_memref_counter], cx 1409 00004982 1916[1689] <1> sbb word [string_memref_counter + 2], dx 1410 <1> 1411 00004986 58 <1> pop ax 1412 <1> @@: 1413 <1> 1414 00004987 A810 <1> test al, PP_STRSRC 1415 00004989 7429 <1> jz .no_src 1416 <1> 1417 0000498B 803E[2D89]03 <1> _no386 cmp byte [segmnt], 3 1418 00004990 7722 <1> _no386 ja .no_src ; if FS or GS on non-386 --> (invalid) 1419 00004992 803E[2D89]05 <1> cmp byte [segmnt], 5 1420 00004997 771B <1> ja .no_src ; if invalid segment --> 1421 <1> 1422 00004999 50 <1> push ax 1423 0000499A A0[2D89] <1> mov al, [segmnt] ; segment number 1424 0000499D 98 <1> cbw 1425 0000499E D1E0 <1> shl ax, 1 1426 000049A0 93 <1> xchg ax, bx ; mov bx, ax 1427 000049A1 58 <1> pop ax 1428 000049A2 8BB7[9889] <1> mov si, word [segrgaddr + bx] 1429 <1> ; si = address of segment/selector reg 1430 000049A6 BF[740C] <1> mov di, reg_esi ; di = address of offset reg 1431 000049A9 E8D305 <1> call init_string_memref 1432 <1> @@: ; entry: set memref to string source and mark 1433 <1> ; (jump to .none afterwards if al is zero) 1434 000049AC 808F[DA88]60 <1> or byte [memrefs + bx + mrFlags], mrfString | mrfStringSource 1435 000049B1 E88D05 <1> call calc_linear_memref_and_mark_nonfree 1436 <1> 1437 <1> .no_src: 1438 000049B4 A828 <1> test al, PP_STRDEST | PP_STRSRC2 1439 000049B6 7417 <1> jz .none 1440 000049B8 BE[800C] <1> mov si, reg_es ; si = address of segment/selector reg 1441 000049BB BF[780C] <1> mov di, reg_edi ; di = address of offset reg 1442 000049BE E8BE05 <1> call init_string_memref 1443 000049C1 A808 <1> test al, PP_STRSRC2 ; alternative string source ? 1444 000049C3 B000 <1> mov al, 0 ; (cause conditional branch to jump) 1445 000049C5 75E5 <1> jnz @B ; yes, set as string source --> 1446 000049C7 808F[DA88]A0 <1> or byte [memrefs + bx + mrFlags], mrfString | mrfStringDest 1447 000049CC E87205 <1> call calc_linear_memref_and_mark_nonfree 1448 <1> 1449 <1> .none: 1450 <1> 1451 <1> %if _SYMBOLIC 1452 <1> display_symbol_memrefs: 1453 <1> mov cx, [memrefs.free] 1454 <1> test cx, cx 1455 <1> jz .none_memref 1456 <1> 1457 <1> xor si, si 1458 <1> .loop_memref: 1459 <1> push cx 1460 <1> push si 1461 <1> 1462 <1> mov bx, si 1463 <1> call get_memref_index_bx 1464 <1> mov ax, word [memrefs + bx + mrFlags] 1465 <1> mov dx, msg.memrefs_branchdirect 1466 <1> test al, mrfBranchDirect 1467 <1> jnz .gotmsg 1468 <1> 1469 <1> test byte [disflags], DIS_F_SHOW 1470 <1> jz .next_memref 1471 <1> 1472 <1> mov dx, msg.memrefs_stringsource 1473 <1> test al, mrfStringSource 1474 <1> jnz .gotmsg 1475 <1> mov dx, msg.memrefs_stringdest 1476 <1> test al, mrfStringDest 1477 <1> jnz .gotmsg 1478 <1> mov dl, al 1479 <1> and dl, mrfMemSource | mrfMemDest 1480 <1> cmp dl, mrfMemSource | mrfMemDest 1481 <1> mov dx, msg.memrefs_memsourcedest 1482 <1> je .gotmsg 1483 <1> mov dx, msg.memrefs_memsource 1484 <1> test al, mrfMemSource 1485 <1> jnz .gotmsg 1486 <1> mov dx, msg.memrefs_memdest 1487 <1> test al, mrfMemDest 1488 <1> jnz .gotmsg 1489 <1> mov dx, msg.memrefs_mem_unknown 1490 <1> test al, mrfMem 1491 <1> jnz .gotmsg 1492 <1> mov dx, msg.memrefs_unknown 1493 <1> .gotmsg: 1494 <1> 1495 <1> ; We do not call zz_detect_xms here because that is 1496 <1> ; already done unconditionally during the initialisation 1497 <1> ; of the function disasm. 1498 <1> 1499 <1> push dx 1500 <1> mov ax, [memrefs + bx + mrLinear] 1501 <1> mov dx, [memrefs + bx + mrLinear + 2] 1502 <1> 1503 <1> mov cx, dx 1504 <1> mov bx, ax 1505 <1> call binsearchmain ; search for matching symbol 1506 <1> pop dx 1507 <1> jcxz .no_symbol 1508 <1> .loop_symbol: 1509 <1> call putsz 1510 <1> push bx 1511 <1> call displaystring 1512 <1> push bx 1513 <1> push ax 1514 <1> call getfarpointer.main 1515 <1> pop di 1516 <1> pop es 1517 <1> 1518 <1> pop si 1519 <1> push si 1520 <1> 1521 <1> push dx 1522 <1> 1523 <1> push bx 1524 <1> mov bx, si 1525 <1> call get_memref_index_bx 1526 <1> mov dx, word [memrefs + bx + mrOffset + 2] 1527 <1> mov ax, word [memrefs + bx + mrOffset] 1528 <1> 1529 <1> cmp dx, word [es:di + smOffset + 2] 1530 <1> mov dx, msg.memref_after_symbol.non_wrt 1531 <1> jne .wrt_symbol 1532 <1> cmp ax, word [es:di + smOffset] 1533 <1> je .non_wrt_symbol 1534 <1> .wrt_symbol: 1535 <1> mov dx, msg.memref_between_symbol.wrt 1536 <1> call disp_message 1537 <1> push ss 1538 <1> pop es 1539 <1> mov di, line_out 1540 <1> mov ax, word [memrefs + bx + mrSegmentSelector] 1541 <1> call hexword 1542 <1> push bx 1543 <1> push cx 1544 <1> call putsline 1545 <1> pop cx 1546 <1> pop bx 1547 <1> mov dx, msg.memref_after_symbol.wrt 1548 <1> .non_wrt_symbol: 1549 <1> call disp_message 1550 <1> 1551 <1> pop bx 1552 <1> pop dx 1553 <1> .next_symbol: 1554 <1> inc bx 1555 <1> loop .loop_symbol 1556 <1> 1557 <1> .no_symbol: 1558 <1> push ss 1559 <1> pop es 1560 <1> push ss 1561 <1> pop ds 1562 <1> 1563 <1> .next_memref: 1564 <1> pop si 1565 <1> pop cx 1566 <1> inc si 1567 <1> loop .loop_memref_j 1568 <1> jmp .none_memref 1569 <1> 1570 <1> .loop_memref_j: 1571 <1> jmp .loop_memref 1572 <1> 1573 <1> .none_memref: 1574 <1> %endif 1575 <1> 1576 <1> %if _DEBUG2 1577 <1> display_memrefs: 1578 <1> mov cx, [memrefs.free] 1579 <1> test cx, cx 1580 <1> jz .none 1581 <1> xor si, si 1582 <1> .loop: 1583 <1> mov bx, si 1584 <1> call get_memref_index_bx 1585 <1> mov ax, word [memrefs + bx + mrFlags] 1586 <1> mov dx, msg.memrefs_branchdirect 1587 <1> test al, mrfBranchDirect 1588 <1> jnz .gotmsg 1589 <1> mov dx, msg.memrefs_stringsource 1590 <1> test al, mrfStringSource 1591 <1> jnz .gotmsg 1592 <1> mov dx, msg.memrefs_stringdest 1593 <1> test al, mrfStringDest 1594 <1> jnz .gotmsg 1595 <1> mov dl, al 1596 <1> and dl, mrfMemSource | mrfMemDest 1597 <1> cmp dl, mrfMemSource | mrfMemDest 1598 <1> mov dx, msg.memrefs_memsourcedest 1599 <1> je .gotmsg 1600 <1> mov dx, msg.memrefs_memsource 1601 <1> test al, mrfMemSource 1602 <1> jnz .gotmsg 1603 <1> mov dx, msg.memrefs_memdest 1604 <1> test al, mrfMemDest 1605 <1> jnz .gotmsg 1606 <1> mov dx, msg.memrefs_mem_unknown 1607 <1> test al, mrfMem 1608 <1> jnz .gotmsg 1609 <1> mov dx, msg.memrefs_unknown 1610 <1> .gotmsg: 1611 <1> call putsz 1612 <1> 1613 <1> mov di, line_out 1614 <1> mov ax, word [memrefs + bx + mrSegmentSelector] 1615 <1> call hexword 1616 <1> push word [memrefs + bx + mrOffset] 1617 <1> mov al, ':' 1618 <1> stosb 1619 <1> %if 1 || _PM 1620 <1> mov ax, word [memrefs + bx + mrOffset + 2] 1621 <1> test byte [memrefs + bx + mrFlags], mrfA32 1622 <1> jz .16 1623 <1> call hexword 1624 <1> .16: 1625 <1> %endif 1626 <1> pop ax 1627 <1> call hexword 1628 <1> push si 1629 <1> push cx 1630 <1> mov si, msg.memrefs_length 1631 <1> call copy_single_counted_string 1632 <1> mov ax, word [memrefs + bx + mrLength + 2] 1633 <1> test ax, ax 1634 <1> jz @F 1635 <1> call hexword 1636 <1> @@: 1637 <1> mov ax, word [memrefs + bx + mrLength] 1638 <1> call hexword 1639 <1> call putsline_crlf 1640 <1> pop cx 1641 <1> pop si 1642 <1> 1643 <1> inc si 1644 <1> dec cx 1645 <1> jnz .loop 1646 <1> .none: 1647 <1> %endif ; _DEBUG2 1648 <1> %endif ; _MEMREF_AMOUNT 1649 <1> 1650 <1> 1651 <1> da_repeat: 1652 <1> %if _SYMBOLIC 1653 <1> mov bx, word [u_addr + 4] 1654 <1> _386_PM_o32 1655 <1> mov dx, word [u_addr] 1656 <1> call getlinear 1657 <1> jc .no_sym_between 1658 <1> 1659 <1> ; push dx 1660 <1> push ax ; linear after instruction 1661 <1> 1662 <1> xchg dx, cx 1663 <1> xchg ax, bx 1664 <1> 1665 <1> sub bx, 1 1666 <1> sbb cx, 0 ; cx:bx = end of range 1667 <1> 1668 <1> mov dx, word [u_lin_start + 2] 1669 <1> mov ax, word [u_lin_start] 1670 <1> add ax, 1 1671 <1> adc dx, 0 ; dx:ax = start of range 1672 <1> 1673 <1> call binsearchmain 1674 <1> pop ax 1675 <1> ; pop dx ; dx:ax = linear after instruction 1676 <1> jcxz .no_sym_between 1677 <1> 1678 <1> .loop_sym_between: 1679 <1> ; push dx 1680 <1> push ax 1681 <1> push bx 1682 <1> call displaystring 1683 <1> pop ax 1684 <1> ; pop dx 1685 <1> 1686 <1> push bx 1687 <1> push ax ; (reserve space, uninitialised) 1688 <1> call getfarpointer.main 1689 <1> pop di 1690 <1> pop es 1691 <1> 1692 <1> ; push dx 1693 <1> push ax 1694 <1> sub ax, word [es:di + smLinear] 1695 <1> ; sbb dx, word [es:di + smLinear + 2] 1696 <1> 1697 <1> ; push dx 1698 <1> push ax 1699 <1> xor dx, dx 1700 <1> add ax, word [es:di + smOffset] 1701 <1> adc dx, word [es:di + smOffset + 2] 1702 <1> cmp word [u_addr + 2], dx 1703 <1> mov dx, msg.uu_after_symbol_between_1.non_wrt 1704 <1> jne .sym_between.wrt 1705 <1> cmp word [u_addr], ax 1706 <1> je .sym_between.not_wrt 1707 <1> .sym_between.wrt: 1708 <1> mov dx, msg.uu_after_symbol_between_1.wrt 1709 <1> call disp_message 1710 <1> 1711 <1> push ss 1712 <1> pop es 1713 <1> mov di, line_out 1714 <1> mov ax, word [u_addr + 4] 1715 <1> call hexword 1716 <1> push bx 1717 <1> push cx 1718 <1> call putsline 1719 <1> pop cx 1720 <1> pop bx 1721 <1> 1722 <1> mov dx, msg.uu_after_symbol_between_2.wrt 1723 <1> .sym_between.not_wrt: 1724 <1> call disp_message 1725 <1> pop ax 1726 <1> ; pop dx 1727 <1> 1728 <1> push ss 1729 <1> pop es 1730 <1> push di 1731 <1> push bx 1732 <1> push cx 1733 <1> mov di, line_out 1734 <1> call decword 1735 <1> call putsline 1736 <1> pop cx 1737 <1> pop bx 1738 <1> pop di 1739 <1> pop ax 1740 <1> ; pop dx 1741 <1> 1742 <1> ; push dx 1743 <1> mov dx, msg.uu_after_symbol_between_3 1744 <1> call disp_message 1745 <1> ; pop dx 1746 <1> 1747 <1> inc bx 1748 <1> loop .loop_sym_between 1749 <1> .no_sym_between: 1750 <1> push ss 1751 <1> pop es 1752 <1> %endif 1753 <1> 1754 000049CF A0[3689] <1> mov al, [disflags] 1755 000049D2 A801 <1> test al, DIS_F_REPT 1756 000049D4 7437 <1> jz @FF ; if not repeating --> 1757 000049D6 A808 <1> test al, DIS_I_UNUSED 1758 000049D8 751A <1> jnz @F ; if " (unused)" was displayed --> 1759 000049DA A840 <1> test al, DIS_I_MOV_SS 1760 000049DC A1[2089] <1> mov ax, [index] 1761 000049DF 7405 <1> jz .not_mov_to_ss ; not mov to ss --> 1762 <1> 1763 <1> ; DIS_I_MOV_SS is set, check for wo[index] == 8Eh; 1764 <1> ; as we only want to match move *to* ss, not from (8Ch). 1765 000049E1 3D8E00 <1> cmp ax, 8Eh ; move to seg reg? 1766 000049E4 740E <1> je @F ; yes, it is mov to ss --> 1767 <1> 1768 <1> .not_mov_to_ss: 1769 000049E6 84E4 <1> test ah, ah 1770 000049E8 7524 <1> jnz .not_single_byte_opcode 1771 <1> 1772 000049EA BF[C889] <1> mov di, single_byte_opcodes_repeat_disassembly 1773 000049ED B90F00 <1> mov cx, single_byte_opcodes_repeat_disassembly.length 1774 000049F0 F2AE <1> repne scasb 1775 000049F2 751A <1> jne @FFF 1776 <1> @@: 1777 000049F4 8326[3689]03 <1> and word [disflags], DIS_F_REPT|DIS_F_SHOW 1778 000049F9 FE06[3989] <1> inc byte [disrepeatcount] 1779 000049FD 803E[3989]10 <1> cmp byte [disrepeatcount], 16 1780 00004A02 7303E9D4F8 <1> jb disasm.preserve_disrepeatcount 1781 <1> 1782 00004A07 BA[4473] <1> mov dx, msg.uu_too_many_repeat 1783 00004A0A E8F367 <1> call putsz 1784 <1> @@: 1785 00004A0D C3 <1> retn 1786 <1> 1787 <1> @@: 1788 <1> .not_single_byte_opcode: 1789 <1> 1790 00004A0E 8A3E[1F89] <1> mov bh, byte [disp8] 1791 00004A12 3DEB00 <1> cmp ax, 0EBh ; unconditional short jump ? 1792 00004A15 74F6 <1> je @BB ; yes, return --> 1793 <1> _386_PM_o32 ; and dword [dis_n], byte 0 1794 00004A17 8326[1889]00 <1> and word [dis_n], byte 0 1795 00004A1C E8BF09 <1> call disgetbyte 1796 00004A1F B302 <1> mov bl, 2 ; displacement to skip a jmp short 1797 00004A21 3CEB <1> cmp al, 0EBh ; jmp short ? 1798 00004A23 7406 <1> je @F ; yes --> 1799 00004A25 B303 <1> mov bl, 3 ; displacement to skip a 16-bit jmp near 1800 00004A27 3CE9 <1> cmp al, 0E9h ; jmp near ? 1801 00004A29 75E2 <1> jne @BB ; no, return --> 1802 <1> %if _PM 1803 <1> test byte [bCSAttr], 40h ; 32-bit code segment ? 1804 <1> jz @F ; no, 16-bit, use displacement 3 --> 1805 <1> mov bl, 5 ; displacement to skip a 32-bit jmp near 1806 <1> %endif 1807 <1> @@: 1808 00004A2B 38DF <1> cmp bh, bl ; right displacement ? 1809 00004A2D 75DE <1> jne @BBB ; no --> 1810 <1> 1811 00004A2F 8326[3689]03 <1> and word [disflags], DIS_F_REPT|DIS_F_SHOW 1812 00004A34 8336[3C89]04 <1> xor word [condmsg], (msg.condnotjump + DATASECTIONFIXUP) ^ (msg.condjump + DATASECTIONFIXUP) 1814 00004A39 E9A4F8 <1> jmp disasm.preserve_condmsg_and_disrepeatcount 1815 <1> 1816 <1> 1817 <1> %if _MEMREF_AMOUNT 1818 <1> simulate_rep_sca_cmp: 1819 <1> 1820 00004A3C 67 <1> _386_a32 1821 <1> .repne_scasd: 1822 00004A3D 66 <1> _386_o32 1823 00004A3E F2 <1> repne 1824 00004A3F AF <1> scasw 1825 00004A40 C3 <1> retn 1826 <1> 1827 00004A41 67 <1> _386_a32 1828 <1> .repne_scasw: 1829 00004A42 F2AF <1> repne scasw 1830 00004A44 C3 <1> retn 1831 <1> 1832 00004A45 67 <1> _386_a32 1833 <1> .repne_scasb: 1834 00004A46 F2AE <1> repne scasb 1835 00004A48 C3 <1> retn 1836 <1> 1837 00004A49 67 <1> _386_a32 1838 <1> .repne_cmpsd: 1839 00004A4A 66 <1> _386_o32 1840 00004A4B F2 <1> repne 1841 00004A4C A7 <1> cmpsw 1842 00004A4D C3 <1> retn 1843 <1> 1844 00004A4E 67 <1> _386_a32 1845 <1> .repne_cmpsw: 1846 00004A4F F2A7 <1> repne cmpsw 1847 00004A51 C3 <1> retn 1848 <1> 1849 00004A52 67 <1> _386_a32 1850 <1> .repne_cmpsb: 1851 00004A53 F2A6 <1> repne cmpsb 1852 00004A55 C3 <1> retn 1853 <1> 1854 00004A56 67 <1> _386_a32 1855 <1> .repe_scasd: 1856 00004A57 66 <1> _386_o32 1857 00004A58 F3 <1> repe 1858 00004A59 AF <1> scasw 1859 00004A5A C3 <1> retn 1860 <1> 1861 00004A5B 67 <1> _386_a32 1862 <1> .repe_scasw: 1863 00004A5C F3AF <1> repe scasw 1864 00004A5E C3 <1> retn 1865 <1> 1866 00004A5F 67 <1> _386_a32 1867 <1> .repe_scasb: 1868 00004A60 F3AE <1> repe scasb 1869 00004A62 C3 <1> retn 1870 <1> 1871 00004A63 67 <1> _386_a32 1872 <1> .repe_cmpsd: 1873 00004A64 66 <1> _386_o32 1874 00004A65 F3 <1> repe 1875 00004A66 A7 <1> cmpsw 1876 00004A67 C3 <1> retn 1877 <1> 1878 00004A68 67 <1> _386_a32 1879 <1> .repe_cmpsw: 1880 00004A69 F3A7 <1> repe cmpsw 1881 00004A6B C3 <1> retn 1882 <1> 1883 00004A6C 67 <1> _386_a32 1884 <1> .repe_cmpsb: 1885 00004A6D F3A6 <1> repe cmpsb 1886 00004A6F C3 <1> retn 1887 <1> 1888 <1> 1889 <1> usesection lDEBUG_DATA_ENTRY 1890 000089D7 00 <1> align 2, db 0 1891 <1> .table: 1892 000089D8 [3D4A] <1> dw .repne_scasd 1893 000089DA [424A] <1> dw .repne_scasw 1894 000089DC [464A] <1> dw .repne_scasb 1895 000089DE [464A] <1> dw .repne_scasb 1896 000089E0 [4A4A] <1> dw .repne_cmpsd 1897 000089E2 [4F4A] <1> dw .repne_cmpsw 1898 000089E4 [534A] <1> dw .repne_cmpsb 1899 000089E6 [534A] <1> dw .repne_cmpsb 1900 <1> .table_repe_offset: equ $ - .table 1901 000089E8 [574A] <1> dw .repe_scasd 1902 000089EA [5C4A] <1> dw .repe_scasw 1903 000089EC [604A] <1> dw .repe_scasb 1904 000089EE [604A] <1> dw .repe_scasb 1905 000089F0 [644A] <1> dw .repe_cmpsd 1906 000089F2 [694A] <1> dw .repe_cmpsw 1907 000089F4 [6D4A] <1> dw .repe_cmpsb 1908 000089F6 [6D4A] <1> dw .repe_cmpsb 1909 <1> 1910 <1> usesection lDEBUG_CODE 1911 <1> %endif 1912 <1> 1913 <1> 1914 <1> ; Here are the routines for printing out the operands themselves. 1915 <1> ; Immediate data (OP_IMM) 1916 <1> 1917 <1> dop_imm: 1918 00004A70 80FC00 <1> cmp ah, 0 1919 00004A73 7C17 <1> jl dop03 ; if just a byte --> 1920 00004A75 9C <1> pushf 1921 00004A76 F606[3689]10 <1> test byte [disflags], DIS_I_SHOWSIZ 1922 00004A7B 7403 <1> jz .nosize ; if we don't need to show the size --> 1923 00004A7D E88E08 <1> call showsize 1924 <1> .nosize: 1925 00004A80 E87109 <1> call disgetword 1926 00004A83 9D <1> popf ; ZF 1927 00004A84 7503E9C463 <1> je hexword ; if just a word 1928 00004A89 E9CE08 <1> jmp disp32.ax 1929 <1> 1930 <1> dop03: 1931 00004A8C E84F09 <1> call disgetbyte ; print immediate byte 1932 00004A8F E9C263 <1> jmp hexbyte 1933 <1> 1934 <1> 1935 <1> ; Memory offset reference (OP_MOFFS) 1936 <1> 1937 <1> dop_moffs: 1938 00004A92 B005 <1> mov al, 5 1939 00004A94 F606[1C89]20 <1> test byte [presizeflags], PRE32A 1940 00004A99 7501 <1> jnz .32 ; if 32-bit addressing --> 1941 00004A9B 40 <1> inc ax 1942 <1> .32: 1943 00004A9C A2[1C83] <1> mov [regmem], al 1944 00004A9F EB0A <1> jmp s dop05 1945 <1> 1946 <1> 1947 <1> ; MOD R/M (OP_RM) 1948 <1> 1949 <1> dop_rm: 1950 00004AA1 E8C607 <1> call getregmem 1951 00004AA4 3CC0 <1> cmp al,0c0h 1952 00004AA6 7203E93F02 <1> jae dop33 ; if pure register reference --> 1953 <1> 1954 <1> dop05: ; <--- used by OP_M, OP_M64, OP_M80, OP_MOFFS 1955 00004AAB 8826[2C89] <1> mov byte [rmsize], ah ; save r/m size 1956 00004AAF F606[3789]01 <1> testopt [disflags], DIS_I_NOSIZ 1957 00004AB4 7506 <1> jnz @F 1958 00004AB6 E85508 <1> call showsize ; print out size 1959 00004AB9 E88908 <1> call showptr ; append "PTR " (if not NASM syntax) 1960 <1> @@: 1961 <1> dop06: ; <--- used by OP_MXX, OP_MFLOAT, OP_MDOUBLE 1962 00004ABC 800E[1D89]01 <1> or byte [preused],PRESEG ; needed even if there's no segment override 1963 <1> ; because handling of LOCK prefix relies on it 1964 00004AC1 B05B <1> mov al, '[' 1965 00004AC3 E80202 <1> call stosb_nasm 1966 <1> 1967 00004AC6 F606[1C89]01 <1> test byte [preflags],PRESEG 1968 00004ACB 7406 <1> jz dop07 ;if no segment override 1969 00004ACD E83608 <1> call showseg ;print segment name 1970 00004AD0 B03A <1> mov al,':' 1971 00004AD2 AA <1> stosb 1972 <1> dop07: 1973 00004AD3 A0[1C83] <1> mov al,[regmem] 1974 00004AD6 24C7 <1> and al,0c7h 1975 00004AD8 800E[1D89]20 <1> or byte [preused],PREASIZE 1976 00004ADD F606[1C89]20 <1> test byte [presizeflags],PRE32A 1977 00004AE2 7403E9AF00 <1> jnz dop18 ;if 32-bit addressing 1978 00004AE7 800E[3689]04 <1> or byte [disflags],DIS_I_SHOW ;we'd like to show this address 1979 00004AEC 8326[3089]00 <1> and word [addrr], 0 ; zero out the address initially 1980 00004AF1 93 <1> xchg ax,bx ;mov bx,ax 1981 00004AF2 E8C601 <1> call store_opensqubracket 1982 00004AF5 80FB06 <1> cmp bl,6 1983 00004AF8 7503E98B00 <1> je dop16 ;if [xxxx] 1984 00004AFD 83E307 <1> and bx,7 1985 00004B00 8A9F[4A89] <1> mov bl,[rmtab+bx] 1986 00004B04 F6C308 <1> test bl,8 1987 00004B07 7525 <1> jnz dop09 ;if BX 1988 00004B09 F6C304 <1> test bl,4 1989 00004B0C 7436 <1> jz dop11 ;if not BP 1990 00004B0E B84250 <1> mov ax,'BP' 1991 00004B11 8B0E[700C] <1> mov cx,[reg_ebp] 1992 00004B15 E80A00 <1> call da_set_default_ss 1993 00004B18 EB1B <1> jmp dop10 1994 <1> 1995 <1> 1996 <1> ; INP: al = 2 * register number 1997 <1> ; [preflags] & PRESEG set if segment overridden 1998 <1> ; else, 1999 <1> ; byte [segmnt] = initialised to 3 (ds) 2000 <1> ; OUT: no action if register number not for esp or ebp 2001 <1> ; no action if segment overridden 2002 <1> ; otherwise, 2003 <1> ; byte [segmnt] -= 1, resulting in 2 (ss) 2004 <1> da_set_default_ss_if_esp_ebp: 2005 00004B1A 3C08 <1> cmp al, 2 * 4 2006 00004B1C 7404 <1> je @F 2007 00004B1E 3C0A <1> cmp al, 2 * 5 2008 00004B20 750B <1> jne @FF 2009 <1> @@: 2010 <1> da_set_default_ss: 2011 00004B22 F606[1C89]01 <1> test byte [preflags], PRESEG 2012 00004B27 7504 <1> jnz @F ; if segment override --> 2013 00004B29 FE0E[2D89] <1> dec byte [segmnt] ; default is now SS 2014 <1> @@: 2015 00004B2D C3 <1> retn 2016 <1> 2017 <1> 2018 <1> dop09: 2019 00004B2E B84258 <1> mov ax,'BX' ;BX 2020 00004B31 8B0E[600C] <1> mov cx,[reg_ebx] 2021 <1> 2022 <1> dop10: 2023 00004B35 890E[3089] <1> mov [addrr],cx ;print it out, etc. 2024 00004B39 E8CD07 <1> call dis_stosw_lowercase 2025 00004B3C F6C303 <1> test bl,2+1 2026 00004B3F 741C <1> jz dop13 ;if done 2027 00004B41 B02B <1> mov al,'+' 2028 00004B43 AA <1> stosb 2029 <1> dop11: 2030 00004B44 B85349 <1> mov ax,'SI' 2031 00004B47 8B0E[740C] <1> mov cx,[reg_esi] 2032 00004B4B F6C301 <1> test bl,1 2033 00004B4E 7406 <1> jz dop12 ;if SI 2034 00004B50 B044 <1> mov al,'D' ;DI 2035 00004B52 8B0E[780C] <1> mov cx,[reg_edi] 2036 <1> 2037 <1> dop12: 2038 00004B56 010E[3089] <1> add [addrr], cx ; print it out, etc. 2039 00004B5A E8AC07 <1> call dis_stosw_lowercase 2040 <1> dop13: 2041 00004B5D F606[1C83]C0 <1> test byte [regmem], 0C0h 2042 00004B62 742E <1> jz s dop17 ; if no displacement --> 2043 00004B64 F606[1C83]80 <1> test byte [regmem], 80h 2044 00004B69 751A <1> jnz dop15 ; if word displacement --> 2045 00004B6B E87008 <1> call disgetbyte 2046 00004B6E 98 <1> cbw 2047 00004B6F 0106[3089] <1> add [addrr], ax 2048 00004B73 3C00 <1> cmp al, 0 2049 00004B75 B42B <1> mov ah, '+' 2050 00004B77 7D04 <1> jge dop14 ; if not negative --> 2051 00004B79 B42D <1> mov ah, '-' 2052 00004B7B F6D8 <1> neg al 2053 <1> dop14: 2054 00004B7D 8825 <1> mov [di], ah 2055 00004B7F 47 <1> inc di 2056 00004B80 E8D162 <1> call hexbyte ; print the byte displacement 2057 00004B83 EB0D <1> jmp s dop17 ; done --> 2058 <1> 2059 <1> dop15: 2060 00004B85 B02B <1> mov al, '+' 2061 00004B87 AA <1> stosb 2062 <1> dop16: 2063 00004B88 E86908 <1> call disgetword 2064 00004B8B 0106[3089] <1> add [addrr], ax 2065 00004B8F E8BB62 <1> call hexword ; print word displacement 2066 <1> 2067 <1> dop17: 2068 00004B92 B05D <1> mov al, ']' 2069 00004B94 AA <1> stosb 2070 00004B95 C3 <1> retn 2071 <1> 2072 <1> ; 32-bit MOD REG R/M addressing. 2073 <1> 2074 <1> dop18: 2075 00004B96 810E[3689]0408 <1> or word [disflags], DIS_I_SHOW | DIS_I_SHOW_A32 2076 00004B9C 8326[3089]00 <1> and word [addrr], 0 2077 00004BA1 8326[3289]00 <1> and word [addrr + 2], 0 ; zero out the address initially 2078 00004BA6 3C05 <1> cmp al, 5 ; mod=0 and r/m=5 ? 2079 00004BA8 7503E98200 <1> je dop19 ; yes, just a disp32 address --> 2080 00004BAD 50 <1> push ax 2081 00004BAE 2407 <1> and al, 7 2082 00004BB0 3C04 <1> cmp al, 4 2083 00004BB2 7506 <1> jne dop20 ; if no SIB --> 2084 00004BB4 E82708 <1> call disgetbyte ; get and save it 2085 00004BB7 A2[1D83] <1> mov [sibbyte], al 2086 <1> dop20: 2087 00004BBA 58 <1> pop ax 2088 00004BBB A880 <1> test al, 80h 2089 00004BBD 7538 <1> jnz dop22 ; if disp32 --> 2090 00004BBF A840 <1> test al, 40h 2091 00004BC1 743A <1> jz dop23 ; if no disp8 --> 2092 00004BC3 E81808 <1> call disgetbyte 2093 <1> 2094 00004BC6 98 <1> cbw 2095 00004BC7 99 <1> cwd 2096 00004BC8 0106[3089] <1> add word [addrr], ax 2097 00004BCC 1116[3289] <1> adc word [addrr + 2], dx 2098 <1> 2099 00004BD0 3C00 <1> cmp al, 0 2100 00004BD2 7D06 <1> jge dop21 ; if not negative --> 2101 00004BD4 F6D8 <1> neg al 2102 00004BD6 C6052D <1> mov byte [di], '-' 2103 00004BD9 47 <1> inc di 2104 <1> dop21: 2105 00004BDA E87762 <1> call hexbyte 2106 00004BDD EB1B <1> jmp s dop22a ; done --> 2107 <1> 2108 <1> disp32_add_to_addrr: 2109 00004BDF E81208 <1> call disgetword 2110 00004BE2 0106[3089] <1> add word [addrr], ax 2111 00004BE6 50 <1> push ax 2112 00004BE7 9C <1> pushf 2113 00004BE8 E80908 <1> call disgetword 2114 00004BEB 9D <1> popf 2115 00004BEC 1106[3289] <1> adc word [addrr + 2], ax 2116 00004BF0 E85A62 <1> call hexword 2117 00004BF3 58 <1> pop ax 2118 00004BF4 E95662 <1> jmp hexword 2119 <1> 2120 <1> dop22: 2121 00004BF7 E8E5FF <1> call disp32_add_to_addrr 2122 <1> ; print disp32 2123 <1> 2124 <1> dop22a: 2125 00004BFA E8C900 <1> call store_plus 2126 <1> 2127 <1> dop23: 2128 00004BFD A0[1C83] <1> mov al,[regmem] 2129 00004C00 2407 <1> and al,7 2130 00004C02 3C04 <1> cmp al,4 2131 00004C04 7403E99800 <1> jne dop28 ;if no SIB 2132 00004C09 A0[1D83] <1> mov al, [sibbyte] 2133 00004C0C 88C4 <1> mov ah, al 2134 00004C0E 250738 <1> and ax, 00_111_000_00_000_111b 2135 <1> ; ah = index << 3, al = base 2136 00004C11 80FC20 <1> cmp ah, 4 << 3 ; index encodes esp ? 2137 00004C14 7414 <1> je dop_sib_index_4 ; yes, use base only --> 2138 <1> ; When this branch is taken, the scale is ignored. 2139 <1> ; This is typically used only for encoding [esp] 2140 <1> ; and [esp + x] but is a valid encoding even for 2141 <1> ; other base registers. So better support it. 2142 <1> ; (This used to be a special case for SIB == 24h 2143 <1> ; only because it doesn't usually occur else. 2144 <1> ; The other cases were rejected in dop25.) 2145 <1> 2146 00004C16 E80700 <1> call dop_is_mod_0_and_base_5 2147 00004C19 7539 <1> jnz dop24 ; if not mod=0 base=5 --> 2148 00004C1B E8C1FF <1> call disp32_add_to_addrr; show 32-bit displacement instead of [EBP] 2149 00004C1E EB45 <1> jmp dop25 ; and handle the scale and index --> 2150 <1> 2151 <1> 2152 <1> ; INP: al = low 3 bits of SIB byte (= base) 2153 <1> ; byte [regmem] = ModR/M byte 2154 <1> ; OUT: NZ if not mod=0 base=5 special case 2155 <1> ; ZR else 2156 <1> ; REM: base=5 usually encodes [ebp], and mod=0 2157 <1> ; usually encodes no displacement field. 2158 <1> ; If both are true however, then the 2159 <1> ; special case is true: there is no base 2160 <1> ; register and a 32-bit displacement. 2161 <1> dop_is_mod_0_and_base_5: 2162 00004C20 3C05 <1> cmp al, 5 2163 00004C22 7505 <1> jne @F ; NZ if not base=5 --> 2164 00004C24 F606[1C83]C0 <1> test byte [regmem], 1100_0000b 2165 <1> ; NZ if not mod=0 2166 <1> @@: 2167 00004C29 C3 <1> retn 2168 <1> 2169 <1> 2170 <1> dop_sib_index_4: 2171 <1> ; The mod=0 base=5 special case and the 2172 <1> ; index=4 special case can occur both 2173 <1> ; together. That is a SIB encoding of 2174 <1> ; a 32-bit displacement without any 2175 <1> ; index or base registers. 2176 <1> ; 2177 <1> ; This was noted on stackoverflow.com by 2178 <1> ; Peter Cordes: "x86-32 has 2 redundant 2179 <1> ; ways to encode [0x123456], i.e. no-base 2180 <1> ; + disp32: with or without a SIB byte, 2181 <1> ; because SIB has an encoding for no-base 2182 <1> ; and no-index." (There is a use for this 2183 <1> ; distinction and thus the SIB form only 2184 <1> ; in 64-bit mode but it is accepted as a 2185 <1> ; valid alternative encoding even for us.) 2186 <1> ; 2187 <1> ; - https://stackoverflow.com/questions/48124293/can-rip-be-used-with-another-register-with-rip-relative-addressing/48125453#48125453 2188 00004C2A E8F3FF <1> call dop_is_mod_0_and_base_5 2189 00004C2D 7572 <1> jnz dop28 ; if not mod=0 base=5 --> 2190 <1> ; fall through to dop19 2191 <1> 2192 <1> dop19: 2193 00004C2F E88900 <1> call store_opensqubracket 2194 00004C32 E8AAFF <1> call disp32_add_to_addrr 2195 <1> ; display 32-bit offset 2196 <1> dop17_j1: 2197 00004C35 E95AFF <1> jmp dop17 2198 <1> 2199 <1> add_reg32_to_addrr: 2200 00004C38 B90100 <1> mov cx, 1 2201 <1> add_reg32_times_cx_to_addrr: 2202 00004C3B 50 <1> push ax 2203 00004C3C 53 <1> push bx 2204 00004C3D 93 <1> xchg ax, bx 2205 00004C3E 8B9F[8889] <1> mov bx, word [reg32addr + bx] 2206 <1> @@: 2207 00004C42 8B07 <1> mov ax, word [bx] 2208 00004C44 0106[3089] <1> add word [addrr], ax 2209 00004C48 8B4702 <1> mov ax, word [bx + 2] 2210 00004C4B 1106[3289] <1> adc word [addrr + 2], ax 2211 00004C4F E2F1 <1> loop @B 2212 00004C51 5B <1> pop bx 2213 00004C52 58 <1> pop ax 2214 00004C53 C3 <1> retn 2215 <1> 2216 <1> dop24: 2217 00004C54 E85800 <1> call store_opensqubracket_e 2218 00004C57 E80B07 <1> call showreg16 ; show 16-bit register name (number in AL) 2219 00004C5A E8BDFE <1> call da_set_default_ss_if_esp_ebp 2220 00004C5D E8D8FF <1> call add_reg32_to_addrr 2221 00004C60 B05D <1> mov al, ']' 2222 00004C62 E85800 <1> call stosb_notnasm 2223 <1> dop25: 2224 00004C65 E85E00 <1> call store_plus 2225 <1> 2226 00004C68 A0[1D83] <1> mov al, [sibbyte] 2227 00004C6B E8F505 <1> call da_get_bits_3_to_5 ; al = index 2228 <1> ; (In dop23 we already checked this is not = 4 2229 <1> ; which is a special escaping encoding.) 2230 <1> 2231 00004C6E E83E00 <1> call store_opensqubracket_e 2232 <1> 2233 00004C71 8A26[1D83] <1> mov ah, [sibbyte] 2234 00004C75 B90100 <1> mov cx, 1 2235 00004C78 F6C4C0 <1> test ah, 0C0h 2236 00004C7B 740F <1> jz @F 2237 00004C7D 41 <1> inc cx 2238 00004C7E F6C480 <1> test ah, 80h 2239 00004C81 7409 <1> jz @F 2240 00004C83 B104 <1> mov cl, 4 2241 00004C85 F6C440 <1> test ah, 40h 2242 00004C88 7402 <1> jz @F 2243 00004C8A B108 <1> mov cl, 8 2244 <1> @@: 2245 <1> 2246 00004C8C E8D606 <1> call showreg16 2247 00004C8F 51 <1> push cx 2248 00004C90 E8A8FF <1> call add_reg32_times_cx_to_addrr 2249 00004C93 59 <1> pop cx 2250 00004C94 49 <1> dec cx ; = 0-based scale 2251 00004C95 7408 <1> jz dop27 ; if scale == 1 (S=00b) --> 2252 00004C97 B02A <1> mov al, '*' 2253 00004C99 AA <1> stosb 2254 00004C9A 88C8 <1> mov al, cl 2255 00004C9C 0431 <1> add al, '1' ; from 0-based to '1'-based 2256 <1> dop26: 2257 00004C9E AA <1> stosb 2258 <1> dop27: 2259 <1> dop17_j2: 2260 00004C9F EB94 <1> jmp s dop17_j1 2261 <1> 2262 <1> ; 32-bit addressing without SIB 2263 <1> 2264 <1> dop28: 2265 00004CA1 E80B00 <1> call store_opensqubracket_e 2266 00004CA4 E8BE06 <1> call showreg16 2267 00004CA7 E870FE <1> call da_set_default_ss_if_esp_ebp 2268 00004CAA E88BFF <1> call add_reg32_to_addrr 2269 00004CAD EBF0 <1> jmp short dop27 2270 <1> 2271 <1> ; Store '[' if not NASM syntax, 2272 <1> ; then (regardless of syntax) store 'E' 2273 <1> ; INP: di-> buffer 2274 <1> ; OUT: di-> behind "[E" or 'E' 2275 <1> ; CHG: - 2276 <1> ; 2277 <1> ; The 'E' is lowercased if that option is selected. 2278 <1> store_opensqubracket_e: 2279 00004CAF 50 <1> push ax 2280 00004CB0 E80800 <1> call store_opensqubracket 2281 00004CB3 B045 <1> mov al, 'E' 2282 00004CB5 E8CF05 <1> call dis_lowercase 2283 00004CB8 AA <1> stosb 2284 00004CB9 58 <1> pop ax 2285 00004CBA C3 <1> retn 2286 <1> 2287 <1> ; Store '[' if not NASM syntax 2288 <1> ; INP: di-> buffer 2289 <1> ; OUT: di-> behind '[' if not NASM syntax 2290 <1> ; CHG: al 2291 <1> store_opensqubracket: 2292 00004CBB B05B <1> mov al, '[' 2293 <1> 2294 <1> ; Store al if not NASM syntax 2295 <1> ; INP: di-> buffer 2296 <1> ; OUT: di-> behind stored byte if not NASM syntax 2297 <1> ; CHG: - 2298 <1> stosb_notnasm: 2299 00004CBD F606[DC00]04 <1> testopt [asm_options], disasm_nasm 2300 00004CC2 7501 <1> jnz .ret 2301 00004CC4 AA <1> stosb 2302 00004CC5 C3 <1> .ret: retn 2303 <1> 2304 <1> ; Store '+' if NASM syntax 2305 <1> ; INP: di-> buffer 2306 <1> ; OUT: di-> behind '+' if NASM syntax 2307 <1> ; CHG: al 2308 <1> store_plus: 2309 00004CC6 B02B <1> mov al, '+' 2310 <1> 2311 <1> ; Store al if NASM syntax 2312 <1> ; INP: di-> buffer 2313 <1> ; OUT: di-> behind stored byte if NASM syntax 2314 <1> ; CHG: - 2315 <1> stosb_nasm: 2316 00004CC8 F606[DC00]04 <1> testopt [asm_options], disasm_nasm 2317 00004CCD 7401 <1> jz .ret 2318 00004CCF AA <1> stosb 2319 00004CD0 C3 <1> .ret: retn 2320 <1> 2321 <1> 2322 <1> ; Memory-only reference (OP_M) 2323 <1> 2324 <1> dop_m: 2325 00004CD1 E89605 <1> call getregmem 2326 00004CD4 3CC0 <1> cmp al, 0C0h 2327 00004CD6 7303E9D0FD <1> jb dop05 ; if it's what we expect --> 2328 <1> 2329 <1> ; it's a register reference 2330 00004CDB E92A05 <1> disbad1:jmp disbad ; this is not supposed to happen --> 2331 <1> 2332 <1> ; Register reference from MOD R/M part (OP_R_MOD) 2333 <1> 2334 <1> dop_r_mod: 2335 00004CDE E88905 <1> call getregmem 2336 00004CE1 3CC0 <1> cmp al,0c0h 2337 00004CE3 72F6 <1> jb disbad1 ;if it's a memory reference 2338 00004CE5 EB03 <1> jmp s dop33 2339 <1> 2340 <1> ; Pure register reference (OP_R) 2341 <1> 2342 <1> dop_r: 2343 00004CE7 E87605 <1> call getregmem_r 2344 <1> 2345 <1> dop33: ; <--- used by OP_RM, OP_R_MOD and OP_R_ADD 2346 00004CEA 2407 <1> and al,7 ;entry point for regs from MOD R/M, and others 2347 00004CEC 8A0E[3889] <1> mov cl,[disflags2] 2348 00004CF0 080E[3689] <1> or [disflags],cl ;if it was variable size operand, the size 2349 <1> ;should now be marked as known. 2350 00004CF4 80FC00 <1> cmp ah,0 2351 00004CF7 7C11 <1> jl dop35 ;if byte register 2352 00004CF9 740D <1> jz dop34 ;if word register 2353 <1> dop33a: 2354 00004CFB 80FC20 <1> cmp ah, 20h ; qword register (MMX) ? 2355 00004CFE 7415 <1> je dop35_1 ; --> 2356 00004D00 50 <1> push ax 2357 00004D01 B045 <1> mov al, 'E' 2358 00004D03 E88105 <1> call dis_lowercase 2359 00004D06 AA <1> stosb 2360 00004D07 58 <1> pop ax 2361 <1> ;mov byte [di],'E' ;enter here from OP_ECX 2362 <1> ;inc di 2363 <1> dop34: 2364 00004D08 0408 <1> add al,8 2365 <1> dop35: 2366 00004D0A 98 <1> cbw 2367 00004D0B D1E0 <1> shl ax,1 2368 00004D0D 93 <1> xchg ax,bx ;mov bx,ax 2369 00004D0E 8B87[5289] <1> mov ax,[rgnam816+bx];get the register name 2370 00004D12 E9F405 <1> jmp dis_stosw_lowercase 2371 <1> 2372 <1> dop35_1: 2373 00004D15 50 <1> push ax 2374 00004D16 B84D4D <1> mov ax, "MM" 2375 00004D19 E8ED05 <1> call dis_stosw_lowercase 2376 00004D1C 58 <1> pop ax 2377 00004D1D 0430 <1> add al, '0' 2378 00004D1F AA <1> stosb 2379 00004D20 C3 <1> retn 2380 <1> 2381 <1> ; Register number embedded in the instruction (OP_R_ADD) 2382 <1> 2383 <1> dop_r_add: 2384 00004D21 A0[1E89] <1> mov al,[instru] 2385 00004D24 EBC4 <1> jmp s dop33 2386 <1> 2387 <1> ; AL or AX or EAX (OP_AX) 2388 <1> 2389 <1> dop_ax: 2390 00004D26 B000 <1> mov al,0 2391 00004D28 EBC0 <1> jmp s dop33 2392 <1> 2393 <1> ; QWORD mem (OP_M64) 2394 <1> ; This operand type is used by CMPXCHG8B, FILD and FISTP. 2395 <1> dop_m64: 2396 <1> ;mov ax, 'Q' ; print "QWORD" 2397 00004D2A B420 <1> mov ah, 20h ; size QWORD 2398 00004D2C EB35 <1> jmp s dop40 2399 <1> 2400 <1> ; FLOAT (=REAL4) mem (OP_MFLOAT) 2401 <1> dop_mfloat: 2402 00004D2E B8464C <1> mov ax, "FL" 2403 00004D31 E8D505 <1> call dis_stosw_lowercase 2404 00004D34 B84F41 <1> mov ax, "OA" 2405 00004D37 E8CF05 <1> call dis_stosw_lowercase 2406 00004D3A B85420 <1> mov ax, "T " 2407 00004D3D EB15 <1> jmp short dop38c 2408 <1> 2409 <1> ; DOUBLE (=REAL8) mem (OP_MDOUBLE). 2410 <1> 2411 <1> dop_mdouble: 2412 00004D3F B8444F <1> mov ax, "DO" 2413 00004D42 E8C405 <1> call dis_stosw_lowercase 2414 00004D45 B85542 <1> mov ax, "UB" 2415 00004D48 E8BE05 <1> call dis_stosw_lowercase 2416 00004D4B B04C <1> mov al, 'L' 2417 00004D4D E83705 <1> call dis_lowercase 2418 00004D50 AA <1> stosb 2419 00004D51 B84520 <1> mov ax, "E " 2420 <1> dop38c: 2421 00004D54 E8B205 <1> call dis_stosw_lowercase 2422 00004D57 E8EB05 <1> call showptr 2423 00004D5A EB1B <1> jmp s dop42a 2424 <1> 2425 <1> ; TBYTE (=REAL10) mem (OP_M80). 2426 <1> 2427 <1> dop_m80: 2428 00004D5C B854FF <1> mov ax,0FF00h+'T' ;print 'T' + "BYTE" 2429 00004D5F E82505 <1> call dis_lowercase 2430 00004D62 AA <1> stosb 2431 <1> dop40: 2432 00004D63 E80405 <1> call getregmem 2433 00004D66 3CC0 <1> cmp al,0c0h 2434 00004D68 7317 <1> jae disbad5 ; if it's a register reference 2435 00004D6A 800E[3689]80 <1> or byte [disflags], DIS_I_DONTSHOW 2436 <1> ; don't show this 2437 00004D6F E939FD <1> jmp dop05 2438 <1> 2439 <1> %if 0 2440 <1> ; Far memory (OP_FARMEM). 2441 <1> ; This is either a FAR16 (DWORD) or FAR32 (FWORD) pointer. 2442 <1> dop_farmem: 2443 <1> call dischk32d 2444 <1> jz dop41a ; if not dword far 2445 <1> call showdword 2446 <1> dop41a: 2447 <1> mov ax, "FA" ; store "FAR " 2448 <1> call dis_stosw_lowercase 2449 <1> mov ax, "R " 2450 <1> call dis_stosw_lowercase 2451 <1> %endif 2452 <1> 2453 <1> ; mem (OP_MXX). 2454 <1> 2455 <1> dop_mxx: 2456 00004D72 800E[3689]80 <1> or byte [disflags], DIS_I_DONTSHOW 2457 <1> ; don't show this 2458 <1> dop42a: 2459 00004D77 E8F004 <1> call getregmem 2460 00004D7A 3CC0 <1> cmp al,0c0h 2461 00004D7C 7303E93BFD <1> jb dop06 ; mem ref, don't show size --> 2462 <1> disbad5: 2463 00004D81 E98404 <1> jmp disbad 2464 <1> 2465 <1> ; Far immediate (OP_FARP). Either FAR16 or FAR32. 2466 <1> dop_farimm: 2467 00004D84 E86D06 <1> call disgetword 2468 00004D87 50 <1> push ax 2469 00004D88 E8E905 <1> call dischk32d 2470 00004D8B 7409 <1> jz dop44_word ; if not 32-bit address 2471 <1> 2472 <1> dop44_dword: 2473 <1> %if _PM 2474 <1> test byte [bCSAttr],40h ; for 16-bit code segments 2475 <1> jnz @F ; no need to display "WORD " 2476 <1> %endif 2477 00004D8D E89D05 <1> call showdword 2478 <1> @@: 2479 <1> 2480 00004D90 E86106 <1> call disgetword 2481 00004D93 50 <1> push ax 2482 00004D94 EB00 <1> jmp dop44_common 2483 <1> 2484 <1> dop44_word: 2485 <1> %if _PM 2486 <1> test byte [bCSAttr],40h ; for 32-bit code segments 2487 <1> jz @F ; no need to display "DWORD " 2488 <1> call showword 2489 <1> @@: 2490 <1> %endif 2491 <1> 2492 <1> dop44_common: 2493 00004D96 E85B06 <1> call disgetword 2494 <1> %if _MEMREF_AMOUNT 2495 00004D99 E88A01 <1> call get_free_memref 2496 00004D9C 8987[D888] <1> mov word [memrefs + bx + mrSegmentSelector], ax 2497 <1> %endif 2498 00004DA0 E8AA60 <1> call hexword 2499 00004DA3 B03A <1> mov al,':' 2500 00004DA5 AA <1> stosb 2501 00004DA6 E8CB05 <1> call dischk32d 2502 00004DA9 740D <1> jz dop45 ;if not 32-bit address 2503 00004DAB 58 <1> pop ax 2504 <1> %if _MEMREF_AMOUNT 2505 00004DAC 8987[D688] <1> mov word [memrefs + bx + mrOffset + 2], ax 2506 00004DB0 808F[DA88]10 <1> or byte [memrefs + bx + mrFlags], mrfA32 2507 <1> %endif 2508 00004DB5 E89560 <1> call hexword 2509 <1> dop45: 2510 00004DB8 58 <1> pop ax 2511 <1> %if _MEMREF_AMOUNT 2512 00004DB9 8987[D488] <1> mov word [memrefs + bx + mrOffset], ax 2513 00004DBD 808F[DA88]01 <1> or byte [memrefs + bx + mrFlags], mrfBranchDirect 2514 00004DC2 E87C01 <1> call calc_linear_memref_and_mark_nonfree 2515 <1> %endif 2516 00004DC5 E98560 <1> jmp hexword 2517 <1> 2518 <1> 2519 <1> %if _COND 2520 <1> ; INP: [presizeflags] & PRE32A, d[reg_ecx] 2521 <1> ; OUT: dx:ax = (e)cx 2522 <1> cond_get_ecx: 2523 00004DC8 A1[640C] <1> mov ax, word [reg_ecx] 2524 00004DCB F606[1C89]20 <1> test byte [presizeflags], PRE32A ; A32 ? 2525 00004DD0 8B16[660C] <1> mov dx, word [reg_ecx+2] 2526 00004DD4 7502 <1> jnz .ecx 2527 00004DD6 31D2 <1> xor dx, dx 2528 <1> .ecx: 2529 00004DD8 C3 <1> retn 2530 <1> 2531 <1> ; INP: ax = 0..15 condition code, else invalid 2532 <1> ; OUT: w[condmsg] set as appropriate 2533 <1> cond_handle: 2534 00004DD9 83F80F <1> cmp ax, 15 2535 00004DDC 7738 <1> ja .return 2536 00004DDE 8B0E[980C] <1> mov cx, word [reg_efl] ; get flags 2537 00004DE2 89C3 <1> mov bx, ax 2538 00004DE4 80E3FE <1> and bl, ~1 ; make even 2539 00004DE7 2401 <1> and al, 1 ; 1 if negated condition 2540 00004DE9 80FB0C <1> cmp bl, 12 ; L/GE or LE/G? 2541 00004DEC 7306 <1> jae .specific ; yes --> 2542 <1> 2543 00004DEE 858F[BC89] <1> test cx, [cond_table+bx]; flag(s) set ? 2544 00004DF2 EB14 <1> jmp short .jump_ZF ; NZ if (normal) condition true --> 2545 <1> 2546 <1> .specific: 2547 00004DF4 80FB0E <1> cmp bl, 14 2548 00004DF7 7205 <1> jb .L_GE 2549 <1> 2550 <1> ; Handle LE/NG and G/NLE conditions. 2551 <1> ; The former says ZF | (OF ^ SF). 2552 <1> .LE_G: 2553 00004DF9 F6C140 <1> test cl, 40h ; ZF | .. 2554 00004DFC 750C <1> jnz .jump_true 2555 <1> 2556 <1> ; Handle L/NGE and GE/NL conditions. 2557 <1> ; The former says OF ^ SF. 2558 <1> .L_GE: 2559 00004DFE 81E18008 <1> and cx, 880h ; OF ^ SF 2560 00004E02 7408 <1> jz .jump_false ; both clear --> 2561 00004E04 81F18008 <1> xor cx, 880h 2562 <1> .jump_ZF: 2563 00004E08 7402 <1> jz .jump_false ; both set --> (or ZR: (normal) condition false) 2564 <1> .jump_true: 2565 00004E0A 3401 <1> xor al, 1 ; (negating ^ raw truth) = cooked truth 2566 <1> .jump_false: 2567 00004E0C 84C0 <1> test al, al ; true ? 2568 00004E0E 7507 <1> jnz .msg_jumping ; yes --> 2569 <1> 2570 <1> .msg_notjumping: 2571 00004E10 C706[3C89][A081] <1> mov word [condmsg], msg.condnotjump 2572 <1> .return: 2573 00004E16 C3 <1> retn 2574 <1> 2575 <1> .msg_jumping: 2576 00004E17 C706[3C89][A481] <1> mov word [condmsg], msg.condjump 2577 00004E1D C3 <1> retn 2578 <1> %endif 2579 <1> 2580 <1> 2581 <1> ; 8-bit relative jump (OP_REL8) 2582 <1> 2583 <1> dop_rel8: 2584 <1> %if _COND 2585 00004E1E A1[2089] <1> mov ax, word [index] 2586 00004E21 3DE300 <1> cmp ax, 0E3h 2587 00004E24 772C <1> ja .cond_done ; no conditional jump --> 2588 00004E26 7211 <1> jb .cond_noncx ; not jcxz, check for other --> 2589 <1> 2590 00004E28 E89DFF <1> call cond_get_ecx 2591 00004E2B 09D0 <1> or ax, dx 2592 00004E2D 7405 <1> jz .cond_msg_jumping 2593 <1> .cond_msg_notjumping: 2594 00004E2F E8DEFF <1> call cond_handle.msg_notjumping 2595 00004E32 EB1E <1> jmp short .cond_done 2596 <1> 2597 <1> .cond_msg_jumping: 2598 00004E34 E8E0FF <1> call cond_handle.msg_jumping 2599 00004E37 EB19 <1> jmp short .cond_done 2600 <1> 2601 <1> .cond_noncx: 2602 00004E39 3CE0 <1> cmp al, 0E0h 2603 00004E3B 7210 <1> jb .cond_nonloop ; not loop, check for other --> 2604 <1> 2605 00004E3D 50 <1> push ax 2606 00004E3E E887FF <1> call cond_get_ecx 2607 00004E41 48 <1> dec ax ; = 0 if cx is 1 2608 00004E42 09D0 <1> or ax, dx ; = 0 if cx is 1 and ecx is cx 2609 00004E44 58 <1> pop ax 2610 00004E45 74E8 <1> jz .cond_msg_notjumping ; if (e)cx is 1 --> 2611 00004E47 3CE2 <1> cmp al, 0E2h 2612 00004E49 74E9 <1> je .cond_msg_jumping ; loop without additional condition --> 2613 00004E4B 3495 <1> xor al, 0E0h^75h ; E0h (loopnz) to 75h (jnz), 2614 <1> ; E1h (loopz) to 74h (jz) 2615 <1> 2616 <1> .cond_nonloop: 2617 00004E4D 2C70 <1> sub al, 70h ; (ah = 0) 2618 00004E4F E887FF <1> call cond_handle ; call common code (checks for ax < 16) 2619 <1> .cond_done: 2620 <1> %endif 2621 00004E52 E88905 <1> call disgetbyte 2622 00004E55 98 <1> cbw 2623 00004E56 A2[1F89] <1> mov byte [disp8], al 2624 00004E59 E98A00 <1> jmp dop48 2625 <1> 2626 <1> ; 16/32-bit relative jump (OP_REL1632) 2627 <1> 2628 <1> dop_rel1632: 2629 <1> %if _COND 2630 00004E5C A1[2089] <1> mov ax, word [index] 2631 00004E5F 2D6002 <1> sub ax, SPARSE_BASE+80h 2632 00004E62 E874FF <1> call cond_handle 2633 <1> %endif 2634 00004E65 E88C05 <1> call disgetword 2635 00004E68 E80905 <1> call dischk32d 2636 00004E6B 745D <1> jz dop48_near ; if not 32-bit offset 2637 00004E6D 92 <1> xchg ax, dx ; mov dx, ax 2638 00004E6E E88305 <1> call disgetword 2639 <1> 2640 00004E71 813E[2089]E800 <1> cmp word [index], 00E8h 2641 00004E77 7429 <1> je .not_show_keyword ; no need to distinguish NEAR call --> 2642 <1> ; ax:dx between FFFFh:FF80h (-128) .. 0000h:007Fh (127): 2643 <1> ; == show "NEAR" keyword 2644 <1> ; 2645 <1> ; Note: This is not entirely correct. If a jump short is 2646 <1> ; used, the actual opcode is shorter, thus the 2647 <1> ; exact distance that can be reached by the jump short 2648 <1> ; differs from what the jump near can reach with 2649 <1> ; a rel16/32 displacement between -128..127. 2650 00004E79 83F8FF <1> cmp ax, -1 2651 00004E7C 7410 <1> je .checkminus 2652 00004E7E 85C0 <1> test ax, ax 2653 00004E80 7520 <1> jnz .not_show_keyword 2654 <1> .checkplus: 2655 00004E82 83FA7F <1> cmp dx, byte 127 2656 00004E85 7F1B <1> jg .not_show_keyword 2657 00004E87 83FA00 <1> cmp dx, 0 2658 00004E8A 7C16 <1> jl .not_show_keyword 2659 00004E8C EB0A <1> jmp .show_keyword 2660 <1> 2661 <1> .checkminus: 2662 00004E8E 83FA80 <1> cmp dx, byte -128 2663 00004E91 7C0F <1> jl .not_show_keyword 2664 00004E93 83FA00 <1> cmp dx, 0 2665 00004E96 7D0A <1> jge .not_show_keyword 2666 <1> 2667 <1> .show_keyword: 2668 00004E98 F606[DC00]20 <1> testopt [asm_options], disasm_show_near 2669 00004E9D 7503 <1> jnz .not_show_keyword 2670 00004E9F E85403 <1> call dop_show_near 2671 <1> .not_show_keyword: 2672 <1> 2673 <1> %if _PM 2674 <1> test byte [bCSAttr],40h ; for 32-bit code segments 2675 <1> jnz @F ; no need to display "DWORD " 2676 <1> %endif 2677 00004EA2 50 <1> push ax 2678 00004EA3 E88704 <1> call showdword 2679 00004EA6 58 <1> pop ax 2680 <1> @@: 2681 <1> 2682 00004EA7 8B1E[540B] <1> mov bx,[u_addr+0] 2683 00004EAB 031E[1889] <1> add bx,[dis_n] 2684 00004EAF 1306[1A89] <1> adc ax,[dis_n + 2] 2685 00004EB3 01DA <1> add dx,bx 2686 <1> %if _PM 2687 <1> adc ax,[u_addr+2] 2688 <1> %else 2689 00004EB5 83D000 <1> adc ax, 0 2690 <1> %endif 2691 <1> %if _MEMREF_AMOUNT 2692 00004EB8 E86B00 <1> call get_free_memref 2693 00004EBB 8987[D688] <1> mov word [memrefs + bx + mrOffset + 2], ax 2694 00004EBF 808F[DA88]10 <1> or byte [memrefs + bx + mrFlags], mrfA32 2695 <1> %endif 2696 00004EC4 E8865F <1> call hexword 2697 00004EC7 92 <1> xchg ax,dx 2698 00004EC8 EB42 <1> jmp s dop_branch_word 2699 <1> 2700 <1> 2701 <1> dop48_near: 2702 00004ECA 813E[2089]E800 <1> cmp word [index], 00E8h 2703 00004ED0 7414 <1> je @F ; no need to distinguish NEAR call --> 2704 <1> ; ax between FF80h (-128) .. 007Fh (127): 2705 <1> ; == show "NEAR" keyword 2706 <1> ; 2707 <1> ; Note: This is not entirely correct. If a jump short is 2708 <1> ; used, the actual opcode is shorter, thus the 2709 <1> ; exact distance that can be reached by the jump short 2710 <1> ; differs from what the jump near can reach with 2711 <1> ; a rel16/32 displacement between -128..127. 2712 00004ED2 83F880 <1> cmp ax, byte -128 2713 00004ED5 7C0F <1> jl @F 2714 00004ED7 83F87F <1> cmp ax, byte 127 2715 00004EDA 7F0A <1> jg @F 2716 00004EDC F606[DC00]20 <1> testopt [asm_options], disasm_show_near 2717 00004EE1 7503 <1> jnz @F 2718 00004EE3 E81003 <1> call dop_show_near 2719 <1> @@: 2720 <1> 2721 <1> %if _PM 2722 <1> test byte [bCSAttr],40h ; for 16-bit code segments 2723 <1> jz @F ; no need to display "WORD " 2724 <1> push ax 2725 <1> call showword 2726 <1> pop ax 2727 <1> @@: 2728 <1> %endif 2729 <1> 2730 <1> dop48: 2731 00004EE6 99 <1> cwd 2732 00004EE7 0306[540B] <1> add ax, word [u_addr] 2733 <1> %if _PM 2734 <1> adc dx, word [u_addr + 2] 2735 <1> %else 2736 00004EEB 83D200 <1> adc dx, 0 2737 <1> %endif 2738 00004EEE 0306[1889] <1> add ax, word [dis_n] 2739 00004EF2 1316[1A89] <1> adc dx, word [dis_n + 2] 2740 00004EF6 E87B04 <1> call dischk32d ; 32-bit opsize ? 2741 00004EF9 7411 <1> jz .16 ; no --> 2742 00004EFB 92 <1> xchg ax, dx 2743 00004EFC E84E5F <1> call hexword ; yes, display high word 2744 00004EFF 92 <1> xchg ax, dx 2745 <1> %if _MEMREF_AMOUNT 2746 00004F00 E82300 <1> call get_free_memref 2747 00004F03 8997[D688] <1> mov word [memrefs + bx + mrOffset + 2], dx 2748 00004F07 808F[DA88]10 <1> or byte [memrefs + bx + mrFlags], mrfA32 2749 <1> %endif 2750 <1> .16: 2751 <1> 2752 <1> dop_branch_word: 2753 <1> %if _MEMREF_AMOUNT 2754 00004F0C E81700 <1> call get_free_memref 2755 00004F0F 8987[D488] <1> mov word [memrefs + bx + mrOffset], ax 2756 00004F13 FF36[580B] <1> push word [u_addr + saSegSel] 2757 00004F17 8F87[D888] <1> pop word [memrefs + bx + mrSegmentSelector] 2758 00004F1B 808F[DA88]01 <1> or byte [memrefs + bx + mrFlags], mrfBranchDirect 2759 00004F20 E81E00 <1> call calc_linear_memref_and_mark_nonfree 2760 <1> %endif 2761 00004F23 E9275F <1> jmp hexword ; call hexword and return 2762 <1> 2763 <1> 2764 <1> %if _MEMREF_AMOUNT 2765 <1> ; INP: word [memrefs.free] 2766 <1> ; OUT: bx = byte index into memref array 2767 <1> ; CHG: - 2768 <1> ; STT: ss = ds = es 2769 <1> get_free_memref: 2770 00004F26 8B1E[1089] <1> mov bx, [memrefs.free] 2771 <1> get_memref_index_bx: 2772 00004F2A 83FB04 <1> cmp bx, _MEMREF_AMOUNT 2773 00004F2D 7309 <1> jae @F 2774 00004F2F 01DB <1> add bx, bx 2775 00004F31 01DB <1> add bx, bx 2776 00004F33 01DB <1> add bx, bx 2777 00004F35 01DB <1> add bx, bx 2778 <1> %if MEMREF_size != 16 2779 <1> %error Adjust multiplication 2780 <1> %endif 2781 00004F37 C3 <1> retn 2782 <1> 2783 <1> @@: 2784 00004F38 BA[7B74] <1> mov dx, msg.memrefs_invalid_internal 2785 00004F3B E8C262 <1> call putsz 2786 00004F3E E9BFB0 <1> jmp cmd3 2787 <1> 2788 <1> 2789 <1> ; INP: word [memrefs.free] 2790 <1> ; [memrefs] array entry 2791 <1> ; OUT: NC if valid segmented address (getlinear succeeded), 2792 <1> ; dword [memrefs + x + mrLinear] filled 2793 <1> ; word [memrefs.free] incremented 2794 <1> ; CY if invalid address, 2795 <1> ; [memrefs + x] re-initialised 2796 <1> ; word [memrefs.free] left unmodified 2797 <1> ; CHG: - 2798 <1> ; STT: ss = ds = es 2799 <1> calc_linear_memref_and_mark_nonfree: 2800 00004F41 50 <1> push ax 2801 00004F42 53 <1> push bx 2802 <1> _386_PM_o32 2803 00004F43 52 <1> push dx 2804 00004F44 E8DFFF <1> call get_free_memref 2805 00004F47 53 <1> push bx 2806 <1> _386_PM_o32 2807 00004F48 8B97[D488] <1> mov dx, word [memrefs + bx + mrOffset] 2808 00004F4C 8B9F[D888] <1> mov bx, word [memrefs + bx + mrSegmentSelector] 2809 00004F50 E89CE5 <1> call getlinear 2810 00004F53 5B <1> pop bx 2811 00004F54 7210 <1> jc .error 2812 <1> 2813 00004F56 8987[D088] <1> mov word [memrefs + bx + mrLinear], ax 2814 00004F5A 8997[D288] <1> mov word [memrefs + bx + mrLinear + 2], dx 2815 00004F5E FF06[1089] <1> inc word [memrefs.free] 2816 <1> 2817 <1> ; clc 2818 <1> .return: 2819 <1> _386_PM_o32 2820 00004F62 5A <1> pop dx 2821 00004F63 5B <1> pop bx 2822 00004F64 58 <1> pop ax 2823 00004F65 C3 <1> retn 2824 <1> 2825 <1> .error: 2826 00004F66 57 <1> push di 2827 00004F67 8DBF[D088] <1> lea di, [memrefs + bx] 2828 00004F6B E80400 <1> call init_one_memref 2829 00004F6E 5F <1> pop di 2830 00004F6F F9 <1> stc 2831 00004F70 EBF0 <1> jmp .return 2832 <1> 2833 <1> 2834 <1> ; INP: di -> memref to initialise 2835 <1> ; OUT: ax = 0 2836 <1> ; di -> past initialised memref 2837 <1> ; CHG: - 2838 <1> ; STT: ss = ds = es 2839 <1> init_one_memref: 2840 00004F72 31C0 <1> xor ax, ax 2841 <1> 2842 <1> ; INP: di -> memref to initialise 2843 <1> ; ax = 0 2844 <1> ; OUT: di -> past initialised memref 2845 <1> ; CHG: - 2846 <1> ; STT: ss = ds = es 2847 <1> .ax_already_zero: 2848 00004F74 AB <1> stosw ; zero-initialise all memrefs 2849 00004F75 AB <1> stosw ; mrLinear 2850 00004F76 AB <1> stosw 2851 00004F77 AB <1> stosw ; mrOffset 2852 00004F78 AB <1> stosw ; mrSegmentSelector 2853 00004F79 AB <1> stosw ; mrFlags 2854 00004F7A 40 <1> inc ax 2855 00004F7B AB <1> stosw 2856 00004F7C 48 <1> dec ax 2857 00004F7D AB <1> stosw ; mrLength = 1 2858 00004F7E C3 <1> retn 2859 <1> 2860 <1> 2861 <1> ; INP: si = address of segreg (reg_cs, reg_ds, etc) 2862 <1> ; di = address of index reg (reg_esi or reg_edi) 2863 <1> ; [memrefs] 2864 <1> ; [presizeflags] 2865 <1> ; byte [index] = which opcode 2866 <1> ; [reg_ecx] 2867 <1> ; [reg_efl] & 400h = Direction Flag 2868 <1> ; OUT: memrefs + bx -> current memref (partially filled) 2869 <1> ; CHG: bx, si, di, cx, dx 2870 <1> init_string_memref: 2871 00004F7F E8A4FF <1> call get_free_memref 2872 00004F82 FF34 <1> push word [si] ; get segment/selector 2873 00004F84 8F87[D888] <1> pop word [memrefs + bx + mrSegmentSelector] 2874 <1> ; store segment/selector 2875 00004F88 FF35 <1> push word [di] 2876 00004F8A 8F87[D488] <1> pop word [memrefs + bx + mrOffset] 2877 <1> ; store low word of offset 2878 00004F8E 8B0E[1689] <1> mov cx, word [string_memref_counter + 2] 2879 00004F92 8B16[1489] <1> mov dx, word [string_memref_counter] 2880 <1> 2881 00004F96 F606[1C89]20 <1> test byte [presizeflags], PRE32A 2882 00004F9B 740C <1> jz @F ; if 16-bit addressing --> 2883 00004F9D FF7502 <1> push word [di + 2] 2884 00004FA0 8F87[D688] <1> pop word [memrefs + bx + mrOffset + 2] 2885 <1> ; store high word of offset 2886 00004FA4 808F[DA88]10 <1> or byte [memrefs + bx + mrFlags], mrfA32 2887 <1> ; remember that it is a32 2888 <1> @@: 2889 <1> 2890 00004FA9 F606[1C89]02 <1> test byte [preflags], PREREP 2891 00004FAE 7505 <1> jnz @F ; if to take (e)cx repetitions --> 2892 00004FB0 BA0100 <1> mov dx, 1 2893 00004FB3 31C9 <1> xor cx, cx ; cx:dx = 1, just one element 2894 <1> @@: 2895 <1> 2896 00004FB5 50 <1> push ax 2897 00004FB6 B80100 <1> mov ax, 1 2898 00004FB9 F606[2089]01 <1> test byte [index], 1 ; element size is byte ? 2899 00004FBE 740A <1> jz @F ; yes, ax = 1 2900 00004FC0 40 <1> inc ax ; = 2 2901 00004FC1 F606[1C89]10 <1> test byte [presizeflags], PRE32D 2902 <1> ; element size is word ? 2903 00004FC6 7402 <1> jz @F ; yes, ax = 2 2904 00004FC8 01C0 <1> add ax, ax ; = 4 2905 <1> @@: 2906 <1> 2907 00004FCA 3C01 <1> cmp al, 1 ; byte size ? 2908 00004FCC 7415 <1> je @F ; yes, do not multiply --> 2909 00004FCE 01D2 <1> add dx, dx 2910 00004FD0 11C9 <1> adc cx, cx ; * 2, word to byte 2911 00004FD2 720A <1> jc .carry_counter 2912 00004FD4 3C02 <1> cmp al, 2 ; word size ? 2913 00004FD6 740B <1> je @F ; yes, done multiplying --> 2914 00004FD8 01D2 <1> add dx, dx 2915 00004FDA 11C9 <1> adc cx, cx ; * 4, dword to byte 2916 00004FDC 7305 <1> jnc @F 2917 <1> .carry_counter: 2918 00004FDE BAFFFF <1> mov dx, -1 2919 00004FE1 89D1 <1> mov cx, dx ; in case the counter is large 2920 <1> ; A carry out of an a16 address is not yet handled. 2921 <1> ; Note that eg cx=8000h a16 movsw may be valid to 2922 <1> ; copy exactly 64 KiB. Likewise, technically a 2923 <1> ; size of exactly 4 GiB is valid; however, our 2924 <1> ; memref format cannot store that. 2925 <1> @@: 2926 00004FE3 8997[DC88] <1> mov word [memrefs + bx + mrLength], dx 2927 00004FE7 898F[DE88] <1> mov word [memrefs + bx + mrLength + 2], cx 2928 <1> 2929 00004FEB F606[990C]04 <1> testopt [reg_efl], 400h ; DF set ? 2930 00004FF0 7411 <1> jz @F 2931 <1> 2932 00004FF2 0187[D488] <1> add word [memrefs + bx + mrOffset], ax 2933 00004FF6 8397[D688]00 <1> adc word [memrefs + bx + mrOffset + 2], 0 2934 00004FFB 2997[D488] <1> sub word [memrefs + bx + mrOffset], dx 2935 00004FFF 198F[D688] <1> sbb word [memrefs + bx + mrOffset + 2], cx 2936 <1> 2937 <1> @@: 2938 00005003 58 <1> pop ax 2939 00005004 C3 <1> retn 2940 <1> %endif 2941 <1> 2942 <1> 2943 <1> ; Check for ST(1) (OP_1CHK). 2944 <1> 2945 <1> dop49: 2946 00005005 58 <1> pop ax ;discard return address 2947 00005006 A0[1C83] <1> mov al,[regmem] 2948 00005009 2407 <1> and al,7 2949 0000500B 3C01 <1> cmp al,1 2950 0000500D 7403 <1> je dop50 ;if it's ST(1) 2951 0000500F E9CEF3 <1> jmp da14 ;another operand (but no comma) 2952 <1> 2953 <1> dop50: 2954 00005012 E961F4 <1> jmp da_op_end ; end of list --> 2955 <1> 2956 <1> ; ST(I) (OP_STI). 2957 <1> 2958 <1> dop_sti: 2959 00005015 A0[1C83] <1> mov al, byte [regmem] 2960 00005018 2407 <1> and al, 7 2961 0000501A 93 <1> xchg ax, bx ;mov bx,ax 2962 0000501B B85354 <1> mov ax, 'ST' 2963 0000501E E8E802 <1> call dis_stosw_lowercase; store ST(bl) 2964 00005021 B028 <1> mov al, '(' 2965 00005023 AA <1> stosb 2966 00005024 B83029 <1> mov ax, '0)' 2967 00005027 08D8 <1> or al, bl 2968 00005029 AB <1> stosw 2969 0000502A C3 <1> retn 2970 <1> 2971 <1> ; CRx (OP_CR). 2972 <1> 2973 <1> dop_cr: 2974 0000502B BB4352 <1> mov bx,'CR' 2975 0000502E E82F02 <1> call getregmem_r 2976 00005031 3C04 <1> cmp al,4 2977 00005033 7713 <1> ja disbad4 ;if too large 2978 00005035 7505 <1> jne dop52a 2979 00005037 C606[2283]05 <1> mov byte [dismach],5 ;CR4 is new to the 586 2980 <1> dop52a: 2981 0000503C 813E[2089]0202 <1> cmp word [index],SPARSE_BASE+22h 2982 00005042 7528 <1> jne dop55 ;if not MOV CRx,xx 2983 00005044 3C01 <1> cmp al,1 2984 00005046 7524 <1> jne dop55 ;if not CR1 2985 <1> 2986 00005048 E9BD01 <1> disbad4:jmp disbad ;can't MOV CR1,xx 2987 <1> 2988 <1> ; DRx (OP_DR). 2989 <1> 2990 <1> dop_dr: 2991 0000504B E81202 <1> call getregmem_r 2992 0000504E BB4452 <1> mov bx,'DR' 2993 00005051 B9FFFF <1> mov cx,-1 ;no max or illegal value 2994 00005054 EB16 <1> jmp s dop55 2995 <1> 2996 <1> ; TRx (OP_TR). 2997 <1> 2998 <1> dop_tr: 2999 00005056 E80702 <1> call getregmem_r 3000 00005059 3C03 <1> cmp al,3 3001 0000505B 7303E9A801 <1> jb disbad ;if too small 3002 00005060 3C06 <1> cmp al,6 3003 00005062 7305 <1> jae dop54a ;if TR6-7 3004 00005064 C606[2283]04 <1> mov byte [dismach],4 ;TR3-5 are new to the 486 3005 <1> dop54a: 3006 00005069 BB5452 <1> mov bx,'TR' 3007 <1> 3008 <1> dop55: 3009 0000506C 93 <1> xchg ax, bx 3010 0000506D E89902 <1> call dis_stosw_lowercase; store XX 3011 00005070 93 <1> xchg ax, bx 3012 00005071 0C30 <1> or al, '0' 3013 00005073 AA <1> stosb 3014 00005074 C3 <1> retn 3015 <1> 3016 <1> ; Segment register (OP_SEGREG). 3017 <1> 3018 <1> dop_segreg: 3019 00005075 E8E801 <1> call getregmem_r 3020 00005078 3C06 <1> cmp al,6 3021 0000507A 7203E98901 <1> jae disbad ; if not a segment register --> 3022 0000507F 3C02 <1> cmp al,2 3023 00005081 7505 <1> jne @F ; if not SS --> 3024 00005083 800E[3689]40 <1> or byte [disflags], DIS_I_MOV_SS ; note this 3025 <1> @@: 3026 00005088 3C04 <1> cmp al,4 3027 0000508A 7205 <1> jb dop57a ;if not FS or GS 3028 0000508C C606[2283]03 <1> mov byte [dismach],3;(no new 486-686 instructions involve seg regs) 3029 <1> dop57a: 3030 00005091 0410 <1> add al,16 3031 00005093 E974FC <1> jmp dop35 ;go print it out 3032 <1> 3033 <1> ; Sign-extended immediate byte (OP_IMMS8). "push xx" 3034 <1> 3035 <1> dop_imms8: 3036 00005096 E84503 <1> call disgetbyte 3037 00005099 3C00 <1> cmp al,0 3038 0000509B 93 <1> xchg ax,bx ;mov bl,al 3039 0000509C B02B <1> mov al,'+' 3040 0000509E 7D04 <1> jge dop58a ;if >= 0 3041 000050A0 F6DB <1> neg bl 3042 000050A2 B02D <1> mov al,'-' 3043 <1> dop58a: 3044 000050A4 AA <1> stosb 3045 000050A5 93 <1> xchg ax,bx ;mov al,bl 3046 000050A6 EB03 <1> jmp s dop59a ;call hexbyte and return 3047 <1> 3048 <1> 3049 <1> ; Immediate byte (OP_IMM8). 3050 <1> 3051 <1> dop_imm8: 3052 000050A8 E83303 <1> call disgetbyte 3053 <1> dop59a: 3054 000050AB E9A65D <1> jmp hexbyte ;call hexbyte and return 3055 <1> 3056 <1> 3057 <1> dop_imm8_int: 3058 000050AE E82D03 <1> call disgetbyte 3059 000050B1 3C03 <1> cmp al, 3 3060 000050B3 75F6 <1> jne dop59a 3061 000050B5 50 <1> push ax 3062 000050B6 E86902 <1> call showsize.byte 3063 000050B9 58 <1> pop ax 3064 000050BA EBEF <1> jmp dop59a 3065 <1> 3066 <1> dop_imm8_optional: 3067 000050BC E81F03 <1> call disgetbyte 3068 000050BF 3C0A <1> cmp al, 10 3069 000050C1 75E8 <1> jne dop59a 3070 000050C3 58 <1> pop ax 3071 000050C4 E9AFF3 <1> jmp da_op_end 3072 <1> 3073 <1> 3074 <1> ; Show MMx reg (OP_MMX; previously was "Show ECX if 32-bit LOOPxx"). 3075 <1> dop_mmx: 3076 000050C7 BB4D4D <1> mov bx, "MM" 3077 000050CA E89301 <1> call getregmem_r 3078 000050CD EB9D <1> jmp short dop55 3079 <1> 3080 <1> ; MMX register (in ModR/M part) 3081 <1> dop_mmx_mod: 3082 000050CF BB4D4D <1> mov bx, "MM" 3083 000050D2 E89501 <1> call getregmem 3084 000050D5 3CC0 <1> cmp al, 0C0h 3085 000050D7 7303E92C01 <1> jb disbad ; needs to be encoded as register --> 3086 000050DC 2407 <1> and al, 7 3087 000050DE EB8C <1> jmp short dop55 3088 <1> 3089 <1> 3090 <1> %if _MEMREF_AMOUNT 3091 <1> dop_stack_push: 3092 000050E0 B80200 <1> mov ax, 2 3093 <1> .special: 3094 000050E3 F606[1C89]10 <1> test byte [presizeflags], PRE32D 3095 000050E8 7402 <1> jz .iso16 3096 000050EA 01C0 <1> add ax, ax 3097 <1> .iso16: 3098 000050EC E837FE <1> call get_free_memref ; memrefs + bx -> the memref structure 3099 <1> 3100 000050EF 8987[DC88] <1> mov word [memrefs + bx + mrLength], ax 3101 000050F3 8B0E[6E0C] <1> mov cx, word [reg_esp + 2] 3102 000050F7 8B16[6C0C] <1> mov dx, word [reg_esp] 3103 000050FB 29C2 <1> sub dx, ax 3104 000050FD 83D900 <1> sbb cx, 0 3105 <1> 3106 00005100 8997[D488] <1> mov word [memrefs + bx + mrOffset], dx 3107 <1> 3108 00005104 B20A <1> mov dl, mrfMemDest | mrfMem 3109 <1> 3110 00005106 EB21 <1> jmp dop_stack_common 3111 <1> 3112 <1> 3113 <1> dop_stack_pop: 3114 00005108 B80200 <1> mov ax, 2 3115 <1> .special: 3116 0000510B 8B0E[6E0C] <1> mov cx, word [reg_esp + 2] 3117 0000510F 8B16[6C0C] <1> mov dx, word [reg_esp] 3118 <1> .leave: 3119 00005113 F606[1C89]10 <1> test byte [presizeflags], PRE32D 3120 00005118 7402 <1> jz .iso16 3121 0000511A 01C0 <1> add ax, ax 3122 <1> .iso16: 3123 0000511C E807FE <1> call get_free_memref ; memrefs + bx -> the memref structure 3124 <1> 3125 0000511F 8987[DC88] <1> mov word [memrefs + bx + mrLength], ax 3126 <1> 3127 00005123 8997[D488] <1> mov word [memrefs + bx + mrOffset], dx 3128 <1> 3129 00005127 B206 <1> mov dl, mrfMemSource | mrfMem 3130 <1> 3131 <1> dop_stack_common: 3132 00005129 A1[840C] <1> mov ax, word [reg_ss] ; get ss selector into ax 3133 0000512C 8987[D888] <1> mov word [memrefs + bx + mrSegmentSelector], ax 3134 <1> 3135 <1> _386_PM xchg ax, bx ; selector in bx 3136 <1> _386_PM call test_d_b_bit ; check whether a 32-bit ss 3137 <1> _386_PM xchg ax, bx 3138 <1> _386_PM jz .isstack16 3139 <1> _386_PM or dl, mrfA32 3140 <1> _386_PM mov word [memrefs + bx + mrOffset + 2], cx 3141 <1> .isstack16: 3142 <1> 3143 00005130 0897[DA88] <1> or byte [memrefs + bx + mrFlags], dl 3144 00005134 E80AFE <1> call calc_linear_memref_and_mark_nonfree 3145 00005137 EB53 <1> jmp dop_continue_maybe_end 3146 <1> 3147 <1> 3148 <1> dop_stack_special: 3149 00005139 A1[2089] <1> mov ax, [index] 3150 0000513C 3D3301 <1> cmp ax, GROUP7 + 3 ; call far [mem] ? 3151 0000513F 7414 <1> je .callfar 3152 00005141 84E4 <1> test ah, ah 3153 00005143 7544 <1> jnz .error 3154 00005145 57 <1> push di 3155 00005146 BF[F889] <1> mov di, .bytes ; list of opcodes 3156 00005149 B90B00 <1> mov cx, .bytes_amount 3157 0000514C F2AE <1> repne scasb 3158 0000514E 8A450A <1> mov al, [di + .bytes_amount - 1] 3159 00005151 5F <1> pop di 3160 00005152 7535 <1> jne .error ; if not one of these --> 3161 <1> 3162 00005154 A9 <1> db __TEST_IMM16 ; (skip mov) 3163 <1> .callfar: 3164 00005155 B044 <1> mov al, 40h + 4 3165 <1> 3166 <1> .haveinfo: 3167 00005157 89C3 <1> mov bx, ax 3168 00005159 83E03F <1> and ax, 3Fh 3169 0000515C 80FB80 <1> cmp bl, 80h 3170 0000515F 73AA <1> jae dop_stack_pop.special 3171 00005161 80FB40 <1> cmp bl, 40h 3172 00005164 7203E97AFF <1> jae dop_stack_push.special 3173 00005169 84C0 <1> test al, al 3174 0000516B 740F <1> jz .leave 3175 0000516D 3C01 <1> cmp al, 1 3176 0000516F 7518 <1> jne .error 3177 <1> .into: 3178 00005171 F606[990C]08 <1> testopt [reg_efl], 800h 3179 00005176 7414 <1> jz .none 3180 00005178 B046 <1> mov al, 40h + 6 3181 0000517A EBDB <1> jmp .haveinfo 3182 <1> 3183 <1> .leave: 3184 0000517C B80200 <1> mov ax, 2 ; pop size = 1 word or 1 dword 3185 0000517F 8B0E[720C] <1> mov cx, word [reg_ebp + 2] 3186 00005183 8B16[700C] <1> mov dx, word [reg_ebp] ; pop from address in (e)bp, not (e)sp 3187 00005187 EB8A <1> jmp dop_stack_pop.leave 3188 <1> 3189 <1> .error: 3190 00005189 E9AEF2 <1> jmp da_internal_error 3191 <1> 3192 <1> usesection lDEBUG_DATA_ENTRY 3193 <1> 3194 <1> .bytes: 3195 000089F8 CDCE <1> db 0CDh, 0CEh ; int, into 3196 000089FA CCF1 <1> db 0CCh, 0F1h ; int3, int1 3197 000089FC 9A <1> db 9Ah ; call far imm:imm 3198 000089FD CFCACB <1> db 0CFh, 0CAh, 0CBh ; iret, retf imm, retf 3199 00008A00 60 <1> db 60h ; pusha 3200 00008A01 61 <1> db 61h ; popa 3201 00008A02 C9 <1> db 0C9h ; leave 3202 <1> .bytes_amount: equ $ - .bytes 3203 <1> 3204 <1> ; In this table the bits have the following meaning: 3205 <1> ; 3206 <1> ; flag 80h: special pop 3207 <1> ; flag 40h: special push 3208 <1> ; if neither flag set: unusual, for leave and into 3209 <1> ; else: masked with 3Fh gives amount of bytes to push/pop 3210 <1> ; in o16, which needs to be doubled to get the amount 3211 <1> ; to push/pop in o32 instead. 3212 <1> .info: 3213 00008A03 46 <1> db 40h + 6 ; int 3214 00008A04 01 <1> db 1 ; into 3215 00008A05 46 <1> db 40h + 6 ; int3 3216 00008A06 46 <1> db 40h + 6 ; int1 3217 00008A07 44 <1> db 40h + 4 ; call far imm:imm 3218 00008A08 86 <1> db 80h + 6 ; iret 3219 00008A09 84 <1> db 80h + 4 ; retf imm 3220 00008A0A 84 <1> db 80h + 4 ; retf 3221 00008A0B 50 <1> db 40h + 16 ; pusha 3222 00008A0C 90 <1> db 80h + 16 ; popa 3223 00008A0D 00 <1> db 0 ; leave 3224 <1> 3225 <1> usesection lDEBUG_CODE 3226 <1> 3227 <1> .none: 3228 <1> %else 3229 <1> dop_stack_push: 3230 <1> dop_stack_pop: 3231 <1> dop_stack_special: 3232 <1> %endif 3233 <1> dop_continue_maybe_end: 3234 0000518C 58 <1> pop ax ; discard return address 3235 0000518D E948F2 <1> jmp da14_check_end ; next --> 3236 <1> 3237 <1> ; Set flag to always show size (OP_SHOSIZ). 3238 <1> dop_shosiz: 3239 00005190 800E[3689]10 <1> or byte [disflags],DIS_I_SHOWSIZ 3240 <1> dop60a: 3241 00005195 58 <1> pop ax ; discard return address 3242 00005196 E947F2 <1> jmp da14 ; next... 3243 <1> 3244 <1> dop_far_m: 3245 00005199 800E[3789]02 <1> setopt [disflags], DIS_I_FAR_M 3246 0000519E EBF5 <1> jmp dop60a 3247 <1> 3248 <1> dop_double_m: 3249 000051A0 800E[3789]04 <1> setopt [disflags], DIS_I_DOUBLE_M 3250 000051A5 EBEE <1> jmp dop60a 3251 <1> 3252 <1> 3253 <1> %if _MEMREF_AMOUNT 3254 <1> dop_m_src: 3255 000051A7 800E[3789]10 <1> setopt [disflags], DIS_I_M_SRC 3256 000051AC EBE7 <1> jmp dop60a 3257 <1> 3258 <1> dop_m_src_dst: 3259 000051AE 800E[3789]10 <1> setopt [disflags], DIS_I_M_SRC 3260 <1> dop_m_dst: 3261 000051B3 800E[3789]20 <1> setopt [disflags], DIS_I_M_DST 3262 000051B8 EBDB <1> jmp dop60a 3263 <1> %else 3264 <1> dop_m_src: equ dop60a 3265 <1> dop_m_src_dst: equ dop60a 3266 <1> dop_m_dst: equ dop60a 3267 <1> %endif 3268 <1> 3269 <1> 3270 <1> dop_short: 3271 000051BA F606[DC00]10 <1> testopt [asm_options], disasm_show_short 3272 000051BF 74D4 <1> jz dop60a 3273 000051C1 B85348 <1> mov ax, "SH" 3274 000051C4 E84201 <1> call dis_stosw_lowercase 3275 000051C7 B84F52 <1> mov ax, "OR" 3276 000051CA E83C01 <1> call dis_stosw_lowercase 3277 000051CD B85420 <1> mov ax, "T " 3278 000051D0 E83601 <1> call dis_stosw_lowercase 3279 <1> dop60a_1: 3280 000051D3 EBC0 <1> jmp dop60a 3281 <1> 3282 <1> dop_near: 3283 000051D5 F606[DC00]20 <1> testopt [asm_options], disasm_show_near 3284 000051DA 74F7 <1> jz dop60a_1 3285 000051DC E81700 <1> call dop_show_near 3286 <1> dop60a_2: 3287 000051DF EBF2 <1> jmp dop60a_1 3288 <1> 3289 <1> dop_far: 3290 000051E1 F606[DC00]40 <1> testopt [asm_options], disasm_show_far 3291 000051E6 74F7 <1> jz dop60a_2 3292 <1> dop_far_required: 3293 000051E8 B84641 <1> mov ax, "FA" ; store "FAR " 3294 000051EB E81B01 <1> call dis_stosw_lowercase 3295 000051EE B85220 <1> mov ax, "R " 3296 000051F1 E81501 <1> call dis_stosw_lowercase 3297 000051F4 EBE9 <1> jmp dop60a_2 3298 <1> 3299 <1> dop_show_near: 3300 000051F6 50 <1> push ax 3301 000051F7 B84E45 <1> mov ax, "NE" 3302 000051FA E80C01 <1> call dis_stosw_lowercase 3303 000051FD B84152 <1> mov ax, "AR" 3304 00005200 E80601 <1> call dis_stosw_lowercase 3305 00005203 B020 <1> mov al, " " 3306 00005205 AA <1> stosb 3307 00005206 58 <1> pop ax 3308 00005207 C3 <1> retn 3309 <1> 3310 <1> 3311 <1> disbad: 3312 00005208 8B26[3489] <1> mov sp,[savesp2] ;pop junk off stack 3313 0000520C B8[BB43] <1> mov ax, da13 3314 0000520F 50 <1> push ax 3315 <1> _386_PM_o32 ; xor eax, eax 3316 00005210 31C0 <1> xor ax, ax 3317 <1> _386_PM_o32 ; mov dword [dis_n], eax 3318 00005212 A3[1889] <1> mov word [dis_n], ax 3319 00005215 A3[1C89] <1> mov word [preflags], ax ; clear preflags and preused 3320 <1> %if _COND 3321 00005218 A3[3C89] <1> mov word [condmsg], ax ; initialize conditions message 3322 <1> %endif 3323 0000521B C606[2C89]80 <1> mov byte [rmsize], 80h ; don't display any memory 3324 00005220 A3[2283] <1> mov word [dismach], ax ; forget about the machine type 3325 00005223 8026[3689]FB <1> and byte [disflags],~DIS_I_SHOW ;and flags 3326 00005228 E8B301 <1> call disgetbyte 3327 0000522B BF[A489] <1> mov di,prefixlist 3328 0000522E B90C00 <1> mov cx,N_PREFIX 3329 00005231 F2AE <1> repne scasb 3330 00005233 740B <1> je .namedprefix ;if it's a named prefix 3331 <1> _386_PM_o32 ; dec dword [dis_n] 3332 00005235 FF0E[1889] <1> dec word [dis_n] 3333 00005239 BBC101 <1> mov bx,MN_DB ;offset of 'DB' mnemonic 3334 0000523C BEB516 <1> mov si, fake_oplist.op_imm8 - oplists 3335 0000523F C3 <1> retn 3336 <1> 3337 <1> .namedprefix: 3338 00005240 800E[3689]08 <1> or byte [disflags],DIS_I_UNUSED ;print special flag 3339 00005245 BB0B00 <1> mov bx,N_PREFIX - 1 3340 00005248 29CB <1> sub bx,cx 3341 0000524A D1E3 <1> shl bx,1 3342 0000524C 83FB0C <1> cmp bx, byte 6 *2 3343 0000524F 7207 <1> jb .segprefix ; if SEG directive --> 3344 <1> %if _PM 3345 <1> cmp bx, byte 10 *2 3346 <1> jb .non16prefix ; if not OSIZE or ASIZE --> 3347 <1> test byte [bCSAttr], 40h; 32-bit code segment ? 3348 <1> jz .non16prefix ; no, O32 or A32 --> 3349 <1> add bx, byte 4 ; yes, change to O16 or A16 3350 <1> .non16prefix: 3351 <1> %endif 3352 00005251 8B9F[A489] <1> mov bx,[prefixmnem+bx-6*2] 3353 00005255 31F6 <1> xor si, si ; no operand (empty oplist) 3354 00005257 C3 <1> retn 3355 <1> 3356 <1> .segprefix: 3357 00005258 8DB7B716 <1> lea si, [bx + fake_oplist.op_segments - oplists] 3358 <1> ; -> fake OPLIST for segments 3359 0000525C BB5108 <1> mov bx,MN_SEG 3360 0000525F C3 <1> retn 3361 <1> 3362 <1> 3363 <1> usesection ASMTABLE1, 1 3364 <1> fake_oplist: 3365 <1> .op_imm8: 3366 000016B5 1100 <1> db OP_IMM8, 0 3367 <1> .op_segments: 3368 000016B7 2B00 <1> db OP_ES, 0 3369 000016B9 2900 <1> db OP_CS, 0 3370 000016BB 2E00 <1> db OP_SS, 0 3371 000016BD 2A00 <1> db OP_DS, 0 3372 000016BF 2C00 <1> db OP_FS, 0 3373 000016C1 2D00 <1> db OP_GS, 0 3374 <1> __SECT__ 3375 <1> 3376 <1> 3377 <1> ; GETREGMEM_R - Get the reg part of the reg/mem part of the instruction 3378 <1> ; Uses CL 3379 <1> 3380 <1> getregmem_r: 3381 00005260 E80700 <1> call getregmem 3382 <1> 3383 <1> ; INP: al = bits 3 to 5 has value to extract 3384 <1> ; OUT: al = (INP:al >> 3) & 7 3385 <1> ; CHG: cl 3386 <1> da_get_bits_3_to_5: 3387 00005263 B103 <1> mov cl,3 3388 00005265 D2E8 <1> shr al,cl 3389 00005267 2407 <1> and al,7 3390 00005269 C3 <1> ret 3391 <1> 3392 <1> ; GETREGMEM - Get the reg/mem part of the instruction 3393 <1> 3394 <1> getregmem: 3395 0000526A F606[1D89]80 <1> test byte [preused],GOTREGM 3396 0000526F 750B <1> jnz grm1 ;if we have it already 3397 00005271 800E[1D89]80 <1> or byte [preused],GOTREGM 3398 00005276 E86501 <1> call disgetbyte ;get the byte 3399 00005279 A2[1C83] <1> mov [regmem],al ;save it away 3400 <1> 3401 0000527C A0[1C83] <1> grm1: mov al,[regmem] 3402 0000527F C3 <1> ret 3403 <1> 3404 <1> dis_lowercase_w: 3405 00005280 86C4 <1> xchg al, ah 3406 00005282 E80200 <1> call dis_lowercase 3407 00005285 86C4 <1> xchg al, ah 3408 <1> dis_lowercase: 3409 00005287 3C41 <1> cmp al, 'A' 3410 00005289 720D <1> jb .not 3411 0000528B 3C5A <1> cmp al, 'Z' 3412 0000528D 7709 <1> ja .not 3413 0000528F F606[DC00]01 <1> testopt [asm_options], disasm_lowercase 3414 00005294 7402 <1> jz .not 3415 00005296 0C20 <1> or al, 20h 3416 <1> .not: 3417 00005298 C3 <1> retn 3418 <1> 3419 <1> 3420 <1> dis_lowercase_refmem_w: 3421 00005299 86C4 <1> xchg al, ah 3422 0000529B E80200 <1> call dis_lowercase_refmem 3423 0000529E 86C4 <1> xchg al, ah 3424 <1> dis_lowercase_refmem: 3425 000052A0 3C41 <1> cmp al, 'A' 3426 000052A2 720D <1> jb .not 3427 000052A4 3C5A <1> cmp al, 'Z' 3428 000052A6 7709 <1> ja .not 3429 000052A8 F606[DC00]08 <1> testopt [asm_options], disasm_lowercase_refmem 3430 000052AD 7402 <1> jz .not 3431 000052AF 0C20 <1> or al, 20h 3432 <1> .not: 3433 000052B1 C3 <1> retn 3434 <1> 3435 <1> 3436 <1> ; Show the opcode mnemonic 3437 <1> ; 3438 <1> ; INP: si-> Opcode mnemonic string of an mnlist entry. 3439 <1> ; w[si-2] & 0Fh = Length of that string. 3440 <1> ; OUT: di-> next available byte in output line 3441 <1> ; (>= line_out + 32 due to padding) 3442 <1> ; CHG: ax, cx, si 3443 <1> showop: 3444 000052B2 BF[CA07] <1> mov di, line_out+MNEMONOFS 3445 000052B5 56 <1> push si 3446 <1> 3447 000052B6 8B4CFE <1> mov cx, [si-2] 3448 000052B9 83E10F <1> and cx, 0Fh 3449 <1> .loop: 3450 000052BC AC <1> lodsb 3451 000052BD E8C7FF <1> call dis_lowercase 3452 000052C0 AA <1> stosb 3453 000052C1 E2F9 <1> loop .loop 3454 <1> 3455 000052C3 58 <1> pop ax ; ax-> mnemonic 3456 000052C4 3D[900B] <1> cmp ax, mnlist_a_suffix_allowed ; non-suffixed mnemonic ? 3457 000052C7 7227 <1> jb .nosuffix ; yes --> 3458 000052C9 3D[B40B] <1> cmp ax, mnlist_o_suffix_allowed ; optional address size suffix ? 3459 000052CC 7208 <1> jb .a_suffix_allowed ; yes --> 3460 000052CE 3D[290C] <1> cmp ax, mnlist_o_suffix_required; optional operand size suffix ? 3461 000052D1 B410 <1> mov ah, PREOSIZE ; (OSIZE: check OSIZE/O32) 3462 000052D3 7309 <1> jae .suffix_decide ; no, it's required --> 3463 000052D5 A9 <1> db __TEST_IMM16 ; (skip mov) 3464 <1> .a_suffix_allowed: 3465 000052D6 B420 <1> mov ah, PREASIZE ; optional ASIZE: check ASIZE/A32 3466 <1> 3467 <1> .suffix_decide_optional: ; check whether the suffix is necessary 3468 000052D8 8426[1C89] <1> test byte [preflags], ah ; check if such a prefix occured (ZR if not) 3469 000052DC 740E <1> jz .suffix_invisible ; no, is default form --> (hide suffix) 3470 <1> 3471 <1> .suffix_decide: ; suffix will be displayed, now only decide which 3472 000052DE B057 <1> mov al, 'W' 3473 000052E0 8426[1C89] <1> test byte [presizeflags], ah ; 32-bit form ? 3474 000052E4 7402 <1> jz .got_suffix ; no --> 3475 000052E6 B044 <1> mov al, 'D' 3476 <1> .got_suffix: 3477 000052E8 E89CFF <1> call dis_lowercase 3478 000052EB AA <1> stosb ; store suffix 3479 <1> 3480 <1> .suffix_invisible: ; notional suffix either displayed or left hidden, 3481 000052EC 0826[1D89] <1> or byte [preused], ah ; in any case, mark opcode prefix as used 3482 <1> 3483 <1> .nosuffix: 3484 <1> 3485 <1> ; Store blanks to pad to 8 characters, but at least one 3486 000052F0 B020 <1> mov al, 32 3487 <1> .pad: 3488 000052F2 AA <1> stosb 3489 000052F3 81FF[D207] <1> cmp di, line_out+MNEMONOFS+8 3490 000052F7 72F9 <1> jb .pad 3491 <1> 3492 000052F9 C3 <1> retn 3493 <1> 3494 <1> 3495 <1> ; INP: byte [segmnt] = number of segment register 3496 <1> ; [segrgnam] = uppercase segment register names 3497 <1> ; CHG: bx, ax 3498 <1> ; OUT: ax = uppercase segment register name 3499 <1> showseg_uppercase_ax: 3500 000052FA A0[2D89] <1> mov al,[segmnt] ;segment number 3501 000052FD 98 <1> cbw 3502 000052FE D1E0 <1> shl ax,1 3503 00005300 93 <1> xchg ax,bx ;mov bx,ax 3504 00005301 8B87[7289] <1> mov ax,[segrgnam+bx] ;get register name 3505 00005305 C3 <1> retn 3506 <1> 3507 <1> ; SHOWSEG - Show the segment descriptor in SEGMNT 3508 <1> ; Entry DI Where to put it 3509 <1> ; Exit DI Updated 3510 <1> ; Uses AX, BX 3511 <1> 3512 <1> showseg: 3513 00005306 E8F1FF <1> call showseg_uppercase_ax 3514 <1> dis_stosw_lowercase: 3515 00005309 E874FF <1> call dis_lowercase_w 3516 0000530C AB <1> stosw 3517 0000530D C3 <1> retn 3518 <1> 3519 <1> 3520 <1> ; Write a size specifier to the buffer 3521 <1> ; and set some flags 3522 <1> ; INP: ah = r/m size value, 3523 <1> ; F0h byte (less than zero) 3524 <1> ; 00h word (equal to zero) 3525 <1> ; 10h dword (greater than zero, but != 20h) 3526 <1> ; 20h qword (greater than zero, == 20h) 3527 <1> ; di-> buffer 3528 <1> ; OUT: di-> behind size specifier in buffer 3529 <1> ; by[rmsize] set 3530 <1> ; wo[sizeloc]-> size specifier in buffer 3531 <1> ; CHG: ax 3532 <1> ; 3533 <1> ; Size specifiers are BYTE, WORD, DWORD, and QWORD. One 3534 <1> ; blank is appended to the size specifier. 3535 <1> ; 3536 <1> ; Size specifiers are lowercased if that option is selected. 3537 <1> showsize: 3538 0000530E 8826[2C89] <1> mov [rmsize], ah ; save r/m size 3539 00005312 893E[3A89] <1> mov [sizeloc], di ; save where we're putting this 3540 00005316 B051 <1> mov al, 'Q' 3541 00005318 80FC20 <1> cmp ah, 20h ; QWORD ? 3542 0000531B 7412 <1> je .qword ; yes --> 3543 0000531D 80FC00 <1> cmp ah, 0 3544 00005320 7D09 <1> jge .notbyte ; if word or dword --> 3545 <1> .byte: 3546 00005322 B85445 <1> mov ax, "TE" 3547 00005325 50 <1> push ax 3548 00005326 B84259 <1> mov ax, "BY" 3549 00005329 EB0F <1> jmp s .common 3550 <1> 3551 <1> .notbyte: 3552 0000532B 7406 <1> je .word ; if word 3553 <1> .dword: 3554 0000532D B044 <1> mov al, 'D' 3555 <1> .qword: 3556 0000532F E855FF <1> call dis_lowercase 3557 00005332 AA <1> stosb 3558 <1> .word: 3559 00005333 B85244 <1> mov ax, "RD" 3560 00005336 50 <1> push ax 3561 00005337 B8574F <1> mov ax, "WO" 3562 <1> .common: 3563 0000533A E8CCFF <1> call dis_stosw_lowercase 3564 0000533D 58 <1> pop ax 3565 0000533E E8C8FF <1> call dis_stosw_lowercase 3566 00005341 B020 <1> mov al, 32 3567 00005343 AA <1> stosb 3568 <1> showptr.ret: 3569 00005344 C3 <1> retn 3570 <1> 3571 <1> ; Write "PTR " to a buffer if NASM syntax is not selected. 3572 <1> ; INP: di-> buffer 3573 <1> ; OUT: di-> behind written string "PTR " (or unchanged) 3574 <1> ; CHG: ax 3575 <1> ; 3576 <1> ; The string is lowercased if that option is selected. 3577 <1> showptr: 3578 00005345 F606[DC00]04 <1> testopt [asm_options], disasm_nasm 3579 0000534A 75F8 <1> jnz .ret 3580 0000534C B85054 <1> mov ax, "PT" 3581 0000534F E8B7FF <1> call dis_stosw_lowercase 3582 00005352 B85220 <1> mov ax, "R " 3583 00005355 EBB2 <1> jmp s dis_stosw_lowercase 3584 <1> 3585 <1> ; Write "DWORD " to a buffer 3586 <1> ; INP: di-> buffer 3587 <1> ; OUT: di-> behind written string "DWORD " 3588 <1> ; CHG: ax 3589 <1> ; 3590 <1> ; The string is lowercased if that option is selected. 3591 <1> showdword: equ showsize.dword 3592 <1> showword: equ showsize.word 3593 <1> 3594 <1> ; DISP32 - Print 32-bit displacement for addressing modes. 3595 <1> ; Entry None 3596 <1> ; Exit None 3597 <1> ; Uses AX 3598 <1> 3599 <1> disp32: 3600 00005357 E89A00 <1> call disgetword 3601 <1> .ax: 3602 0000535A 50 <1> push ax 3603 0000535B E89600 <1> call disgetword 3604 0000535E E8EC5A <1> call hexword 3605 00005361 58 <1> pop ax 3606 00005362 E9E85A <1> jmp hexword 3607 <1> 3608 <1> ; SHOWREG16 - Show 16-bit register name. 3609 <1> ; 3610 <1> ; INP: al = register number, 0 to 7 3611 <1> ; di -> buffer 3612 <1> ; OUT: register name stored to buffer 3613 <1> ; ax = INP:al * 2 3614 <1> showreg16: 3615 00005365 98 <1> cbw 3616 00005366 D1E0 <1> shl ax,1 3617 00005368 93 <1> xchg ax,bx 3618 00005369 50 <1> push ax 3619 0000536A 8B87[6289] <1> mov ax,[rgnam16+bx] 3620 0000536E E898FF <1> call dis_stosw_lowercase 3621 00005371 58 <1> pop ax 3622 00005372 93 <1> xchg ax,bx 3623 00005373 C3 <1> ret 3624 <1> 3625 <1> 3626 <1> ; DISCHK32D - Check for O32 (32-bit operand size). 3627 <1> dischk32d: 3628 00005374 800E[1D89]10 <1> or byte [preused], PREOSIZE 3629 00005379 F606[1C89]10 <1> test byte [presizeflags], PRE32D 3630 0000537E C3 <1> retn 3631 <1> 3632 <1> 3633 <1> ; SHOWMACH - Return string "[needs math coprocessor]", etc. 3634 <1> ; Entry di -> table of 5 words 3635 <1> ; cx = instruction 3636 <1> ; Exit si Address of string 3637 <1> ; cx Length of string, or 0 if not needed 3638 <1> ; Uses al, di 3639 <1> 3640 <1> showmach: 3641 0000537F BE[F57C] <1> mov si,needsmsg ; candidate message 3642 00005382 F606[2383]01 <1> test byte [dmflags],DM_COPR 3643 00005387 741E <1> jz sm1 ; if not a coprocessor instruction 3644 00005389 C6440937 <1> mov byte [si + needsmsg.digit_6_ofs], '7' 3645 <1> ; change message text 3646 0000538D A0[100B] <1> mov al,[mach_87] 3647 00005390 803E[0F0B]00 <1> cmp byte [has_87],0 3648 00005395 7517 <1> jnz sm2 ; if it has a coprocessor 3649 00005397 A0[0E0B] <1> mov al,[machine] 3650 0000539A 3A06[2283] <1> cmp al,[dismach] 3651 0000539E 7214 <1> jb sm3 ; if we display the message 3652 000053A0 BE[007D] <1> mov si,needsmath ; print this message instead 3653 000053A3 B91800 <1> mov cx,needsmath_L 3654 000053A6 C3 <1> retn 3655 <1> 3656 <1> sm1: 3657 000053A7 C6440936 <1> mov byte [si + needsmsg.digit_6_ofs], '6' 3658 <1> ; reset message text 3659 000053AB A0[0E0B] <1> mov al,[machine] 3660 <1> sm2: 3661 000053AE 3A06[2283] <1> cmp al,[dismach] 3662 000053B2 730C <1> jae sm4 ; if no message (so far) 3663 <1> sm3: 3664 000053B4 A0[2283] <1> mov al,[dismach] 3665 000053B7 0430 <1> add al,'0' 3666 000053B9 884407 <1> mov byte [si + needsmsg.digit_x_ofs], al 3667 000053BC B90B00 <1> mov cx,needsmsg_L ; length of the message 3668 000053BF C3 <1> retn 3669 <1> 3670 <1> ; Check for obsolete instruction. 3671 <1> sm4: 3672 000053C0 BE[187D] <1> mov si, obsolete ; candidate message 3673 000053C3 89C8 <1> mov ax, cx ; get info on this instruction 3674 000053C5 B90500 <1> mov cx, 5 3675 000053C8 F2AF <1> repne scasw 3676 000053CA 7511 <1> jne sm6 ; if no matches 3677 000053CC BF[3C83] <1> mov di, obsmach + 5 - 1 3678 000053CF 29CF <1> sub di, cx 3679 000053D1 31C9 <1> xor cx, cx ; clear CX: no message 3680 000053D3 A0[100B] <1> mov al, byte [mach_87] 3681 000053D6 3A05 <1> cmp al, byte [di] 3682 000053D8 7E03 <1> jle sm5 ; if this machine is OK 3683 000053DA B90A00 <1> mov cx, obsolete_L 3684 <1> sm5: 3685 000053DD C3 <1> retn 3686 <1> 3687 <1> sm6: equ sm5 3688 <1> 3689 <1> 3690 <1> ; DISGETBYTE - Get byte for disassembler. 3691 <1> ; Entry None 3692 <1> ; Exit AL Next byte in instruction stream 3693 <1> ; Uses None 3694 <1> 3695 <1> disgetbyte: 3696 000053DE 1E <1> push ds 3697 <1> _386_PM_o32 ; push esi 3698 000053DF 56 <1> push si ; save ds, (e)si 3699 <1> _386_PM_o32 ; mov esi, dword [u_addr] 3700 000053E0 8B36[540B] <1> mov si, word [u_addr] 3701 <1> _386_PM_o32 ; add esi, dword [dis_n] 3702 000053E4 0336[1889] <1> add si, word [dis_n] ; index to the right byte 3703 000053E8 8E1E[580B] <1> mov ds, word [u_addr + saSegSel] 3704 <1> _386_PM_a32 3705 000053EC AC <1> lodsb ; get the byte 3706 <1> _386_PM_o32 ; pop esi 3707 000053ED 5E <1> pop si 3708 000053EE 1F <1> pop ds ; restore regs 3709 <1> _386_PM_o32 ; inc dword [dis_n] 3710 000053EF FF06[1889] <1> inc word [dis_n] ; indicate that we've gotten this byte 3711 000053F3 C3 <1> retn 3712 <1> 3713 <1> 3714 <1> ; DISGETWORD - Get word for disassembler. 3715 <1> ; Entry None 3716 <1> ; Exit AX Next word 3717 <1> ; Uses None 3718 <1> 3719 <1> disgetword: 3720 000053F4 1E <1> push ds 3721 <1> _386_PM_o32 ; push esi 3722 000053F5 56 <1> push si ; save ds, (e)si 3723 <1> _386_PM_o32 ; mov esi, dword [u_addr] 3724 000053F6 8B36[540B] <1> mov si, word [u_addr] 3725 <1> _386_PM_o32 ; add esi, dword [dis_n] 3726 000053FA 0336[1889] <1> add si, word [dis_n] ; index to the right byte 3727 000053FE 8E1E[580B] <1> mov ds, word [u_addr + saSegSel] 3728 <1> _386_PM_a32 3729 00005402 AD <1> lodsw ; get the word 3730 <1> _386_PM_o32 ; pop esi 3731 00005403 5E <1> pop si 3732 00005404 1F <1> pop ds ; restore regs 3733 <1> _386_PM_o32 ; add dword [dis_n], byte 2 3734 00005405 8306[1889]02 <1> add word [dis_n], byte 2 ; indicate that we've gotten this word 3735 0000540A C3 <1> retn 3736 <1> 3737 <1> 3738 <1> ; DISSHOWBYTES - Show bytes for the disassembler. 3739 <1> ; Entry BX Number of bytes (must be > 0) 3740 <1> ; di-> output line 3741 <1> ; Exit u_addr updated 3742 <1> ; Uses BX, (E)SI. 3743 <1> 3744 <1> disshowbytes: 3745 <1> _386_PM_o32 ; mov esi, dword [u_addr] 3746 0000540B 8B36[540B] <1> mov si, word [u_addr] 3747 0000540F 8E1E[580B] <1> mov ds, word [u_addr + saSegSel] 3748 <1> .loop: 3749 <1> _386_PM_a32 3750 00005413 AC <1> lodsb 3751 00005414 E83D5A <1> call hexbyte 3752 00005417 4B <1> dec bx 3753 00005418 75F9 <1> jnz .loop 3754 0000541A 16 <1> push ss 3755 0000541B 1F <1> pop ds 3756 <1> _386_PM_o32 ; mov dword [u_addr], esi 3757 0000541C 8936[540B] <1> mov word [u_addr], si 3758 00005420 C3 <1> retn 3759 <1> 3760 <1> ; MOVEOVER - Move the line to the right. 3761 <1> ; Entry DI Last address + 1 of line so far 3762 <1> ; Exit CX Number of bytes to move 3763 <1> ; DI Updated 3764 <1> ; Uses SI 3765 <1> moveover: 3766 00005421 833E[3A89]00 <1> cmp word [sizeloc], byte 0 3767 00005426 7404 <1> je mo1 ; if sizeloc not saved 3768 00005428 010E[3A89] <1> add word [sizeloc], cx 3769 <1> 3770 <1> mo1: 3771 0000542C 89FE <1> mov si, di 3772 0000542E 01CF <1> add di, cx 3773 00005430 89F9 <1> mov cx, di 3774 00005432 81E9[CA07] <1> sub cx, line_out+MNEMONOFS 3775 00005436 57 <1> push di 3776 00005437 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND as below 3777 00005438 4E <1> dec si 3778 00005439 4F <1> dec di 3779 <1> 3780 <1> 3781 <1> numdef AMD_ERRATUM_109_WORKAROUND, 1 3782 <1> ; Refer to comment in init.asm init_movp. 3783 <1> 3784 <1> %if _AMD_ERRATUM_109_WORKAROUND 3785 0000543A E308 <1> jcxz @FF 3786 0000543C 83F914 <1> cmp cx, 20 3787 0000543F 7703 <1> ja @FF 3788 <1> @@: 3789 00005441 A4 <1> movsb 3790 00005442 E2FD <1> loop @B 3791 <1> @@: 3792 <1> %endif 3793 00005444 F3A4 <1> rep movsb 3794 00005446 5F <1> pop di 3795 00005447 FC <1> cld 3796 00005448 C3 <1> retn 2355 2356 2357 %if _PM 2358 %include "pmdata.asm" 2359 %include "pminit.asm" 2360 %include "pmentry.asm" 2361 2362 2363 usesection lDEBUG_CODE 2364 2365 resetmode_and_test_d_b_bit: 2366 %if _PM 2367 call resetmode 2368 %endif 2369 2370 ; Test if bx is a 32-bit selector 2371 ; (as opposed to a 16-bit selector or a segment) 2372 ; 2373 ; INP: bx = selector (PM) or segment (86M) 2374 ; OUT: NZ = 32-bit 2375 ; ZR = 16-bit (always if 86M) 2376 ; NC 2377 ; REM: This checks whether a code segment's D bit or 2378 ; a stack segment's B bit is set. This operation 2379 ; is not meaningful otherwise. 2380 test_d_b_bit: 2381 _386 call ispm 2382 _386 jz .pm ; 386 and PM, check selector --> 2383 ; not PM or no 386 2384 .ZR: 2385 cmp al, al ; ZR, NC 2386 retn 2387 .pm: 2388 [cpu 386] 2389 push eax 2390 xor eax, eax ; use rights = 0 if inaccessible 2391 lar eax, ebx ; access rights 2392 ; eax is unchanged if the access rights are inaccessible 2393 ; (and NZ is set in that case) 2394 test eax, 400000h ; test bit (NC) 2395 pop eax 2396 retn 2397 __CPU__ 2398 2399 2400 ; Test if selector in bx has a limit beyond 64 KiB - 1 B 2401 ; 2402 ; INP: bx = selector (PM) or segment (86M) 2403 ; OUT: NZ = limit above 64 KiB - 1 B 2404 ; ZR = limit below 64 KiB (always if 86M) 2405 ; NC 2406 test_high_limit: 2407 _386 call ispm 2408 _386 jz .pm ; 386 and PM, check selector --> 2409 ; not PM or no 386 2410 jmp test_d_b_bit.ZR 2411 2412 .pm: 2413 [cpu 386] 2414 push eax 2415 xor eax, eax ; use limit = 0 if inaccessible 2416 lsl eax, ebx ; segment limit 2417 ; eax is unchanged if the segment limit is inaccessible 2418 ; (and NZ is set in that case) 2419 test eax, 0FFFF_0000h ; (NC) ZR if low limit, else NZ 2420 pop eax 2421 retn 2422 __CPU__ 2423 2424 subcpureset ; subcpu used in pminit.asm 2425 %endif ; _PM 2426 2427 %if _NOEXTENDER 2428 ; When we support non-extended DPMI, some calls to Int21 2429 ; are (extended) Int21 calls and some are (not extended) 2430 ; calls down to the real mode Int21. doscall is a macro 2431 ; that will always call the non-extended Int21. 2432 2433 ; Execute a non-extended DOS call 2434 _doscall: 2435 pushf 2436 call ispm 2437 jnz .rm 2438 subcpu 286 2439 ; Execute a non-extended DOS call from PM 2440 popf 2441 .pm: 2442 push word [ss:pspdbg] 2443 push 21h 2444 call intcall 2445 retn 2446 subcpureset 2447 .rm: 2448 popf 2449 jmp _int21 2450 %endif 2451 2452 %if _SYMBOLIC 2453 %include "symbols.asm" 2454 %else 2455 2456 %if _PM 2457 ; For branches other than symbolic, here's selector_to_segment 2458 ; (as used by the puts in lineio.asm). Picked from symsnip 2459 ; binsrch.asm at revision 9c232415d568. 2460 ; INP: word [ss:sp] = selector to access 2461 ; OUT: word [ss:sp] = segment value to use for access 2462 ; CHG: - 2463 selector_to_segment: 2464 lframe near 2465 lpar word, in_selector_out_segment 2466 lpar_return 2467 lenter 2468 2469 call ispm ; is it PM ? 2470 jnz .ret ; no, 86M --> (selector == segment) 2471 2472 subcpu 286 2473 push ax 2474 push bx 2475 push cx 2476 push dx 2477 2478 mov bx, word [bp + ?in_selector_out_segment] 2479 mov ax, 6 2480 int 31h ; get segment base to cx:dx 2481 shr dx, 4 2482 shl cx, 12 2483 or dx, cx 2484 mov word [bp + ?in_selector_out_segment], dx 2485 2486 pop dx 2487 pop cx 2488 pop bx 2489 pop ax 2490 subcpureset 2491 2492 .ret: 2493 lleave 2494 lret 2495 %endif 2496 2497 %endif 2498 2499 2500 ; support functions for symbols.asm 2501 2502 2503 ; INP: ds:dx -> message 2504 ; cx = length 2505 ; CHG: - 2506 ; STT: ds, es don't care 2507 disp_message_length_cx: 2508 00005449 50 push ax 2509 0000544A 53 push bx 2510 0000544B 51 push cx 2511 0000544C 52 push dx 2512 0000544D 06 push es 2513 0000544E 1E push ds 2514 0000544F 1E push ds 2515 00005450 07 pop es ; es:dx -> message, cx = length 2516 00005451 16 push ss 2517 00005452 1F pop ds ; ds = ss (required for puts) 2518 00005453 E83A5A call puts 2519 00005456 1F pop ds 2520 00005457 07 pop es 2521 00005458 5A pop dx 2522 00005459 59 pop cx 2523 0000545A 5B pop bx 2524 0000545B 58 pop ax 2525 0000545C C3 retn 2526 2527 ; INP: ds:dx -> message, ASCIZ 2528 ; CHG: - 2529 ; STT: ds, es don't care 2530 disp_message: 2531 0000545D 06 push es 2532 0000545E 1E push ds 2533 0000545F 07 pop es ; es:dx -> message 2534 00005460 E89D5D call putsz ; (sets up ds = ss internally) 2535 00005463 07 pop es 2536 00005464 C3 retn 2537 2538 ; INP: al = character to display 2539 ; CHG: - 2540 ; STT: ds, es don't care 2541 disp_al: equ putc 2542 2543 2544 ; Display number in ax hexadecimal, always 4 digits 2545 ; 2546 ; INP: ax = number 2547 ; OUT: displayed using disp_al 2548 ; CHG: none 2549 disp_ax_hex: 2550 00005465 86C4 xchg al, ah 2551 00005467 E80200 call disp_al_hex 2552 0000546A 86C4 xchg al, ah 2553 disp_al_hex: 2554 0000546C 51 push cx 2555 0000546D B104 mov cl, 4 2556 0000546F D2C0 rol al, cl 2557 00005471 E80300 call disp_al_nybble_hex 2558 00005474 D2C0 rol al, cl 2559 00005476 59 pop cx 2560 disp_al_nybble_hex: 2561 00005477 50 push ax 2562 00005478 240F and al, 0Fh 2563 0000547A 0430 add al, '0' 2564 0000547C 3C39 cmp al, '9' 2565 0000547E 7602 jbe @F 2566 00005480 0407 add al, -'9' -1 +'A' 2567 @@: 2568 00005482 E89D5D call disp_al 2569 00005485 58 pop ax 2570 00005486 C3 retn 2571 2572 2573 ; Display number in ax decimal 2574 ; 2575 ; INP: ax = number 2576 ; OUT: displayed using disp_al 2577 ; CHG: none 2578 disp_ax_dec: ; ax (no leading zeros) 2579 00005487 53 push bx 2580 00005488 31DB xor bx, bx 2581 .pushax: 2582 0000548A 52 push dx 2583 0000548B 50 push ax 2584 0000548C 08DB or bl, bl 2585 0000548E 7405 jz .nobl 2586 00005490 80EB05 sub bl, 5 2587 00005493 F6DB neg bl 2588 .nobl: 2589 00005495 51 push cx 2590 00005496 B91027 mov cx, 10000 2591 00005499 E81B00 call .divide_out 2592 0000549C B9E803 mov cx, 1000 2593 0000549F E81500 call .divide_out 2594 000054A2 B96400 mov cx, 100 2595 000054A5 E80F00 call .divide_out 2596 000054A8 B10A mov cl, 10 2597 000054AA E80A00 call .divide_out 2598 ; (Divisor 1 is useless) 2599 000054AD 0430 add al, '0' 2600 000054AF E8705D call disp_al 2601 000054B2 59 pop cx 2602 000054B3 58 pop ax 2603 000054B4 5A pop dx 2604 000054B5 5B pop bx ; Caller's register 2605 000054B6 C3 retn 2606 2607 2608 ; INP: ax = number 2609 ; cx = divisor 2610 ; OUT: ax = remainder of operation 2611 ; result displayed 2612 .divide_out: 2613 000054B7 52 push dx 2614 000054B8 31D2 xor dx, dx 2615 000054BA F7F1 div cx ; 0:ax / cx 2616 000054BC 52 push dx ; remainder 2617 000054BD FECB dec bl 2618 000054BF 7503 jnz .nobl2 2619 000054C1 80CF01 or bh, 1 2620 .nobl2: 2621 000054C4 08C7 or bh, al 2622 000054C6 7405 jz .leadingzero 2623 000054C8 0430 add al, '0' 2624 000054CA E8555D call disp_al ; display result 2625 .leadingzero: 2626 000054CD 58 pop ax ; remainder 2627 000054CE 5A pop dx 2628 000054CF C3 retn 2629 2630 2631 %include "cc.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug C command (compare) 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2022 C. Masloch 8 <1> 9 <1> Usage of the works is permitted provided that this 10 <1> instrument is retained with the works, so that any entity 11 <1> that uses the works is notified of this instrument. 12 <1> 13 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 14 <1> 15 <1> %endif 16 <1> 17 <1> 18 <1> usesection lDEBUG_CODE 19 <1> 20 <1> ; C command - compare bytes. 21 <1> cc: 22 000054D0 E8FE46 <1> call parsecm ; parse arguments 23 <1> 24 <1> ; To make the 16-bit 64 KiB compare hack below work, the 25 <1> ; full ecx mustn't be increased here for 16-bit segments. 26 <1> ; The passed ecx isn't higher than FFFFh for 16-bit segments, 27 <1> ; and a value of 0001_0000h needs to be passed as zero to 28 <1> ; the hack anyway. 29 <1> %if _PM 30 <1> cmp byte [ss:bAddr32], 0 31 <1> je .16 32 <1> [cpu 386] 33 <1> inc ecx 34 <1> jnz cc1 35 <1> jmp error 36 <1> __CPU__ 37 <1> .16: 38 <1> %endif 39 000054D3 41 <1> inc cx 40 <1> cc1: 41 000054D4 1E <1> push ds 42 000054D5 06 <1> push es 43 000054D6 16 <1> push ss 44 000054D7 1F <1> pop ds ; ds := cs 45 000054D8 E88B46 <1> call dohack ; do the interrupt pointer hack 46 000054DB 07 <1> pop es 47 000054DC 1F <1> pop ds 48 <1> %if _PM 49 <1> cmp byte [ss:bAddr32], 0 50 <1> jz .cmp16 51 <1> a32 repe cmpsb 52 <1> mov dl, byte [esi-1] 53 <1> mov dh, byte [es:edi-1] 54 <1> jmp short .cmpdone 55 <1> .cmp16: 56 <1> %endif 57 <1> ; The following 3 instructions make a hack to support 64 KiB 58 <1> ; compare. The only time we get here with cx = 0 is the first 59 <1> ; iteration for a 64 KiB compare. In that case, dec cx results 60 <1> ; in FFFFh making repe cmpsb work. The single cmpsb will either 61 <1> ; jump the repe cmpsb (if it found a mismatch) or not jump it. 62 <1> ; The repe cmpsb might be executed with cx = 0, but will then 63 <1> ; not change anything including the flags so it works. 64 000054DD 49 <1> dec cx 65 000054DE A6 <1> cmpsb 66 000054DF 7502 <1> jne .skip 67 000054E1 F3A6 <1> repe cmpsb ; start comparing 68 <1> .skip: 69 000054E3 8A54FF <1> mov dl, byte [si-1] ; save the possibly errant characters 70 000054E6 268A75FF <1> mov dh, byte [es:di-1] 71 <1> .cmpdone: 72 000054EA 9F <1> lahf 73 000054EB 1E <1> push ds 74 000054EC 06 <1> push es 75 000054ED 16 <1> push ss 76 000054EE 1F <1> pop ds 77 000054EF E88846 <1> call unhack ; undo the interrupt pointer hack 78 000054F2 07 <1> pop es 79 000054F3 1F <1> pop ds 80 000054F4 9E <1> sahf 81 000054F5 744A <1> je cc2 ; if we're done 82 000054F7 06 <1> push es 83 000054F8 16 <1> push ss 84 000054F9 07 <1> pop es 85 <1> _386_PM_o32 ; mov ebx, edi 86 000054FA 89FB <1> mov bx, di 87 000054FC BF[AE07] <1> mov di, line_out 88 000054FF 8CD8 <1> mov ax, ds 89 00005501 E84959 <1> call hexword 90 00005504 B03A <1> mov al, ':' 91 00005506 AA <1> stosb 92 <1> _386_PM_o32 ; mov eax, esi 93 00005507 89F0 <1> mov ax, si 94 <1> _386_PM_o32 ; dec eax 95 00005509 48 <1> dec ax 96 <1> %if _PM 97 <1> cmp byte [ss:bAddr32], 0 98 <1> jz .16si 99 <1> call hexword_high 100 <1> .16si: 101 <1> %endif 102 0000550A E84059 <1> call hexword 103 0000550D B82020 <1> mov ax, 32<<8|32 104 00005510 AB <1> stosw 105 00005511 88D0 <1> mov al, dl 106 00005513 E83E59 <1> call hexbyte 107 00005516 B82020 <1> mov ax, 32<<8|32 108 00005519 AB <1> stosw 109 0000551A 88F0 <1> mov al, dh 110 0000551C E83559 <1> call hexbyte 111 0000551F B82020 <1> mov ax, 32<<8|32 112 00005522 AB <1> stosw 113 00005523 58 <1> pop ax 114 00005524 50 <1> push ax 115 00005525 E82559 <1> call hexword 116 00005528 B03A <1> mov al, ':' 117 0000552A AA <1> stosb 118 <1> _386_PM_o32 ; mov eax, ebx 119 0000552B 89D8 <1> mov ax, bx 120 <1> _386_PM_o32 ; dec eax 121 0000552D 48 <1> dec ax 122 <1> %if _PM 123 <1> cmp byte [ss:bAddr32], 0 124 <1> jz .16bx 125 <1> call hexword_high 126 <1> .16bx: 127 <1> %endif 128 0000552E E81C59 <1> call hexword 129 00005531 1E <1> push ds 130 00005532 16 <1> push ss 131 00005533 1F <1> pop ds 132 00005534 53 <1> push bx 133 00005535 51 <1> push cx 134 00005536 E84C59 <1> call putsline_crlf 135 00005539 59 <1> pop cx 136 0000553A 5F <1> pop di 137 0000553B 1F <1> pop ds 138 0000553C 07 <1> pop es 139 <1> %if _PM 140 <1> cmp byte [ss:bAddr32],0 141 <1> jz cc1_6 142 <1> [cpu 386] 143 <1> jecxz cc2 144 <1> __CPU__ 145 <1> cc1_j1: 146 <1> jmp cc1 147 <1> cc1_6: 148 <1> %else 149 <1> cc1_j1 equ cc1 150 <1> %endif 151 <1> %if 0 152 <1> _386_PM_o32 ; inc ecx 153 <1> inc cx 154 <1> _386_PM_a32 ; loopd cc1 155 <1> loop cc1 ; if not done yet 156 <1> %else 157 <1> _386_PM_a32 ; jecxz cc2 158 0000553D E302 <1> jcxz cc2 159 0000553F EB93 <1> jmp cc1 ; if not done yet 160 <1> %endif 161 <1> cc2: 162 00005541 16 <1> push ss ; restore segment registers 163 00005542 1F <1> pop ds 164 00005543 16 <1> push ss 165 00005544 07 <1> pop es 166 00005545 C3 <1> retn 2632 2633 2634 %if _BOOTLDR 2635 %include "boot.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug "boot" commands - boot loading 5 <1> 6 <1> Copyright (C) 2008-2017 C. Masloch 7 <1> 8 <1> Usage of the works is permitted provided that this 9 <1> instrument is retained with the works, so that any entity 10 <1> that uses the works is notified of this instrument. 11 <1> 12 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 <1> 14 <1> %endif 15 <1> 16 <1> 17 <1> usesection lDEBUG_DATA_ENTRY 18 <1> 19 00008A0E 00 <1> align 16, db 0 20 <1> load_unit_flags: 21 00008A10 00 <1> times 128 db _LUF_DEFAULT_DISKETTE 22 00008A90 00 <1> times 128 db _LUF_DEFAULT_HARDDISK 23 <1> 24 <1> align 16, db 0 25 00008B10 00 <1> load_partition_table: times 16 * 4 db 0 26 <1> .end: 27 <1> 28 <1> align 16, db 0 29 <1> ; Data passed to us from loader (in case we booted) 30 <1> loaddata_loadedfrom: 31 00008B50 00 <1> times (-LOADDATA + bsBPB + ebpbNew + BPBN_size) db 0 32 <1> 33 00008BCA 00 <1> align 16, db 0 34 <1> load_data_lowest: 35 00008BD0 00 <1> times LOADDATA3_size db 0 36 <1> ; data used to access storage 37 <1> load_data: 38 00008BE0 00 <1> times (-LOADDATA2 + bsBPB + ebpbNew + BPBN_size) db 0 39 00008C6A 00 <1> align 16, db 0 40 <1> load_current_settings: 41 <1> istruc LOADSETTINGS 42 00008C70 0000 <1> at lsKernelName, load_kernelname_default: dw 0 43 00008C72 0000 <1> at lsAddName, load_addname_default: dw 0 44 00008C74 0000 <1> at lsMinPara, load_minpara: dw 0 45 00008C76 0000 <1> at lsMaxPara, load_maxpara: dw 0 46 00008C78 0000 <1> at lsOptions, load_options: dw 0 47 00008C7A 0000 <1> at lsSegment, load_loadseg: dw 0 48 00008C7C 00000000 <1> at lsEntry, load_entrypoint: dd 0 49 00008C80 00000000 <1> at lsBPB, load_bpb: dd 0 50 00008C84 0000 <1> at lsCheckOffset, load_check_offset: dw 0 51 00008C86 0000 <1> at lsCheckValue, load_check_value: dw 0 52 <1> at lsName 53 <1> ; iend 54 <1> %pop ; (pop off the istruc context) 55 <1> 56 <1> %if _INPUT_FILE_BOOT 57 00008C88 00 <1> align 16, db 0 58 <1> load_yy_direntry: 59 00008C90 00 <1> times DIRENTRY_size db 0 60 <1> 61 <1> LOAD_INPUT_FILE_SIZE equ fromparas(paras(-LOADDATA3 + bsBPB + ebpbNew + BPBN_size)) 62 <1> align 16, db 0 63 <1> load_input_file: 64 00008CB0 00 <1> times _INPUT_FILE_BOOT * LOAD_INPUT_FILE_SIZE db 0 65 <1> .active: 66 00008F30 0000 <1> dw 0 67 <1> .goto_offset: 68 00008F32 0000 <1> dw 0 69 <1> %endif 70 <1> 71 <1> align 4, db 0 72 00008F34 00000000 <1> load_bpb_dest: dd 0 73 <1> load_sectors: equ load_data - LOADDATA2 + bsBPB + bpbCHSSectors 74 <1> load_heads: equ load_data - LOADDATA2 + bsBPB + bpbCHSHeads 75 <1> load_sectorsize: equ load_data - LOADDATA2 + bsBPB + bpbBytesPerSector 76 <1> load_sectorsizepara: equ load_data - LOADDATA2 + ldParaPerSector 77 <1> load_sectorseg: equ load_data - LOADDATA2 + ldSectorSeg 78 00008F38 00000000 <1> load_partition_sector: dd 0 79 <1> load_ldp_sector: equ loaddata_loadedfrom - LOADDATA + bsBPB + bpbHiddenSectors 80 <1> ; load_sdp_sector: equ load_data - LOADDATA2 + bsBPB + bpbHiddenSectors 81 00008F3C 0000 <1> load_partition_cycle: dw 0 82 00008F3E 0000 <1> load_cmdline: dw 0 83 <1> load_ldflags: equ load_data - LOADDATA2 + ldFlags 84 <1> load_unit: equ load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit 85 00008F40 0000 <1> load_partition_entry: dw 0 86 00008F42 00 <1> load_partition: db 0 87 00008F43 00 <1> load_current_partition: db 0 88 00008F44 00 <1> load_found_partition: db 0 89 00008F45 00 <1> load_check_dir_attr: db 0 90 00008F46 00 <1> load_sector_alt: db 0 91 <1> 92 00008F47 00 <1> align 4, db 0 93 00008F48 00 <1> load_kernel_name: times 11 + 1 db 0 94 <1> align 2, db 0 95 <1> ; load_kernelname_default:dw 0 96 <1> ; ASCIZ filename for if load_kernelname_input terminates in '/' 97 00008F54 0000 <1> load_kernelname_input: dw 0 98 <1> ; input (ASCIZ '/'-terminated pathnames + optional filename) 99 00008F56 0000 <1> load_kernelname_next: dw 0 100 <1> ; next element in ASCIZ load_kernelname_input, 101 <1> ; empty string if pathname terminated in '/' 102 <1> ; load_addname_default: dw 0 103 00008F58 0000 <1> load_addname_input: dw 0 104 00008F5A 0000 <1> load_addname_next: dw 0 105 <1> %if _INPUT_FILE_BOOT 106 00008F5C 0000 <1> load_yyname_input: dw 0 107 00008F5E 0000 <1> load_yyname_next: dw 0 108 <1> %endif 109 <1> 110 <1> align 2, db 0 111 00008F60 0000 <1> load_adr_dirbuf_segment:dw 0 112 00008F62 0000 <1> boot_new_memsizekib: dw 0 113 00008F64 0000 <1> boot_old_memsizekib: dw 0 114 00008F66 00 <1> boot_ebdaflag: db 0 ; EBDA flag: non-zero if present 115 <1> 116 00008F67 00 <1> align 4, db 0 117 00008F68 00000000 <1> load_readwrite_sector: dd 0 118 00008F6C 0000 <1> load_readwrite_buffer: dw 0 119 00008F6E 0000 <1> load_readwrite_count: dw 0 120 00008F70 0000 <1> load_readwrite_function:dw 0 121 <1> 122 <1> 123 <1> usesection lDEBUG_CODE 124 <1> 125 <1> init_bootcmd: 126 00005546 E887B0 <1> call guard_re 127 00005549 BD[108C] <1> mov bp, load_data - LOADDATA2 128 <1> 129 0000554C F606[CC00]80 <1> testopt [internalflags3], dif3_partition_changed 130 00005551 7413 <1> jz @F 131 <1> 132 00005553 FF761E <1> push word [bp + bsBPB + bpbHiddenSectors + 2] 133 00005556 FF761C <1> push word [bp + bsBPB + bpbHiddenSectors] 134 00005559 8F06[388F] <1> pop word [load_partition_sector] 135 0000555D 8F06[3A8F] <1> pop word [load_partition_sector + 2] 136 00005561 8026[CC00]7F <1> clropt [internalflags3], dif3_partition_changed 137 <1> @@: 138 <1> 139 00005566 31C9 <1> xor cx, cx 140 00005568 894E1C <1> mov [bp + bsBPB + bpbHiddenSectors + 0], cx 141 0000556B 894E1E <1> mov [bp + bsBPB + bpbHiddenSectors + 2], cx 142 0000556E 880E[468F] <1> mov byte [load_sector_alt], cl 143 00005572 C3 <1> retn 144 <1> 145 <1> 146 <1> usesection lDEBUG_DATA_ENTRY 147 <1> 148 00008F72 00 <1> align 4, db 0 149 <1> bootcmd_dispatch: 150 00008F74 [305A] <1> dw bootcmd.list 151 00008F76 [3973] <1> dw msg.list 152 00008F78 [8E55] <1> dw bootcmd.quit 153 00008F7A [7163] <1> dw msg.quit 154 00008F7C [0C5E] <1> dw boot_read 155 00008F7E [4B63] <1> dw msg.read 156 00008F80 [145E] <1> dw boot_write 157 00008F82 [5063] <1> dw msg.write 158 00008F84 [2F66] <1> dw boot_dir 159 00008F86 [5D63] <1> dw msg.dir 160 00008F88 [C455] <1> dw bootcmd.protocol 161 00008F8A [7663] <1> dw msg.protocol 162 00008F8C 0000 <1> dw 0 ; table end marker 163 <1> 164 <1> 165 <1> usesection lDEBUG_CODE 166 <1> 167 <1> bootcmd: 168 <1> %if _PM 169 <1> call ispm 170 <1> jnz .rm 171 <1> mov dx, nopmsupp 172 <1> mov ax, 0201h 173 <1> call setrc 174 <1> jmp putsz_error 175 <1> .rm: 176 <1> %endif 177 <1> d4 call d4message 178 <1> d4 asciz "In bootcmd",13,10 179 <1> 180 00005573 E8D0FF <1> call init_bootcmd 181 <1> 182 00005576 E8FA57 <1> call skipcomma 183 00005579 4E <1> dec si 184 0000557A BB[748F] <1> mov bx, bootcmd_dispatch 185 <1> @@: 186 0000557D 8B0F <1> mov cx, [bx] 187 0000557F 8B5702 <1> mov dx, [bx + 2] 188 00005582 83C304 <1> add bx, 4 189 00005585 E370 <1> jcxz .notproto 190 00005587 E86457 <1> call isstring? 191 0000558A 75F1 <1> jne @B 192 0000558C FFE1 <1> jmp cx 193 <1> 194 <1> 195 <1> .quit: 196 <1> %if _DOSEMU 197 0000558E F606[C700]01 <1> testopt [internalflags], runningdosemu 198 00005593 7407 <1> jz .quit_not_dosemu 199 <1> 200 00005595 31DB <1> xor bx, bx 201 00005597 B8FFFF <1> mov ax, -1 202 0000559A CDE6 <1> int 0E6h ; dosemu quit 203 <1> 204 <1> .quit_not_dosemu: 205 <1> %endif 206 <1> 207 <1> ; from https://stackoverflow.com/a/5240330/738287 208 0000559C B80153 <1> mov ax, 5301h 209 0000559F 31DB <1> xor bx, bx 210 000055A1 CD15 <1> int 15h ; connect to APM API 211 <1> 212 000055A3 B80E53 <1> mov ax, 530Eh 213 000055A6 31DB <1> xor bx, bx 214 000055A8 B90201 <1> mov cx, 0102h 215 000055AB CD15 <1> int 15h ; set APM version to 1.02 216 <1> 217 000055AD B80753 <1> mov ax, 5307h 218 000055B0 BB0100 <1> mov bx, 1 219 000055B3 B90300 <1> mov cx, 3 220 000055B6 CD15 <1> int 15h ; shut down system 221 <1> 222 000055B8 BA[925F] <1> mov dx, msg.boot_quit_fail 223 000055BB B80202 <1> mov ax, 0202h 224 000055BE E84243 <1> call setrc 225 000055C1 E9365C <1> jmp putsz_error 226 <1> 227 <1> 228 <1> .protocol: 229 000055C4 E8C557 <1> call skipequals 230 000055C7 4E <1> dec si 231 000055C8 BA[B863] <1> mov dx, msg.sector 232 000055CB E82057 <1> call isstring? 233 000055CE 7423 <1> je .proto_sector 234 <1> 235 000055D0 BA[BF63] <1> mov dx, msg.sector_alt 236 000055D3 E81857 <1> call isstring? 237 000055D6 7416 <1> je .proto_sector_alt 238 <1> 239 000055D8 BB[D879] <1> mov bx, loadsettings 240 <1> .proto_settings_next: 241 000055DB 8D5718 <1> lea dx, [bx + lsName] 242 000055DE E80D57 <1> call isstring? 243 000055E1 7421 <1> je .proto_settings 244 000055E3 83C320 <1> add bx, LOADSETTINGS_size 245 000055E6 833F00 <1> cmp word [bx], 0 246 000055E9 75F0 <1> jne .proto_settings_next 247 <1> 248 000055EB E9CE42 <1> jmp error 249 <1> 250 <1> .proto_sector_alt: 251 000055EE C606[468F]01 <1> mov byte [load_sector_alt], 1 252 <1> .proto_sector: 253 000055F3 E87D57 <1> call skipcomma 254 000055F6 A8 <1> db __TEST_IMM8 255 <1> .notproto: 256 000055F7 AC <1> lodsb 257 000055F8 E81D06 <1> call parseloadunit_default_sdp 258 000055FB E93303 <1> jmp .load 259 <1> 260 <1> 261 <1> .errordec: 262 000055FE 4E <1> dec si 263 <1> .error: 264 000055FF A8 <1> db __TEST_IMM8 ; skip pop 265 <1> .errorpop: 266 00005600 5E <1> pop si 267 00005601 E9B842 <1> jmp error 268 <1> 269 <1> 270 <1> .proto_settings: 271 00005604 56 <1> push si 272 00005605 89DE <1> mov si, bx 273 00005607 BF[708C] <1> mov di, load_current_settings 274 0000560A B90C00 <1> mov cx, lsName >> 1 275 0000560D F3A5 <1> rep movsw 276 <1> %if lsName & 1 277 <1> movsb 278 <1> %endif 279 0000560F FF75E8 <1> push word [load_kernelname_default - (load_current_settings + lsName) + di] 280 00005612 8F85CC02 <1> pop word [load_kernelname_input - (load_current_settings + lsName) + di] 281 00005616 FF75EA <1> push word [load_addname_default - (load_current_settings + lsName) + di] 282 00005619 8F85D002 <1> pop word [load_addname_input - (load_current_settings + lsName) + di] 283 <1> 284 0000561D 5E <1> pop si 285 <1> 286 <1> d4 call d4message 287 <1> d4 asciz "In bootcmd.proto_settings",13,10 288 <1> 289 <1> .proto_next: 290 0000561E E85257 <1> call skipcomma 291 00005621 4E <1> dec si 292 00005622 BA[7F63] <1> mov dx, msg.segment 293 00005625 E8C656 <1> call isstring? 294 00005628 7478 <1> je .proto_segment 295 0000562A BA[8763] <1> mov dx, msg.entry 296 0000562D E8BE56 <1> call isstring? 297 00005630 7503E98C00 <1> je .proto_entry 298 00005635 BA[8D63] <1> mov dx, msg.bpb 299 00005638 E8B356 <1> call isstring? 300 0000563B 7503E9A000 <1> je .proto_bpb 301 00005640 BA[9163] <1> mov dx, msg.minpara 302 00005643 E8A856 <1> call isstring? 303 00005646 7503E9B400 <1> je .proto_minpara 304 0000564B BA[9963] <1> mov dx, msg.maxpara 305 0000564E E89D56 <1> call isstring? 306 00005651 7503E9B700 <1> je .proto_maxpara 307 00005656 BA[A163] <1> mov dx, msg.checkoffset 308 00005659 E89256 <1> call isstring? 309 0000565C 7503E9BA00 <1> je .proto_checkoffset 310 00005661 BA[AD63] <1> mov dx, msg.checkvalue 311 00005664 E88756 <1> call isstring? 312 00005667 7503E9C800 <1> je .proto_checkvalue 313 <1> 314 0000566C BB[6878] <1> mov bx, loadoptiontable 315 <1> .proto_lot_next: 316 0000566F 8B0F <1> mov cx, [bx] ; flag 317 00005671 8B5702 <1> mov dx, [bx + 2] ; -> ASCIZ message 318 00005674 85C9 <1> test cx, cx 319 00005676 7503E9C700 <1> jz .proto_done 320 0000567B E87056 <1> call isstring? 321 0000567E 7405 <1> je .proto_lot 322 00005680 83C304 <1> add bx, 4 323 00005683 EBEA <1> jmp .proto_lot_next 324 <1> 325 <1> .proto_lot: 326 00005685 E80457 <1> call skipequals 327 00005688 89CA <1> mov dx, cx 328 0000568A F7D2 <1> not dx 329 0000568C 2116[788C] <1> and word [load_options], dx 330 00005690 E8D150 <1> call getexpression 331 00005693 E8934A <1> call toboolean 332 00005696 85D2 <1> test dx, dx 333 00005698 7404 <1> jz @F 334 0000569A 090E[788C] <1> or word [load_options], cx 335 <1> @@: 336 0000569E 4E <1> dec si 337 0000569F E97CFF <1> jmp .proto_next 338 <1> 339 <1> .proto_segment: 340 000056A2 E8E756 <1> call skipequals 341 000056A5 E88455 <1> call getword ; dx = word 342 000056A8 83FA50 <1> cmp dx, 50h 343 000056AB 7208 <1> jb @F 344 000056AD 8916[7A8C] <1> mov word [load_loadseg], dx 345 000056B1 4E <1> dec si 346 000056B2 E969FF <1> jmp .proto_next 347 <1> 348 <1> @@: 349 000056B5 BA[F262] <1> mov dx, msg.boot_segment_too_low 350 000056B8 B81002 <1> mov ax, 0210h 351 000056BB E84542 <1> call setrc 352 000056BE E95803 <1> jmp .fail 353 <1> 354 <1> 355 <1> .proto_entry: 356 000056C1 E8C856 <1> call skipequals 357 000056C4 31DB <1> xor bx, bx 358 000056C6 E89A46 <1> call getaddr ; bx:(e)dx = addr 359 000056C9 66F7C20000FFFF <1> _386 test edx, 0_FFFF_0000h 360 000056D0 0F852BFF <1> _386 jnz .error 361 000056D4 8916[7C8C] <1> mov word [load_entrypoint], dx 362 000056D8 891E[7E8C] <1> mov word [load_entrypoint + 2], bx 363 000056DC 4E <1> dec si 364 000056DD E93EFF <1> jmp .proto_next 365 <1> 366 <1> .proto_bpb: 367 000056E0 E8A956 <1> call skipequals 368 000056E3 31DB <1> xor bx, bx 369 000056E5 E87B46 <1> call getaddr ; bx:(e)dx = addr 370 000056E8 66F7C20000FFFF <1> _386 test edx, 0_FFFF_0000h 371 000056EF 0F850CFF <1> _386 jnz .error 372 000056F3 8916[808C] <1> mov word [load_bpb], dx 373 000056F7 891E[828C] <1> mov word [load_bpb + 2], bx 374 000056FB 4E <1> dec si 375 000056FC E91FFF <1> jmp .proto_next 376 <1> 377 <1> .proto_minpara: 378 000056FF E88A56 <1> call skipequals 379 00005702 E82755 <1> call getword ; dx = word 380 00005705 8916[748C] <1> mov word [load_minpara], dx 381 00005709 4E <1> dec si 382 0000570A E911FF <1> jmp .proto_next 383 <1> 384 <1> .proto_maxpara: 385 0000570D E87C56 <1> call skipequals 386 00005710 E81955 <1> call getword ; dx = word 387 00005713 8916[768C] <1> mov word [load_maxpara], dx 388 00005717 4E <1> dec si 389 00005718 E903FF <1> jmp .proto_next 390 <1> 391 <1> .proto_checkoffset: 392 0000571B E86E56 <1> call skipequals 393 0000571E E80B55 <1> call getword ; dx = word 394 00005721 89D0 <1> mov ax, dx 395 00005723 241F <1> and al, 31 396 00005725 3C1F <1> cmp al, 31 397 00005727 7503E9D3FE <1> je .error 398 <1> ; Previously we rejected all odd values here. Now, 399 <1> ; we only reject a subset of odd values, namely 400 <1> ; those that may actually cross a sector boundary. 401 <1> ; Note that sectors may be as small as 32 bytes. 402 <1> ; This insures the checked word never crosses a sector 403 <1> ; boundary. Thus, loading a single sector suffices. 404 0000572C 8916[848C] <1> mov word [load_check_offset], dx 405 00005730 4E <1> dec si 406 00005731 E9EAFE <1> jmp .proto_next 407 <1> 408 <1> .proto_checkvalue: 409 00005734 E85556 <1> call skipequals 410 00005737 E8F254 <1> call getword ; dx = word 411 0000573A 8916[868C] <1> mov word [load_check_value], dx 412 0000573E 4E <1> dec si 413 0000573F E9DCFE <1> jmp .proto_next 414 <1> 415 <1> .proto_done: 416 00005742 BB[A478] <1> mov bx, loadoptiontable.incompatible 417 <1> @@: 418 00005745 8B0F <1> mov cx, [bx] 419 00005747 0B4F02 <1> or cx, [bx + 2] 420 0000574A 746B <1> jz .proto_compatible 421 0000574C 8B16[788C] <1> mov dx, word [load_options] 422 00005750 21CA <1> and dx, cx 423 00005752 39CA <1> cmp dx, cx 424 00005754 7405 <1> je .proto_incompatible 425 00005756 83C304 <1> add bx, 4 426 00005759 EBEA <1> jmp @B 427 <1> 428 <1> .proto_incompatible: 429 0000575B 16 <1> push ss 430 0000575C 07 <1> pop es 431 0000575D B80302 <1> mov ax, 0203h 432 00005760 E8A041 <1> call setrc 433 00005763 BA[AC5F] <1> mov dx, msg.bootfail 434 00005766 E8915A <1> call putsz_error 435 00005769 BA[A562] <1> mov dx, msg.boot_cannot_set_both 436 0000576C E88B5A <1> call putsz_error 437 0000576F 8B07 <1> mov ax, word [bx] 438 00005771 E82200 <1> call .proto_incompatible_get_label 439 00005774 E8835A <1> call putsz_error 440 00005777 BA[B662] <1> mov dx, msg.boot_and 441 0000577A E87D5A <1> call putsz_error 442 0000577D 8B4702 <1> mov ax, word [bx + 2] 443 00005780 E81300 <1> call .proto_incompatible_get_label 444 00005783 E8745A <1> call putsz_error 445 00005786 BA[BC62] <1> mov dx, msg.boot_dot_crlf 446 <1> .putsz_errret: 447 00005789 B80402 <1> mov ax, 0204h 448 0000578C E87441 <1> call setrc 449 0000578F E8685A <1> call putsz_error 450 00005792 FF26[D20A] <1> jmp near word [errret] 451 <1> 452 <1> .proto_incompatible_get_label: 453 00005796 53 <1> push bx 454 00005797 BB[6878] <1> mov bx, loadoptiontable 455 <1> @@: 456 0000579A 8B0F <1> mov cx, [bx] 457 0000579C E30E <1> jcxz .proto_internal_error 458 0000579E 39C8 <1> cmp ax, cx 459 000057A0 8B5702 <1> mov dx, word [bx + 2] 460 000057A3 7405 <1> je @F 461 000057A5 83C304 <1> add bx, 4 462 000057A8 EBF0 <1> jmp @B 463 <1> 464 <1> @@: 465 000057AA 5B <1> pop bx 466 000057AB C3 <1> retn 467 <1> 468 <1> .proto_internal_error: 469 000057AC BA[C062] <1> mov dx, msg.boot_internal_error 470 000057AF B80502 <1> mov ax, 0205h 471 000057B2 E84E41 <1> call setrc 472 000057B5 EBD2 <1> jmp .putsz_errret 473 <1> 474 <1> 475 <1> .proto_compatible: 476 000057B7 AC <1> lodsb 477 000057B8 E85D04 <1> call parseloadunit_default_sdp 478 000057BB 7503E98800 <1> jz .fn_done_eol ; no filename given, use defaults --> 479 <1> ; al was = '/' or '\' or first pathname's first character 480 <1> ; si-> next char 481 000057C0 BB[548F] <1> mov bx, load_kernelname_input 482 000057C3 E83E00 <1> call .pathname_parse_super 483 <1> 484 000057C6 56 <1> push si 485 000057C7 50 <1> push ax 486 000057C8 E8D855 <1> call skipwh0 487 000057CB E87F55 <1> call iseol? 488 000057CE 58 <1> pop ax 489 000057CF 5E <1> pop si 490 000057D0 7478 <1> je .fn_done 491 <1> 492 000057D2 BB[588F] <1> mov bx, load_addname_input 493 <1> 494 000057D5 E8CB55 <1> call skipwh0 495 000057D8 3C2F <1> cmp al, '/' 496 000057DA 7404 <1> je @F 497 000057DC 3C5C <1> cmp al, '\' 498 000057DE 751F <1> jne .proto_not_double_slash 499 <1> @@: 500 000057E0 803C2F <1> cmp byte [si], '/' 501 000057E3 7405 <1> je @F 502 000057E5 803C5C <1> cmp byte [si], '\' 503 000057E8 7515 <1> jne .proto_not_double_slash 504 <1> @@: 505 000057EA 4E <1> dec si 506 000057EB 8937 <1> mov word [bx], si 507 000057ED C7042F2F <1> mov word [si], "//" 508 000057F1 46 <1> inc si 509 000057F2 46 <1> inc si 510 000057F3 E85755 <1> call iseol? 511 000057F6 C60400 <1> mov byte [si], 0 512 000057F9 7401 <1> je @F 513 000057FB 46 <1> inc si 514 <1> @@: 515 000057FC AC <1> lodsb 516 000057FD EB4B <1> jmp .fn_done 517 <1> 518 <1> .proto_not_double_slash: 519 000057FF E80200 <1> call .pathname_parse_super 520 00005802 EB46 <1> jmp .fn_done 521 <1> 522 <1> 523 <1> ; INP: bx -> word variable to hold filename 524 <1> ; OUT: word [bx] -> list of /-separated pathnames, zero-terminated 525 <1> ; CHG: ax, cx, si, di, [es:load_kernel_name] 526 <1> .pathname_parse_super: 527 <1> d4 call d4message 528 <1> d4 asciz "In bootcmd.pathname_parse_super",13,10 529 <1> 530 00005804 E89C55 <1> call skipwh0 531 00005807 3C2F <1> cmp al, '/' 532 00005809 7404 <1> je @F 533 0000580B 3C5C <1> cmp al, '\' 534 0000580D 7506 <1> jne @FF 535 <1> @@: 536 0000580F 4E <1> dec si 537 00005810 8937 <1> mov word [bx], si 538 00005812 46 <1> inc si 539 00005813 EB0E <1> jmp .pathname_check 540 <1> 541 <1> @@: 542 00005815 4E <1> dec si 543 00005816 8937 <1> mov word [bx], si 544 <1> 545 <1> .pathname_parse: 546 <1> .pathname_next: 547 <1> d4 call d4message 548 <1> d4 asciz "In bootcmd.pathname_parse",13,10 549 00005818 E8D506 <1> call boot_parse_fn 550 <1> ; al = separator char 551 <1> ; si -> next char after that (if any) 552 0000581B 3C2F <1> cmp al, '/' ; path separator? 553 0000581D 7404 <1> je .pathname_check 554 0000581F 3C5C <1> cmp al, '\' 555 00005821 7517 <1> jne .pathname_none ; no, this was the filename --> 556 <1> .pathname_check: 557 <1> d4 call d4message 558 <1> d4 asciz "In bootcmd.pathname_parse_check",13,10 559 00005823 C644FF2F <1> mov byte [si - 1], '/' ; normalise path separator 560 00005827 AC <1> lodsb 561 00005828 3C20 <1> cmp al, 32 ; space ? 562 0000582A 740E <1> je .pathname_gotfirst 563 0000582C 3C09 <1> cmp al, 9 564 0000582E 740A <1> je .pathname_gotfirst ; yes, allow for second name --> 565 00005830 4E <1> dec si 566 00005831 E81955 <1> call iseol? ; EOL ? 567 00005834 75E2 <1> jne .pathname_next ; no, next pathname element --> 568 00005836 C60400 <1> mov byte [si], 0 ; terminate after trailing path sep 569 00005839 C3 <1> retn 570 <1> 571 <1> .pathname_gotfirst: 572 <1> .pathname_none: 573 0000583A B000 <1> mov al, 0 574 0000583C 4E <1> dec si 575 0000583D 8604 <1> xchg al, byte [si] ; terminate after filename 576 0000583F 8936[080C] <1> mov word [terminator_in_line_in.offset], si 577 00005843 A2[0A0C] <1> mov byte [terminator_in_line_in.value], al 578 00005846 46 <1> inc si 579 00005847 C3 <1> retn 580 <1> 581 <1> 582 <1> ; DPR:word [load_kernelname_input] -> ASCIZ pathname. 583 <1> ; if it ends in '/', append DPR:word [load_kernelname_default] 584 <1> ; DPR:word [load_addname_input] -> ASCIZ pathname. 585 <1> ; if it ends in '/', append DPR:word [load_addname_default] 586 <1> ; if it's empty (and no trailing '/' in front of the zero) 587 <1> ; then no additional name is given. 588 <1> .fn_done_eol: 589 00005848 B00D <1> mov al, 13 590 <1> .fn_done: 591 <1> d4 call d4message 592 <1> d4 asciz "In bootcmd.fn_done",13,10 593 <1> 594 0000584A 8326[3E8F]00 <1> and word [load_cmdline], 0 595 <1> 596 0000584F E8FB54 <1> call iseol? 597 00005852 743E <1> je @F 598 <1> 599 00005854 F606[798C]10 <1> testopt [load_options], LOAD_CMDLINE 600 00005859 7503E95E40 <1> jz error 601 <1> 602 0000585E E84255 <1> call skipwh0 603 00005861 B400 <1> mov ah, 0 604 00005863 3C22 <1> cmp al, '"' 605 00005865 7404 <1> je .cmdline_quote 606 00005867 3C27 <1> cmp al, "'" 607 00005869 7503 <1> jne .cmdline_no_quote 608 <1> .cmdline_quote: 609 0000586B 88C4 <1> mov ah, al 610 0000586D A8 <1> db __TEST_IMM8 611 <1> .cmdline_no_quote: 612 0000586E 4E <1> dec si 613 0000586F 8936[3E8F] <1> mov word [load_cmdline], si 614 <1> .cmdline_loop: 615 00005873 AC <1> lodsb 616 00005874 E8DA54 <1> call iseol?.notsemicolon 617 00005877 740E <1> je .cmdline_eol 618 00005879 38E0 <1> cmp al, ah 619 0000587B 75F6 <1> jne .cmdline_loop 620 <1> .cmdline_quote_eol: 621 0000587D C644FF00 <1> mov byte [si - 1], 0 622 00005881 AC <1> lodsb 623 00005882 E8DD54 <1> call chkeol 624 00005885 EB0B <1> jmp @F 625 <1> 626 <1> .cmdline_eol: 627 00005887 84E4 <1> test ah, ah 628 00005889 7403E92E40 <1> jnz error 629 0000588E C644FF00 <1> mov byte [si - 1], 0 630 <1> 631 <1> @@: 632 00005892 F606[CC00]07 <1> testopt [internalflags3], dif3_load_is_dp 633 00005897 7527 <1> jnz .load_kernel_from_ldp 634 <1> 635 00005899 8A1E[428F] <1> mov bl, [load_partition] 636 0000589D 803E[508C]80 <1> cmp byte [load_unit], 80h 637 000058A2 7228 <1> jb .p_f_is_diskette 638 000058A4 84DB <1> test bl, bl ; partition specified ? 639 000058A6 7503E954FD <1> jz .error ; no, error --> 640 <1> 641 000058AB E8BB14 <1> call query_geometry 642 <1> 643 000058AE B9[E45F] <1> mov cx, load_freedos_from_partition 644 000058B1 E80D13 <1> call scan_partitions 645 000058B4 BA[4661] <1> mov dx, msg.boot_partition_not_found 646 000058B7 B81102 <1> mov ax, 0211h 647 000058BA E84640 <1> call setrc 648 000058BD E95901 <1> jmp .fail 649 <1> 650 <1> 651 <1> .load_kernel_from_ldp: 652 000058C0 E8A614 <1> call query_geometry 653 000058C3 A1[388F] <1> mov ax, word [load_partition_sector] 654 000058C6 8B16[3A8F] <1> mov dx, word [load_partition_sector + 2] 655 000058CA EB0E <1> jmp @F 656 <1> 657 <1> 658 <1> .p_f_is_diskette: 659 000058CC 84DB <1> test bl, bl ; partition specified ? 660 000058CE 7403E92CFD <1> jnz .error ; yes, error --> 661 <1> 662 000058D3 E89314 <1> call query_geometry 663 <1> 664 000058D6 31C0 <1> xor ax, ax 665 000058D8 31D2 <1> xor dx, dx 666 <1> @@: 667 000058DA 8B1E[2A0A] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 668 000058DE 52 <1> push dx 669 000058DF 50 <1> push ax 670 000058E0 E83C16 <1> call read_ae_512_bytes 671 <1> 672 000058E3 26813EFE0155AA <1> cmp word [es:510], 0AA55h 673 000058EA 7403E91E19 <1> jne boot_sigmismatch 674 000058EF 58 <1> pop ax 675 000058F0 5A <1> pop dx 676 <1> 677 000058F1 06 <1> push es 678 000058F2 F606[798C]40 <1> testopt [load_options], LOAD_SET_DSSI_PARTINFO 679 000058F7 7434 <1> jz @F 680 <1> 681 000058F9 50 <1> push ax 682 000058FA 31FF <1> xor di, di 683 000058FC 8EC7 <1> mov es, di 684 000058FE BF0006 <1> mov di, 600h 685 00005901 B8CD19 <1> mov ax, 19CDh 686 00005904 AB <1> stosw ; fake boot sector loader 687 00005905 B9FE00 <1> mov cx, 508 / 2 688 00005908 31C0 <1> xor ax, ax 689 0000590A F3AB <1> rep stosw ; initialise pseudo MBR 690 0000590C B855AA <1> mov ax, 0AA55h 691 0000590F AB <1> stosw ; fake boot sector signature 692 00005910 58 <1> pop ax 693 <1> 694 00005911 BEBE07 <1> mov si, 600h + 512 - 2 - 64 695 00005914 26894408 <1> mov word [es:si + 8], ax 696 00005918 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 697 0000591C 26C60480 <1> mov byte [es:si + piBoot], 80h ; fake primary active 698 00005920 26C64404FF <1> mov byte [es:si + piType], 0FFh ; fake a type 699 00005925 26FE440C <1> inc byte [es:si + piLength] ; fake a size 700 <1> 701 00005929 8936[408F] <1> mov word [load_partition_entry], si 702 <1> @@: 703 0000592D 07 <1> pop es 704 <1> 705 0000592E E92207 <1> jmp load_freedos_common 706 <1> 707 <1> 708 <1> .load: 709 00005931 7403E9C9FC <1> jnz bootcmd.error 710 <1> 711 00005936 F606[CC00]07 <1> testopt [internalflags3], dif3_load_is_dp 712 0000593B 751C <1> jnz .load_sector_from_ldp 713 <1> 714 0000593D 803E[428F]00 <1> cmp byte [load_partition], 0 715 00005942 7421 <1> je .load_boot 716 <1> 717 00005944 E82214 <1> call query_geometry 718 <1> 719 <1> d4 call d4message 720 <1> d4 asciz "In bootcmd.load (before call to scan_partitions)",13,10 721 <1> 722 00005947 B9[755F] <1> mov cx, load_from_partition 723 0000594A E87412 <1> call scan_partitions 724 0000594D BA[4661] <1> mov dx, msg.boot_partition_not_found 725 00005950 B81202 <1> mov ax, 0212h 726 00005953 E8AD3F <1> call setrc 727 00005956 E9C000 <1> jmp .fail 728 <1> 729 <1> 730 <1> .load_sector_from_ldp: 731 00005959 E80D14 <1> call query_geometry 732 0000595C A1[388F] <1> mov ax, word [load_partition_sector] 733 0000595F 8B16[3A8F] <1> mov dx, word [load_partition_sector + 2] 734 00005963 EB07 <1> jmp @F 735 <1> 736 <1> .load_boot: 737 00005965 E80114 <1> call query_geometry 738 <1> 739 00005968 31C0 <1> xor ax, ax 740 0000596A 31D2 <1> xor dx, dx 741 <1> @@: 742 0000596C BBC007 <1> mov bx, 7C0h 743 <1> d4 call d4dumpregs 744 <1> d4 call d4message 745 <1> d4 asciz 13,10,"In bootcmd.load_boot (before call to read_sector)",13,10 746 0000596F 52 <1> push dx 747 00005970 50 <1> push ax 748 00005971 E8AB15 <1> call read_ae_512_bytes 749 <1> d4 call d4message 750 <1> d4 asciz "In bootcmd.load_boot (after call to read_sector)",13,10 751 00005974 31D2 <1> xor dx, dx 752 00005976 8EC2 <1> mov es, dx 753 <1> 754 00005978 A0[508C] <1> mov al, byte [load_unit] ; al = boot unit 755 0000597B BB007C <1> mov bx, 7C00h 756 <1> 757 0000597E 26813EFE7D55AA <1> cmp word [es:7C00h + 510], 0AA55h 758 00005985 7403E98318 <1> jne boot_sigmismatch 759 <1> 760 0000598A 26833F00 <1> cmp word [es:bx], 0 761 0000598E 7503E98618 <1> je boot_codemismatch 762 <1> 763 00005993 50 <1> push ax 764 00005994 B9FF00 <1> mov cx, 510 / 2 765 00005997 BF0006 <1> mov di, 600h ; MBR location 766 0000599A 31C0 <1> xor ax, ax 767 0000599C F3AB <1> rep stosw ; initialise (sector and all entries) 768 0000599E B855AA <1> mov ax, 0AA55h 769 000059A1 AB <1> stosw ; initialise boot sector signature 770 000059A2 26C7060006CD19 <1> mov word [es:600h], 019CDh ; initialise boot sector code 771 000059A9 BFBE07 <1> mov di, 600h + 510 - 4*16 ; -> first partition table entry 772 000059AC 58 <1> pop ax 773 000059AD 268F4508 <1> pop word [es:di + piStart] 774 000059B1 268F450A <1> pop word [es:di + piStart + 2] ; = boot sector LBA 775 000059B5 26C60580 <1> mov byte [es:di + 0], 80h ; "bootable" flag set 776 000059B9 26C64504FF <1> mov byte [es:di + 4], 0FFh ; dummy value for FS type (nonzero) 777 000059BE 26C6450C01 <1> mov byte [es:di + 12], 1 ; dummy value for length (nonzero) 778 <1> 779 <1> load_partition_common: equ $ 780 000059C3 8126[980C]FFF8 <1> and word [reg_efl], ~(400h|200h|100h) ; UP, DI, TF=0 781 000059C9 893E[740C] <1> mov word [reg_esi], di 782 000059CD 893E[700C] <1> mov word [reg_ebp], di 783 000059D1 890E[7C0C] <1> mov word [reg_ds], cx ; ds:si -> 0:600h + offset to first entry 784 000059D5 A2[680C] <1> mov byte [reg_edx], al ; dl = boot unit 785 000059D8 891E[940C] <1> mov word [reg_eip], bx 786 000059DC 890E[960C] <1> mov word [reg_eip + 2], cx 787 000059E0 890E[880C] <1> mov word [reg_cs], cx ; cs:eip = 0:7C00h 788 000059E4 803E[468F]00 <1> cmp byte [load_sector_alt], 0 789 000059E9 740A <1> je @F 790 000059EB 890E[940C] <1> mov word [reg_eip], cx 791 000059EF C706[880C]C007 <1> mov word [reg_cs], 7C0h ; cs:eip = 07C0h:0 792 <1> @@: 793 000059F5 891E[6C0C] <1> mov word [reg_esp], bx 794 000059F9 890E[6E0C] <1> mov word [reg_esp + 2], cx 795 000059FD 890E[840C] <1> mov word [reg_ss], cx ; ss:esp = 0:7C00h 796 00005A01 800E[CB00]01 <1> setopt [internalflags2], dif2_boot_loaded_kernel 797 00005A06 C3 <1> retn 798 <1> 799 <1> 800 <1> .fail_read: 801 00005A07 16 <1> push ss 802 00005A08 07 <1> pop es 803 00005A09 BF[D85F] <1> mov di, msg.bootfail_read_errorcode 804 00005A0C 88E0 <1> mov al, ah 805 00005A0E B404 <1> mov ah, 04h 806 00005A10 E8F03E <1> call setrc 807 00005A13 E83E54 <1> call hexbyte 808 00005A16 BA[BB5F] <1> mov dx, msg.bootfail_read 809 <1> 810 <1> .fail: 811 00005A19 16 <1> push ss 812 00005A1A 07 <1> pop es 813 00005A1B 52 <1> push dx 814 00005A1C BA[AC5F] <1> mov dx, msg.bootfail 815 00005A1F E8D857 <1> call putsz_error 816 00005A22 5A <1> pop dx 817 00005A23 E8D457 <1> call putsz_error 818 00005A26 B8FF02 <1> mov ax, 02FFh 819 00005A29 E8D73E <1> call setrc 820 00005A2C FF26[D20A] <1> jmp near word [errret] 821 <1> 822 <1> 823 <1> bootcmd.list: 824 00005A30 E84053 <1> call skipcomma 825 <1> 826 00005A33 E8E201 <1> call parseloadunit_default_sdp 827 00005A36 7403E9C4FB <1> jnz bootcmd.error 828 <1> 829 00005A3B E82B13 <1> call query_geometry 830 <1> 831 00005A3E F606[CC00]07 <1> testopt [internalflags3], dif3_load_is_dp 832 00005A43 752B <1> jnz .list_ldp 833 <1> 834 00005A45 803E[428F]00 <1> cmp byte [load_partition], 0 835 00005A4A 741E <1> je .listall 836 <1> 837 00005A4C C606[448F]00 <1> mov byte [load_found_partition], 0 838 00005A51 B9[A95A] <1> mov cx, list_single_partition 839 00005A54 E86A11 <1> call scan_partitions 840 00005A57 803E[448F]00 <1> cmp byte [load_found_partition], 0 841 00005A5C 750B <1> jne @F 842 00005A5E BA[4661] <1> mov dx, msg.boot_partition_not_found 843 00005A61 B81302 <1> mov ax, 0213h 844 00005A64 E89C3E <1> call setrc 845 00005A67 EBB0 <1> jmp bootcmd.fail 846 <1> @@: 847 00005A69 C3 <1> retn 848 <1> 849 <1> .listall: 850 00005A6A B9[B75A] <1> mov cx, list_any_partition 851 00005A6D E95111 <1> jmp scan_partitions 852 <1> 853 <1> .list_ldp: 854 00005A70 C606[448F]00 <1> mov byte [load_found_partition], 0 855 00005A75 B9[8E5A] <1> mov cx, list_partition_if_ldp 856 00005A78 E84611 <1> call scan_partitions 857 00005A7B 803E[448F]00 <1> cmp byte [load_found_partition], 0 858 00005A80 750B <1> jne @F 859 00005A82 BA[4661] <1> mov dx, msg.boot_partition_not_found 860 00005A85 B81402 <1> mov ax, 0214h 861 00005A88 E8783E <1> call setrc 862 00005A8B EB8C <1> jmp bootcmd.fail 863 <1> @@: 864 00005A8D C3 <1> retn 865 <1> 866 <1> 867 <1> list_partition_if_ldp: 868 <1> d4 call d4message 869 <1> d4 asciz "In list_partition_if_ldp",13,10 870 <1> 871 00005A8E 8B43F8 <1> mov ax, word [bp + di - 8] 872 00005A91 8B53FA <1> mov dx, word [bp + di - 6] ; root 873 00005A94 26034408 <1> add ax, word [es:si + 8] 874 00005A98 2613540A <1> adc dx, word [es:si + 8 + 2] ; add partition offset 875 00005A9C 3906[388F] <1> cmp word [load_partition_sector], ax 876 00005AA0 7506 <1> jne @F 877 00005AA2 3916[3A8F] <1> cmp word [load_partition_sector + 2], dx 878 00005AA6 740B <1> je list_single_partition.gotit 879 <1> @@: 880 00005AA8 C3 <1> retn 881 <1> 882 <1> list_single_partition: 883 <1> d4 call d4message 884 <1> d4 asciz "In list_single_partition",13,10 885 <1> 886 00005AA9 A0[438F] <1> mov al, byte [load_current_partition] 887 00005AAC 3A06[428F] <1> cmp al, byte [load_partition] 888 00005AB0 7401 <1> je .gotit 889 00005AB2 C3 <1> retn 890 <1> 891 <1> .gotit: 892 00005AB3 FE06[448F] <1> inc byte [load_found_partition] 893 <1> 894 <1> ; INP: es:si -> partition table entry, 895 <1> ; si = load_partition_table .. load_partition_table+48, 896 <1> ; es = ss 897 <1> ; bp + di -> above part table metadata, 898 <1> ; dwo [bp + di - 4] = root (outermost extended position) 899 <1> ; dwo [bp + di - 8] = base (current table position) 900 <1> ; CHG: ax, bx, (cx), dx 901 <1> list_any_partition: 902 00005AB7 06 <1> push es 903 00005AB8 51 <1> push cx 904 00005AB9 56 <1> push si 905 00005ABA 57 <1> push di 906 <1> 907 00005ABB BF[AE07] <1> mov di, line_out ; reset di 908 00005ABE B075 <1> mov al, "u" 909 00005AC0 AA <1> stosb 910 00005AC1 A0[508C] <1> mov al, byte [load_unit] 911 00005AC4 E88D53 <1> call hexbyte 912 00005AC7 B02E <1> mov al, '.' 913 00005AC9 AA <1> stosb 914 00005ACA A0[438F] <1> mov al, byte [load_current_partition] 915 00005ACD E8E452 <1> call decbyte 916 00005AD0 3C0A <1> cmp al, 10 917 00005AD2 B020 <1> mov al, 32 918 00005AD4 7301 <1> jae @F 919 00005AD6 AA <1> stosb 920 <1> @@: 921 00005AD7 AA <1> stosb 922 <1> 923 00005AD8 A0[508C] <1> mov al, byte [load_unit] 924 00005ADB BB6664 <1> mov bx, "fd" 925 00005ADE 3C80 <1> cmp al, 80h 926 00005AE0 7202 <1> jb @F 927 00005AE2 B368 <1> mov bl, "h" 928 <1> @@: 929 00005AE4 247F <1> and al, ~80h 930 00005AE6 0461 <1> add al, 'a' 931 00005AE8 3C7A <1> cmp al, 'z' 932 00005AEA 7609 <1> jbe @F 933 00005AEC B020 <1> mov al, 32 934 00005AEE B90500 <1> mov cx, 3 + 2 935 00005AF1 F3AA <1> rep stosb 936 00005AF3 EB11 <1> jmp @FF 937 <1> 938 <1> @@: 939 00005AF5 93 <1> xchg ax, bx 940 00005AF6 AB <1> stosw 941 00005AF7 93 <1> xchg ax, bx 942 00005AF8 AA <1> stosb 943 00005AF9 A0[438F] <1> mov al, byte [load_current_partition] 944 00005AFC E8B552 <1> call decbyte 945 00005AFF 3C0A <1> cmp al, 10 946 00005B01 B020 <1> mov al, 32 947 00005B03 7301 <1> jae @F 948 00005B05 AA <1> stosb 949 <1> @@: 950 00005B06 AA <1> stosb 951 <1> 952 00005B07 8A4404 <1> mov al, byte [si + 4] 953 00005B0A E84753 <1> call hexbyte 954 <1> 955 00005B0D B020 <1> mov al, 32 956 00005B0F AA <1> stosb 957 <1> 958 00005B10 89F9 <1> mov cx, di ; (preserve di in line_out) 959 00005B12 5F <1> pop di ; get di of scan_partitions 960 00005B13 57 <1> push di 961 00005B14 8B43F8 <1> mov ax, word [bp + di - 8] 962 00005B17 8B53FA <1> mov dx, word [bp + di - 6] ; root 963 00005B1A 89CF <1> mov di, cx ; (preserve di in line_out) 964 00005B1C 034408 <1> add ax, word [si + 8] 965 00005B1F 13540A <1> adc dx, word [si + 8 + 2] ; add partition offset 966 00005B22 92 <1> xchg ax, dx 967 00005B23 E82753 <1> call hexword 968 00005B26 92 <1> xchg ax, dx 969 00005B27 E82353 <1> call hexword 970 <1> 971 00005B2A 50 <1> push ax 972 00005B2B B82028 <1> mov ax, " (" 973 00005B2E AB <1> stosw 974 00005B2F 58 <1> pop ax 975 00005B30 51 <1> push cx 976 00005B31 53 <1> push bx 977 00005B32 8B0E[1B8C] <1> mov cx, [load_sectorsize] 978 00005B36 BB0800 <1> mov bx, 4+4 979 00005B39 E8ACC1 <1> call disp_dxax_times_cx_width_bx_size.store 980 00005B3C 50 <1> push ax 981 00005B3D B82920 <1> mov ax, ") " 982 00005B40 AB <1> stosw 983 00005B41 58 <1> pop ax 984 <1> 985 00005B42 52 <1> push dx 986 00005B43 50 <1> push ax 987 <1> 988 00005B44 8B440C <1> mov ax, word [si + 12] 989 00005B47 8B540E <1> mov dx, word [si + 12 + 2] 990 00005B4A 92 <1> xchg ax, dx 991 00005B4B E8FF52 <1> call hexword 992 00005B4E 92 <1> xchg ax, dx 993 00005B4F E8FB52 <1> call hexword 994 <1> 995 00005B52 50 <1> push ax 996 00005B53 B82028 <1> mov ax, " (" 997 00005B56 AB <1> stosw 998 00005B57 58 <1> pop ax 999 00005B58 E88DC1 <1> call disp_dxax_times_cx_width_bx_size.store 1000 00005B5B B029 <1> mov al, ")" 1001 00005B5D AA <1> stosb 1002 <1> 1003 00005B5E 58 <1> pop ax 1004 00005B5F 5A <1> pop dx 1005 <1> 1006 00005B60 5B <1> pop bx 1007 00005B61 59 <1> pop cx 1008 <1> 1009 00005B62 807C0483 <1> cmp byte [si + piType], ptLinux 1010 00005B66 7544 <1> jne .notlinux 1011 <1> 1012 00005B68 8B1E[2A0A] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 1013 00005B6C E89F13 <1> call read_ae_1536_bytes 1014 <1> 1015 00005B6F 26813E380453EF <1> cmp word [es:1024 + 56], 0xEF53 ; s_magic == EXT2_SUPER_MAGIC ? 1016 00005B76 7403E99300 <1> jne .nolabel 1017 <1> 1018 00005B7B 26833E4E0400 <1> cmp word [es:1024 + 76 + 2], 0 1019 00005B81 7403E98800 <1> jne .nolabel 1020 00005B86 26833E4C0401 <1> cmp word [es:1024 + 76], 1 ; s_rev_level == EXT2_DYNAMIC_REV ? 1021 00005B8C 7403E97D00 <1> jne .nolabel 1022 <1> 1023 00005B91 06 <1> push es 1024 00005B92 1F <1> pop ds 1025 00005B93 BE7804 <1> mov si, 1024 + 120 1026 00005B96 B91000 <1> mov cx, 16 1027 00005B99 16 <1> push ss 1028 00005B9A 07 <1> pop es 1029 <1> 1030 00005B9B B020 <1> mov al, 32 1031 00005B9D AA <1> stosb 1032 <1> @@: 1033 00005B9E AC <1> lodsb 1034 00005B9F 84C0 <1> test al, al 1035 00005BA1 7403 <1> jz @F 1036 00005BA3 AA <1> stosb 1037 00005BA4 E2F8 <1> loop @B 1038 <1> @@: 1039 <1> 1040 00005BA6 16 <1> push ss 1041 00005BA7 1F <1> pop ds 1042 <1> 1043 00005BA8 59 <1> pop cx 1044 00005BA9 5E <1> pop si 1045 00005BAA 56 <1> push si ; get si of scan_partitions 1046 00005BAB 51 <1> push cx 1047 <1> 1048 <1> .notlinux: 1049 00005BAC 8A5C04 <1> mov bl, byte [si + piType] 1050 00005BAF 80FB01 <1> cmp bl, ptFAT12 1051 00005BB2 7419 <1> je .isfat 1052 00005BB4 80FB04 <1> cmp bl, ptFAT16_16BIT_CHS 1053 00005BB7 7414 <1> je .isfat 1054 00005BB9 80FB06 <1> cmp bl, ptFAT16_CHS 1055 00005BBC 740F <1> je .isfat 1056 00005BBE 80FB0B <1> cmp bl, ptFAT32_CHS 1057 00005BC1 740A <1> je .isfat 1058 00005BC3 80FB0C <1> cmp bl, ptFAT32 1059 00005BC6 7405 <1> je .isfat 1060 00005BC8 80FB0E <1> cmp bl, ptFAT16 1061 00005BCB 7541 <1> jne .notfat 1062 <1> .isfat: 1063 <1> 1064 00005BCD 8B1E[2A0A] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 1065 00005BD1 E84B13 <1> call read_ae_512_bytes 1066 <1> 1067 00005BD4 26813EFE0155AA <1> cmp word [es:510], 0AA55h 1068 00005BDB 7531 <1> jne .nolabel 1069 00005BDD 26833E0B0000 <1> cmp word [es:bsBPB + bpbBytesPerSector], 0 1070 00005BE3 7429 <1> je .nolabel 1071 00005BE5 BE2B00 <1> mov si, bsBPB + bpbNew + bpbnVolumeLabel 1072 00005BE8 26833E160000 <1> cmp word [es:bsBPB + bpbSectorsPerFAT], 0 1073 00005BEE 7503 <1> jne @F 1074 00005BF0 BE4700 <1> mov si, bsBPB + ebpbNew + bpbnVolumeLabel 1075 <1> @@: 1076 00005BF3 26807CFB29 <1> cmp byte [es:si - bpbnVolumeLabel + bpbnExtBPBSignature], 29h 1077 00005BF8 7514 <1> jne .nolabel 1078 00005BFA B90B00 <1> mov cx, 11 1079 <1> 1080 00005BFD 06 <1> push es 1081 00005BFE 1F <1> pop ds 1082 00005BFF 16 <1> push ss 1083 00005C00 07 <1> pop es 1084 <1> 1085 00005C01 B020 <1> mov al, 32 1086 00005C03 AA <1> stosb 1087 <1> @@: 1088 00005C04 AC <1> lodsb 1089 00005C05 84C0 <1> test al, al 1090 00005C07 7403 <1> jz @F 1091 00005C09 AA <1> stosb 1092 00005C0A E2F8 <1> loop @B 1093 <1> @@: 1094 <1> 1095 00005C0C 16 <1> push ss 1096 00005C0D 1F <1> pop ds 1097 <1> .notfat: 1098 <1> .nolabel: 1099 00005C0E 16 <1> push ss 1100 00005C0F 07 <1> pop es 1101 00005C10 E87252 <1> call putsline_crlf 1102 <1> 1103 00005C13 5F <1> pop di 1104 00005C14 5E <1> pop si 1105 00005C15 59 <1> pop cx 1106 00005C16 07 <1> pop es 1107 00005C17 C3 <1> retn 1108 <1> 1109 <1> 1110 <1> ; INP: al = first character 1111 <1> ; si -> next 1112 <1> ; OUT: NC 1113 <1> ; byte [load_unit] set 1114 <1> ; byte [load_partition] set 1115 <1> ; (zero if none specified, -1 if ldp or sdp) 1116 <1> ; opt [internalflags3] & dif3_load_is_ldp 1117 <1> ; opt [internalflags3] & dif3_load_is_sdp 1118 <1> ; dword [load_partition_sector] set if ldp or sdp 1119 <1> ; ZR if no filename specified (at end of input) 1120 <1> ; NZ if presumably a filename specified, 1121 <1> ; al = first character (slash or whatever non-blank) 1122 <1> ; si -> next 1123 <1> ; CHG: bx, cx, dx, ax, si, di 1124 <1> ; STT: ds = es = ss 1125 <1> parseloadunit_default_sdp: 1126 00005C18 E81C00 <1> call parseloadunit 1127 00005C1B 7319 <1> jnc @F 1128 <1> 1129 00005C1D 8A16[508C] <1> mov dl, byte [load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit] 1131 00005C21 8816[508C] <1> mov byte [load_unit], dl 1132 00005C25 C606[428F]FF <1> mov byte [load_partition], -1 1133 00005C2A 800E[CC00]02 <1> or byte [internalflags3], dif3_load_is_sdp 1134 <1> 1135 00005C2F E87151 <1> call skipwh0 1136 00005C32 E81851 <1> call iseol? 1137 00005C35 F8 <1> clc 1138 <1> @@: 1139 00005C36 C3 <1> retn 1140 <1> 1141 <1> 1142 <1> ; INP: al = first character 1143 <1> ; si -> next 1144 <1> ; OUT: CY if no load unit 1145 <1> ; (not "HD[A-Z]", "FD[A-Z]", "LD[P]", "SD[P]", "U[0-9A-F]") 1146 <1> ; note: this is barely used! 1147 <1> ; NC else, 1148 <1> ; byte [load_unit] set 1149 <1> ; byte [load_partition] set 1150 <1> ; (zero if none specified, -1 if ldp or sdp) 1151 <1> ; opt [internalflags3] & dif3_load_is_ldp 1152 <1> ; opt [internalflags3] & dif3_load_is_sdp 1153 <1> ; dword [load_partition_sector] set if ldp or sdp 1154 <1> ; ZR if no filename specified (at end of input) 1155 <1> ; NZ if presumably a filename specified, 1156 <1> ; al = first character (slash or whatever non-blank) 1157 <1> ; si -> next 1158 <1> ; CHG: bx, cx, dx, ax, si, di 1159 <1> ; STT: ds = es = ss 1160 <1> parseloadunit: 1161 00005C37 31DB <1> xor bx, bx 1162 <1> lframe near 1163 <1> lvar word, unit_low_partition_high 1164 <1> lequ ?unit_low_partition_high, unit 1165 <1> lequ ?unit_low_partition_high + 1, partition 1166 00005C39 5589E550 <1> lenter 1167 <1> lvar word, dif3_set 1168 00005C3D 53 <1> push bx 1169 <1> lvar dword, load_partition_sector 1170 00005C3E FF36[3A8F] <1> push word [load_partition_sector + 2] 1171 00005C42 FF36[388F] <1> push word [load_partition_sector] 1172 <1> 1173 00005C46 89F7 <1> mov di, si 1174 00005C48 8026[CC00]F8 <1> clropt [internalflags3], dif3_load_is_dp 1175 00005C4D E86A25 <1> call uppercase 1176 00005C50 3C48 <1> cmp al, 'H' 1177 00005C52 7503E9EF00 <1> je .load_hd 1178 00005C57 3C46 <1> cmp al, 'F' 1179 00005C59 7503E9E500 <1> je .load_fd 1180 00005C5E B401 <1> mov ah, dif3_load_is_ldp 1181 00005C60 3C4C <1> cmp al, 'L' 1182 00005C62 7419 <1> je .load_ld_sd 1183 00005C64 B402 <1> mov ah, dif3_load_is_sdp 1184 00005C66 3C53 <1> cmp al, 'S' 1185 00005C68 7413 <1> je .load_ld_sd 1186 <1> %if _INPUT_FILE_BOOT 1187 00005C6A B404 <1> mov ah, dif3_load_is_ydp 1188 00005C6C 3C59 <1> cmp al, 'Y' 1189 00005C6E 740D <1> je .load_ld_sd 1190 <1> %endif 1191 00005C70 3C55 <1> cmp al, 'U' 1192 00005C72 747C <1> je .load_u 1193 <1> .retc: 1194 00005C74 89FE <1> mov si, di 1195 00005C76 4E <1> dec si 1196 00005C77 AC <1> lodsb 1197 00005C78 F9 <1> stc 1198 <1> .ret: 1199 00005C79 89EC5D <1> lleave code 1200 00005C7C C3 <1> lret 1201 <1> 1202 <1> .load_ld_sd: 1203 00005C7D AC <1> lodsb 1204 00005C7E E83925 <1> call uppercase 1205 00005C81 3C44 <1> cmp al, 'D' 1206 00005C83 75EF <1> jne .retc 1207 <1> 1208 <1> d4 call d4message 1209 <1> d4 asciz "In parseloadunit.load_ld_sd",13,10 1210 <1> 1211 00005C85 8A16[508C] <1> mov dl, byte [load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit] 1213 00005C89 80FC02 <1> cmp ah, dif3_load_is_sdp 1214 00005C8C 741D <1> je @F 1215 00005C8E 8A16[B08B] <1> mov dl, byte [loaddata_loadedfrom - LOADDATA + bsBPB + ebpbNew + bpbnBootUnit] 1217 <1> %if _INPUT_FILE_BOOT 1218 00005C92 80FC01 <1> cmp ah, dif3_load_is_ldp 1219 00005C95 7414 <1> je @F 1220 00005C97 F606[CB00]02 <1> testopt [internalflags2], dif2_input_file_boot 1221 00005C9C 74D6 <1> jz .retc 1222 <1> 1223 00005C9E 93 <1> xchg ax, bx 1224 00005C9F B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 1225 00005CA2 F726[308F] <1> mul word [load_input_file.active] 1226 <1> 1227 <1> ; test dx, dx 1228 <1> ; jnz .error 1229 <1> 1230 00005CA6 93 <1> xchg ax, bx 1231 00005CA7 8A97[308D] <1> mov dl, byte [load_input_file + bx - LOADDATA3 + bsBPB + ebpbNew + bpbnBootUnit] 1233 <1> %endif 1234 <1> @@: 1235 00005CAB AC <1> lodsb 1236 00005CAC E80B25 <1> call uppercase 1237 00005CAF 3C50 <1> cmp al, 'P' 1238 00005CB1 7403E9AD00 <1> jne .got_unit 1239 <1> 1240 <1> d4 call d4message 1241 <1> d4 asciz "In parseloadunit.load_ld_sd with ldp",13,10 1242 <1> 1243 00005CB6 8856FE <1> mov byte [bp + ?unit], dl 1244 00005CB9 C646FFFF <1> mov byte [bp + ?partition], -1 1245 00005CBD 0866FC <1> or byte [bp + ?dif3_set], ah 1246 <1> 1247 00005CC0 80FC02 <1> cmp ah, dif3_load_is_sdp 1248 00005CC3 741D <1> je @F 1249 <1> %if _INPUT_FILE_BOOT 1250 00005CC5 80FC01 <1> cmp ah, dif3_load_is_ldp 1251 00005CC8 740A <1> je .is_ldp 1252 00005CCA FFB7[0E8D] <1> push word [load_input_file + bx - LOADDATA3 + bsBPB + bpbHiddenSectors + 2] 1254 00005CCE FFB7[0C8D] <1> push word [load_input_file + bx - LOADDATA3 + bsBPB + bpbHiddenSectors] 1256 00005CD2 EB08 <1> jmp .is_ldp_ydp 1257 <1> 1258 <1> %endif 1259 <1> .is_ldp: 1260 00005CD4 FF36[8E8B] <1> push word [load_ldp_sector + 2] 1261 00005CD8 FF36[8C8B] <1> push word [load_ldp_sector] 1262 <1> .is_ldp_ydp: 1263 00005CDC 8F46F8 <1> pop word [bp + ?load_partition_sector] 1264 00005CDF 8F46FA <1> pop word [bp + ?load_partition_sector + 2] 1265 <1> @@: 1266 <1> 1267 00005CE2 E8BD50 <1> call skipwhite 1268 00005CE5 E86550 <1> call iseol? 1269 00005CE8 7403E9F700 <1> jne .fn 1270 00005CED E9F000 <1> jmp .ret_nc 1271 <1> 1272 <1> .load_u: 1273 00005CF0 AC <1> lodsb 1274 00005CF1 E8C624 <1> call uppercase 1275 <1> 1276 00005CF4 3C28 <1> cmp al, '(' 1277 00005CF6 7419 <1> je @F 1278 00005CF8 3C30 <1> cmp al, '0' 1279 00005CFA 7303E975FF <1> jb .retc 1280 00005CFF 3C39 <1> cmp al, '9' 1281 00005D01 760E <1> jbe @F 1282 00005D03 3C41 <1> cmp al, 'A' 1283 00005D05 7303E96AFF <1> jb .retc 1284 00005D0A 3C46 <1> cmp al, 'F' 1285 00005D0C 7603E963FF <1> ja .retc 1286 <1> @@: 1287 <1> 1288 00005D11 3C28 <1> cmp al, '(' 1289 00005D13 7511 <1> jne .u_not_expr 1290 00005D15 AC <1> lodsb 1291 00005D16 E84B4A <1> call getexpression 1292 00005D19 E88750 <1> call skipwh0 1293 00005D1C 3C29 <1> cmp al, ')' 1294 00005D1E AC <1> lodsb 1295 00005D1F 7403E9DAF8 <1> jne bootcmd.errordec 1296 00005D24 EB03 <1> jmp .u_check_dot 1297 <1> 1298 <1> .u_not_expr: 1299 00005D26 E8EB0F <1> call boot_get_hexadecimal_literal 1300 <1> .u_check_dot: 1301 00005D29 3C2E <1> cmp al, '.' 1302 00005D2B 7403E9CFF8 <1> jne bootcmd.error 1303 00005D30 AC <1> lodsb 1304 00005D31 85DB <1> test bx, bx 1305 00005D33 7403E9C7F8 <1> jnz bootcmd.error 1306 00005D38 81FA0001 <1> cmp dx, 256 1307 00005D3C 7203E9BEF8 <1> jae bootcmd.error 1308 00005D41 EB20 <1> jmp .got_unit 1309 <1> 1310 <1> .load_fd: 1311 00005D43 B200 <1> mov dl, 0 1312 <1> 1313 <1> d4 call d4message 1314 <1> d4 asciz "In parseloadunit.load_fd",13,10 1315 <1> 1316 00005D45 A9 <1> db __TEST_IMM16 ; skip mov 1317 <1> .load_hd: 1318 00005D46 B280 <1> mov dl, 80h 1319 <1> d4 call d4message 1320 <1> d4 asciz "In parseloadunit.load_fd or .load_hd",13,10 1321 <1> 1322 00005D48 AC <1> lodsb 1323 00005D49 E86E24 <1> call uppercase 1324 00005D4C 3C44 <1> cmp al, 'D' 1325 00005D4E 7403E921FF <1> jne .retc 1326 00005D53 AC <1> lodsb 1327 00005D54 E86324 <1> call uppercase 1328 00005D57 2C41 <1> sub al, 'A' 1329 00005D59 3C19 <1> cmp al, 'Z' - 'A' 1330 00005D5B 7603E914FF <1> ja .retc 1331 00005D60 08C2 <1> or dl, al ; hdX: 80h + number, fdX: 0 + number 1332 00005D62 AC <1> lodsb 1333 <1> 1334 <1> .got_unit: 1335 00005D63 89D1 <1> mov cx, dx 1336 00005D65 884EFE <1> mov byte [bp + ?unit], cl 1337 00005D68 C646FF00 <1> mov byte [bp + ?partition], 0 1338 00005D6C 3C2F <1> cmp al, '/' ; slash ? 1339 00005D6E 7474 <1> je .fn 1340 00005D70 3C5C <1> cmp al, '\' 1341 00005D72 7470 <1> je .fn ; got a filename --> 1342 00005D74 3C20 <1> cmp al, 32 ; or blank ? 1343 00005D76 7404 <1> je @F 1344 00005D78 3C09 <1> cmp al, 9 1345 00005D7A 7508 <1> jne .checkeol ; check for EOL -- but no filename 1346 <1> ; (hdd1name is invalid -- must be hdd1/name or hdd1 name) 1347 <1> @@: ; was blank 1348 00005D7C E82450 <1> call skipwh0 ; skip blanks 1349 00005D7F E8CB4F <1> call iseol? ; EOL ? 1350 00005D82 7560 <1> jne .fn ; no, is filename --> 1351 <1> ; will jump after this 1352 <1> .checkeol: 1353 00005D84 E8C64F <1> call iseol? ; EOL ? 1354 00005D87 7457 <1> je .ret_nc ; yes, no filename --> 1355 <1> 1356 00005D89 3C28 <1> cmp al, '(' 1357 00005D8B 740E <1> je @F 1358 00005D8D 3C30 <1> cmp al, '0' 1359 00005D8F 7303E9E0FE <1> jb .retc 1360 00005D94 3C39 <1> cmp al, '9' 1361 00005D96 7603E9D9FE <1> ja .retc 1362 <1> @@: 1363 <1> 1364 <1> d4 call d4message 1365 <1> d4 asciz "In parseloadunit (after no EOL found)",13,10 1366 00005D9B 51 <1> push cx 1367 00005D9C 80FA80 <1> cmp dl, 80h 1368 00005D9F 7303E95BF8 <1> jb bootcmd.error ; diskettes aren't partitioned 1369 00005DA4 3C28 <1> cmp al, '(' 1370 00005DA6 750F <1> jne .not_expr 1371 00005DA8 AC <1> lodsb ; skip opening paren 1372 <1> 1373 <1> d4 call d4message 1374 <1> d4 asciz "In parseloadunit (before call to getexpression)",13,10 1375 <1> 1376 00005DA9 E8B849 <1> call getexpression 1377 <1> 1378 <1> d4 call d4message 1379 <1> d4 asciz "In parseloadunit (after call to getexpression)",13,10 1380 00005DAC E8F44F <1> call skipwh0 1381 00005DAF 3C29 <1> cmp al, ')' 1382 00005DB1 AC <1> lodsb 1383 00005DB2 7406 <1> je .got_expr 1384 00005DB4 E947F8 <1> jmp bootcmd.errordec 1385 <1> 1386 <1> .not_expr: 1387 <1> d4 call d4message 1388 <1> d4 asciz "In parseloadunit (before call to boot_get_decimal_literal)",13,10 1389 00005DB7 E8520F <1> call boot_get_decimal_literal 1390 <1> .got_expr: ; bx:dx = load partition number 1391 <1> d4 call d4message 1392 <1> d4 asciz "In parseloadunit.got_expr",13,10 1393 00005DBA 59 <1> pop cx ; cl = load unit 1394 00005DBB 85DB <1> test bx, bx 1395 00005DBD 7403E93DF8 <1> jnz bootcmd.error 1396 00005DC2 81FAFF00 <1> cmp dx, 255 1397 00005DC6 7603E934F8 <1> ja bootcmd.error 1398 00005DCB 85D2 <1> test dx, dx 1399 00005DCD 7503E92DF8 <1> jz bootcmd.error 1400 00005DD2 E8CE4F <1> call skipwh0 1401 00005DD5 8856FF <1> mov byte [bp + ?partition], dl 1402 00005DD8 884EFE <1> mov byte [bp + ?unit], cl 1403 00005DDB E86F4F <1> call iseol? 1404 00005DDE 7504 <1> jne .fn 1405 <1> .ret_nc: 1406 00005DE0 31DB <1> xor bx, bx ; NC, ZR 1407 00005DE2 EB06 <1> jmp @F 1408 <1> 1409 <1> .fn: 1410 00005DE4 E8BC4F <1> call skipwh0 1411 00005DE7 83CB01 <1> or bx, 1 ; NC, NZ 1412 <1> @@: 1413 00005DEA 8F06[388F] <1> pop word [load_partition_sector] 1414 00005DEE 8F06[3A8F] <1> pop word [load_partition_sector + 2] 1415 <1> ; pop from ?load_partition_sector 1416 00005DF2 9C <1> pushf 1417 00005DF3 8B5EFE <1> mov bx, word [bp + ?unit_low_partition_high] 1418 00005DF6 881E[508C] <1> mov byte [load_unit], bl 1419 00005DFA 883E[428F] <1> mov byte [load_partition], bh 1420 00005DFE 8A5EFC <1> mov bl, byte [bp + ?dif3_set] 1421 00005E01 081E[CC00] <1> or byte [internalflags3], bl 1422 00005E05 9D <1> popf ; ZF, CF 1423 00005E06 E970FE <1> jmp .ret 1424 <1> 1425 <1> lleave ctx 1426 <1> 1427 <1> 1428 00005E09 00 <1> align 4, db 0 1429 <1> 1430 <1> boot_read: 1431 00005E0C C706[708F][316F] <1> mov word [load_readwrite_function], read_sector 1432 00005E12 EB06 <1> jmp boot_readwrite 1433 <1> 1434 <1> boot_write: 1435 00005E14 C706[708F][306F] <1> mov word [load_readwrite_function], write_sector 1436 <1> 1437 <1> boot_readwrite: 1438 <1> 1439 <1> d4 call d4message 1440 <1> d4 asciz "In boot_readwrite",13,10 1441 <1> 1442 00005E1A E86F4F <1> call skipequals 1443 00005E1D E8F8FD <1> call parseloadunit_default_sdp 1444 00005E20 7503E9C800 <1> jz .error 1445 <1> 1446 <1> %if 0 1447 <1> call skipwh0 1448 <1> mov bx, word [reg_ds] ; default segment 1449 <1> call getaddr ; get buffer address into bx:(e)dx 1450 <1> 1451 <1> _386 test edx, 0FFFF_0000h 1452 <1> _386 jnz .error 1453 <1> 1454 <1> ; (variable must be a dword!) 1455 <1> mov word [load_readwrite_buffer], dx 1456 <1> mov word [load_readwrite_buffer + 2], bx 1457 <1> %else 1458 00005E25 E8044E <1> call getword 1459 <1> ; (variable is a word) 1460 00005E28 8916[6C8F] <1> mov word [load_readwrite_buffer], dx 1461 <1> %endif 1462 <1> 1463 00005E2C E8744F <1> call skipwh0 1464 00005E2F E81B4F <1> call iseol? 1465 00005E32 750F <1> jne @F 1466 <1> 1467 <1> d4 call d4message 1468 <1> d4 asciz "In boot_readwrite no sector given no count given",13,10 1469 <1> 1470 00005E34 8326[688F]00 <1> and word [load_readwrite_sector], 0 1471 00005E39 8326[6A8F]00 <1> and word [load_readwrite_sector + 2], 0 1472 00005E3E BA0100 <1> mov dx, 1 1473 00005E41 EB36 <1> jmp @FF 1474 <1> 1475 <1> @@: 1476 00005E43 BA[5663] <1> mov dx, msg.hidden 1477 00005E46 4E <1> dec si 1478 00005E47 E8A44E <1> call isstring? 1479 00005E4A 7510 <1> jne .nothidden 1480 <1> 1481 00005E4C E83D4F <1> call skipequals 1482 00005E4F E81249 <1> call getdword 1483 <1> 1484 00005E52 89561C <1> mov word [bp + bsBPB + bpbHiddenSectors + 0], dx 1485 00005E55 895E1E <1> mov word [bp + bsBPB + bpbHiddenSectors + 2], bx 1486 00005E58 E8484F <1> call skipwh0 1487 <1> 1488 00005E5B A8 <1> db __TEST_IMM8 1489 <1> .nothidden: 1490 00005E5C AC <1> lodsb 1491 00005E5D E80449 <1> call getexpression ; bx:dx = value 1492 <1> 1493 00005E60 8916[688F] <1> mov word [load_readwrite_sector], dx 1494 00005E64 891E[6A8F] <1> mov word [load_readwrite_sector + 2], bx 1495 <1> 1496 00005E68 E8384F <1> call skipwh0 1497 00005E6B BA0100 <1> mov dx, 1 1498 00005E6E E8DC4E <1> call iseol? 1499 00005E71 7406 <1> je @F 1500 00005E73 E8B64D <1> call getword 1501 00005E76 E8E94E <1> call chkeol 1502 <1> @@: 1503 00005E79 8916[6E8F] <1> mov word [load_readwrite_count], dx 1504 <1> 1505 00005E7D E8E90E <1> call query_geometry 1506 <1> 1507 00005E80 F606[CC00]07 <1> testopt [internalflags3], dif3_load_is_dp 1508 00005E85 753C <1> jnz .ldp 1509 <1> 1510 00005E87 803E[428F]00 <1> cmp byte [load_partition], 0 1511 00005E8C 7447 <1> je .whole_unit 1512 <1> 1513 00005E8E C606[448F]00 <1> mov byte [load_found_partition], 0 1514 00005E93 B9[A55E] <1> mov cx, .single_partition 1515 00005E96 E8280D <1> call scan_partitions 1516 <1> ; cmp byte [load_found_partition], 0 1517 <1> ; jne @F 1518 00005E99 BA[4661] <1> mov dx, msg.boot_partition_not_found 1519 00005E9C B81502 <1> mov ax, 0215h 1520 00005E9F E8613A <1> call setrc 1521 00005EA2 E974FB <1> jmp bootcmd.fail 1522 <1> ;@@: 1523 <1> ; retn 1524 <1> 1525 <1> 1526 <1> .single_partition: 1527 <1> ; INP: es:si -> partition table entry, 1528 <1> ; si = load_partition_table .. load_partition_table+48, 1529 <1> ; es = ss 1530 <1> ; bp + di -> above part table metadata, 1531 <1> ; dwo [bp + di - 4] = root (outermost extended position) 1532 <1> ; dwo [bp + di - 8] = base (current table position) 1533 <1> ;; CHG: ax, bx, (cx), dx 1534 <1> ; CHG: all 1535 <1> 1536 <1> d4 call d4message 1537 <1> d4 asciz "In boot_readwrite.single_partition",13,10 1538 <1> 1539 00005EA5 A0[438F] <1> mov al, byte [load_current_partition] 1540 00005EA8 3A06[428F] <1> cmp al, byte [load_partition] 1541 00005EAC 7401 <1> je .gotit 1542 00005EAE C3 <1> retn 1543 <1> 1544 <1> .gotit: 1545 <1> d4 call d4message 1546 <1> d4 asciz "In boot_readwrite.gotit",13,10 1547 <1> 1548 <1> ; inc byte [load_found_partition] 1549 <1> 1550 00005EAF 8B43F8 <1> mov ax, [bp + di - 8] 1551 00005EB2 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 1552 <1> 1553 00005EB5 26034408 <1> add ax, [es:si + 8] 1554 00005EB9 2613540A <1> adc dx, [es:si + 8 + 2] ; add offset to logical partition 1555 <1> 1556 00005EBD 89EC <1> mov sp, bp 1557 00005EBF 5D <1> pop bp ; restore bp (scan_partitions) 1558 00005EC0 5B <1> pop bx ; discard ret address (scan_partitions) 1559 00005EC1 EB07 <1> jmp .gotbase_dxax 1560 <1> 1561 <1> 1562 <1> .ldp: 1563 00005EC3 A1[388F] <1> mov ax, word [load_partition_sector] 1564 00005EC6 8B16[3A8F] <1> mov dx, word [load_partition_sector + 2] 1565 <1> 1566 <1> .gotbase_dxax: 1567 00005ECA 89461C <1> mov word [bp + bsBPB + bpbHiddenSectors + 0], ax 1568 00005ECD 89561E <1> mov word [bp + bsBPB + bpbHiddenSectors + 2], dx 1569 00005ED0 800E[CC00]80 <1> setopt [internalflags3], dif3_partition_changed 1570 <1> 1571 <1> .whole_unit: 1572 00005ED5 A1[688F] <1> mov ax, word [load_readwrite_sector] 1573 00005ED8 8B16[6A8F] <1> mov dx, word [load_readwrite_sector + 2] 1574 00005EDC 8B0E[6E8F] <1> mov cx, word [load_readwrite_count] 1575 00005EE0 8B1E[6C8F] <1> mov bx, word [load_readwrite_buffer] 1576 <1> 1577 00005EE4 E306 <1> jcxz @FF 1578 <1> @@: 1579 00005EE6 FF16[708F] <1> call near word [load_readwrite_function] 1580 00005EEA E2FA <1> loop @B 1581 <1> @@: 1582 00005EEC C3 <1> retn 1583 <1> 1584 <1> .error: 1585 00005EED E9CC39 <1> jmp error 1586 <1> 1587 <1> 1588 <1> ; INP: ds:si-> first letter of name 1589 <1> ; es:load_kernel_name-> 12-byte buffer (for fn + 0) 1590 <1> ; CHG: ax, cx, di 1591 <1> ; OUT: al = first character after name (EOL, blank, or slash) 1592 <1> ; si -> next character 1593 <1> boot_parse_fn: 1594 00005EF0 B020 <1> mov al, 32 1595 00005EF2 BF[488F] <1> mov di, load_kernel_name 1596 00005EF5 B90B00 <1> mov cx, 11 1597 00005EF8 F3AA <1> rep stosb ; initialise to empty 1598 <1> 1599 00005EFA BF[488F] <1> mov di, load_kernel_name 1600 00005EFD B90900 <1> mov cx, 9 1601 <1> .loop_name: 1602 00005F00 AC <1> lodsb 1603 00005F01 E8B622 <1> call uppercase 1604 00005F04 E8464E <1> call iseol? 1605 00005F07 7455 <1> je .loop_name_done 1606 00005F09 3C20 <1> cmp al, 32 1607 00005F0B 7451 <1> je .loop_name_done 1608 00005F0D 3C09 <1> cmp al, 9 1609 00005F0F 744D <1> je .loop_name_done 1610 00005F11 3C2F <1> cmp al, '/' 1611 00005F13 7449 <1> je .loop_name_done 1612 00005F15 3C5C <1> cmp al, '\' 1613 00005F17 7445 <1> je .loop_name_done 1614 00005F19 3C2E <1> cmp al, '.' 1615 00005F1B 740F <1> je .loop_name_ext 1616 00005F1D AA <1> stosb 1617 00005F1E E2E0 <1> loop .loop_name 1618 <1> .invalid: 1619 00005F20 BA[9162] <1> mov dx, msg.boot_invalid_filename 1620 00005F23 B81602 <1> mov ax, 0216h 1621 00005F26 E8DA39 <1> call setrc 1622 00005F29 E9EDFA <1> jmp bootcmd.fail 1623 <1> 1624 <1> .loop_name_ext: 1625 00005F2C 83F909 <1> cmp cx, 9 1626 00005F2F 74EF <1> je .invalid 1627 00005F31 B90400 <1> mov cx, 4 1628 00005F34 BF[508F] <1> mov di, load_kernel_name + 8 1629 <1> .loop_ext: 1630 00005F37 AC <1> lodsb 1631 00005F38 E87F22 <1> call uppercase 1632 00005F3B E80F4E <1> call iseol? 1633 00005F3E 7419 <1> je .loop_ext_done 1634 00005F40 3C20 <1> cmp al, 32 1635 00005F42 7415 <1> je .loop_ext_done 1636 00005F44 3C09 <1> cmp al, 9 1637 00005F46 7411 <1> je .loop_ext_done 1638 00005F48 3C2F <1> cmp al, '/' 1639 00005F4A 740D <1> je .loop_ext_done 1640 00005F4C 3C5C <1> cmp al, '\' 1641 00005F4E 7409 <1> je .loop_ext_done 1642 00005F50 3C2E <1> cmp al, '.' 1643 00005F52 74CC <1> je .invalid 1644 00005F54 AA <1> stosb 1645 00005F55 E2E0 <1> loop .loop_ext 1646 00005F57 EBC7 <1> jmp .invalid 1647 <1> 1648 <1> .loop_ext_done: 1649 00005F59 83F904 <1> cmp cx, 4 1650 00005F5C 74C2 <1> je .invalid 1651 <1> .loop_name_done: 1652 00005F5E 83F909 <1> cmp cx, 9 1653 00005F61 74BD <1> je .invalid 1654 00005F63 C606[538F]00 <1> mov byte [load_kernel_name + 11], 0 1655 00005F68 803E[488F]E5 <1> cmp byte [load_kernel_name], 0E5h 1656 00005F6D 7505 <1> jne @F 1657 00005F6F C606[488F]05 <1> mov byte [load_kernel_name], 05h 1658 <1> @@: 1659 00005F74 C3 <1> retn 1660 <1> 1661 <1> 1662 <1> ; INP: es:si -> partition table entry, 1663 <1> ; si = load_partition_table .. load_partition_table+48, 1664 <1> ; es = ss 1665 <1> ; bp + di -> above part table metadata, 1666 <1> ; dwo [bp + di - 4] = root (outermost extended position) 1667 <1> ; dwo [bp + di - 8] = base (current table position) 1668 <1> ; CHG: ax, bx, (cx), dx 1669 <1> load_from_partition: 1670 <1> d4 call d4message 1671 <1> d4 asciz "In load_from_partition",13,10 1672 <1> 1673 00005F75 A0[438F] <1> mov al, byte [load_current_partition] 1674 00005F78 3A06[428F] <1> cmp al, byte [load_partition] 1675 00005F7C 7401 <1> je .gotit 1676 00005F7E C3 <1> retn 1677 <1> 1678 <1> .gotit: 1679 <1> d4 call d4message 1680 <1> d4 asciz "In load_from_partition.gotit",13,10 1681 <1> 1682 00005F7F 8B43F8 <1> mov ax, [bp + di - 8] 1683 00005F82 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 1684 <1> 1685 00005F85 52 <1> push dx 1686 00005F86 50 <1> push ax 1687 00005F87 06 <1> push es 1688 00005F88 BB6000 <1> mov bx, 60h 1689 00005F8B E8910F <1> call read_ae_512_bytes ; load partition table to 0:600h 1690 00005F8E 07 <1> pop es 1691 00005F8F 58 <1> pop ax 1692 00005F90 5A <1> pop dx 1693 <1> 1694 00005F91 26034408 <1> add ax, [es:si + 8] 1695 00005F95 2613540A <1> adc dx, [es:si + 8 + 2] ; add offset to logical partition 1696 <1> 1697 00005F99 26894408 <1> mov word [es:si + 8], ax 1698 00005F9D 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 1699 <1> 1700 00005FA1 31C9 <1> xor cx, cx 1701 00005FA3 8EC1 <1> mov es, cx ; es = 0 1702 00005FA5 8DB4AE7B <1> lea si, [si - (load_partition_table + DATASECTIONFIXUP) + 600h + (510 - 64)] 1703 <1> ; si = 600h + 510-64 .. 600h + 510-16 1704 00005FA9 26894408 <1> mov word [es:si + 8], ax 1705 00005FAD 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 1706 <1> 1707 <1> ; dx:ax = absolute sector number 1708 00005FB1 BBC007 <1> mov bx, 7C0h ; bx:0 = 7C0h:0 -> boot sector area 1709 00005FB4 E8680F <1> call read_ae_512_bytes ; load partition boot sector to 0:7C00h 1710 <1> 1711 00005FB7 89EC <1> mov sp, bp 1712 00005FB9 5D <1> pop bp ; restore bp (scan_partitions) 1713 00005FBA 58 <1> pop ax ; discard ret address (scan_partitions) 1714 <1> 1715 00005FBB 26813EFE0155AA <1> cmp word [es:510], 0AA55h 1716 00005FC2 7403E94612 <1> jne boot_sigmismatch 1717 <1> 1718 00005FC7 31C9 <1> xor cx, cx 1719 00005FC9 26390E0000 <1> cmp word [es:0], cx 1720 00005FCE 7503E94612 <1> je boot_codemismatch 1721 <1> 1722 00005FD3 8EC1 <1> mov es, cx ; cx = 0, es = 0 1723 00005FD5 89F7 <1> mov di, si ; di -> partition table entry (seg 0) 1724 00005FD7 26800D80 <1> or byte [es:di + 0], 80h ; set bootable flag 1725 00005FDB A0[508C] <1> mov al, byte [load_unit] ; al = unit 1726 00005FDE BB007C <1> mov bx, 7C00h ; bx = 7C00h 1727 00005FE1 E9DFF9 <1> jmp load_partition_common 1728 <1> 1729 <1> 1730 <1> ; INP: es:si -> partition table entry, 1731 <1> ; si = load_partition_table .. load_partition_table+48, 1732 <1> ; es = ss 1733 <1> ; bp + di -> above part table metadata, 1734 <1> ; dwo [bp + di - 4] = root (outermost extended position) 1735 <1> ; dwo [bp + di - 8] = base (current table position) 1736 <1> ; CHG: ax, bx, (cx), dx 1737 <1> load_freedos_from_partition: 1738 <1> d4 call d4message 1739 <1> d4 asciz "In load_freedos_from_partition",13,10 1740 <1> 1741 00005FE4 A0[438F] <1> mov al, byte [load_current_partition] 1742 00005FE7 3A06[428F] <1> cmp al, byte [load_partition] 1743 00005FEB 7401 <1> je .gotit 1744 00005FED C3 <1> retn 1745 <1> 1746 <1> .gotit: 1747 <1> d4 call d4message 1748 <1> d4 asciz "In load_freedos_from_partition.gotit",13,10 1749 <1> 1750 00005FEE 8B43F8 <1> mov ax, [bp + di - 8] 1751 00005FF1 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 1752 <1> 1753 00005FF4 26034408 <1> add ax, [es:si + 8] 1754 00005FF8 2613540A <1> adc dx, [es:si + 8 + 2] ; add offset to logical partition 1755 <1> 1756 00005FFC 26894408 <1> mov word [es:si + 8], ax 1757 00006000 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 1758 00006004 26800C80 <1> or byte [es:si + 0], 80h ; set bootable flag 1759 <1> 1760 <1> 1761 00006008 F606[798C]40 <1> testopt [load_options], LOAD_SET_DSSI_PARTINFO 1762 0000600D 7427 <1> jz @F 1763 <1> 1764 0000600F 52 <1> push dx 1765 00006010 50 <1> push ax 1766 <1> 1767 00006011 8B43F8 <1> mov ax, [bp + di - 8] 1768 00006014 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 1769 <1> 1770 00006017 52 <1> push dx 1771 00006018 50 <1> push ax 1772 00006019 06 <1> push es 1773 0000601A BB6000 <1> mov bx, 60h 1774 0000601D E8FF0E <1> call read_ae_512_bytes ; load partition table to 0:600h 1775 00006020 07 <1> pop es 1776 00006021 58 <1> pop ax 1777 00006022 5A <1> pop dx 1778 <1> 1779 00006023 31C9 <1> xor cx, cx 1780 00006025 8EC1 <1> mov es, cx ; es = 0 1781 00006027 8DBCAE7B <1> lea di, [si - (load_partition_table + DATASECTIONFIXUP) + 600h + (510 - 64)] 1782 <1> ; si = 600h + 510-64 .. 600h + 510-16 1783 0000602B B108 <1> mov cl, 16 / 2 1784 0000602D 57 <1> push di 1785 0000602E F3A5 <1> rep movsw 1786 <1> 1787 00006030 8F06[408F] <1> pop word [load_partition_entry] 1788 <1> 1789 00006034 58 <1> pop ax 1790 00006035 5A <1> pop dx 1791 <1> @@: 1792 <1> 1793 <1> 1794 00006036 89EC <1> mov sp, bp 1795 00006038 5D <1> pop bp ; restore bp (scan_partitions) 1796 00006039 5B <1> pop bx ; discard ret address (scan_partitions) 1797 <1> 1798 <1> ; dx:ax = absolute sector number 1799 0000603A 8B1E[2A0A] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 1800 0000603E 50 <1> push ax 1801 0000603F 52 <1> push dx 1802 00006040 E8DC0E <1> call read_ae_512_bytes ; load partition boot sector 1803 <1> 1804 00006043 26813EFE0155AA <1> cmp word [es:510], 0AA55h 1805 0000604A 7403E9BE11 <1> jne boot_sigmismatch 1806 <1> 1807 0000604F 31C9 <1> xor cx, cx 1808 <1> ; cmp word [es:0], cx 1809 <1> ; je boot_codemismatch 1810 <1> 1811 00006051 5A <1> pop dx 1812 00006052 58 <1> pop ax 1813 <1> 1814 <1> ; dx:ax = boot sector 1815 <1> ; byte [load_unit] = unit 1816 <1> ; es:0-> read sector 1817 <1> load_freedos_common: 1818 00006053 26A31C00 <1> mov word [es:bsBPB + bpbHiddenSectors], ax 1819 00006057 2689161E00 <1> mov word [es:bsBPB + bpbHiddenSectors + 2], dx 1820 <1> 1821 0000605C 8B5E0B <1> mov bx, [bp + bsBPB + bpbBytesPerSector] 1822 0000605F 263B1E0B00 <1> cmp bx, [es:bsBPB + bpbBytesPerSector] 1823 00006064 7403E9B811 <1> jne boot_secsizemismatch 1824 <1> 1825 <1> ; preserve some variables from our pseudo BPB 1826 00006069 31C0 <1> xor ax, ax 1827 0000606B FF7618 <1> push word [bp + bsBPB + bpbCHSSectors] 1828 0000606E 268F061800 <1> pop word [es:bsBPB + bpbCHSSectors] 1829 00006073 FF761A <1> push word [bp + bsBPB + bpbCHSHeads] 1830 00006076 268F061A00 <1> pop word [es:bsBPB + bpbCHSHeads] ; preserve geometry 1831 <1> 1832 0000607B 8B5EEA <1> mov bx, word [bp + ldParaPerSector] 1833 0000607E D1EB <1> shr bx, 1 1834 00006080 895ED4 <1> mov word [bp + ldEntriesPerSector], bx 1835 <1> 1836 00006083 2639061600 <1> cmp word [es:bsBPB + bpbSectorsPerFAT], ax 1837 00006088 8A5E40 <1> mov bl, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 1838 0000608B 7407 <1> je .is_fat32 1839 0000608D 26881E2400 <1> mov byte [es:bsBPB + bpbNew + bpbnBootUnit], bl 1840 00006092 EB05 <1> jmp short .was_fat1612 1841 <1> .is_fat32: 1842 00006094 26881E4000 <1> mov byte [es:bsBPB + ebpbNew + bpbnBootUnit], bl 1843 <1> .was_fat1612: 1844 <1> 1845 00006099 06 <1> push es 1846 0000609A 1E <1> push ds 1847 0000609B 06 <1> push es 1848 0000609C 1F <1> pop ds 1849 0000609D 31F6 <1> xor si, si ; -> BPB from boot partition 1850 0000609F 16 <1> push ss 1851 000060A0 07 <1> pop es 1852 000060A1 BF[108C] <1> mov di, load_data - LOADDATA2 ; -> our copy of a BPB 1853 000060A4 B95A00 <1> mov cx, (bsBPB + ebpbNew + BPBN_size) 1854 000060A7 F3A4 <1> rep movsb ; get the BPB 1855 <1> 1856 000060A9 1F <1> pop ds 1857 000060AA 800E[CC00]80 <1> setopt [internalflags3], dif3_partition_changed 1858 <1> 1859 000060AF 394616 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], ax 1860 000060B2 740B <1> je @F ; is FAT32 --> 1861 000060B4 BE[348C] <1> mov si, load_data - LOADDATA2 + bsBPB + bpbNew 1862 000060B7 BF[508C] <1> mov di, load_data - LOADDATA2 + bsBPB + ebpbNew 1863 000060BA B91A00 <1> mov cx, BPBN_size 1864 000060BD F3A4 <1> rep movsb ; clone the FAT16 / FAT12 BPBN 1865 <1> ; to where the FAT32 BPBN lives 1866 <1> @@: 1867 000060BF 07 <1> pop es 1868 <1> 1869 000060C0 E8B365 <1> call bootgetmemorysize 1870 000060C3 8956E0 <1> mov word [bp + ldMemoryTop], dx 1871 000060C6 81EA0005 <1> sub dx, (20 * 1024) >> 4 1872 <1> ; leave 20 KiB free at the top, to 1873 <1> ; allow loading with the lDOS protocol (needs BPB and FAT seg 1874 <1> ; to live below its destination buffers for these) 1875 000060CA 7303 <1> jnc @F 1876 <1> .outofmem: 1877 000060CC E9FE0D <1> jmp query_geometry.out_of_memory_error 1878 <1> @@: 1879 <1> 1880 000060CF 81EA0002 <1> sub dx, 8192 >> 4 1881 000060D3 72F7 <1> jc .outofmem 1882 000060D5 8956F8 <1> mov word [bp + lsvFATSeg], dx 1883 000060D8 B8FFFF <1> mov ax, -1 1884 000060DB 8946F4 <1> mov word [bp + lsvFATSector], ax 1885 000060DE 8946F6 <1> mov word [bp + lsvFATSector + 2], ax 1886 <1> 1887 000060E1 FF36[7A8C] <1> push word [load_loadseg] 1888 000060E5 8F46FA <1> pop word [bp + lsvLoadSeg] 1889 <1> 1890 000060E8 31DB <1> xor bx, bx 1891 000060EA B90808 <1> mov cx, ((- LOADSTACKVARS + 15 + 4096) & ~15) >> 1 1892 000060ED F606[798C]20 <1> testopt [load_options], LOAD_NO_BPB 1893 000060F2 7506 <1> jnz @F 1894 000060F4 BB0002 <1> mov bx, 512 1895 000060F7 B90809 <1> mov cx, ((512 - LOADSTACKVARS + 15 + 4096) & ~15) >> 1 1896 <1> @@: 1897 <1> 1898 000060FA 833E[828C]FF <1> cmp word [load_bpb + 2], -1 1899 000060FF 7469 <1> je .auto_bpb 1900 <1> 1901 00006101 A1[808C] <1> mov ax, [load_bpb] 1902 00006104 D1E8 <1> shr ax, 1 1903 00006106 D1E8 <1> shr ax, 1 1904 00006108 D1E8 <1> shr ax, 1 1905 0000610A D1E8 <1> shr ax, 1 ; round down: start of BPB 1906 0000610C 0306[828C] <1> add ax, [load_bpb + 2] ; start of BPB 1907 00006110 2D0101 <1> sub ax, (4096 - LOADSTACKVARS + 15) >> 4 1908 <1> ; start of stack area 1909 00006113 50 <1> push ax 1910 00006114 7235 <1> jc .bpb_too_low 1911 <1> 1912 00006116 3B46FA <1> cmp ax, word [bp + lsvLoadSeg] 1913 00006119 773B <1> ja .loads_below_bpb 1914 <1> 1915 0000611B 83F860 <1> cmp ax, 60h 1916 0000611E 722B <1> jb .bpb_too_low 1917 <1> 1918 00006120 A1[808C] <1> mov ax, [load_bpb] 1919 00006123 01D8 <1> add ax, bx 1920 00006125 83C00F <1> add ax, 15 1921 00006128 D1E8 <1> shr ax, 1 1922 0000612A D1E8 <1> shr ax, 1 1923 0000612C D1E8 <1> shr ax, 1 1924 0000612E D1E8 <1> shr ax, 1 1925 00006130 0306[828C] <1> add ax, [load_bpb + 2] ; end of BPB / pseudo-boot-sector 1926 <1> 1927 00006134 3B46FA <1> cmp ax, word [bp + lsvLoadSeg] 1928 00006137 761F <1> jbe .loads_above_bpb 1929 <1> 1930 00006139 BA[D562] <1> mov dx, msg.boot_bpb_load_overlap 1931 0000613C B81702 <1> mov ax, 0217h 1932 0000613F E8C137 <1> call setrc 1933 <1> .fail: 1934 00006142 B81802 <1> mov ax, 0218h 1935 00006145 E8BB37 <1> call setrc 1936 00006148 E9CEF8 <1> jmp bootcmd.fail 1937 <1> 1938 <1> .bpb_too_low: 1939 0000614B BA[0563] <1> mov dx, msg.boot_bpb_too_low 1940 0000614E B81902 <1> mov ax, 0219h 1941 00006151 E8AF37 <1> call setrc 1942 00006154 EBEC <1> jmp .fail 1943 <1> 1944 <1> 1945 <1> 1946 <1> .loads_below_bpb: 1947 00006156 89C2 <1> mov dx, ax ; set load top to before BPB/lsv/stack 1948 <1> 1949 <1> .loads_above_bpb: ; dx = word [bp + ldLoadTop] = word [bp + lsvFATSeg] 1950 00006158 FF36[828C] <1> push word [load_bpb + 2] 1951 0000615C 8F06[368F] <1> pop word [load_bpb_dest + 2] 1952 00006160 FF36[808C] <1> push word [load_bpb] 1953 00006164 8F06[348F] <1> pop word [load_bpb_dest] 1954 00006168 EB37 <1> jmp .got_bpb_set_load_top 1955 <1> 1956 <1> 1957 <1> ; auto-BPB: allocate BPB at top and load below that 1958 <1> .auto_bpb: 1959 0000616A 81EA0101 <1> sub dx, (-LOADSTACKVARS + 15 + 4096) >> 4 1960 0000616E 7303E959FF <1> jc .outofmem 1961 00006173 85DB <1> test bx, bx 1962 00006175 7408 <1> jz @F 1963 00006177 83EA20 <1> sub dx, 512 >> 4 1964 0000617A 7303E94DFF <1> jc .outofmem 1965 <1> @@: 1966 <1> 1967 0000617F 52 <1> push dx 1968 00006180 89D0 <1> mov ax, dx 1969 <1> ; eg dx = 800h 1970 <1> ; want (((800h<<4) + 4096 - LOADSTACKVARS) - 7C00h) >> 4 1971 <1> ; which is 143h 1972 <1> ; which :7C00h = 903h:0 1973 <1> ; dx + ( 4096 - LOADSTACKVARS - 7C00h) / 16 1974 <1> ; dx - (-4096 + LOADSTACKVARS + 7C00h) / 16 1975 00006182 BBF0EF <1> mov bx, (-4096 +LOADSTACKVARS) 1976 00006185 031E[808C] <1> add bx, word [load_bpb] 1977 00006189 51 <1> push cx 1978 0000618A B104 <1> mov cl, 4 1979 0000618C D3EB <1> shr bx, cl 1980 0000618E 59 <1> pop cx 1981 0000618F 29D8 <1> sub ax, bx 1982 <1> ; sub ax, (-4096 +LOADSTACKVARS + 7C00h) / 16 1983 00006191 7303E936FF <1> jc .outofmem 1984 <1> ; mov word [load_bpb_dest], 7C00h 1985 00006196 FF36[808C] <1> push word [load_bpb] 1986 0000619A 8F06[348F] <1> pop word [load_bpb_dest] 1987 0000619E A3[368F] <1> mov word [load_bpb_dest + 2], ax 1988 <1> .got_bpb_set_load_top: 1989 000061A1 8956E2 <1> mov word [bp + ldLoadTop], dx 1990 <1> 1991 <1> .got_bpb: ; cx = how many words are used for stack/lsv/BPB 1992 000061A4 58 <1> pop ax ; -> stack area 1993 000061A5 06 <1> push es 1994 000061A6 8EC0 <1> mov es, ax 1995 000061A8 31FF <1> xor di, di 1996 000061AA 31C0 <1> xor ax, ax 1997 000061AC F3AB <1> rep stosw 1998 000061AE 07 <1> pop es 1999 <1> 2000 000061AF E8C916 <1> call initialise_fs 2001 <1> 2002 000061B2 C606[458F]00 <1> mov byte [load_check_dir_attr], 0 2003 000061B7 8B36[548F] <1> mov si, word [load_kernelname_input] 2004 000061BB 803C2F <1> cmp byte [si], '/' 2005 000061BE 7501 <1> jne @F 2006 000061C0 46 <1> inc si 2007 <1> @@: 2008 000061C1 803C00 <1> cmp byte [si], 0 2009 000061C4 7504 <1> jne @F 2010 000061C6 8B36[708C] <1> mov si, word [load_kernelname_default] 2011 <1> @@: 2012 000061CA 16 <1> push ss 2013 000061CB 07 <1> pop es 2014 000061CC E821FD <1> call boot_parse_fn ; get next pathname 2015 000061CF 3C2F <1> cmp al, '/' 2016 000061D1 7509 <1> jne @F 2017 000061D3 C606[458F]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 2018 000061D8 8936[568F] <1> mov word [load_kernelname_next], si 2019 <1> @@: 2020 <1> 2021 000061DC BFFFFF <1> mov di, -1 2022 000061DF 89FE <1> mov si, di 2023 000061E1 897EF4 <1> mov [bp + lsvFATSector], di 2024 000061E4 8976F6 <1> mov [bp + lsvFATSector + 2], si 2025 <1> 2026 000061E7 31C0 <1> xor ax, ax 2027 000061E9 31D2 <1> xor dx, dx 2028 <1> 2029 <1> scan_dir_kernelname_loop: 2030 000061EB 8946EC <1> mov word [bp + ldDirCluster], ax 2031 000061EE 8956EE <1> mov word [bp + ldDirCluster + 2], dx 2032 <1> 2033 000061F1 31DB <1> xor bx, bx 2034 000061F3 8EC3 <1> mov es, bx 2035 000061F5 BB0005 <1> mov bx, 500h 2036 000061F8 E8C607 <1> call scan_dir_aux_for_file 2037 <1> 2038 000061FB 803E[458F]10 <1> cmp byte [load_check_dir_attr], ATTR_DIRECTORY 2039 00006200 753C <1> jne got_kernelentry 2040 <1> 2041 00006202 56 <1> push si 2042 00006203 57 <1> push di 2043 00006204 C606[458F]00 <1> mov byte [load_check_dir_attr], 0 2044 00006209 8B36[568F] <1> mov si, word [load_kernelname_next] 2045 0000620D 803C00 <1> cmp byte [si], 0 2046 00006210 7504 <1> jne @F 2047 00006212 8B36[708C] <1> mov si, word [load_kernelname_default] 2048 <1> @@: 2049 00006216 06 <1> push es 2050 00006217 16 <1> push ss 2051 00006218 07 <1> pop es 2052 00006219 E8D4FC <1> call boot_parse_fn ; get next pathname 2053 0000621C 07 <1> pop es 2054 0000621D 3C2F <1> cmp al, '/' 2055 0000621F 7509 <1> jne @F 2056 00006221 C606[458F]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 2057 00006226 8936[568F] <1> mov word [load_kernelname_next], si 2058 <1> @@: 2059 0000622A 5F <1> pop di 2060 0000622B 5E <1> pop si 2061 <1> 2062 0000622C 31D2 <1> xor dx, dx 2063 0000622E 268B471A <1> mov ax, [es:bx + deClusterLow] 2064 <1> ; = first cluster (not FAT32) 2065 00006232 807EE620 <1> cmp byte [bp + ldFATType], 32 2066 00006236 7504 <1> jne @F 2067 00006238 268B5714 <1> mov dx, [es:bx + deClusterHigh] 2068 <1> ; dx:ax = first cluster (FAT32) 2069 <1> @@: 2070 <1> 2071 0000623C EBAD <1> jmp scan_dir_kernelname_loop 2072 <1> 2073 <1> 2074 <1> got_kernelentry: 2075 0000623E 56 <1> push si 2076 0000623F 57 <1> push di 2077 <1> 2078 00006240 C606[458F]00 <1> mov byte [load_check_dir_attr], 0 2079 00006245 8B36[588F] <1> mov si, word [load_addname_input] 2080 00006249 803C2F <1> cmp byte [si], '/' 2081 0000624C 7511 <1> jne @F 2082 0000624E 46 <1> inc si 2083 0000624F 803C2F <1> cmp byte [si], '/' 2084 00006252 7503E9A400 <1> je got_no_addentry.no_dxax_on_stack 2085 <1> 2086 00006257 31C0 <1> xor ax, ax 2087 00006259 8946EC <1> mov word [bp + ldDirCluster], ax 2088 0000625C 8946EE <1> mov word [bp + ldDirCluster + 2], ax 2089 <1> ; search from root directory 2090 <1> @@: 2091 0000625F 803C00 <1> cmp byte [si], 0 2092 00006262 750C <1> jne @F 2093 00006264 8B36[728C] <1> mov si, word [load_addname_default] 2094 00006268 803C00 <1> cmp byte [si], 0 2095 0000626B 7503E98B00 <1> je got_no_addentry.no_dxax_on_stack 2096 <1> @@: 2097 00006270 16 <1> push ss 2098 00006271 07 <1> pop es 2099 00006272 E87BFC <1> call boot_parse_fn ; get next pathname 2100 00006275 3C2F <1> cmp al, '/' 2101 00006277 7509 <1> jne @F 2102 00006279 C606[458F]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 2103 0000627E 8936[568F] <1> mov word [load_kernelname_next], si 2104 <1> @@: 2105 00006282 5F <1> pop di 2106 00006283 5E <1> pop si 2107 00006284 EB06 <1> jmp @F 2108 <1> 2109 <1> scan_dir_addname_loop: 2110 00006286 8946EC <1> mov word [bp + ldDirCluster], ax 2111 00006289 8956EE <1> mov word [bp + ldDirCluster + 2], dx 2112 <1> 2113 <1> @@: 2114 0000628C 31DB <1> xor bx, bx 2115 0000628E 8EC3 <1> mov es, bx 2116 00006290 BB2005 <1> mov bx, 520h ; 0:bx -> space for second directory entry 2117 00006293 E82B07 <1> call scan_dir_aux_for_file 2118 <1> 2119 00006296 803E[458F]10 <1> cmp byte [load_check_dir_attr], ATTR_DIRECTORY 2120 0000629B 756C <1> jne got_addentry 2121 <1> 2122 0000629D 56 <1> push si 2123 0000629E 57 <1> push di 2124 0000629F 52 <1> push dx 2125 000062A0 50 <1> push ax 2126 000062A1 C606[458F]00 <1> mov byte [load_check_dir_attr], 0 2127 000062A6 8B36[5A8F] <1> mov si, word [load_addname_next] 2128 000062AA 803C00 <1> cmp byte [si], 0 2129 000062AD 7509 <1> jne @F 2130 000062AF 8B36[728C] <1> mov si, word [load_addname_default] 2131 000062B3 803C00 <1> cmp byte [si], 0 2132 000062B6 7441 <1> je got_no_addentry 2133 <1> @@: 2134 000062B8 06 <1> push es 2135 000062B9 16 <1> push ss 2136 000062BA 07 <1> pop es 2137 000062BB E832FC <1> call boot_parse_fn ; get next pathname 2138 000062BE 07 <1> pop es 2139 000062BF 3C2F <1> cmp al, '/' 2140 000062C1 7509 <1> jne @F 2141 000062C3 C606[458F]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 2142 000062C8 8936[5A8F] <1> mov word [load_addname_next], si 2143 <1> @@: 2144 000062CC 58 <1> pop ax 2145 000062CD 5A <1> pop dx 2146 000062CE 5F <1> pop di 2147 000062CF 5E <1> pop si 2148 <1> 2149 000062D0 31D2 <1> xor dx, dx 2150 000062D2 268B471A <1> mov ax, [es:bx + deClusterLow] 2151 <1> ; = first cluster (not FAT32) 2152 000062D6 807EE620 <1> cmp byte [bp + ldFATType], 32 2153 000062DA 7504 <1> jne @F 2154 000062DC 268B5714 <1> mov dx, [es:bx + deClusterHigh] 2155 <1> ; dx:ax = first cluster (FAT32) 2156 <1> @@: 2157 <1> 2158 000062E0 EBA4 <1> jmp scan_dir_addname_loop 2159 <1> 2160 <1> 2161 <1> helper_shift_down_and_clamp: 2162 000062E2 B90400 <1> mov cx, 4 2163 <1> @@: 2164 000062E5 D0EA <1> shr dl, 1 2165 000062E7 D1D8 <1> rcr ax, 1 2166 000062E9 D1DB <1> rcr bx, 1 2167 000062EB E2F8 <1> loop @B 2168 <1> 2169 000062ED 08D0 <1> or al, dl 2170 000062EF 89DA <1> mov dx, bx ; size in paragraphs 2171 000062F1 85C0 <1> test ax, ax ; > 0FFFFh ? 2172 000062F3 7403 <1> jz @F ; no, take actual size --> 2173 000062F5 BAFFFF <1> mov dx, 0FFFFh ; clamp to 0FFFFh 2174 <1> @@: 2175 000062F8 C3 <1> retn 2176 <1> 2177 <1> got_no_addentry: 2178 000062F9 58 <1> pop ax 2179 000062FA 5A <1> pop dx 2180 <1> .no_dxax_on_stack: 2181 <1> ; push ax 2182 000062FB B91000 <1> mov cx, 16 2183 000062FE 31C0 <1> xor ax, ax 2184 00006300 8EC0 <1> mov es, ax 2185 00006302 BF2005 <1> mov di, 520h ; es:di -> space for second directory entry 2186 00006305 F3AB <1> rep stosw ; store zeros 2187 <1> ; pop ax 2188 <1> 2189 00006307 5F <1> pop di 2190 00006308 5E <1> pop si 2191 <1> 2192 <1> got_addentry: 2193 00006309 31C0 <1> xor ax, ax 2194 0000630B 8EC0 <1> mov es, ax 2195 <1> 2196 <1> 2197 <1> ; (boot32.asm code starts here) 2198 <1> 2199 0000630D 8B46E2 <1> mov ax, word [bp + ldLoadTop] 2200 00006310 2B46EA <1> sub ax, word [bp + ldParaPerSector] 2201 00006313 7303E9B4FD <1> jc load_freedos_common.outofmem 2202 00006318 8946D6 <1> mov [bp + ldLastAvailableSector], ax 2203 <1> 2204 0000631B 268B1E1C05 <1> mov bx, [es:500h + deSize] 2205 00006320 26A11E05 <1> mov ax, [es:500h + deSize + 2] ; ax:bx = file size 2206 00006324 268A160C05 <1> mov dl, [es:500h + 12] ; dl = FAT+ size bits 2207 00006329 88D6 <1> mov dh, dl 2208 0000632B 81E207E0 <1> and dx, 0E007h ; obtain bits 7-5 and 2-0 2209 0000632F D0EE <1> shr dh, 1 2210 00006331 D0EE <1> shr dh, 1 2211 00006333 08F2 <1> or dl, dh ; dl:ax:bx = file size 2212 00006335 52 <1> push dx 2213 00006336 50 <1> push ax 2214 00006337 53 <1> push bx 2215 <1> 2216 00006338 E8A7FF <1> call helper_shift_down_and_clamp 2217 <1> ; round down to next paragraph boundary 2218 0000633B 3916[748C] <1> cmp word [load_minpara], dx 2219 0000633F 7603E9A400 <1> ja error_filetoosmall 2220 <1> 2221 00006344 5B <1> pop bx 2222 00006345 58 <1> pop ax 2223 00006346 5A <1> pop dx 2224 00006347 8B4E0B <1> mov cx, [bp + bsBPB + bpbBytesPerSector] 2225 0000634A 49 <1> dec cx ; BpS - 1 2226 0000634B 01CB <1> add bx, cx 2227 0000634D 83D000 <1> adc ax, 0 2228 00006350 80D200 <1> adc dl, 0 ; round up to next sector 2229 00006353 F7D1 <1> not cx ; ~ (BpS - 1) 2230 00006355 21CB <1> and bx, cx ; mask to limit to rounded-up sector 2231 00006357 E888FF <1> call helper_shift_down_and_clamp 2232 <1> 2233 <1> ; dl:ax:bx = size in paragraphs 2234 0000635A A1[768C] <1> mov ax, word [load_maxpara] 2235 0000635D 39C2 <1> cmp dx, ax ; actual size below maximum ? 2236 0000635F 7602 <1> jbe @F ; yes, use actual size --> 2237 00006361 89C2 <1> mov dx, ax ; use maximum size 2238 <1> @@: 2239 00006363 8956D8 <1> mov word [bp + ldParasLeft], dx 2240 00006366 C746DA0000 <1> mov word [bp + ldParasDone], 0 2241 <1> 2242 <1> ; get starting cluster of file 2243 0000636B 31D2 <1> xor dx, dx 2244 0000636D 26A11A05 <1> mov ax, [es:500h + deClusterLow] 2245 <1> ; = first cluster (not FAT32) 2246 <1> 2247 00006371 807EE620 <1> cmp byte [bp + ldFATType], 32 2248 00006375 7505 <1> jne @F 2249 00006377 268B161405 <1> mov dx, [es:500h + deClusterHigh] 2250 <1> ; dx:ax = first cluster (FAT32) 2251 <1> @@: 2252 <1> 2253 0000637C 8946F0 <1> mov word [bp + lsvFirstCluster], ax 2254 0000637F 8956F2 <1> mov word [bp + lsvFirstCluster + 2], dx 2255 <1> 2256 00006382 E80A08 <1> call check_clust 2257 00006385 7303E92E15 <1> jc error_badchain 2258 <1> 2259 <1> next_load_cluster: 2260 0000638A E82107 <1> call clust_to_first_sector 2261 <1> ; dx:ax = first sector of cluster 2262 <1> ; cx:bx = cluster value 2263 0000638D 51 <1> push cx 2264 0000638E 53 <1> push bx ; preserve cluster number for later 2265 <1> 2266 0000638F 8B4EE8 <1> mov cx, [bp + ldClusterSize] 2267 <1> 2268 00006392 8B5EFA <1> mov bx, [bp + lsvLoadSeg] 2269 <1> ; xxx - this will always load an entire cluster (e.g. 64 sectors), 2270 <1> ; even if the file is shorter than this 2271 <1> @@: 2272 00006395 3B5ED6 <1> cmp bx, [bp + ldLastAvailableSector] 2273 00006398 7613 <1> jbe @F 2274 0000639A 833E[768C]00 <1> cmp word [load_maxpara], 0 2275 0000639F 743D <1> je @FF ; if to allow partial load --> 2276 000063A1 BA[2362] <1> mov dx, msg.boot_file_too_big_error 2277 000063A4 B81A02 <1> mov ax, 021Ah 2278 000063A7 E85935 <1> call setrc 2279 000063AA E96CF6 <1> jmp bootcmd.fail 2280 <1> 2281 <1> @@: 2282 000063AD 06 <1> push es ; (must preserve ADR_FATBUF reference) 2283 000063AE E8800B <1> call read_sector 2284 000063B1 07 <1> pop es 2285 000063B2 895EFA <1> mov [bp + lsvLoadSeg], bx ; => after last read data 2286 <1> 2287 000063B5 50 <1> push ax 2288 000063B6 8B46EA <1> mov ax, [bp + ldParaPerSector] 2289 000063B9 0146DA <1> add word [bp + ldParasDone], ax 2290 000063BC 833E[768C]00 <1> cmp word [load_maxpara], 0 2291 000063C1 7407 <1> je .donotuseleft 2292 000063C3 2946D8 <1> sub word [bp + ldParasLeft], ax 2293 000063C6 58 <1> pop ax 2294 000063C7 7615 <1> jbe @F ; read enough --> 2295 000063C9 A8 <1> db __TEST_IMM8 ; (skip pop) 2296 <1> .donotuseleft: 2297 000063CA 58 <1> pop ax 2298 <1> 2299 000063CB E2C8 <1> loop @BB 2300 000063CD 5B <1> pop bx 2301 000063CE 59 <1> pop cx 2302 <1> 2303 000063CF E80507 <1> call clust_next 2304 000063D2 73B6 <1> jnc next_load_cluster 2305 000063D4 40 <1> inc ax 2306 000063D5 40 <1> inc ax 2307 000063D6 A808 <1> test al, 8 ; set in 0FFF_FFF8h--0FFF_FFFFh, 2308 <1> ; clear in 0, 1, and 0FFF_FFF7h 2309 000063D8 7503E9DB14 <1> jz error_badchain 2310 000063DD A9 <1> db __TEST_IMM16 2311 <1> @@: 2312 000063DE 5B <1> pop bx 2313 000063DF 59 <1> pop cx 2314 <1> 2315 000063E0 A1[748C] <1> mov ax, word [load_minpara] 2316 000063E3 3B46DA <1> cmp ax, word [bp + ldParasDone] 2317 000063E6 760C <1> jbe @F 2318 <1> error_filetoosmall: 2319 000063E8 BA[3362] <1> mov dx, msg.boot_file_too_small_error 2320 000063EB B81B02 <1> mov ax, 021Bh 2321 000063EE E81235 <1> call setrc 2322 000063F1 E925F6 <1> jmp bootcmd.fail 2323 <1> @@: 2324 <1> 2325 <1> 2326 000063F4 8E06[7A8C] <1> mov es, word [load_loadseg] 2327 000063F8 8B3E[848C] <1> mov di, word [load_check_offset] 2328 000063FC A1[868C] <1> mov ax, word [load_check_value] 2329 000063FF 85C0 <1> test ax, ax 2330 00006401 7406 <1> jz @F 2331 00006403 AF <1> scasw 2332 00006404 7403E9F301 <1> jne .error_check_mismatch 2333 <1> @@: 2334 <1> 2335 <1> ; turn off floppy motor 2336 00006409 BAF203 <1> mov dx,3F2h 2337 0000640C B000 <1> mov al,0 2338 0000640E EE <1> out dx,al 2339 <1> 2340 <1> ; Set-up registers for and jump to loaded file 2341 <1> 2342 0000640F 8A5640 <1> mov dl, [bp + bsBPB + ebpbNew + bpbnBootUnit] 2343 <1> ; testopt [load_options], LOAD_SET_DL_UNIT 2344 <1> ; jz @F 2345 <1> ; (always set dl) 2346 00006412 8816[680C] <1> mov byte [reg_edx], dl 2347 <1> @@: 2348 <1> 2349 <1> ; testopt [load_options], LOAD_SET_BL_UNIT 2350 <1> ; jz @F 2351 <1> ; (always set bl -- overwritten later if LOAD_SET_AXBX_DATASTART) 2352 00006416 8816[600C] <1> mov byte [reg_ebx], dl 2353 <1> @@: 2354 <1> 2355 0000641A 8A6E15 <1> mov ch, byte [bp + bsBPB + bpbMediaID] 2356 0000641D 882E[650C] <1> mov byte [reg_ecx + 1], ch 2357 <1> 2358 00006421 F606[788C]40 <1> testopt [load_options], LOAD_DATASTART_HIDDEN 2359 00006426 740C <1> jz @F 2360 00006428 8B5E1C <1> mov bx, [bp + bsBPB + bpbHiddenSectors] 2361 0000642B 8B461E <1> mov ax, [bp + bsBPB + bpbHiddenSectors + 2] 2362 0000642E 015EFC <1> add word [bp + lsvDataStart], bx 2363 00006431 1146FE <1> adc word [bp + lsvDataStart + 2], ax 2364 <1> @@: 2365 <1> 2366 00006434 F606[788C]80 <1> testopt [load_options], LOAD_SET_AXBX_DATASTART 2367 00006439 740D <1> jz @F 2368 0000643B 8B5EFC <1> mov bx, word [bp + lsvDataStart] 2369 0000643E 8B46FE <1> mov ax, word [bp + lsvDataStart + 2] 2370 00006441 891E[600C] <1> mov word [reg_ebx], bx 2371 00006445 A3[5C0C] <1> mov word [reg_eax], ax 2372 <1> @@: 2373 <1> 2374 00006448 F606[798C]08 <1> testopt [load_options], LOAD_SET_AXBX_ROOT_HIDDEN 2375 0000644D 7413 <1> jz @F 2376 0000644F 8B5ED0 <1> mov bx, word [bp + ldRootSector] 2377 00006452 8B46D2 <1> mov ax, word [bp + ldRootSector + 2] 2378 00006455 035E1C <1> add bx, word [bp + bsBPB + bpbHiddenSectors] 2379 00006458 13461E <1> adc ax, word [bp + bsBPB + bpbHiddenSectors + 2] 2380 0000645B 891E[600C] <1> mov word [reg_ebx], bx 2381 0000645F A3[5C0C] <1> mov word [reg_eax], ax 2382 <1> @@: 2383 <1> 2384 00006462 F606[788C]04 <1> testopt [load_options], LOAD_SET_SIDI_CLUSTER 2385 00006467 740D <1> jz @F 2386 00006469 8B56F2 <1> mov dx, word [bp + lsvFirstCluster + 2] 2387 0000646C 8B46F0 <1> mov ax, word [bp + lsvFirstCluster] 2388 0000646F 8916[740C] <1> mov word [reg_esi], dx 2389 00006473 A3[780C] <1> mov word [reg_edi], ax 2390 <1> @@: 2391 <1> 2392 <1> ; (boot.asm code ends here) 2393 <1> 2394 <1> 2395 00006476 C43E[348F] <1> les di, [load_bpb_dest] 2396 0000647A 57 <1> push di 2397 0000647B 83EF10 <1> sub di, -LOADSTACKVARS 2398 0000647E BE[008C] <1> mov si, load_data - LOADDATA2 + LOADSTACKVARS 2399 00006481 B91000 <1> mov cx, -LOADSTACKVARS 2400 00006484 F606[798C]20 <1> testopt [load_options], LOAD_NO_BPB 2401 00006489 7568 <1> jnz .no_bpb_movsb 2402 0000648B B93400 <1> mov cx, -LOADSTACKVARS + bsBPB + bpbNew 2403 0000648E F3A4 <1> rep movsb ; move common BPB part 2404 <1> 2405 00006490 394E16 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], cx 2406 00006493 B93600 <1> mov cx, ebpbNew - bpbNew + BPBN_size ; move FAT32 EBPB part + BPBN 2407 00006496 7406 <1> je @F 2408 00006498 83C61C <1> add si, ebpbNew - bpbNew; -> BPBN 2409 0000649B B91A00 <1> mov cx, BPBN_size ; move only BPBN 2410 <1> @@: 2411 0000649E F3A4 <1> rep movsb 2412 <1> 2413 000064A0 89F8 <1> mov ax, di 2414 000064A2 5F <1> pop di 2415 000064A3 29F8 <1> sub ax, di 2416 000064A5 48 <1> dec ax 2417 000064A6 48 <1> dec ax 2418 000064A7 86C4 <1> xchg al, ah 2419 000064A9 B0EB <1> mov al, 0EBh 2420 000064AB 268905 <1> mov word [es:di], ax 2421 000064AE 26C6450290 <1> mov byte [es:di + 2], 90h 2422 <1> 2423 000064B3 F606[798C]02 <1> testopt [load_options], LOAD_LBA_SET_TYPE 2424 000064B8 7416 <1> jz @F 2425 000064BA F646E701 <1> test byte [bp + ldFlags], ldfHasLBA 2426 000064BE 7410 <1> jz @F 2427 <1> 2428 000064C0 26C645020E <1> mov byte [es:di + 2], 0Eh ; (LBA-enabled) FAT16 FS partition type 2429 000064C5 807EE620 <1> cmp byte [bp + ldFATType], 32 2430 000064C9 7205 <1> jb @F 2431 000064CB 26C645020C <1> mov byte [es:di + 2], 0Ch ; (LBA-enabled) FAT32 FS partition type 2432 <1> @@: 2433 <1> 2434 000064D0 26C785FE0155AA <1> mov word [es:di + 510], 0AA55h 2435 000064D7 1E <1> push ds 2436 000064D8 31C9 <1> xor cx, cx 2437 000064DA 8ED9 <1> mov ds, cx 2438 000064DC BE0005 <1> mov si, 500h 2439 000064DF 57 <1> push di 2440 000064E0 81C7D601 <1> add di, 512 - 2 - 2 - 14 - 12 - 12 2441 <1> ; 2: AA55 sig, 2: null word, 14: MS-DOS 7 protocol 2442 <1> ; message table pointer lives here, 2443 <1> ; 12: add name, 12: kernel name 2444 000064E4 B10B <1> mov cl, 11 2445 000064E6 F3A4 <1> rep movsb ; put kernel filename into the pseudo boot sector 2446 000064E8 47 <1> inc di 2447 000064E9 BE2005 <1> mov si, 520h 2448 000064EC B10B <1> mov cl, 11 2449 000064EE F3A4 <1> rep movsb ; put additional filename (if any), cx = 0 2450 000064F0 5F <1> pop di 2451 000064F1 1F <1> pop ds 2452 <1> 2453 <1> ; cx = 0 2454 000064F2 A8 <1> db __TEST_IMM8 ; (skip pop) 2455 <1> .no_bpb_movsb: 2456 000064F3 58 <1> pop ax ; discard word on stack 2457 000064F4 F3A4 <1> rep movsb 2458 <1> 2459 000064F6 8126[980C]FFF8 <1> and word [reg_efl], ~(400h|200h|100h) ; UP, DI, TF=0 2460 <1> 2461 000064FC 890E[960C] <1> mov word [reg_eip + 2], cx 2462 00006500 FF36[7C8C] <1> push word [load_entrypoint] 2463 00006504 8F06[940C] <1> pop word [reg_eip] 2464 00006508 A1[7E8C] <1> mov ax, word [load_entrypoint + 2] 2465 0000650B 0306[7A8C] <1> add ax, word [load_loadseg] 2466 0000650F A3[880C] <1> mov word [reg_cs], ax 2467 <1> 2468 00006512 A1[368F] <1> mov ax, word [load_bpb_dest + 2] 2469 00006515 A3[840C] <1> mov word [reg_ss], ax 2470 <1> ; testopt [load_options], LOAD_SET_DSBP_BPB 2471 <1> ; jz @F 2472 <1> ; (always set ds -- overwritten later if LOAD_SET_DSSI_DPT) 2473 00006518 A3[7C0C] <1> mov word [reg_ds], ax 2474 <1> @@: 2475 0000651B 8B1E[348F] <1> mov bx, word [load_bpb_dest] 2476 0000651F 890E[720C] <1> mov word [reg_ebp + 2], cx 2477 00006523 891E[700C] <1> mov word [reg_ebp], bx 2478 00006527 89D8 <1> mov ax, bx 2479 00006529 83EB10 <1> sub bx, -LOADSTACKVARS ; (subtracts --10h) 2480 0000652C 890E[6E0C] <1> mov word [reg_esp + 2], cx 2481 00006530 891E[6C0C] <1> mov word [reg_esp], bx 2482 <1> 2483 00006534 F606[798C]20 <1> testopt [load_options], LOAD_NO_BPB 2484 00006539 751B <1> jnz @F 2485 <1> 2486 0000653B F606[798C]04 <1> testopt [load_options], LOAD_MESSAGE_TABLE 2487 00006540 7414 <1> jz @F 2488 00006542 B96000 <1> mov cx, (bsBPB + ebpbNew + BPBN_size + 2 + 15) & ~15 2489 00006545 01C8 <1> add ax, cx 2490 00006547 268985EE01 <1> mov word [es:di + 1EEh], ax 2491 <1> ; this pointer points to the MS-DOS 7 message table. 2492 <1> ; 2493 <1> ; note that in actual MS-DOS 7 boot sectors, this value is 2494 <1> ; eg 17Fh, which is incorrectly used with the boot sector's 2495 <1> ; ss to load the table into the initial loader. 2496 <1> ; 2497 <1> ; refer to comments in msg.asm about msdos7_message_table. 2498 0000654C BE[9579] <1> mov si, msdos7_message_table 2499 0000654F 01CF <1> add di, cx 2500 00006551 B94300 <1> mov cx, msdos7_message_table.size 2501 00006554 F3A4 <1> rep movsb 2502 <1> @@: 2503 <1> 2504 00006556 F606[798C]10 <1> testopt [load_options], LOAD_CMDLINE 2505 0000655B 7440 <1> jz .no_cmdline 2506 <1> 2507 0000655D 8B36[3E8F] <1> mov si, word [load_cmdline] 2508 00006561 85F6 <1> test si, si 2509 00006563 7503 <1> jnz @F 2510 00006565 BE[3E8F] <1> mov si, load_cmdline 2511 <1> @@: 2512 <1> 2513 <1> ; due to the size of our line_in buffer, 2514 <1> ; the command line is never too long for 2515 <1> ; the lsv command line buffer (256 bytes). 2516 00006568 B98000 <1> mov cx, lsvclBufferLength / 2 2517 0000656B 812E[6C0C]0401 <1> sub word [reg_esp], - lsvCommandLine.start + LOADSTACKVARS 2518 <1> ; hazard: if sp is too low, this underflows! 2519 00006571 7303E9AD00 <1> jc .error_stack_underflow 2520 00006576 8E06[840C] <1> mov es, [reg_ss] 2521 0000657A 8B3E[6C0C] <1> mov di, [reg_esp] ; es:di -> stack area for the pointers 2522 0000657E 81FF0001 <1> cmp di, 256 2523 00006582 7303E99C00 <1> jb .error_stack_underflow 2524 00006587 57 <1> push di 2525 00006588 F3A5 <1> rep movsw 2526 0000658A 26884DFF <1> mov byte [es:di - 1], cl; truncate command line if too long 2527 0000658E B8434C <1> mov ax, lsvclSignature 2528 00006591 AB <1> stosw ; write lsvCommandLine.signature 2529 00006592 31C0 <1> xor ax, ax 2530 00006594 AB <1> stosw ; write lsvExtra 2531 00006595 5F <1> pop di 2532 00006596 B90001 <1> mov cx, lsvclBufferLength 2533 00006599 F2AE <1> repne scasb ; search terminator 2534 0000659B F3AA <1> rep stosb ; zero buffer behind terminator 2535 <1> .no_cmdline: 2536 <1> 2537 0000659D 31C0 <1> xor ax, ax 2538 0000659F 8EC0 <1> mov es, ax 2539 000065A1 BF7800 <1> mov di, 1Eh * 4 2540 000065A4 268B5502 <1> mov dx, word [es:di + 2] 2541 000065A8 268B1D <1> mov bx, word [es:di] 2542 <1> 2543 000065AB F606[788C]10 <1> testopt [load_options], LOAD_SET_DSSI_DPT 2544 000065B0 7408 <1> jz @F 2545 000065B2 8916[7C0C] <1> mov word [reg_ds], dx 2546 000065B6 891E[740C] <1> mov word [reg_esi], bx 2547 <1> @@: 2548 000065BA F606[788C]20 <1> testopt [load_options], LOAD_PUSH_DPT 2549 000065BF 7419 <1> jz @F 2550 <1> 2551 000065C1 06 <1> push es 2552 000065C2 57 <1> push di 2553 000065C3 832E[6C0C]08 <1> sub word [reg_esp], 4 * 2 ; push four words 2554 000065C8 8E06[840C] <1> mov es, [reg_ss] 2555 000065CC 8B3E[6C0C] <1> mov di, [reg_esp] ; es:di -> stack area for the pointers 2556 000065D0 58 <1> pop ax ; di (1Eh * 4) 2557 000065D1 AB <1> stosw 2558 000065D2 58 <1> pop ax ; es (0) 2559 000065D3 AB <1> stosw 2560 000065D4 89D8 <1> mov ax, bx 2561 000065D6 AB <1> stosw ; si (Int1E offset) 2562 000065D7 89D0 <1> mov ax, dx 2563 000065D9 AB <1> stosw ; ds (Int1E segment) 2564 <1> @@: 2565 <1> 2566 000065DA F606[798C]40 <1> testopt [load_options], LOAD_SET_DSSI_PARTINFO 2567 000065DF 7415 <1> jz @F 2568 000065E1 A1[408F] <1> mov ax, word [load_partition_entry] 2569 000065E4 8326[7C0C]00 <1> and word [reg_ds], 0 2570 000065E9 A3[740C] <1> mov word [reg_esi], ax 2571 000065EC F606[798C]20 <1> testopt [load_options], LOAD_NO_BPB 2572 000065F1 7403 <1> jz @F 2573 000065F3 A3[700C] <1> mov word [reg_ebp], ax 2574 <1> @@: 2575 000065F6 800E[CB00]01 <1> setopt [internalflags2], dif2_boot_loaded_kernel 2576 000065FB C3 <1> retn 2577 <1> 2578 <1> 2579 <1> .error_check_mismatch: 2580 000065FC 4F <1> dec di 2581 000065FD 4F <1> dec di ; = offset into file 2582 000065FE 26FF35 <1> push word [es:di] ; = value we got in file 2583 00006601 57 <1> push di ; = offset 2584 00006602 16 <1> push ss 2585 00006603 07 <1> pop es ; set STT 2586 00006604 BF[C960] <1> mov di, msg.bootfail_check_mismatch.check_value 2587 00006607 E84348 <1> call hexword ; write expected value 2588 0000660A 58 <1> pop ax 2589 0000660B BF[D960] <1> mov di, msg.bootfail_check_mismatch.check_offset 2590 0000660E E83C48 <1> call hexword ; write offset 2591 00006611 58 <1> pop ax 2592 00006612 BF[E760] <1> mov di, msg.bootfail_check_mismatch.check_got 2593 00006615 E83548 <1> call hexword ; write what we got in file 2594 <1> 2595 00006618 BA[B060] <1> mov dx, msg.bootfail_check_mismatch 2596 0000661B B81C02 <1> mov ax, 021Ch 2597 0000661E E8E232 <1> call setrc 2598 00006621 EB09 <1> jmp @F ; fail with error message 2599 <1> 2600 <1> .error_stack_underflow: 2601 00006623 BA[9660] <1> mov dx, msg.bootfail_stack_underflow 2602 00006626 B81D02 <1> mov ax, 021Dh 2603 00006629 E8D732 <1> call setrc 2604 <1> @@: 2605 0000662C E9EAF3 <1> jmp bootcmd.fail 2606 <1> 2607 <1> 2608 <1> boot_dir: 2609 0000662F 8026[CC00]F7 <1> clropt [internalflags3], dif3_load_dir_dir 2610 00006634 E86B47 <1> call skipwhite 2611 00006637 4E <1> dec si 2612 00006638 BA[5D63] <1> mov dx, msg.dir 2613 0000663B E8B046 <1> call isstring? 2614 0000663E 7505 <1> jne @F 2615 00006640 800E[CC00]08 <1> setopt [internalflags3], dif3_load_dir_dir 2616 <1> @@: 2617 00006645 C706[548F][6A63] <1> mov word [load_kernelname_input], msg.emptydirname 2618 0000664B AC <1> lodsb 2619 0000664C E8C9F5 <1> call parseloadunit_default_sdp 2620 0000664F 7409 <1> jz .fn_done_eol ; no filename given, use defaults --> 2621 <1> ; al was = '/' or '\' or first pathname's first character 2622 <1> ; si-> next char 2623 00006651 BB[548F] <1> mov bx, load_kernelname_input 2624 00006654 E8ADF1 <1> call bootcmd.pathname_parse_super 2625 00006657 E80847 <1> call chkeol 2626 <1> 2627 <1> .fn_done_eol: 2628 0000665A F606[CC00]07 <1> testopt [internalflags3], dif3_load_is_dp 2629 0000665F 7527 <1> jnz .boot_dir_from_ldp 2630 <1> 2631 00006661 8A1E[428F] <1> mov bl, [load_partition] 2632 00006665 803E[508C]80 <1> cmp byte [load_unit], 80h 2633 0000666A 7228 <1> jb .boot_dir_is_diskette 2634 0000666C 84DB <1> test bl, bl ; partition specified ? 2635 0000666E 7503E98CEF <1> jz bootcmd.error ; no, error --> 2636 <1> 2637 00006673 E8F306 <1> call query_geometry 2638 <1> 2639 00006676 B9[BB66] <1> mov cx, boot_dir_from_partition 2640 00006679 E84505 <1> call scan_partitions 2641 0000667C BA[4661] <1> mov dx, msg.boot_partition_not_found 2642 0000667F B81102 <1> mov ax, 0211h 2643 00006682 E87E32 <1> call setrc 2644 00006685 E991F3 <1> jmp bootcmd.fail 2645 <1> 2646 <1> 2647 <1> .boot_dir_from_ldp: 2648 00006688 E8DE06 <1> call query_geometry 2649 0000668B A1[388F] <1> mov ax, word [load_partition_sector] 2650 0000668E 8B16[3A8F] <1> mov dx, word [load_partition_sector + 2] 2651 00006692 EB0E <1> jmp @F 2652 <1> 2653 <1> 2654 <1> .boot_dir_is_diskette: 2655 00006694 84DB <1> test bl, bl ; partition specified ? 2656 00006696 7403E964EF <1> jnz bootcmd.error ; yes, error --> 2657 <1> 2658 0000669B E8CB06 <1> call query_geometry 2659 <1> 2660 0000669E 31C0 <1> xor ax, ax 2661 000066A0 31D2 <1> xor dx, dx 2662 <1> @@: 2663 000066A2 8B1E[2A0A] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 2664 000066A6 52 <1> push dx 2665 000066A7 50 <1> push ax 2666 000066A8 E87408 <1> call read_ae_512_bytes 2667 <1> 2668 000066AB 26813EFE0155AA <1> cmp word [es:510], 0AA55h 2669 000066B2 7403E9560B <1> jne boot_sigmismatch 2670 000066B7 58 <1> pop ax 2671 000066B8 5A <1> pop dx 2672 <1> 2673 000066B9 EB41 <1> jmp boot_dir_common 2674 <1> 2675 <1> 2676 <1> ; INP: es:si -> partition table entry, 2677 <1> ; si = load_partition_table .. load_partition_table+48, 2678 <1> ; es = ss 2679 <1> ; bp + di -> above part table metadata, 2680 <1> ; dwo [bp + di - 4] = root (outermost extended position) 2681 <1> ; dwo [bp + di - 8] = base (current table position) 2682 <1> ; CHG: ax, bx, (cx), dx 2683 <1> boot_dir_from_partition: 2684 <1> d4 call d4message 2685 <1> d4 asciz "In boot_dir_from_partition",13,10 2686 <1> 2687 000066BB A0[438F] <1> mov al, byte [load_current_partition] 2688 000066BE 3A06[428F] <1> cmp al, byte [load_partition] 2689 000066C2 7401 <1> je .gotit 2690 000066C4 C3 <1> retn 2691 <1> 2692 <1> .gotit: 2693 <1> d4 call d4message 2694 <1> d4 asciz "In boot_dir_from_partition.gotit",13,10 2695 <1> 2696 000066C5 8B43F8 <1> mov ax, [bp + di - 8] 2697 000066C8 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 2698 <1> 2699 000066CB 26034408 <1> add ax, [es:si + 8] 2700 000066CF 2613540A <1> adc dx, [es:si + 8 + 2] ; add offset to logical partition 2701 <1> 2702 000066D3 26894408 <1> mov word [es:si + 8], ax 2703 000066D7 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 2704 000066DB 26800C80 <1> or byte [es:si + 0], 80h ; set bootable flag 2705 <1> 2706 000066DF 89EC <1> mov sp, bp 2707 000066E1 5D <1> pop bp ; restore bp (scan_partitions) 2708 000066E2 5B <1> pop bx ; discard ret address (scan_partitions) 2709 <1> 2710 <1> ; dx:ax = absolute sector number 2711 000066E3 8B1E[2A0A] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 2712 000066E7 50 <1> push ax 2713 000066E8 52 <1> push dx 2714 000066E9 E83308 <1> call read_ae_512_bytes ; load partition boot sector 2715 <1> 2716 000066EC 26813EFE0155AA <1> cmp word [es:510], 0AA55h 2717 000066F3 7403E9150B <1> jne boot_sigmismatch 2718 <1> 2719 000066F8 31C9 <1> xor cx, cx 2720 <1> ; cmp word [es:0], cx 2721 <1> ; je boot_codemismatch 2722 <1> 2723 000066FA 5A <1> pop dx 2724 000066FB 58 <1> pop ax 2725 <1> 2726 <1> ; dx:ax = boot sector 2727 <1> ; byte [load_unit] = unit 2728 <1> ; es:0-> read sector 2729 <1> boot_dir_common: 2730 000066FC 26A31C00 <1> mov word [es:bsBPB + bpbHiddenSectors], ax 2731 00006700 2689161E00 <1> mov word [es:bsBPB + bpbHiddenSectors + 2], dx 2732 <1> 2733 00006705 8B5E0B <1> mov bx, [bp + bsBPB + bpbBytesPerSector] 2734 00006708 263B1E0B00 <1> cmp bx, [es:bsBPB + bpbBytesPerSector] 2735 0000670D 7403E90F0B <1> jne boot_secsizemismatch 2736 <1> 2737 <1> ; preserve some variables from our pseudo BPB 2738 00006712 31C0 <1> xor ax, ax 2739 00006714 FF7618 <1> push word [bp + bsBPB + bpbCHSSectors] 2740 00006717 268F061800 <1> pop word [es:bsBPB + bpbCHSSectors] 2741 0000671C FF761A <1> push word [bp + bsBPB + bpbCHSHeads] 2742 0000671F 268F061A00 <1> pop word [es:bsBPB + bpbCHSHeads] ; preserve geometry 2743 <1> 2744 00006724 8B5EEA <1> mov bx, word [bp + ldParaPerSector] 2745 00006727 D1EB <1> shr bx, 1 2746 00006729 895ED4 <1> mov word [bp + ldEntriesPerSector], bx 2747 <1> 2748 0000672C 2639061600 <1> cmp word [es:bsBPB + bpbSectorsPerFAT], ax 2749 00006731 8A5E40 <1> mov bl, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 2750 00006734 7407 <1> je .is_fat32 2751 00006736 26881E2400 <1> mov byte [es:bsBPB + bpbNew + bpbnBootUnit], bl 2752 0000673B EB05 <1> jmp short .was_fat1612 2753 <1> .is_fat32: 2754 0000673D 26881E4000 <1> mov byte [es:bsBPB + ebpbNew + bpbnBootUnit], bl 2755 <1> .was_fat1612: 2756 <1> 2757 00006742 06 <1> push es 2758 00006743 1E <1> push ds 2759 00006744 06 <1> push es 2760 00006745 1F <1> pop ds 2761 00006746 31F6 <1> xor si, si ; -> BPB from boot partition 2762 00006748 16 <1> push ss 2763 00006749 07 <1> pop es 2764 0000674A BF[108C] <1> mov di, load_data - LOADDATA2 ; -> our copy of a BPB 2765 0000674D B95A00 <1> mov cx, (bsBPB + ebpbNew + BPBN_size) 2766 00006750 F3A4 <1> rep movsb ; get the BPB 2767 <1> 2768 00006752 1F <1> pop ds 2769 00006753 800E[CC00]80 <1> setopt [internalflags3], dif3_partition_changed 2770 <1> 2771 00006758 394616 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], ax 2772 0000675B 740B <1> je @F ; is FAT32 --> 2773 0000675D BE[348C] <1> mov si, load_data - LOADDATA2 + bsBPB + bpbNew 2774 00006760 BF[508C] <1> mov di, load_data - LOADDATA2 + bsBPB + ebpbNew 2775 00006763 B91A00 <1> mov cx, BPBN_size 2776 00006766 F3A4 <1> rep movsb ; clone the FAT16 / FAT12 BPBN 2777 <1> ; to where the FAT32 BPBN lives 2778 <1> @@: 2779 00006768 07 <1> pop es 2780 <1> 2781 00006769 FF36[2A0A] <1> push word [auxbuff_segorsel] 2782 0000676D 8F46F8 <1> pop word [bp + lsvFATSeg] 2783 00006770 804EE702 <1> or byte [bp + ldFlags], ldfFATInvalid 2784 00006774 B8FFFF <1> mov ax, -1 2785 00006777 8946F4 <1> mov word [bp + lsvFATSector], ax 2786 0000677A 8946F6 <1> mov word [bp + lsvFATSector + 2], ax 2787 <1> 2788 0000677D E8FB10 <1> call initialise_fs 2789 <1> 2790 00006780 C706[8E8F][9269] <1> mov word [handle_scan_dir_entry], scan_dir_entry 2791 <1> 2792 00006786 C606[458F]00 <1> mov byte [load_check_dir_attr], 0 2793 0000678B 8B36[548F] <1> mov si, word [load_kernelname_input] 2794 0000678F 803C2F <1> cmp byte [si], '/' 2795 00006792 7501 <1> jne @F 2796 00006794 46 <1> inc si 2797 <1> @@: 2798 00006795 803C00 <1> cmp byte [si], 0 2799 00006798 7503E99B00 <1> je .root 2800 0000679D 16 <1> push ss 2801 0000679E 07 <1> pop es 2802 0000679F E84EF7 <1> call boot_parse_fn ; get next pathname 2803 000067A2 3C2F <1> cmp al, '/' 2804 000067A4 7509 <1> jne @F 2805 000067A6 C606[458F]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 2806 000067AB 8936[568F] <1> mov word [load_kernelname_next], si 2807 <1> @@: 2808 000067AF 84C0 <1> test al, al 2809 000067B1 7506 <1> jnz @F 2810 000067B3 C706[8E8F][8F69] <1> mov word [handle_scan_dir_entry], scan_dir_entry_dir_or_file 2811 <1> @@: 2812 <1> 2813 000067B9 BFFFFF <1> mov di, -1 2814 000067BC 89FE <1> mov si, di 2815 000067BE 897EF4 <1> mov [bp + lsvFATSector], di 2816 000067C1 8976F6 <1> mov [bp + lsvFATSector + 2], si 2817 <1> 2818 000067C4 31C0 <1> xor ax, ax 2819 000067C6 31D2 <1> xor dx, dx 2820 <1> 2821 000067C8 83EC20 <1> sub sp, 32 2822 <1> 2823 <1> .scan_dir_dirname_loop: 2824 000067CB 8946EC <1> mov word [bp + ldDirCluster], ax 2825 000067CE 8956EE <1> mov word [bp + ldDirCluster + 2], dx 2826 <1> 2827 000067D1 16 <1> push ss 2828 000067D2 07 <1> pop es 2829 000067D3 89E3 <1> mov bx, sp 2830 000067D5 E8EF01 <1> call scan_dir_aux_with_error 2831 <1> 2832 000067D8 803E[458F]10 <1> cmp byte [load_check_dir_attr], ATTR_DIRECTORY 2833 000067DD 7542 <1> jne .got_direntry 2834 <1> 2835 000067DF 56 <1> push si 2836 000067E0 57 <1> push di 2837 000067E1 C606[458F]00 <1> mov byte [load_check_dir_attr], 0 2838 000067E6 8B36[568F] <1> mov si, word [load_kernelname_next] 2839 000067EA 803C00 <1> cmp byte [si], 0 2840 000067ED 744F <1> je .sub 2841 <1> 2842 000067EF 06 <1> push es 2843 000067F0 16 <1> push ss 2844 000067F1 07 <1> pop es 2845 000067F2 E8FBF6 <1> call boot_parse_fn ; get next pathname 2846 000067F5 07 <1> pop es 2847 000067F6 3C2F <1> cmp al, '/' 2848 000067F8 7509 <1> jne @F 2849 000067FA C606[458F]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 2850 000067FF 8936[568F] <1> mov word [load_kernelname_next], si 2851 <1> @@: 2852 00006803 84C0 <1> test al, al 2853 00006805 7506 <1> jnz @F 2854 00006807 C706[8E8F][8F69] <1> mov word [handle_scan_dir_entry], scan_dir_entry_dir_or_file 2855 <1> @@: 2856 <1> 2857 0000680D 5F <1> pop di 2858 0000680E 5E <1> pop si 2859 <1> 2860 0000680F 31D2 <1> xor dx, dx 2861 00006811 268B471A <1> mov ax, [es:bx + deClusterLow] 2862 <1> ; = first cluster (not FAT32) 2863 00006815 807EE620 <1> cmp byte [bp + ldFATType], 32 2864 00006819 7504 <1> jne @F 2865 0000681B 268B5714 <1> mov dx, [es:bx + deClusterHigh] 2866 <1> ; dx:ax = first cluster (FAT32) 2867 <1> @@: 2868 <1> 2869 0000681F EBAA <1> jmp .scan_dir_dirname_loop 2870 <1> 2871 <1> .got_direntry: 2872 00006821 F606[CC00]08 <1> testopt [internalflags3], dif3_load_dir_dir 2873 00006826 7507 <1> jnz @F 2874 00006828 26F6470B10 <1> test byte [es:bx + deAttrib], ATTR_DIRECTORY 2875 0000682D 7511 <1> jnz @FF 2876 <1> @@: 2877 0000682F 89DF <1> mov di, bx 2878 00006831 E83400 <1> call list_dir_entry 2879 00006834 83C420 <1> add sp, 32 2880 00006837 C3 <1> retn 2881 <1> 2882 <1> .root: 2883 00006838 31C0 <1> xor ax, ax 2884 0000683A 31D2 <1> xor dx, dx 2885 0000683C EB15 <1> jmp .scan 2886 <1> 2887 <1> .sub: 2888 0000683E 5F <1> pop di 2889 0000683F 5E <1> pop si 2890 <1> 2891 <1> @@: 2892 00006840 83C420 <1> add sp, 32 2893 <1> 2894 00006843 31D2 <1> xor dx, dx 2895 00006845 268B471A <1> mov ax, [es:bx + deClusterLow] 2896 <1> ; = first cluster (not FAT32) 2897 00006849 807EE620 <1> cmp byte [bp + ldFATType], 32 2898 0000684D 7504 <1> jne @F 2899 0000684F 268B5714 <1> mov dx, [es:bx + deClusterHigh] 2900 <1> ; dx:ax = first cluster (FAT32) 2901 <1> @@: 2902 <1> .scan: 2903 00006853 8946EC <1> mov word [bp + ldDirCluster], ax 2904 00006856 8956EE <1> mov word [bp + ldDirCluster + 2], dx 2905 <1> 2906 00006859 C706[8E8F][6868] <1> mov word [handle_scan_dir_entry], list_dir_entry 2907 0000685F C706[908F][4A04] <1> mov word [handle_scan_dir_not_found], dmycmd 2908 <1> 2909 00006865 E96501 <1> jmp scan_dir_aux 2910 <1> 2911 <1> 2912 <1> list_dir_entry: 2913 00006868 26803D00 <1> cmp byte [es:di], 0 2914 0000686C 7503E91D01 <1> je .ret ; (NC, ZR) 2915 00006871 26803DE5 <1> cmp byte [es:di], 0E5h 2916 00006875 7504 <1> jne @F 2917 00006877 80CB01 <1> or bl, 1 ; (NC, NZ) 2918 0000687A C3 <1> retn 2919 <1> 2920 <1> @@: 2921 0000687B 268A5D0B <1> mov bl, byte [es:di + deAttrib] 2922 0000687F F6C308 <1> test bl, ATTR_VOLLABEL 2923 00006882 7403E90401 <1> jnz .ret_NC_NZ ; skip volume labels (and LFNs) --> (NZ) 2924 <1> 2925 00006887 26803D2E <1> cmp byte [es:di], '.' ; dot or dotdot entry ? 2926 0000688B 7503E9FB00 <1> je .ret_NC_NZ ; yes, skip --> 2927 <1> 2928 00006890 50 <1> push ax 2929 00006891 53 <1> push bx 2930 00006892 51 <1> push cx 2931 00006893 52 <1> push dx 2932 00006894 56 <1> push si 2933 00006895 57 <1> push di 2934 00006896 06 <1> push es 2935 00006897 1E <1> push ds 2936 00006898 06 <1> push es 2937 00006899 1F <1> pop ds 2938 0000689A 89FE <1> mov si, di 2939 <1> 2940 0000689C 16 <1> push ss 2941 0000689D 07 <1> pop es 2942 0000689E BF[AE07] <1> mov di, line_out 2943 000068A1 B90800 <1> mov cx, 8 2944 000068A4 F3A4 <1> rep movsb 2945 000068A6 B82020 <1> mov ax, 2020h 2946 000068A9 AA <1> stosb 2947 000068AA B103 <1> mov cl, 3 2948 000068AC F3A4 <1> rep movsb 2949 000068AE AB <1> stosw 2950 <1> 2951 000068AF 1F <1> pop ds 2952 000068B0 B02D <1> mov al, '-' 2953 000068B2 F6C320 <1> test bl, ATTR_ARCHIVE 2954 000068B5 7402 <1> jz @F 2955 000068B7 B041 <1> mov al, 'A' 2956 <1> @@: 2957 000068B9 AA <1> stosb 2958 000068BA B02D <1> mov al, '-' 2959 000068BC F6C302 <1> test bl, ATTR_HIDDEN 2960 000068BF 7402 <1> jz @F 2961 000068C1 B048 <1> mov al, 'H' 2962 <1> @@: 2963 000068C3 AA <1> stosb 2964 000068C4 B02D <1> mov al, '-' 2965 000068C6 F6C301 <1> test bl, ATTR_READONLY 2966 000068C9 7402 <1> jz @F 2967 000068CB B052 <1> mov al, 'R' 2968 <1> @@: 2969 000068CD AA <1> stosb 2970 000068CE B02D <1> mov al, '-' 2971 000068D0 F6C304 <1> test bl, ATTR_SYSTEM 2972 000068D3 7402 <1> jz @F 2973 000068D5 B053 <1> mov al, 'S' 2974 <1> @@: 2975 000068D7 AA <1> stosb 2976 000068D8 B82020 <1> mov ax, 2020h 2977 000068DB AB <1> stosw 2978 <1> 2979 000068DC F6C310 <1> test bl, ATTR_DIRECTORY 2980 000068DF 7408 <1> jz @F 2981 000068E1 BE[6163] <1> mov si, msg.dirinsteadsize 2982 000068E4 E8B5C8 <1> call copy_single_counted_string 2983 000068E7 EB2D <1> jmp @FF 2984 <1> 2985 <1> @@: 2986 000068E9 07 <1> pop es 2987 000068EA 5E <1> pop si 2988 000068EB 56 <1> push si 2989 000068EC 06 <1> push es 2990 000068ED 268A440C <1> mov al, byte [es:si + dePlusSize] 2991 000068F1 88C4 <1> mov ah, al 2992 000068F3 2507E0 <1> and ax, 0E007h 2993 000068F6 88E2 <1> mov dl, ah 2994 000068F8 B400 <1> mov ah, 0 2995 000068FA B600 <1> mov dh, 0 2996 000068FC D1EA <1> shr dx, 1 2997 000068FE D1EA <1> shr dx, 1 2998 00006900 09D0 <1> or ax, dx 2999 00006902 50 <1> push ax 3000 00006903 268B541E <1> mov dx, word [es:si + deSize + 2] 3001 00006907 268B441C <1> mov ax, word [es:si + deSize] 3002 0000690B 5E <1> pop si 3003 0000690C 16 <1> push ss 3004 0000690D 07 <1> pop es 3005 0000690E 31C9 <1> xor cx, cx 3006 00006910 BB0800 <1> mov bx, 4+4 3007 00006913 E8D2B3 <1> call disp_dxax_times_cx_width_bx_size.store 3008 <1> 3009 <1> @@: 3010 00006916 B82020 <1> mov ax, 2020h 3011 00006919 AB <1> stosw 3012 0000691A 07 <1> pop es 3013 0000691B 5E <1> pop si 3014 0000691C 56 <1> push si 3015 0000691D 06 <1> push es 3016 0000691E 268B5C18 <1> mov bx, word [es:si + deDate] 3017 00006922 268B7416 <1> mov si, word [es:si + deTime] 3018 00006926 16 <1> push ss 3019 00006927 07 <1> pop es 3020 00006928 89D8 <1> mov ax, bx 3021 0000692A B90900 <1> mov cx, 9 3022 0000692D D3E8 <1> shr ax, cl 3023 0000692F 05BC07 <1> add ax, 1980 3024 00006932 31D2 <1> xor dx, dx 3025 00006934 B104 <1> mov cl, 4 3026 00006936 E8AC44 <1> call dec_dword_minwidth 3027 00006939 B02D <1> mov al, '-' 3028 0000693B AA <1> stosb 3029 0000693C 89D8 <1> mov ax, bx 3030 0000693E B105 <1> mov cl, 5 3031 00006940 D3E8 <1> shr ax, cl 3032 00006942 83E00F <1> and ax, 15 3033 00006945 B102 <1> mov cl, 2 3034 00006947 E89B44 <1> call dec_dword_minwidth 3035 0000694A B02D <1> mov al, '-' 3036 0000694C AA <1> stosb 3037 0000694D 89D8 <1> mov ax, bx 3038 0000694F 83E01F <1> and ax, 31 3039 00006952 E89044 <1> call dec_dword_minwidth 3040 00006955 B020 <1> mov al, 32 3041 00006957 AA <1> stosb 3042 00006958 89F0 <1> mov ax, si 3043 0000695A B10B <1> mov cl, 11 3044 0000695C D3E8 <1> shr ax, cl 3045 0000695E B102 <1> mov cl, 2 3046 00006960 E88244 <1> call dec_dword_minwidth 3047 00006963 B03A <1> mov al, ':' 3048 00006965 AA <1> stosb 3049 00006966 89F0 <1> mov ax, si 3050 00006968 B105 <1> mov cl, 5 3051 0000696A D3E8 <1> shr ax, cl 3052 0000696C 83E03F <1> and ax, 63 3053 0000696F B102 <1> mov cl, 2 3054 00006971 E87144 <1> call dec_dword_minwidth 3055 00006974 B03A <1> mov al, ':' 3056 00006976 AA <1> stosb 3057 00006977 89F0 <1> mov ax, si 3058 00006979 83E01F <1> and ax, 31 3059 0000697C D1E0 <1> shl ax, 1 3060 0000697E E86444 <1> call dec_dword_minwidth 3061 <1> 3062 00006981 E80145 <1> call putsline_crlf 3063 <1> 3064 00006984 07 <1> pop es 3065 00006985 5F <1> pop di 3066 00006986 5E <1> pop si 3067 00006987 5A <1> pop dx 3068 00006988 59 <1> pop cx 3069 00006989 5B <1> pop bx 3070 0000698A 58 <1> pop ax 3071 <1> 3072 <1> .ret_NC_NZ: 3073 0000698B 80CB01 <1> or bl, 1 ; (NC, NZ) 3074 <1> .ret: 3075 0000698E C3 <1> retn 3076 <1> 3077 <1> 3078 <1> usesection lDEBUG_DATA_ENTRY 3079 <1> 3080 <1> align 2, db 0 3081 <1> handle_scan_dir_entry: 3082 00008F8E [BC98] <1> dw error 3083 <1> handle_scan_dir_not_found: 3084 00008F90 [BC98] <1> dw error 3085 <1> 3086 <1> 3087 <1> usesection lDEBUG_CODE 3088 <1> 3089 <1> scan_dir_entry_dir_or_file: 3090 0000698F B701 <1> mov bh, 1 3091 00006991 A9 <1> db __TEST_IMM16 ; (skip mov) 3092 <1> 3093 <1> scan_dir_entry: 3094 00006992 B700 <1> mov bh, 0 3095 00006994 26803D00 <1> cmp byte [es:di], 0 3096 00006998 F9 <1> stc 3097 00006999 7425 <1> je .ret 3098 0000699B 268A5D0B <1> mov bl, byte [es:di + deAttrib] 3099 0000699F F6C308 <1> test bl, ATTR_VOLLABEL 3100 000069A2 751B <1> jnz @F ; skip volume labels (and LFNs) --> (NZ) 3101 000069A4 84FF <1> test bh, bh 3102 000069A6 7509 <1> jnz .no_check_dir 3103 000069A8 80E310 <1> and bl, ATTR_DIRECTORY ; isolate directory bit 3104 000069AB 3A1E[458F] <1> cmp bl, byte [load_check_dir_attr] ; is it what we're searching? 3105 000069AF 750E <1> jne @F ; no --> 3106 <1> .no_check_dir: 3107 000069B1 56 <1> push si 3108 000069B2 57 <1> push di 3109 000069B3 51 <1> push cx 3110 000069B4 BE[488F] <1> mov si, load_kernel_name ; ds:si-> name to match 3111 000069B7 B90B00 <1> mov cx, 11 ; length of padded 8.3 FAT filename 3112 000069BA F3A6 <1> repe cmpsb ; check entry 3113 000069BC 59 <1> pop cx 3114 000069BD 5F <1> pop di 3115 000069BE 5E <1> pop si 3116 <1> @@: 3117 000069BF F8 <1> clc 3118 <1> .ret: 3119 000069C0 C3 <1> retn 3120 <1> 3121 <1> 3122 <1> ; INP: es:bx -> where to place directory entry 3123 <1> ; si:di = loaded FAT sector (0 = first FAT sector) 3124 <1> ; dword [bp + ldDirCluster] = directory cluster to scan, 3125 <1> ; 0 for root dir 3126 <1> ; byte [bp + ldFATType] = size of FAT entry in bits 3127 <1> ; OUT: es:bx -> directory entry (es:bx unchanged) 3128 <1> ; si:di = loaded FAT sector 3129 <1> ; CHG: dx, ax, si, di, cx 3130 <1> scan_dir_aux_for_file: 3131 000069C1 C706[8E8F][9269] <1> mov word [handle_scan_dir_entry], scan_dir_entry 3132 <1> 3133 <1> scan_dir_aux_with_error: 3134 000069C7 C706[908F][236A] <1> mov word [handle_scan_dir_not_found], error_filenotfound 3135 <1> 3136 <1> scan_dir_aux: 3137 000069CD FF36[2A0A] <1> push word [auxbuff_segorsel] 3138 000069D1 8F06[608F] <1> pop word [load_adr_dirbuf_segment] 3139 <1> 3140 <1> scan_dir: 3141 000069D5 8B46EC <1> mov ax, word [bp + ldDirCluster] 3142 000069D8 8B56EE <1> mov dx, word [bp + ldDirCluster + 2] 3143 <1> 3144 000069DB 85C0 <1> test ax, ax 3145 000069DD 7576 <1> jnz fat32_scan_root.dir_clust_dxax 3146 000069DF 85D2 <1> test dx, dx 3147 000069E1 7572 <1> jnz fat32_scan_root.dir_clust_dxax 3148 <1> 3149 <1> ; got to scan root directory. use FAT12/FAT16 walker if so, 3150 <1> ; else use FAT32 walker 3151 <1> 3152 000069E3 807EE610 <1> cmp byte [bp + ldFATType], 16 3153 000069E7 7766 <1> ja fat32_scan_root 3154 <1> 3155 000069E9 56 <1> push si 3156 000069EA 57 <1> push di 3157 000069EB 06 <1> push es 3158 000069EC 53 <1> push bx 3159 <1> 3160 000069ED 8B7611 <1> mov si, word [bp + bsBPB + bpbNumRootDirEnts] 3161 <1> 3162 <1> 3163 <1> ; (boot.asm code starts here) 3164 <1> 3165 <1> fat16_scan_root: 3166 000069F0 85F6 <1> test si, si 3167 000069F2 7424 <1> jz handle_filenotfound_fat16 3168 <1> 3169 000069F4 8B46D0 <1> mov ax, [bp + ldRootSector] 3170 000069F7 8B56D2 <1> mov dx, [bp + ldRootSector + 2] 3171 <1> 3172 <1> ; Scan root directory for file. We don't bother to check for deleted 3173 <1> ; entries (E5h) or entries that mark the end of the directory (00h). 3174 <1> ; number of root entries in si here 3175 <1> fat16_next_sect: 3176 000069FA 8B1E[608F] <1> mov bx, [load_adr_dirbuf_segment] 3177 000069FE E83005 <1> call read_sector 3178 <1> 3179 00006A01 8B4ED4 <1> mov cx, [bp + ldEntriesPerSector] ; entries per sector as loop counter 3180 00006A04 31FF <1> xor di, di ; es:di-> first entry in this sector 3181 <1> fat16_next_ent: 3182 00006A06 FF16[8E8F] <1> call near word [handle_scan_dir_entry] 3183 00006A0A 720C <1> jc handle_filenotfound_fat16 3184 00006A0C 8D7D20 <1> lea di, [di + DIRENTRY_size] ; bytes/dirent 3185 00006A0F 7428 <1> je fat16_found_it ; found entry --> 3186 <1> 3187 00006A11 4E <1> dec si ; count down entire root's entries 3188 00006A12 E0F2 <1> loopnz fat16_next_ent ; count down sector's entries (jumps iff si >0 && cx >0) 3189 00006A14 85F6 <1> test si, si ; work around qemu bug 3190 00006A16 75E2 <1> jnz fat16_next_sect ; (jumps iff si >0 && cx ==0) 3191 <1> ; ends up here iff si ==0 3192 <1> ; ie all root entries checked unsuccessfully 3193 <1> %if 0 3194 <1> 3195 <1> qemu prior to 2020-08 has a bug which affects the above 3196 <1> conditionals. The bug is that if NZ is set (like when the 3197 <1> branch to fat16_found_it is not taken) and then another 3198 <1> instruction sets ZR (like the dec si at the end of the root 3199 <1> directory) and then loopnz is used which sets cx to zero 3200 <1> then after the loopnz FL will be NZ leading to the jnz branch 3201 <1> to be taken. Eventually the entire load unit is traversed and 3202 <1> qemu returns error 01h when trying to read past the end of 3203 <1> the unit (at least for 1440 KiB diskettes). 3204 <1> 3205 <1> The bug is now worked around by the comparison with zero at 3206 <1> the fat16_next_ent label. The test si, si serves as another 3207 <1> workaround to forcibly set the flag correctly after loopnz. 3208 <1> It is only really needed when the entire root is filled with 3209 <1> non-zero directory entries and an older qemu is used. 3210 <1> 3211 <1> Reference: https://bugs.launchpad.net/qemu/+bug/1888165 3212 <1> 3213 <1> %endif 3214 <1> 3215 <1> handle_filenotfound_fat16: 3216 00006A18 5B <1> pop bx 3217 00006A19 07 <1> pop es 3218 00006A1A 5F <1> pop di 3219 00006A1B 5E <1> pop si 3220 <1> 3221 00006A1C A9 <1> db __TEST_IMM16 ; (skip pop and pop) 3222 <1> handle_filenotfound_fat32: 3223 00006A1D 5B <1> pop bx 3224 00006A1E 07 <1> pop es 3225 <1> 3226 <1> handle_filenotfound: 3227 00006A1F FF26[908F] <1> jmp near word [handle_scan_dir_not_found] 3228 <1> 3229 <1> error_filenotfound: 3230 <1> %if _INPUT_FILE_BOOT 3231 00006A23 F606[CF00]08 <1> testopt [internalflags3], dif3_in_if 3232 00006A28 7403E9761B <1> jnz if_exists_not_found 3233 <1> %endif 3234 00006A2D BA[1162] <1> mov dx, msg.boot_file_not_found 3235 00006A30 B81E02 <1> mov ax, 021Eh 3236 00006A33 E8CD2E <1> call setrc 3237 00006A36 E9E0EF <1> jmp bootcmd.fail 3238 <1> 3239 <1> fat16_found_it: 3240 00006A39 5B <1> pop bx 3241 00006A3A 58 <1> pop ax 3242 00006A3B B92000 <1> mov cx, 32 3243 00006A3E 29CF <1> sub di, cx 3244 00006A40 1E <1> push ds 3245 00006A41 06 <1> push es 3246 00006A42 1F <1> pop ds 3247 00006A43 89FE <1> mov si, di ; ds:si -> entry in directory buffer 3248 00006A45 89DF <1> mov di, bx 3249 00006A47 8EC0 <1> mov es, ax ; es:di -> destination for entry 3250 00006A49 F3A4 <1> rep movsb 3251 00006A4B 1F <1> pop ds 3252 00006A4C 5F <1> pop di 3253 00006A4D 5E <1> pop si 3254 00006A4E C3 <1> retn 3255 <1> 3256 <1> 3257 <1> ; (boot32.asm code starts here) 3258 <1> 3259 <1> fat32_scan_root: 3260 00006A4F 8B462C <1> mov ax, [bp + bsBPB + ebpbRootCluster] 3261 00006A52 8B562E <1> mov dx, [bp + bsBPB + ebpbRootCluster + 2] 3262 <1> 3263 <1> .dir_clust_dxax: 3264 00006A55 06 <1> push es 3265 00006A56 53 <1> push bx 3266 <1> 3267 00006A57 E83501 <1> call check_clust 3268 00006A5A 72C1 <1> jc handle_filenotfound_fat32 3269 <1> 3270 <1> fat32_next_root_clust: 3271 00006A5C E84F00 <1> call clust_to_first_sector 3272 00006A5F 51 <1> push cx 3273 00006A60 53 <1> push bx 3274 00006A61 8B4EE8 <1> mov cx, [bp + ldClusterSize] 3275 <1> fat32_next_root_sect: 3276 00006A64 51 <1> push cx 3277 00006A65 8B4ED4 <1> mov cx, [bp + ldEntriesPerSector] 3278 <1> 3279 <1> ; Scan root directory for file. We don't bother to check for deleted 3280 <1> ; entries (E5h) or entries that mark the end of the directory (00h). 3281 00006A68 8B1E[608F] <1> mov bx, [load_adr_dirbuf_segment] 3282 00006A6C E8C204 <1> call read_sector 3283 <1> 3284 00006A6F 57 <1> push di 3285 00006A70 31FF <1> xor di, di ; es:di-> first entry in this sector 3286 <1> fat32_next_ent: 3287 00006A72 FF16[8E8F] <1> call near word [handle_scan_dir_entry] 3288 00006A76 7214 <1> jc handle_filenotfound_fat32_pop 3289 00006A78 8D7D20 <1> lea di, [di + DIRENTRY_size] ; bytes/dirent 3290 00006A7B 7415 <1> je fat32_found_it ; found entry --> 3291 <1> 3292 00006A7D E2F3 <1> loop fat32_next_ent ; count down sector's entries (jumps iff cx >0) 3293 00006A7F 5F <1> pop di 3294 00006A80 59 <1> pop cx 3295 00006A81 E2E1 <1> loop fat32_next_root_sect 3296 00006A83 5B <1> pop bx 3297 00006A84 59 <1> pop cx 3298 00006A85 E84F00 <1> call clust_next 3299 00006A88 73D2 <1> jnc fat32_next_root_clust 3300 00006A8A EB04 <1> jmp @F 3301 <1> 3302 <1> handle_filenotfound_fat32_pop: 3303 00006A8C 5F <1> pop di 3304 00006A8D 59 <1> pop cx 3305 00006A8E 5B <1> pop bx 3306 00006A8F 59 <1> pop cx 3307 <1> @@: 3308 00006A90 EB8B <1> jmp handle_filenotfound_fat32 3309 <1> 3310 <1> 3311 <1> fat32_found_it: 3312 00006A92 5A <1> pop dx ; value for di 3313 00006A93 83C406 <1> add sp, 6 ; discard sector-in-cluster counter and cluster 3314 00006A96 5B <1> pop bx 3315 00006A97 58 <1> pop ax 3316 00006A98 B92000 <1> mov cx, 32 3317 00006A9B 29CF <1> sub di, cx 3318 00006A9D 1E <1> push ds 3319 00006A9E 06 <1> push es 3320 00006A9F 1F <1> pop ds 3321 00006AA0 56 <1> push si 3322 00006AA1 89FE <1> mov si, di ; ds:si -> entry in directory buffer 3323 00006AA3 89DF <1> mov di, bx 3324 00006AA5 8EC0 <1> mov es, ax ; es:di -> destination for entry 3325 00006AA7 F3A4 <1> rep movsb 3326 00006AA9 5E <1> pop si 3327 00006AAA 1F <1> pop ds 3328 00006AAB 89D7 <1> mov di, dx ; restore si:di = loaded FAT sector 3329 00006AAD C3 <1> retn 3330 <1> 3331 <1> 3332 <1> ; (iniload.asm code continues here) 3333 <1> 3334 <1> ; INP: dx:ax = cluster - 2 (0-based cluster) 3335 <1> ; OUT: cx:bx = input dx:ax 3336 <1> ; dx:ax = first sector of that cluster 3337 <1> ; CHG: - 3338 <1> clust_to_first_sector: 3339 00006AAE 52 <1> push dx 3340 00006AAF 50 <1> push ax 3341 00006AB0 52 <1> push dx 3342 00006AB1 F726[F88B] <1> mul word [load_data - LOADDATA2 + ldClusterSize] 3343 00006AB5 93 <1> xchg bx, ax 3344 00006AB6 87CA <1> xchg cx, dx 3345 00006AB8 58 <1> pop ax 3346 00006AB9 F726[F88B] <1> mul word [load_data - LOADDATA2 + ldClusterSize] 3347 00006ABD 85D2 <1> test dx, dx 3348 00006ABF 7513 <1> jnz .error_badchain 3349 00006AC1 92 <1> xchg dx, ax 3350 00006AC2 01CA <1> add dx, cx 3351 00006AC4 720E <1> jc .error_badchain 3352 00006AC6 93 <1> xchg ax, bx 3353 <1> 3354 00006AC7 0306[0C8C] <1> add ax, [load_data - LOADDATA2 + lsvDataStart] 3355 00006ACB 1316[0E8C] <1> adc dx, [load_data - LOADDATA2 + lsvDataStart + 2] 3356 00006ACF 7203 <1> jc .error_badchain 3357 <1> ; dx:ax = first sector in cluster 3358 00006AD1 5B <1> pop bx 3359 00006AD2 59 <1> pop cx ; cx:bx = cluster 3360 00006AD3 C3 <1> retn 3361 <1> 3362 <1> .error_badchain: 3363 00006AD4 E9E10D <1> jmp error_badchain 3364 <1> 3365 <1> 3366 <1> ; INP: cx:bx = cluster (0-based) 3367 <1> ; si:di = loaded FAT sector, -1 if none 3368 <1> ; OUT: CY if no next cluster 3369 <1> ; NC if next cluster found, 3370 <1> ; dx:ax = next cluster value (0-based) 3371 <1> ; si:di = loaded FAT sector 3372 <1> ; CHG: cx, bx 3373 <1> clust_next: 3374 00006AD7 89D8 <1> mov ax, bx 3375 00006AD9 89CA <1> mov dx, cx 3376 <1> .dxax: 3377 00006ADB 83C002 <1> add ax, 2 3378 00006ADE 83D200 <1> adc dx, 0 3379 <1> 3380 00006AE1 06 <1> push es 3381 00006AE2 803E[F68B]10 <1> cmp byte [load_data - LOADDATA2 + ldFATType], 16 3382 00006AE7 7452 <1> je .fat16 3383 00006AE9 774C <1> ja .fat32 3384 <1> 3385 <1> .fat12: 3386 <1> ; FAT12 entries are 12 bits, bytes are 8 bits. Ratio is 3 / 2, 3387 <1> ; so multiply cluster number by 3 first, then divide by 2. 3388 <1> ; ax = cluster number (up to 12 bits set) 3389 00006AEB 89C2 <1> mov dx, ax 3390 00006AED D1E0 <1> shl ax, 1 ; = 2n (up to 13 bits set) 3391 00006AEF 01D0 <1> add ax, dx ; = 2n+n = 3n (up to 14 bits set) 3392 00006AF1 D1E8 <1> shr ax, 1 ; ax = byte offset into FAT (0..6129) 3393 <1> ; CF = whether to use high 12 bits 3394 00006AF3 19C9 <1> sbb cx, cx ; = -1 iff CY, else 0 3395 <1> 3396 <1> ; Use the calculated byte offset as an offset into the FAT 3397 <1> ; buffer, which holds all of the FAT's relevant data. 3398 00006AF5 8E06[088C] <1> mov es, [load_data - LOADDATA2 + lsvFATSeg] 3399 00006AF9 89C3 <1> mov bx, ax ; -> 16-bit word in FAT to load 3400 <1> 3401 00006AFB F606[F78B]02 <1> test byte [load_ldflags], ldfFATInvalid 3402 00006B00 7426 <1> jz .fat12_have_fat ; already have it --> 3403 00006B02 51 <1> push cx 3404 00006B03 31D2 <1> xor dx, dx 3405 00006B05 F736[1B8C] <1> div word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 3406 <1> ; dx = remainder, byte offset 3407 <1> ; ax = sector to read 3408 00006B09 52 <1> push dx 3409 00006B0A 31D2 <1> xor dx, dx 3410 00006B0C 0306[1E8C] <1> add ax, [load_data - LOADDATA2 + bsBPB + bpbReservedSectors] 3411 00006B10 11D2 <1> adc dx, dx 3412 00006B12 8B1E[088C] <1> mov bx, [load_data - LOADDATA2 + lsvFATSeg] 3413 00006B16 E81804 <1> call read_sector 3414 00006B19 59 <1> pop cx 3415 00006B1A 3B0E[1B8C] <1> cmp cx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 3416 00006B1E 7505 <1> jne .fat12_have_fat_cx 3417 00006B20 06 <1> push es 3418 00006B21 E80D04 <1> call read_sector ; read second sector for straddling entry 3419 00006B24 07 <1> pop es 3420 <1> 3421 <1> .fat12_have_fat_cx: 3422 00006B25 89CB <1> mov bx, cx 3423 00006B27 59 <1> pop cx 3424 <1> 3425 <1> .fat12_have_fat: 3426 <1> 3427 <1> ; get 16 bits from FAT 3428 00006B28 268B07 <1> mov ax, [es:bx] 3429 <1> 3430 00006B2B 80E104 <1> and cl, 4 ; = 4 iff CY after shift, else 0 3431 00006B2E D3E8 <1> shr ax, cl ; shift down iff odd entry, else unchanged 3432 00006B30 25FF0F <1> and ax, 0FFFh ; insure it's only 12 bits 3433 00006B33 31D2 <1> xor dx, dx 3434 00006B35 EB57 <1> jmp short .gotvalue 3435 <1> 3436 <1> .fat32: 3437 <1> ; * 4 = byte offset into FAT (0--4000_0000h) 3438 00006B37 01C0 <1> add ax, ax 3439 00006B39 11D2 <1> adc dx, dx 3440 <1> .fat16: 3441 <1> ; * 2 = byte offset into FAT (0--2_0000h) 3442 00006B3B 01C0 <1> add ax, ax 3443 00006B3D 11D2 <1> adc dx, dx 3444 <1> 3445 00006B3F 50 <1> push ax 3446 00006B40 92 <1> xchg ax, dx 3447 00006B41 31D2 <1> xor dx, dx ; dx:ax = high word 3448 00006B43 F736[1B8C] <1> div word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 3449 00006B47 89C3 <1> mov bx, ax 3450 00006B49 58 <1> pop ax ; dx = remainder, ax = low word 3451 00006B4A F736[1B8C] <1> div word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 3452 00006B4E 87D3 <1> xchg dx, bx ; dx:ax = result, bx = remainder 3453 <1> ; dx:ax = sector offset into FAT (0--200_0000h) 3454 <1> ; bx = byte offset into FAT sector (0--8190) 3455 00006B50 F606[F78B]02 <1> test byte [load_ldflags], ldfFATInvalid 3456 00006B55 7513 <1> jnz .read_no_store ; always read --> 3457 <1> 3458 00006B57 39F2 <1> cmp dx, si 3459 00006B59 7504 <1> jne @F ; read sector 3460 00006B5B 39F8 <1> cmp ax, di 3461 00006B5D 741B <1> je @FF ; sector is already buffered 3462 <1> @@: 3463 00006B5F 89D6 <1> mov si, dx 3464 00006B61 89C7 <1> mov di, ax 3465 00006B63 8916[068C] <1> mov word [load_data - LOADDATA2 + lsvFATSector + 2], dx 3466 00006B67 A3[048C] <1> mov word [load_data - LOADDATA2 + lsvFATSector + 0], ax 3467 <1> 3468 <1> .read_no_store: 3469 00006B6A 53 <1> push bx 3470 00006B6B 0306[1E8C] <1> add ax, [load_data - LOADDATA2 + bsBPB + bpbReservedSectors] 3471 00006B6F 83D200 <1> adc dx, 0 3472 00006B72 8B1E[088C] <1> mov bx, [load_data - LOADDATA2 + lsvFATSeg] 3473 00006B76 E8B803 <1> call read_sector 3474 00006B79 5B <1> pop bx 3475 <1> @@: 3476 00006B7A 8E06[088C] <1> mov es, [load_data - LOADDATA2 + lsvFATSeg] 3477 00006B7E 31D2 <1> xor dx, dx 3478 00006B80 268B07 <1> mov ax, [es:bx] 3479 <1> 3480 00006B83 803E[F68B]10 <1> cmp byte [load_data - LOADDATA2 + ldFATType], 16 3481 00006B88 7404 <1> je @F 3482 00006B8A 268B5702 <1> mov dx, [es:bx + 2] 3483 <1> @@: 3484 <1> .gotvalue: 3485 00006B8E 07 <1> pop es 3486 <1> 3487 <1> ; INP: dx:ax = cluster value, 2-based 3488 <1> ; OUT: dx:ax -= 2 (makes it 0-based) 3489 <1> ; CY iff invalid cluster 3490 <1> check_clust: 3491 00006B8F 80E60F <1> and dh, 0Fh 3492 00006B92 83E802 <1> sub ax, 2 3493 00006B95 83DA00 <1> sbb dx, 0 3494 <1> 3495 00006B98 803E[F68B]10 <1> cmp byte [load_data - LOADDATA2 + ldFATType], 16 3496 00006B9D 7707 <1> ja .fat32 3497 00006B9F 740B <1> je .fat16 3498 <1> 3499 <1> .fat12: 3500 00006BA1 3DF50F <1> cmp ax, 0FF7h - 2 3501 00006BA4 EB09 <1> jmp short .common 3502 <1> 3503 <1> .fat32: 3504 00006BA6 81FAFF0F <1> cmp dx, 0FFFh 3505 00006BAA 7203 <1> jb @F ; CY here means valid ...- 3506 <1> 3507 <1> .fat16: 3508 00006BAC 83F8F5 <1> cmp ax, 0FFF7h - 2 3509 <1> @@: ; -... or if NC first, CY here also 3510 <1> .common: 3511 00006BAF F5 <1> cmc ; NC if valid 3512 00006BB0 720E <1> jc .ret 3513 00006BB2 3B16[D28B] <1> cmp dx, word [load_data - LOADDATA2 + ldMaxCluster + 2] 3514 00006BB6 7504 <1> jne @F 3515 00006BB8 3B06[D08B] <1> cmp ax, word [load_data - LOADDATA2 + ldMaxCluster] 3516 <1> @@: 3517 00006BBC 7701 <1> ja .ret_CY 3518 00006BBE A8 <1> db __TEST_IMM8 ; (skip stc, NC) 3519 <1> .ret_CY: 3520 00006BBF F9 <1> stc 3521 <1> .ret: 3522 00006BC0 C3 <1> retn 3523 <1> 3524 <1> 3525 <1> partition_table equ load_partition_table 3526 <1> partition_table.end equ load_partition_table.end 3527 <1> %define _SCANPTAB_PREFIX 3528 <1> %define _SCANPTAB_DEBUG4_PREFIX 3529 <1> %assign _PARTITION_TABLE_IN_CS 0 3530 <1> %define _BASE bp 3531 <1> %include "scanptab.asm" 1 <2> 2 <2> %if 0 3 <2> 4 <2> scanptab - Scan partition table 5 <2> 2019 by C. Masloch 6 <2> 7 <2> Usage of the works is permitted provided that this 8 <2> instrument is retained with the works, so that any entity 9 <2> that uses the works is notified of this instrument. 10 <2> 11 <2> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 12 <2> 13 <2> %endif 14 <2> 15 <2> ; _SCANPTAB_PREFIX = prefix for our variables and functions 16 <2> ; _SCANPTAB_DEBUG4_PREFIX = prefix for d4 function calls 17 <2> numdef PARTITION_TABLE_IN_CS, 1 18 <2> numdef BOOTCMD_FAIL_ERROR, 1 19 <2> gendef BASE, ss:bx 20 <2> %ifidn _BASE, ss:bx 21 <2> %elifidn _BASE, bp 22 <2> %else 23 <2> %error Invalid base 24 <2> %endif 25 <2> 26 <2> 27 <2> ; INP: byte [%load_unit] = unit to scan 28 <2> ; cx = function to call for each partition 29 <2> ; OUT: function called for each partition 30 <2> ; CHG: di, si, ax, bx, (cx), dx, es 31 <2> ; STT: ds => data segment (used for %load_* variables, unless bp-based) 32 <2> ; 33 <2> ; Note: Calls %read_partition_table (in this module), 34 <2> ; which calls %read_ae_512_bytes, which calls 35 <2> ; read_sector. The read_sector base must be 36 <2> ; zero and the geometry must be initialised. 37 <2> 38 <2> ; Function in cx is called with: 39 <2> ; INP: es:si -> partition table entry, 40 <2> ; si = %partition_table .. %partition_table+48, 41 <2> ; es = ss (if not _PARTITION_TABLE_IN_CS) 42 <2> ; es = cs (if _PARTITION_TABLE_IN_CS) 43 <2> ; byte [%load_current_partition] = partition number, 44 <2> ; 0 for diskette (unpartitioned), 45 <2> ; 1 to 4 for primary partitions, 46 <2> ; 5+ for logical partitions 47 <2> ; _BASE + di -> above part table metadata, 48 <2> ; dword [_BASE + di - 4] = root (outermost extended position) 49 <2> ; dword [_BASE + di - 8] = base (current table position) 50 <2> ; dword [es:si + piStart] = local partition start 51 <2> ; base + local start = absolute partition start 52 <2> ; _BASE -> bp value (dummy if _BASE is not bp), 53 <2> ; near return address of scan_partitions 54 <2> ; CHG: ax, (cx), dx, bx (unless part of _BASE) 55 <2> ; STT: ds => data segment (used for load_* variables, unless bp-based) 56 <2> ; Note: preserves (cx), si, di, ds, es, (bp), _BASE 57 <2> ; 58 <2> ; Note: If the function returns to scan_partitions, 59 <2> ; cx must be left as the function to call for 60 <2> ; subsequent partitions afterwards. 61 <2> ; Note: May load sp from _BASE then pop bp then return 62 <2> ; near if the scan should stop after the call. 63 <2> %[_SCANPTAB_PREFIX]scan_partitions: 64 00006BC1 8326[3C8F]00 <2> and word [ %[_SCANPTAB_PREFIX]load_partition_cycle], 0 65 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 66 <2> d4 asciz "In scan_partitions",13,10 67 <2> 68 00006BC6 55 <2> push bp 69 <2> %ifidn _BASE, ss:bx 70 <2> mov bx, sp 71 <2> %elifidn _BASE, bp 72 00006BC7 89E5 <2> mov bp, sp 73 <2> %endif 74 00006BC9 31FF <2> xor di, di 75 00006BCB 57 <2> push di ; [_BASE+di-2] 76 00006BCC 57 <2> push di ; [_BASE+di-4] 77 00006BCD 57 <2> push di ; [_BASE+di-6] 78 00006BCE 57 <2> push di ; [_BASE+di-8] 79 <2> 80 00006BCF 803E[508C]80 <2> cmp byte [ %[_SCANPTAB_PREFIX]load_unit], 80h 81 00006BD4 7325 <2> jae @F 82 <2> 83 00006BD6 57 <2> push di 84 00006BD7 51 <2> push cx 85 <2> %if _PARTITION_TABLE_IN_CS 86 <2> push cs 87 <2> %else 88 00006BD8 16 <2> push ss 89 <2> %endif 90 00006BD9 07 <2> pop es 91 00006BDA BF[108B] <2> mov di, %[_SCANPTAB_PREFIX]partition_table 92 00006BDD 31C0 <2> xor ax, ax 93 00006BDF B92000 <2> mov cx, (4 * 16) >> 1 94 00006BE2 F3AB <2> rep stosw ; initialise fake partition table 95 00006BE4 59 <2> pop cx 96 00006BE5 5F <2> pop di 97 00006BE6 BE[108B] <2> mov si, %[_SCANPTAB_PREFIX]partition_table 98 <2> ; -> fake PARTINFO 99 00006BE9 26C60480 <2> mov byte [es:si + piBoot], 80h ; fake primary active 100 00006BED 26C64404FF <2> mov byte [es:si + piType], 0FFh ; fake a type 101 00006BF2 C606[438F]00 <2> mov byte [ %[_SCANPTAB_PREFIX]load_current_partition], 0 ; special: 0 = diskette 102 <2> ; piLength is 0, too 103 00006BF7 FFD1 <2> call cx 104 <2> 105 00006BF9 EB66 <2> jmp %[_SCANPTAB_PREFIX]scan_logical.end 106 <2> 107 <2> 108 <2> @@: 109 00006BFB 31C0 <2> xor ax, ax 110 00006BFD 31D2 <2> xor dx, dx 111 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 112 <2> d4 asciz "In scan_partitions (before first call to read_partition_table)",13,10 113 00006BFF E8DA00 <2> call %[_SCANPTAB_PREFIX]read_partition_table 114 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 115 <2> d4 asciz "In scan_partitions (after first call to read_partition_table)",13,10 116 00006C02 BE[108B] <2> mov si, %[_SCANPTAB_PREFIX]partition_table 117 00006C05 8816[438F] <2> mov byte [ %[_SCANPTAB_PREFIX]load_current_partition], dl ; = 0 118 <2> .loop_primary_parts: 119 00006C09 FE06[438F] <2> inc byte [ %[_SCANPTAB_PREFIX]load_current_partition] 120 00006C0D 26807C0400 <2> cmp byte [es:si + piType], 0 121 00006C12 7402 <2> je .loop_primary_skip 122 00006C14 FFD1 <2> call cx ; es:si -> partition table entry 123 <2> ; byte [load_current_partition] = which 124 <2> .loop_primary_skip: 125 00006C16 83C610 <2> add si, 16 126 00006C19 81FE[508B] <2> cmp si, %[_SCANPTAB_PREFIX]partition_table.end 127 00006C1D 72EA <2> jb .loop_primary_parts 128 <2> 129 <2> %[_SCANPTAB_PREFIX]scan_logical: 130 <2> .: 131 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 132 <2> d4 asciz "In scan_logical.",13,10 133 00006C1F BE[108B] <2> mov si, %[_SCANPTAB_PREFIX]partition_table 134 <2> .loop: 135 00006C22 FF06[3C8F] <2> inc word [ %[_SCANPTAB_PREFIX]load_partition_cycle] 136 00006C26 7503E9A500 <2> jz .got_partition_cycle 137 <2> 138 00006C2B 268A4404 <2> mov al, [es:si + piType] 139 <2> 140 <2> %ifidn _BASE, bp 141 00006C2F 31DB <2> xor bx, bx 142 <2> %endif 143 00006C31 84C0 <2> test al, al 144 00006C33 741F <2> jz .next 145 00006C35 3C0F <2> cmp al, 0Fh ; extended partition (LBA aware) ? 146 00006C37 742C <2> je .push ; yes --> 147 00006C39 247F <2> and al, ~80h ; extended partition Linux (85h) ? 148 00006C3B 3C05 <2> cmp al, 05h ; or extended partition DOS (05h) ? 149 00006C3D 7426 <2> je .push ; yes --> 150 <2> 151 <2> %ifidn _BASE, bp 152 00006C3F 395BFE <2> cmp word [_BASE+di-2], bx 153 00006C42 7505 <2> jne .logical 154 00006C44 395BFC <2> cmp word [_BASE+di-4], bx 155 <2> %else 156 <2> cmp word [_BASE+di-2], 0 157 <2> jne .logical 158 <2> cmp word [_BASE+di-4], 0 159 <2> %endif 160 00006C47 740B <2> je .next 161 <2> .logical: 162 00006C49 FE06[438F] <2> inc byte [ %[_SCANPTAB_PREFIX]load_current_partition] 163 00006C4D 7503E98400 <2> jz .error_too_many_partitions 164 00006C52 FFD1 <2> call cx 165 <2> ; CHG: ax, (cx), dx, bx if _BASE = bp 166 <2> ; preserve: (cx), si, di, ds, es, bx if _BASE = ss:bx 167 <2> .next: 168 00006C54 83C610 <2> add si, 16 ; -> next partition table entry 169 00006C57 81FE[508B] <2> cmp si, %[_SCANPTAB_PREFIX]partition_table.end 170 <2> ; was last? 171 00006C5B 72C5 <2> jb .loop ; no, loop --> 172 00006C5D 85FF <2> test di, di ; still some on stack? 173 00006C5F 7546 <2> jnz .pop ; yes, pop 174 <2> .end: 175 <2> %ifidn _BASE, bp 176 00006C61 89EC <2> mov sp, bp ; restore sp 177 00006C63 5D <2> pop bp 178 <2> %else 179 <2> mov sp, bx ; restore sp 180 <2> pop ax ; (discard dummy bp value) 181 <2> %endif 182 00006C64 C3 <2> retn ; and bye 183 <2> 184 <2> .push: 185 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 186 <2> d4 asciz "In scan_logical.push",13,10 187 <2> 188 00006C65 56 <2> push si 189 <2> .push_check_empty_next: 190 00006C66 83C610 <2> add si, 16 ; -> next 191 00006C69 81FE[508B] <2> cmp si, %[_SCANPTAB_PREFIX]partition_table.end 192 <2> ; at end? 193 00006C6D 734A <2> jae .replace ; yes, no other partitions found, replace --> 194 00006C6F 26807C0400 <2> cmp byte [es:si + piType], 0 ; is this a partition? 195 00006C74 74F0 <2> je .push_check_empty_next ; no, check next --> 196 <2> ; found a partition after this, do push 197 <2> ; (possibly logical or another extended) 198 <2> .push_check_is_not_empty: 199 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 200 <2> d4 asciz "In scan_logical.push_check_is_not_empty",13,10 201 00006C76 5E <2> pop si ; restore -> partition table entry 202 00006C77 56 <2> push si ; stored at word [_BASE+di-10] 203 00006C78 83EF0A <2> sub di, 10 204 00006C7B FF7308 <2> push word [_BASE+di+10-2] 205 00006C7E FF7306 <2> push word [_BASE+di+10-4] ; copy root 206 <2> 207 00006C81 268B4408 <2> mov ax, word [es:si + piStart] 208 00006C85 268B540A <2> mov dx, word [es:si + piStart + 2] ; get extended partition offset 209 00006C89 0343FC <2> add ax, word [_BASE+di-4] 210 00006C8C 1353FE <2> adc dx, word [_BASE+di-2] ; add in root to get absolute sector number 211 <2> 212 00006C8F 52 <2> push dx 213 00006C90 50 <2> push ax ; new base 214 <2> 215 <2> .replace_common: 216 <2> %ifidn _BASE, bp 217 00006C91 395BFE <2> cmp word [_BASE+di-2], bx ; have a (nonzero) root? 218 00006C94 750B <2> jne .have_root 219 00006C96 395BFC <2> cmp word [_BASE+di-4], bx 220 <2> %else 221 <2> cmp word [_BASE+di-2], 0 ; have a (nonzero) root? 222 <2> jne .have_root 223 <2> cmp word [_BASE+di-4], 0 224 <2> %endif 225 00006C99 7506 <2> jne .have_root ; yes --> 226 <2> 227 00006C9B 8953FE <2> mov word [_BASE+di-2], dx 228 00006C9E 8943FC <2> mov word [_BASE+di-4], ax ; set root 229 <2> .have_root: 230 <2> 231 00006CA1 E83800 <2> call %[_SCANPTAB_PREFIX]read_partition_table 232 00006CA4 E978FF <2> jmp . 233 <2> 234 <2> .pop: 235 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 236 <2> d4 asciz "In scan_logical.pop",13,10 237 <2> 238 00006CA7 83C70A <2> add di, 10 239 00006CAA 83C408 <2> add sp, 8 240 00006CAD 5E <2> pop si 241 <2> 242 00006CAE 8B43F8 <2> mov ax, word [_BASE+di-8] 243 00006CB1 8B53FA <2> mov dx, word [_BASE+di-6] 244 00006CB4 E82500 <2> call %[_SCANPTAB_PREFIX]read_partition_table 245 00006CB7 EB9B <2> jmp .next 246 <2> 247 <2> .replace: 248 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 249 <2> d4 asciz "In scan_logical.replace",13,10 250 <2> 251 00006CB9 5E <2> pop si ; (discard) 252 00006CBA 268B4408 <2> mov ax, word [es:si + piStart] 253 00006CBE 268B540A <2> mov dx, word [es:si + piStart + 2] ; get extended partition offset 254 00006CC2 0343FC <2> add ax, word [_BASE+di - 4] 255 00006CC5 1353FE <2> adc dx, word [_BASE+di - 2] ; add in root 256 00006CC8 8943F8 <2> mov word [_BASE+di - 8], ax 257 00006CCB 8953FA <2> mov word [_BASE+di - 6], dx ; set base 258 <2> 259 00006CCE EBC1 <2> jmp .replace_common 260 <2> 261 <2> 262 <2> %if _BOOTCMD_FAIL_ERROR 263 <2> .got_partition_cycle: 264 00006CD0 BA[2461] <2> mov dx, msg.boot_partition_cycle_error 265 00006CD3 E943ED <2> jmp bootcmd.fail 266 <2> 267 <2> .error_too_many_partitions: 268 00006CD6 BA[0161] <2> mov dx, msg.boot_too_many_partitions_error 269 00006CD9 E93DED <2> jmp bootcmd.fail 270 <2> %endif 271 <2> 272 <2> 273 <2> ; if _PARTITION_TABLE_IN_CS: 274 <2> ; INP: dx:ax = partition table sector to read 275 <2> ; CHG: ax, dx 276 <2> ; OUT: es = cs 277 <2> ; 64 bytes [es:partition_table] = partition table 278 <2> ; does not return if error 279 <2> 280 <2> ; else: 281 <2> ; INP: dx:ax = partition table sector to read 282 <2> ; CHG: ax, dx 283 <2> ; OUT: es = ss 284 <2> ; 64 bytes [es:partition_table] = partition table 285 <2> ; does not return if error 286 <2> %[_SCANPTAB_PREFIX]read_partition_table: 287 00006CDC 53 <2> push bx 288 <2> %ifidn _BASE, bp 289 00006CDD 8B1E[2A0A] <2> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 290 <2> %else 291 <2> mov bx, word [bp + ldSectorSeg] 292 <2> %endif 293 00006CE1 E83B02 <2> call %[_SCANPTAB_PREFIX]read_ae_512_bytes 294 00006CE4 5B <2> pop bx 295 00006CE5 26813EFE0155AA <2> cmp word [es:510], 0AA55h 296 00006CEC 7518 <2> jne .signature_fail 297 00006CEE 1E <2> push ds 298 00006CEF 57 <2> push di 299 00006CF0 56 <2> push si 300 00006CF1 51 <2> push cx 301 00006CF2 06 <2> push es 302 00006CF3 1F <2> pop ds 303 00006CF4 BEBE01 <2> mov si, 510 - 4*16 ; ds:si -> partition table in sectorseg 304 <2> %if _PARTITION_TABLE_IN_CS 305 <2> push cs 306 <2> %else 307 00006CF7 16 <2> push ss 308 <2> %endif 309 00006CF8 07 <2> pop es 310 00006CF9 BF[108B] <2> mov di, %[_SCANPTAB_PREFIX]partition_table 311 <2> ; es:di -> cs:%[_SCANPTAB_PREFIX]partition_table 312 00006CFC B92000 <2> mov cx, 4*16 / 2 313 00006CFF F3A5 <2> rep movsw 314 00006D01 59 <2> pop cx 315 00006D02 5E <2> pop si 316 00006D03 5F <2> pop di 317 00006D04 1F <2> pop ds 318 00006D05 C3 <2> retn 319 <2> 320 <2> 321 <2> %if _BOOTCMD_FAIL_ERROR 322 <2> .signature_fail: 323 00006D06 BA[1060] <2> mov dx, msg.bootfail_sig_parttable 324 00006D09 E90DED <2> jmp bootcmd.fail 325 <2> %endif 3532 <1> 3533 <1> 3534 <1> ; INP: al = first character 3535 <1> ; si -> next 3536 <1> ; OUT: doesn't return if error 3537 <1> ; bx:dx = number read 3538 <1> ; al = character after the number 3539 <1> ; si -> next 3540 <1> ; CHG: cx, ax, di 3541 <1> boot_get_decimal_literal: 3542 00006D0C BA0A00 <1> mov dx, 10 ; set base: decimal 3543 <1> %if 1 3544 00006D0F B93940 <1> mov cx, '9' | (('A'-10-1 + 10) << 8) 3545 <1> %else 3546 <1> mov cl, dl 3547 <1> add cl, '0'-1 3548 <1> cmp cl, '9' 3549 <1> jbe .lit_basebelow11 3550 <1> mov cl, '9' 3551 <1> .lit_basebelow11: ; cl = highest decimal digit for base ('1'..'9') 3552 <1> mov ch, dl 3553 <1> add ch, 'A'-10-1 ; ch = highest letter for base ('A'-x..'Z') 3554 <1> %endif 3555 00006D12 EB06 <1> jmp @F 3556 <1> 3557 <1> 3558 <1> boot_get_hexadecimal_literal: 3559 00006D14 BA1000 <1> mov dx, 16 ; set base: hexadecimal 3560 <1> %if 1 3561 00006D17 B93946 <1> mov cx, '9' | (('A'-10-1 + 16) << 8) 3562 <1> %else 3563 <1> mov cl, dl 3564 <1> add cl, '0'-1 3565 <1> cmp cl, '9' 3566 <1> jbe .lit_basebelow11 3567 <1> mov cl, '9' 3568 <1> .lit_basebelow11: ; cl = highest decimal digit for base ('1'..'9') 3569 <1> mov ch, dl 3570 <1> add ch, 'A'-10-1 ; ch = highest letter for base ('A'-x..'Z') 3571 <1> %endif 3572 <1> 3573 <1> @@: 3574 00006D1A B400 <1> mov ah, 0 3575 00006D1C 31DB <1> xor bx, bx 3576 00006D1E 89D7 <1> mov di, dx ; di = base 3577 <1> 3578 00006D20 E87D3E <1> call getexpression.lit_isdigit? ; first character must be a digit 3579 00006D23 7241 <1> jc .err2 3580 00006D25 31D2 <1> xor dx, dx ; initialize value 3581 <1> .lit_loopdigit: 3582 00006D27 3C5F <1> cmp al, '_' 3583 00006D29 7432 <1> je .lit_skip 3584 00006D2B E8723E <1> call getexpression.lit_isdigit? ; was last character ? 3585 00006D2E 7230 <1> jc .lit_end ; yes --> 3586 00006D30 E88714 <1> call uppercase 3587 00006D33 2C30 <1> sub al, '0' 3588 00006D35 3C09 <1> cmp al, 9 ; was decimal digit ? 3589 00006D37 7602 <1> jbe .lit_decimaldigit ; yes --> 3590 00006D39 2C07 <1> sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 3591 <1> .lit_decimaldigit: 3592 00006D3B 50 <1> push ax 3593 00006D3C 89D0 <1> mov ax, dx 3594 00006D3E 53 <1> push bx 3595 00006D3F F7E7 <1> mul di ; multiply low word with base 3596 00006D41 89D3 <1> mov bx, dx 3597 00006D43 89C2 <1> mov dx, ax 3598 00006D45 58 <1> pop ax 3599 00006D46 52 <1> push dx 3600 00006D47 F7E7 <1> mul di ; multiply high word with base 3601 00006D49 85D2 <1> test dx, dx 3602 00006D4B 5A <1> pop dx 3603 00006D4C 7518 <1> jnz .err2 ; overflow --> 3604 00006D4E 01C3 <1> add bx, ax ; add them 3605 00006D50 58 <1> pop ax 3606 00006D51 7213 <1> jc .err2 ; overflow --> 3607 00006D53 00C2 <1> add dl, al ; add in the new digit 3608 00006D55 80D600 <1> adc dh, 0 3609 00006D58 83D300 <1> adc bx, byte 0 3610 00006D5B 7209 <1> jc .err2 ; overflow --> 3611 <1> 3612 <1> .lit_skip: 3613 00006D5D AC <1> lodsb 3614 00006D5E EBC7 <1> jmp short .lit_loopdigit 3615 <1> 3616 <1> .lit_end: 3617 00006D60 E89630 <1> call isseparator? ; after the number, there must be a separator 3618 00006D63 7501 <1> jne .err2 ; none here --> 3619 00006D65 C3 <1> retn 3620 <1> 3621 <1> .err2: 3622 00006D66 E9532B <1> jmp error 3623 <1> 3624 <1> 3625 <1> query_geometry: 3626 00006D69 E84898 <1> call guard_auxbuff 3627 00006D6C 8A16[508C] <1> mov dl, [load_unit] 3628 <1> ; test dl, dl ; floppy? 3629 <1> ; jns @F ; don't attempt query, might fail --> 3630 <1> ; Note that while the original PC BIOS doesn't support this function 3631 <1> ; (for its diskettes), it does properly return the error code 01h. 3632 <1> ; https://sites.google.com/site/pcdosretro/ibmpcbios (IBM PC version 1) 3633 00006D70 B408 <1> mov ah, 08h 3634 00006D72 31C9 <1> xor cx, cx ; initialise cl to 0 3635 00006D74 890E[2A8C] <1> mov [load_heads], cx 3636 00006D78 890E[288C] <1> mov [load_sectors], cx 3637 00006D7C F9 <1> stc ; initialise to CY 3638 00006D7D E83701 <1> call .int13_retry ; query drive geometry 3639 00006D80 720C <1> jc .try_bootsector ; apparently failed --> 3640 00006D82 88F2 <1> mov dl, dh 3641 00006D84 B600 <1> mov dh, 0 ; dx = maximum head number 3642 00006D86 42 <1> inc dx ; dx = number of heads (H is 0-based) 3643 00006D87 89C8 <1> mov ax, cx ; ax & 3Fh = maximum sector number 3644 00006D89 83E03F <1> and ax, 3Fh ; get sectors (number of sectors, S is 1-based) 3645 00006D8C 7523 <1> jnz .got_sectors_heads ; valid (S is 1-based), use these --> 3646 <1> ; zero = invalid 3647 <1> .try_bootsector: 3648 00006D8E 8E06[2A0A] <1> mov es, word [auxbuff_segorsel] ; es => auxbuff 3649 00006D92 31DB <1> xor bx, bx ; es:bx -> auxbuff 3650 00006D94 B80102 <1> mov ax, 0201h ; read sector, 1 sector 3651 00006D97 B90100 <1> mov cx, 1 ; sector 1 (1-based!), cylinder 0 (0-based) 3652 00006D9A B600 <1> mov dh, 0 ; head 0 (0-based) 3653 00006D9C 8A16[508C] <1> mov dl, [load_unit] 3654 00006DA0 F9 <1> stc 3655 00006DA1 E81301 <1> call .int13_retry 3656 00006DA4 7303E92B01 <1> jc .access_error 3657 <1> 3658 <1> ; note: the smallest supported sector size, 32 bytes, 3659 <1> ; does contain these entries (offset 18h and 1Ah in sector) 3660 <1> ; within the first BPB sector. 3661 00006DA9 268B4718 <1> mov ax, word [es:bx + bsBPB + bpbCHSSectors] 3662 00006DAD 268B571A <1> mov dx, word [es:bx + bsBPB + bpbCHSHeads] 3663 <1> 3664 <1> .got_sectors_heads: 3665 00006DB1 A3[288C] <1> mov word [load_sectors], ax 3666 00006DB4 8916[2A8C] <1> mov word [load_heads], dx 3667 <1> 3668 00006DB8 85C0 <1> test ax, ax 3669 00006DBA 7503E93B01 <1> jz .invalid_sectors 3670 00006DBF 83F83F <1> cmp ax, 63 3671 00006DC2 7603E93301 <1> ja .invalid_sectors 3672 00006DC7 85D2 <1> test dx, dx 3673 00006DC9 7503E93301 <1> jz .invalid_heads 3674 00006DCE 81FA0001 <1> cmp dx, 100h 3675 00006DD2 7603E92A01 <1> ja .invalid_heads 3676 <1> 3677 00006DD7 8E06[2A0A] <1> mov es, word [auxbuff_segorsel] ; es => auxbuff 3678 00006DDB 31DB <1> xor bx, bx ; es:bx -> auxbuff 3679 00006DDD 31C0 <1> xor ax, ax 3680 <1> 3681 <1> %if _AUXBUFFSIZE < 8192+2 3682 <1> %error Expecting to use auxbuff as sector size detection buffer 3683 <1> %endif 3684 <1> 3685 <1> d5 call d5dumpregs 3686 <1> d5 call d5message 3687 <1> d5 asciz 13,10,"In query_geometry 0",13,10 3688 <1> 3689 00006DDF 89DF <1> mov di, bx 3690 00006DE1 B90110 <1> mov cx, (8192 + 2) >> 1 3691 <1> ; es:bx -> auxbuff, es:di = same 3692 00006DE4 F3AB <1> rep stosw ; fill buffer, di -> behind (auxbuff+8192+2) 3693 00006DE6 B80102 <1> mov ax, 0201h ; read sector, 1 sector 3694 00006DE9 41 <1> inc cx ; sector 1 (1-based!), cylinder 0 (0-based) 3695 00006DEA B600 <1> mov dh, 0 ; head 0 (0-based) 3696 00006DEC 8A16[508C] <1> mov dl, [load_unit] 3697 00006DF0 F9 <1> stc 3698 00006DF1 E8C300 <1> call .int13_retry 3699 00006DF4 7303E9DB00 <1> jc .access_error 3700 <1> 3701 00006DF9 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND does not apply 3702 00006DFA AF <1> scasw ; -> auxbuff+8192 (at last word to sca) 3703 <1> d5 call d5dumpregs 3704 <1> d5 call d5message 3705 <1> d5 asciz 13,10,"In query_geometry 1",13,10 3706 00006DFB B90110 <1> mov cx, (8192 + 2) >> 1 3707 00006DFE 31C0 <1> xor ax, ax 3708 00006E00 F3AF <1> repe scasw 3709 00006E02 83C704 <1> add di, 4 ; di -> first differing byte (from top) 3710 00006E05 FC <1> cld 3711 00006E06 57 <1> push di 3712 <1> 3713 00006E07 89DF <1> mov di, bx 3714 00006E09 B90110 <1> mov cx, (8192 + 2) >> 1 3715 00006E0C 48 <1> dec ax ; = FFFFh 3716 00006E0D F3AB <1> rep stosw 3717 <1> 3718 00006E0F B80102 <1> mov ax, 0201h 3719 00006E12 41 <1> inc cx 3720 00006E13 B600 <1> mov dh, 0 3721 00006E15 8A16[508C] <1> mov dl, [load_unit] 3722 00006E19 F9 <1> stc 3723 00006E1A E89A00 <1> call .int13_retry 3724 00006E1D 7303E9B200 <1> jc .access_error 3725 <1> 3726 00006E22 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND does not apply 3727 00006E23 AF <1> scasw ; di -> auxbuff+8192 (last word to sca) 3728 <1> d5 call d5dumpregs 3729 <1> d5 call d5message 3730 <1> d5 asciz 13,10,"In query_geometry 2",13,10 3731 00006E24 5A <1> pop dx 3732 00006E25 B8FFFF <1> mov ax, -1 3733 00006E28 B90110 <1> mov cx, (8192 + 2) >> 1 3734 00006E2B F3AF <1> repe scasw 3735 <1> %if 0 3736 <1> AAAB 3737 <1> ^ 3738 <1> sca B, match 3739 <1> ^ 3740 <1> sca B, mismatch 3741 <1> ^ 3742 <1> stop 3743 <1> %endif 3744 00006E2D 83C704 <1> add di, 4 ; di -> first differing byte (from top) 3745 00006E30 FC <1> cld 3746 <1> 3747 <1> %if 0 3748 <1> 0000000000000 3749 <1> AAAAAAAA00000 3750 <1> ^ 3751 <1> FFFFFFFFFFFFF 3752 <1> AAAAAAAA00FFF 3753 <1> ^ 3754 <1> %endif 3755 00006E31 39FA <1> cmp dx, di ; choose the higher one 3756 00006E33 7302 <1> jae @F 3757 00006E35 89FA <1> mov dx, di 3758 <1> @@: 3759 00006E37 29DA <1> sub dx, bx ; dx = sector size 3760 <1> 3761 <1> d5 call d5dumpregs 3762 <1> d5 call d5message 3763 <1> d5 asciz 13,10,"In query_geometry 3",13,10 3764 <1> 3765 00006E39 81FA0220 <1> cmp dx, 8192 + 2 3766 00006E3D 7203E9A300 <1> jae .sector_too_large 3767 00006E42 B82000 <1> mov ax, 32 3768 00006E45 39C2 <1> cmp dx, ax 3769 00006E47 7303E9A000 <1> jb .sector_too_small 3770 <1> @@: 3771 00006E4C 39C2 <1> cmp dx, ax 3772 00006E4E 740C <1> je .got_match 3773 00006E50 3D0020 <1> cmp ax, 8192 3774 00006E53 7203E99B00 <1> jae .sector_not_power 3775 00006E58 D1E0 <1> shl ax, 1 3776 00006E5A EBF0 <1> jmp @B 3777 <1> 3778 <1> .got_match: 3779 00006E5C A3[1B8C] <1> mov word [load_sectorsize], ax 3780 00006E5F B104 <1> mov cl, 4 3781 00006E61 D3E8 <1> shr ax, cl 3782 00006E63 A3[FA8B] <1> mov word [load_sectorsizepara], ax 3783 <1> 3784 00006E66 C606[F78B]00 <1> mov byte [load_ldflags], 0 3785 00006E6B 8A16[508C] <1> mov dl, [load_unit] 3786 00006E6F 31DB <1> xor bx, bx 3787 00006E71 88D3 <1> mov bl, dl 3788 00006E73 F687[108A]01 <1> testopt [load_unit_flags + bx], lufForceCHS 3789 00006E78 7519 <1> jnz .no_lba 3790 00006E7A B441 <1> mov ah, 41h 3791 00006E7C BBAA55 <1> mov bx, 55AAh 3792 00006E7F F9 <1> stc 3793 00006E80 CD13 <1> int 13h ; 13.41.bx=55AA extensions installation check 3794 00006E82 720F <1> jc .no_lba 3795 00006E84 81FB55AA <1> cmp bx, 0AA55h 3796 00006E88 7509 <1> jne .no_lba 3797 00006E8A F6C101 <1> test cl, 1 ; support bitmap bit 0 3798 00006E8D 7404 <1> jz .no_lba 3799 <1> 3800 <1> %if ldfHasLBA != 1 3801 <1> %error Assuming ldfHasLBA is 1 3802 <1> %endif 3803 00006E8F FE06[F78B] <1> inc byte [load_ldflags] 3804 <1> .no_lba: 3805 <1> 3806 00006E93 A1[2A0A] <1> mov ax, word [auxbuff_segorsel] ; ax => auxbuff 3807 00006E96 89C2 <1> mov dx, ax 3808 00006E98 81C2FF01 <1> add dx, (8192 - 16) >> 4 3809 00006E9C 89C3 <1> mov bx, ax 3810 00006E9E 89D1 <1> mov cx, dx 3811 00006EA0 81E300F0 <1> and bx, 0F000h 3812 00006EA4 81E100F0 <1> and cx, 0F000h 3813 00006EA8 39D9 <1> cmp cx, bx 3814 00006EAA 7504 <1> jne @F 3815 00006EAC A3[F48B] <1> mov word [load_sectorseg], ax 3816 00006EAF C3 <1> retn 3817 <1> 3818 <1> @@: 3819 00006EB0 BA[1463] <1> mov dx, msg.boot_auxbuff_crossing 3820 00006EB3 B020 <1> mov al, 20h 3821 00006EB5 EB4F <1> jmp .error_common_j 3822 <1> 3823 <1> 3824 <1> .int13_retry: 3825 00006EB7 9C <1> pushf 3826 00006EB8 50 <1> push ax 3827 00006EB9 CD13 <1> int 13h ; first try 3828 00006EBB 730B <1> jnc @F ; NC, success on first attempt --> 3829 <1> 3830 <1> ; reset drive 3831 00006EBD 31C0 <1> xor ax, ax 3832 00006EBF CD13 <1> int 13h 3833 00006EC1 7205 <1> jc @F ; CY, reset failed, error in ah --> 3834 <1> 3835 <1> ; try read again 3836 00006EC3 58 <1> pop ax ; restore function number 3837 00006EC4 9D <1> popf ; CF 3838 00006EC5 CD13 <1> int 13h ; retry, CF error status, ah error number 3839 00006EC7 C3 <1> retn 3840 <1> 3841 <1> @@: ; NC or CY, stack has function number 3842 00006EC8 44 <1> inc sp 3843 00006EC9 44 <1> inc sp 3844 00006ECA 44 <1> inc sp 3845 00006ECB 44 <1> inc sp ; discard two words on stack, preserve CF 3846 00006ECC C3 <1> retn 3847 <1> 3848 <1> 3849 <1> .out_of_memory_error: 3850 00006ECD BA[F060] <1> mov dx, msg.boot_out_of_memory_error 3851 00006ED0 B021 <1> mov al, 21h 3852 00006ED2 EB32 <1> jmp .error_common_j 3853 <1> .access_error: 3854 <1> %if _INPUT_FILE_BOOT 3855 00006ED4 F606[CF00]08 <1> testopt [internalflags3], dif3_in_if 3856 00006ED9 7403E9C516 <1> jnz if_exists_not_found 3857 <1> %endif 3858 00006EDE BA[5D61] <1> mov dx, msg.boot_access_error 3859 00006EE1 B022 <1> mov al, 22h 3860 00006EE3 EB21 <1> jmp .error_common_j 3861 <1> .sector_too_large: 3862 00006EE5 BA[6B61] <1> mov dx, msg.boot_sector_too_large 3863 00006EE8 B023 <1> mov al, 23h 3864 00006EEA EB1A <1> jmp .error_common_j 3865 <1> .sector_too_small: 3866 00006EEC BA[9161] <1> mov dx, msg.boot_sector_too_small 3867 00006EEF B024 <1> mov al, 24h 3868 00006EF1 EB13 <1> jmp .error_common_j 3869 <1> .sector_not_power: 3870 00006EF3 BA[B961] <1> mov dx, msg.boot_sector_not_power 3871 00006EF6 B025 <1> mov al, 25h 3872 00006EF8 EB0C <1> jmp .error_common_j 3873 <1> .invalid_sectors: 3874 00006EFA BA[DB61] <1> mov dx, msg.boot_invalid_sectors 3875 00006EFD B026 <1> mov al, 26h 3876 00006EFF EB05 <1> jmp .error_common_j 3877 <1> .invalid_heads: 3878 00006F01 BA[F761] <1> mov dx, msg.boot_invalid_heads 3879 00006F04 B027 <1> mov al, 27h 3880 <1> .error_common_j: 3881 00006F06 B402 <1> mov ah, 02h 3882 00006F08 E8F829 <1> call setrc 3883 00006F0B E90BEB <1> jmp bootcmd.fail 3884 <1> 3885 <1> 3886 <1> ; INP: dx:ax = first sector 3887 <1> ; bx:0 -> buffer 3888 <1> ; OUT: dx:ax = sector number after last read 3889 <1> ; es = input bx 3890 <1> ; bx:0 -> buffer after last written 3891 <1> ; CHG: - 3892 <1> ; STT: ds = ss 3893 <1> read_ae_1536_bytes: 3894 00006F0E 51 <1> push cx 3895 00006F0F 53 <1> push bx 3896 00006F10 B90006 <1> mov cx, 1536 3897 <1> .loop: 3898 00006F13 E81B00 <1> call read_sector 3899 00006F16 2B0E[1B8C] <1> sub cx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 3900 00006F1A 77F7 <1> ja .loop 3901 00006F1C 07 <1> pop es 3902 00006F1D 59 <1> pop cx 3903 00006F1E C3 <1> retn 3904 <1> 3905 <1> ; INP: dx:ax = first sector 3906 <1> ; bx:0 -> buffer 3907 <1> ; OUT: dx:ax = sector number after last read 3908 <1> ; es = input bx 3909 <1> ; bx:0 -> buffer after last written 3910 <1> ; CHG: - 3911 <1> ; STT: ds = ss 3912 <1> read_ae_512_bytes: 3913 00006F1F 51 <1> push cx 3914 00006F20 53 <1> push bx 3915 00006F21 B90002 <1> mov cx, 512 3916 <1> .loop: 3917 00006F24 E80A00 <1> call read_sector 3918 00006F27 2B0E[1B8C] <1> sub cx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 3919 00006F2B 77F7 <1> ja .loop 3920 00006F2D 07 <1> pop es 3921 00006F2E 59 <1> pop cx 3922 00006F2F C3 <1> retn 3923 <1> 3924 <1> 3925 <1> ; Write a sector using Int13.03 or Int13.43 3926 <1> ; 3927 <1> ; Protocol as for read_sector 3928 <1> write_sector: 3929 00006F30 A8 <1> db __TEST_IMM8 ; (skip stc, NC) 3930 <1> 3931 <1> ; Read a sector using Int13.02 or Int13.42 3932 <1> ; 3933 <1> ; INP: dx:ax = sector number (within partition) 3934 <1> ; bx:0-> buffer 3935 <1> ; (_LBA) ds = ss 3936 <1> ; dword[load_data - LOADDATA2 + bsBPB + bpbHiddenSectors] 3937 <1> ; = base sector number (dx:ax is added to this to get 3938 <1> ; the absolute sector number in the selected unit.) 3939 <1> ; OUT: If unable to read, 3940 <1> ; ! jumps to error instead of returning 3941 <1> ; If sector has been read, 3942 <1> ; dx:ax = next sector number (has been incremented) 3943 <1> ; bx:0-> next buffer (bx = es+word[load_sectorsizepara]) 3944 <1> ; es = input bx 3945 <1> ; CHG: - 3946 <1> ; 3947 <1> ; Note: If error 09h (data boundary error) is returned, 3948 <1> ; the read is done into the load_sectorseg buffer, 3949 <1> ; then copied into the user buffer. 3950 <1> read_sector: 3951 00006F31 F9 <1> stc 3952 <1> 3953 <1> read_sector_CY_or_write_sector_NC: 3954 <1> lframe near 3955 00006F32 5589E5 <1> lenter 3956 <1> lvar word, is_read_bit0 3957 00006F35 9C <1> pushf 3958 <1> 3959 <1> .err: equ bootcmd.fail_read 3960 <1> d5 call d5dumpregs 3961 <1> d5 call d5message 3962 <1> d5 asciz 13,10,"In read_sector",13,10 3963 <1> 3964 00006F36 52 <1> push dx 3965 00006F37 51 <1> push cx 3966 00006F38 50 <1> push ax 3967 00006F39 56 <1> push si 3968 <1> 3969 00006F3A 53 <1> push bx 3970 <1> 3971 <1> ; DX:AX==LBA sector number 3972 <1> ; add partition start (= number of hidden sectors) 3973 00006F3B 0306[2C8C] <1> add ax,[load_data - LOADDATA2 + bsBPB + bpbHiddenSectors + 0] 3974 00006F3F 1316[2E8C] <1> adc dx,[load_data - LOADDATA2 + bsBPB + bpbHiddenSectors + 2] 3975 <1> 3976 00006F43 19F6 <1> sbb si, si ; -1 if was CY, 0 else 3977 00006F45 F7DE <1> neg si ; 1 if was CY, 0 else 3978 00006F47 31C9 <1> xor cx, cx 3979 00006F49 51 <1> push cx 3980 00006F4A 56 <1> push si ; bit 32 = 1 if operating in 33-bit space 3981 00006F4B 52 <1> push dx 3982 00006F4C 50 <1> push ax ; qword sector number (lpSector) 3983 00006F4D 53 <1> push bx 3984 00006F4E 51 <1> push cx ; bx:0 -> buffer (lpBuffer) 3985 00006F4F 41 <1> inc cx 3986 00006F50 51 <1> push cx ; word number of sectors to read (lpCount) 3987 00006F51 B110 <1> mov cl, 10h 3988 00006F53 51 <1> push cx ; word size of disk address packet (lpSize) 3989 00006F54 89E6 <1> mov si, sp ; ds:si -> disk address packet (on stack) 3990 <1> 3991 00006F56 F606[F78B]01 <1> test byte [load_data - LOADDATA2 + ldFlags], ldfHasLBA 3992 00006F5B 7503E9BB00 <1> jz .no_lba 3993 <1> 3994 <1> d5 call d5message 3995 <1> d5 asciz "In read_sector.lba",13,10 3996 <1> 3997 00006F60 8A16[508C] <1> mov dl, byte [load_unit] 3998 00006F64 E89A01 <1> call .set_ah_function_42_or_43 3999 00006F67 CD13 <1> int 13h ; 13.42 extensions read 4000 00006F69 7203E9A600 <1> jnc .lba_done 4001 <1> 4002 00006F6E 31C0 <1> xor ax, ax 4003 00006F70 CD13 <1> int 13h 4004 00006F72 7303E990EA <1> jc .lba_error 4005 <1> 4006 <1> ; have to reset the LBAPACKET's lpCount, as the handler may 4007 <1> ; set it to "the number of blocks successfully transferred". 4008 <1> ; (in any case, the high byte is still zero.) 4009 00006F77 C6440201 <1> mov byte [si + lpCount], 1 4010 <1> 4011 00006F7B E88301 <1> call .set_ah_function_42_or_43 4012 00006F7E CD13 <1> int 13h 4013 00006F80 7203E98F00 <1> jnc .lba_done 4014 <1> 4015 00006F85 80FC09 <1> cmp ah, 9 ; data boundary error? 4016 00006F88 7403E97AEA <1> jne .lba_error 4017 <1> 4018 <1> .lba_sectorseg: 4019 <1> d4 call d4dumpregs 4020 <1> d4 call d4message 4021 <1> d4 asciz 13,10,"In read_sector.lba_sectorseg",13,10 4022 <1> 4023 00006F8D F646FE01 <1> test byte [bp + ?is_read_bit0], 1 4024 00006F91 7542 <1> jnz .lba_sectorseg_read 4025 <1> 4026 <1> .lba_sectorseg_write: 4027 00006F93 1E <1> push ds 4028 00006F94 56 <1> push si 4029 00006F95 06 <1> push es 4030 00006F96 57 <1> push di 4031 00006F97 8B0E[1B8C] <1> mov cx, word [load_sectorsize] 4032 00006F9B 8E06[F48B] <1> mov es, word [load_sectorseg] ; => sectorseg 4033 <1> ; lds si, [si + lpBuffer + 0] 4034 00006F9F 8E5C06 <1> mov ds, word [si + lpBuffer + 2]; => user buffer 4035 00006FA2 31F6 <1> xor si, si 4036 00006FA4 31FF <1> xor di, di 4037 00006FA6 F3A4 <1> rep movsb ; copy data into sectorseg 4038 00006FA8 5F <1> pop di 4039 00006FA9 07 <1> pop es 4040 00006FAA 5E <1> pop si 4041 00006FAB 1F <1> pop ds 4042 <1> 4043 00006FAC FF36[F48B] <1> push word [load_sectorseg] 4044 00006FB0 8F4406 <1> pop word [si + lpBuffer + 2] ; => sectorseg 4045 <1> ; and word [si + lpBuffer + 0], byte 0 4046 <1> 4047 00006FB3 C6440201 <1> mov byte [si + lpCount], 1 4048 00006FB7 B443 <1> mov ah, 43h 4049 00006FB9 CD13 <1> int 13h 4050 00006FBB 7316 <1> jnc @F 4051 <1> 4052 00006FBD 31C0 <1> xor ax, ax 4053 00006FBF CD13 <1> int 13h 4054 00006FC1 7303E941EA <1> jc .lba_error 4055 <1> 4056 00006FC6 C6440201 <1> mov byte [si + lpCount], 1 4057 00006FCA B443 <1> mov ah, 43h 4058 00006FCC CD13 <1> int 13h 4059 00006FCE 7303E934EA <1> jc .lba_error 4060 <1> @@: 4061 00006FD3 EB3F <1> jmp .lba_done 4062 <1> 4063 <1> 4064 <1> .lba_sectorseg_read: 4065 <1> ; the offset part of the pointer is already zero! 4066 <1> ; push word [si + lpBuffer + 0] 4067 00006FD5 FF7406 <1> push word [si + lpBuffer + 2] ; user buffer 4068 00006FD8 FF36[F48B] <1> push word [load_sectorseg] 4069 00006FDC 8F4406 <1> pop word [si + lpBuffer + 2] 4070 <1> ; and word [si + lpBuffer + 0], byte 0 4071 <1> 4072 00006FDF C6440201 <1> mov byte [si + lpCount], 1 4073 00006FE3 E81B01 <1> call .set_ah_function_42_or_43 4074 00006FE6 CD13 <1> int 13h 4075 00006FE8 7317 <1> jnc .lba_sectorseg_done 4076 <1> 4077 00006FEA 31C0 <1> xor ax, ax 4078 00006FEC CD13 <1> int 13h 4079 00006FEE 7303E914EA <1> jc .lba_error 4080 <1> 4081 00006FF3 C6440201 <1> mov byte [si + lpCount], 1 4082 00006FF7 E80701 <1> call .set_ah_function_42_or_43 4083 00006FFA CD13 <1> int 13h 4084 00006FFC 7303E906EA <1> jc .lba_error 4085 <1> .lba_sectorseg_done: 4086 <1> 4087 00007001 31F6 <1> xor si, si 4088 00007003 8E1E[F48B] <1> mov ds, word [load_sectorseg] 4089 00007007 07 <1> pop es 4090 <1> ; pop cx 4091 00007008 57 <1> push di 4092 <1> ; mov di, cx 4093 00007009 31FF <1> xor di, di 4094 0000700B 8B0E[1B8C] <1> mov cx, word [load_sectorsize] 4095 0000700F F3A4 <1> rep movsb 4096 00007011 5F <1> pop di 4097 <1> 4098 00007012 16 <1> push ss 4099 00007013 1F <1> pop ds 4100 <1> .lba_done: 4101 00007014 83C410 <1> add sp, 10h 4102 00007017 5B <1> pop bx 4103 00007018 E9D400 <1> jmp .chs_done 4104 <1> 4105 <1> .lba_error: equ .err 4106 <1> 4107 <1> .no_lba: 4108 0000701B 83C408 <1> add sp, 8 4109 0000701E 58 <1> pop ax 4110 0000701F 5A <1> pop dx 4111 00007020 5E <1> pop si 4112 00007021 59 <1> pop cx 4113 00007022 85F6 <1> test si, si 4114 00007024 7403E9DEE9 <1> jnz .err 4115 <1> 4116 <1> ; DX:AX=LBA sector number 4117 <1> ; divide by number of sectors per track to get sector number 4118 <1> ; Use 32:16 DIV instead of 64:32 DIV for 8088 compatability 4119 <1> ; Use two-step 32:16 divide to avoid overflow 4120 00007029 89C1 <1> mov cx,ax 4121 0000702B 89D0 <1> mov ax,dx 4122 0000702D 31D2 <1> xor dx,dx 4123 0000702F F736[288C] <1> div word [load_sectors] 4124 00007033 91 <1> xchg cx,ax 4125 00007034 F736[288C] <1> div word [load_sectors] 4126 00007038 87CA <1> xchg cx,dx 4127 <1> 4128 <1> ; DX:AX=quotient, CX=remainder=sector (S) - 1 4129 <1> ; divide quotient by number of heads 4130 0000703A 89C3 <1> mov bx, ax 4131 0000703C 92 <1> xchg ax, dx 4132 0000703D 31D2 <1> xor dx, dx 4133 0000703F F736[2A8C] <1> div word [load_heads] 4134 00007043 93 <1> xchg bx, ax 4135 00007044 F736[2A8C] <1> div word [load_heads] 4136 <1> 4137 <1> ; bx:ax=quotient=cylinder (C), dx=remainder=head (H) 4138 <1> ; move variables into registers for INT 13h AH=02h 4139 00007048 88D6 <1> mov dh, dl ; dh = head 4140 0000704A 41 <1> inc cx ; cl5:0 = sector 4141 0000704B 86E8 <1> xchg ch, al ; ch = cylinder 7:0, al = 0 4142 0000704D D1E8 <1> shr ax, 1 4143 0000704F D1E8 <1> shr ax, 1 ; al7:6 = cylinder 9:8 4144 <1> ; bx has bits set iff it's > 0, indicating a cylinder >= 65536. 4145 00007051 08FB <1> or bl, bh ; collect set bits from bh 4146 00007053 08C1 <1> or cl, al ; cl7:6 = cylinder 9:8 4147 <1> ; ah has bits set iff it was >= 4, indicating a cylinder >= 1024. 4148 00007055 08E3 <1> or bl, ah ; collect set bits from ah 4149 00007057 8A16[508C] <1> mov dl, [load_unit] 4150 <1> ; dl = drive 4151 0000705B B404 <1> mov ah, 04h ; error number: sector not found 4152 0000705D 7403E9A5E9 <1> jnz .err ; error if cylinder >= 1024 --> 4153 <1> ; ! bx = 0 (for 13.02 call) 4154 <1> 4155 <1> ; we call INT 13h AH=02h once for each sector. Multi-sector reads 4156 <1> ; may fail if we cross a track or 64K boundary 4157 00007062 07 <1> pop es 4158 <1> 4159 00007063 BE1100 <1> mov si, 16 + 1 4160 <1> .loop_chs_retry_repeat: 4161 00007066 E8A300 <1> call .set_ax_function_0201_or_0301 4162 00007069 CD13 <1> int 13h ; read one sector 4163 0000706B 7203E97D00 <1> jnc .done 4164 00007070 50 <1> push ax 4165 00007071 31C0 <1> xor ax, ax 4166 00007073 CD13 <1> int 13h ; reset disk 4167 00007075 58 <1> pop ax 4168 00007076 4E <1> dec si ; another attempt ? 4169 00007077 75ED <1> jnz .loop_chs_retry_repeat ; yes --> 4170 <1> 4171 00007079 80FC09 <1> cmp ah, 9 ; data boundary error? 4172 0000707C 7403E986E9 <1> jne .err 4173 <1> 4174 <1> .chs_sectorseg: 4175 <1> d4 call d4dumpregs 4176 <1> d4 call d4message 4177 <1> d4 asciz 13,10,"In read_sector.chs_sectorseg",13,10 4178 <1> 4179 00007081 F646FE01 <1> test byte [bp + ?is_read_bit0], 1 4180 00007085 7534 <1> jnz .chs_sectorseg_read 4181 <1> 4182 <1> .chs_sectorseg_write: 4183 00007087 06 <1> push es 4184 <1> 4185 00007088 1E <1> push ds 4186 00007089 57 <1> push di 4187 0000708A 51 <1> push cx 4188 0000708B 8B0E[1B8C] <1> mov cx, word [load_sectorsize] 4189 0000708F 06 <1> push es 4190 00007090 8E06[F48B] <1> mov es, word [load_sectorseg] ; => sectorseg 4191 00007094 1F <1> pop ds ; => user buffer 4192 00007095 31F6 <1> xor si, si 4193 00007097 31FF <1> xor di, di 4194 00007099 F3A4 <1> rep movsb ; copy data into sectorseg 4195 0000709B 59 <1> pop cx 4196 0000709C 5F <1> pop di 4197 0000709D 1F <1> pop ds 4198 <1> 4199 0000709E B80103 <1> mov ax, 0301h 4200 000070A1 CD13 <1> int 13h 4201 000070A3 7313 <1> jnc @F 4202 <1> 4203 000070A5 31C0 <1> xor ax, ax 4204 000070A7 CD13 <1> int 13h 4205 000070A9 7303E959E9 <1> jc .err 4206 <1> 4207 000070AE B80103 <1> mov ax, 0301h 4208 000070B1 CD13 <1> int 13h 4209 000070B3 7303E94FE9 <1> jc .err 4210 <1> @@: 4211 000070B8 5B <1> pop bx 4212 000070B9 EB34 <1> jmp .chs_done 4213 <1> 4214 <1> 4215 <1> .chs_sectorseg_read: 4216 <1> 4217 000070BB 06 <1> push es ; user buffer 4218 000070BC 8E06[F48B] <1> mov es, word [load_sectorseg] 4219 <1> 4220 000070C0 E84900 <1> call .set_ax_function_0201_or_0301 4221 000070C3 CD13 <1> int 13h 4222 000070C5 7313 <1> jnc .chs_sectorseg_done 4223 <1> 4224 000070C7 31C0 <1> xor ax, ax 4225 000070C9 CD13 <1> int 13h 4226 000070CB 7303E937E9 <1> jc .err 4227 <1> 4228 000070D0 E83900 <1> call .set_ax_function_0201_or_0301 4229 000070D3 CD13 <1> int 13h 4230 000070D5 7303E92DE9 <1> jc .err 4231 <1> .chs_sectorseg_done: 4232 <1> 4233 000070DA 31F6 <1> xor si, si 4234 000070DC 8E1E[F48B] <1> mov ds, word [load_sectorseg] 4235 000070E0 07 <1> pop es 4236 000070E1 57 <1> push di 4237 000070E2 31FF <1> xor di, di 4238 000070E4 8B0E[1B8C] <1> mov cx, word [load_sectorsize] 4239 000070E8 F3A4 <1> rep movsb 4240 000070EA 5F <1> pop di 4241 <1> 4242 000070EB 16 <1> push ss 4243 000070EC 1F <1> pop ds 4244 <1> .done: 4245 <1> ; increment segment 4246 000070ED 8CC3 <1> mov bx, es 4247 <1> 4248 <1> .chs_done: 4249 000070EF 8EC3 <1> mov es, bx 4250 000070F1 031E[FA8B] <1> add bx, word [load_sectorsizepara] 4251 <1> 4252 000070F5 5E <1> pop si 4253 000070F6 58 <1> pop ax 4254 000070F7 59 <1> pop cx 4255 000070F8 5A <1> pop dx 4256 <1> ; increment LBA sector number 4257 000070F9 40 <1> inc ax 4258 000070FA 7501 <1> jne @F 4259 000070FC 42 <1> inc dx 4260 <1> @@: 4261 000070FD 89EC5D <1> lleave code 4262 00007100 C3 <1> retn 4263 <1> 4264 <1> .set_ah_function_42_or_43: 4265 00007101 B442 <1> mov ah, 42h 4266 00007103 F646FE01 <1> test byte [bp + ?is_read_bit0], 1 4267 00007107 7502 <1> jnz @F 4268 00007109 B443 <1> mov ah, 43h 4269 <1> @@: 4270 0000710B C3 <1> retn 4271 <1> 4272 <1> .set_ax_function_0201_or_0301: 4273 0000710C B001 <1> mov al, 1 4274 <1> .set_ah_function_02_or_03: 4275 0000710E B402 <1> mov ah, 02h 4276 00007110 F646FE01 <1> test byte [bp + ?is_read_bit0], 1 4277 00007114 7502 <1> jnz @F 4278 00007116 B403 <1> mov ah, 03h 4279 <1> @@: 4280 00007118 C3 <1> retn 4281 <1> 4282 <1> lleave ctx 4283 <1> 4284 <1> 4285 <1> %if _INPUT_FILE_BOOT 4286 <1> yy_boot: 4287 00007119 E82AE4 <1> call init_bootcmd 4288 <1> 4289 0000711C E8F9EA <1> call parseloadunit_default_sdp 4290 0000711F 7510 <1> jnz .have_filename 4291 <1> 4292 00007121 BA[6C6F] <1> mov dx, msg.yy_requires_filename 4293 <1> .disp_error_1: 4294 00007124 B80002 <1> mov ax, 0200h 4295 00007127 E8D927 <1> call setrc 4296 0000712A E8CD40 <1> call putsz_error 4297 0000712D FF26[D20A] <1> jmp near word [errret] 4298 <1> 4299 <1> .have_filename: 4300 00007131 F606[CB00]02 <1> testopt [internalflags2], dif2_input_file_boot 4301 00007136 740C <1> jz @F 4302 00007138 833E[308F]03 <1> cmp word [load_input_file.active], _INPUT_FILE_BOOT - 1 4303 0000713D 7205 <1> jb @F 4304 <1> 4305 0000713F BA[AC6F] <1> mov dx, msg.yy_too_many_handles 4306 00007142 EBE0 <1> jmp .disp_error_1 4307 <1> @@: 4308 <1> 4309 <1> ; al was = '/' or '\' or first pathname's first character 4310 <1> ; si-> next char 4311 00007144 3C3A <1> cmp al, ':' 4312 00007146 751F <1> jne .not_yy_goto_subfunction 4313 <1> 4314 00007148 F606[CB00]02 <1> testopt [internalflags2], dif2_input_file_boot 4315 0000714D 7413 <1> jz @F 4316 <1> 4317 0000714F E8503C <1> call skipwhite 4318 00007152 4E <1> dec si 4319 00007153 8936[328F] <1> mov word [load_input_file.goto_offset], si 4320 <1> 4321 00007157 E8F402 <1> call yy_boot_get 4322 0000715A 800E[CC00]80 <1> setopt [internalflags3], dif3_partition_changed 4323 0000715F E97F02 <1> jmp load_yy_finish 4324 <1> 4325 <1> @@: 4326 00007162 BA[F26F] <1> mov dx, msg.yy_no_file 4327 00007165 EBBD <1> jmp .disp_error_1 4328 <1> .not_yy_goto_subfunction: 4329 <1> 4330 00007167 BB[5C8F] <1> mov bx, load_yyname_input 4331 0000716A E897E6 <1> call bootcmd.pathname_parse_super 4332 <1> 4333 0000716D 8326[328F]00 <1> and word [load_input_file.goto_offset], 0 4334 00007172 E82E3C <1> call skipwh0 4335 00007175 8936[000C] <1> mov word [if_exists_then_address], si 4336 00007179 E8C03B <1> call iseol?_or_then 4337 0000717C 7427 <1> je .not_yy_goto 4338 <1> 4339 0000717E 3C3A <1> cmp al, ':' 4340 00007180 7403E93727 <1> jne error 4341 <1> 4342 00007185 E81A3C <1> call skipwhite 4343 00007188 4E <1> dec si 4344 00007189 8936[328F] <1> mov word [load_input_file.goto_offset], si 4345 <1> 4346 <1> @@: 4347 0000718D AC <1> lodsb 4348 0000718E 3C20 <1> cmp al, 32 4349 00007190 7409 <1> je @F 4350 00007192 3C09 <1> cmp al, 9 4351 00007194 7405 <1> je @F 4352 00007196 E8B43B <1> call iseol? 4353 00007199 75F2 <1> jne @B 4354 <1> @@: 4355 0000719B E8053C <1> call skipwh0 4356 0000719E 8936[000C] <1> mov word [if_exists_then_address], si 4357 000071A2 E8B33B <1> call chkeol_or_then 4358 <1> 4359 <1> .not_yy_goto: 4360 <1> 4361 000071A5 F606[CC00]07 <1> testopt [internalflags3], dif3_load_is_dp 4362 000071AA 7555 <1> jnz .load_yy_from_ldp 4363 <1> 4364 000071AC 8A1E[428F] <1> mov bl, [load_partition] 4365 000071B0 803E[508C]80 <1> cmp byte [load_unit], 80h 4366 000071B5 7226 <1> jb .p_f_is_diskette 4367 000071B7 84DB <1> test bl, bl ; partition specified ? 4368 000071B9 7503E9FE26 <1> jz error ; no, error --> 4369 <1> 4370 000071BE E8A8FB <1> call query_geometry 4371 <1> 4372 000071C1 B9[2972] <1> mov cx, load_yy_from_partition 4373 000071C4 E8FAF9 <1> call scan_partitions 4374 000071C7 F606[CF00]08 <1> testopt [internalflags3], dif3_in_if 4375 000071CC 7403E9D213 <1> jnz if_exists_not_found 4376 000071D1 BA[4661] <1> mov dx, msg.boot_partition_not_found 4377 000071D4 B80602 <1> mov ax, 0206h 4378 000071D7 E82927 <1> call setrc 4379 000071DA E93CE8 <1> jmp bootcmd.fail 4380 <1> 4381 <1> 4382 <1> .p_f_is_diskette: 4383 000071DD 84DB <1> test bl, bl ; partition specified ? 4384 000071DF 7403E9D826 <1> jnz error ; yes, error --> 4385 <1> 4386 000071E4 E882FB <1> call query_geometry 4387 <1> 4388 000071E7 31C0 <1> xor ax, ax 4389 000071E9 31D2 <1> xor dx, dx 4390 <1> @@: 4391 000071EB 8B1E[2A0A] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 4392 000071EF 52 <1> push dx 4393 000071F0 50 <1> push ax 4394 000071F1 E82BFD <1> call read_ae_512_bytes 4395 <1> 4396 000071F4 26813EFE0155AA <1> cmp word [es:510], 0AA55h 4397 000071FB 7510 <1> jne boot_sigmismatch 4398 000071FD 58 <1> pop ax 4399 000071FE 5A <1> pop dx 4400 <1> 4401 000071FF EB62 <1> jmp load_yy_common 4402 <1> 4403 <1> 4404 <1> .load_yy_from_ldp: 4405 00007201 E865FB <1> call query_geometry 4406 00007204 A1[388F] <1> mov ax, word [load_partition_sector] 4407 00007207 8B16[3A8F] <1> mov dx, word [load_partition_sector + 2] 4408 0000720B EBDE <1> jmp @B 4409 <1> %endif 4410 <1> 4411 <1> 4412 <1> boot_sigmismatch: 4413 0000720D BA[E05F] <1> mov dx, msg.bootfail_sig 4414 00007210 B80702 <1> mov ax, 0207h 4415 <1> @@: 4416 00007213 E8ED26 <1> call setrc 4417 00007216 E900E8 <1> jmp bootcmd.fail 4418 <1> 4419 <1> boot_codemismatch: 4420 00007219 BA[4460] <1> mov dx, msg.bootfail_code 4421 0000721C B80802 <1> mov ax, 0208h 4422 0000721F EBF2 <1> jmp @B 4423 <1> 4424 <1> boot_secsizemismatch: 4425 00007221 BA[6B60] <1> mov dx, msg.bootfail_secsizediffer 4426 00007224 B80902 <1> mov ax, 0209h 4427 00007227 EBEA <1> jmp @B 4428 <1> 4429 <1> 4430 <1> %if _INPUT_FILE_BOOT 4431 <1> ; INP: es:si -> partition table entry, 4432 <1> ; si = load_partition_table .. load_partition_table+48, 4433 <1> ; es = ss 4434 <1> ; bp + di -> above part table metadata, 4435 <1> ; dwo [bp + di - 4] = root (outermost extended position) 4436 <1> ; dwo [bp + di - 8] = base (current table position) 4437 <1> ; CHG: ax, bx, (cx), dx 4438 <1> load_yy_from_partition: 4439 <1> d4 call d4message 4440 <1> d4 asciz "In load_yy_from_partition",13,10 4441 <1> 4442 00007229 A0[438F] <1> mov al, byte [load_current_partition] 4443 0000722C 3A06[428F] <1> cmp al, byte [load_partition] 4444 00007230 7401 <1> je .gotit 4445 00007232 C3 <1> retn 4446 <1> 4447 <1> .gotit: 4448 <1> d4 call d4message 4449 <1> d4 asciz "In load_yy_from_partition.gotit",13,10 4450 <1> 4451 00007233 8B43F8 <1> mov ax, [bp + di - 8] 4452 00007236 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 4453 <1> 4454 00007239 26034408 <1> add ax, [es:si + 8] 4455 0000723D 2613540A <1> adc dx, [es:si + 8 + 2] ; add offset to logical partition 4456 <1> 4457 00007241 26894408 <1> mov word [es:si + 8], ax 4458 00007245 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 4459 <1> 4460 00007249 89EC <1> mov sp, bp 4461 0000724B 5D <1> pop bp ; restore bp (scan_partitions) 4462 0000724C 5B <1> pop bx ; discard ret address (scan_partitions) 4463 <1> 4464 <1> ; dx:ax = absolute sector number 4465 0000724D 8B1E[2A0A] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 4466 00007251 50 <1> push ax 4467 00007252 52 <1> push dx 4468 00007253 E8C9FC <1> call read_ae_512_bytes ; load partition boot sector 4469 <1> 4470 00007256 26813EFE0155AA <1> cmp word [es:510], 0AA55h 4471 0000725D 75AE <1> jne boot_sigmismatch 4472 <1> 4473 0000725F 31C9 <1> xor cx, cx 4474 <1> ; cmp word [es:0], cx 4475 <1> ; je boot_codemismatch 4476 <1> 4477 00007261 5A <1> pop dx 4478 00007262 58 <1> pop ax 4479 <1> 4480 <1> ; dx:ax = boot sector 4481 <1> ; byte [load_unit] = unit 4482 <1> ; es:0-> read sector 4483 <1> load_yy_common: 4484 00007263 26A31C00 <1> mov word [es:bsBPB + bpbHiddenSectors], ax 4485 00007267 2689161E00 <1> mov word [es:bsBPB + bpbHiddenSectors + 2], dx 4486 <1> 4487 0000726C 8B5E0B <1> mov bx, [bp + bsBPB + bpbBytesPerSector] 4488 0000726F 263B1E0B00 <1> cmp bx, [es:bsBPB + bpbBytesPerSector] 4489 00007274 75AB <1> jne boot_secsizemismatch 4490 <1> 4491 <1> ; preserve some variables from our pseudo BPB 4492 00007276 31C0 <1> xor ax, ax 4493 00007278 FF7618 <1> push word [bp + bsBPB + bpbCHSSectors] 4494 0000727B 268F061800 <1> pop word [es:bsBPB + bpbCHSSectors] 4495 00007280 FF761A <1> push word [bp + bsBPB + bpbCHSHeads] 4496 00007283 268F061A00 <1> pop word [es:bsBPB + bpbCHSHeads] ; preserve geometry 4497 <1> 4498 00007288 8B5EEA <1> mov bx, word [bp + ldParaPerSector] 4499 0000728B D1EB <1> shr bx, 1 4500 0000728D 895ED4 <1> mov word [bp + ldEntriesPerSector], bx 4501 <1> 4502 00007290 2639061600 <1> cmp word [es:bsBPB + bpbSectorsPerFAT], ax 4503 00007295 8A5E40 <1> mov bl, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 4504 00007298 7407 <1> je .is_fat32 4505 0000729A 26881E2400 <1> mov byte [es:bsBPB + bpbNew + bpbnBootUnit], bl 4506 0000729F EB05 <1> jmp short .was_fat1612 4507 <1> .is_fat32: 4508 000072A1 26881E4000 <1> mov byte [es:bsBPB + ebpbNew + bpbnBootUnit], bl 4509 <1> .was_fat1612: 4510 <1> 4511 000072A6 06 <1> push es 4512 000072A7 1E <1> push ds 4513 000072A8 06 <1> push es 4514 000072A9 1F <1> pop ds 4515 000072AA 31F6 <1> xor si, si ; -> BPB from boot partition 4516 000072AC 16 <1> push ss 4517 000072AD 07 <1> pop es 4518 000072AE BF[108C] <1> mov di, load_data - LOADDATA2 ; -> our copy of a BPB 4519 000072B1 B95A00 <1> mov cx, (bsBPB + ebpbNew + BPBN_size) 4520 000072B4 F3A4 <1> rep movsb ; get the BPB 4521 <1> 4522 000072B6 1F <1> pop ds 4523 000072B7 800E[CC00]80 <1> setopt [internalflags3], dif3_partition_changed 4524 <1> 4525 000072BC 394616 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], ax 4526 000072BF 740B <1> je @F ; is FAT32 --> 4527 000072C1 BE[348C] <1> mov si, load_data - LOADDATA2 + bsBPB + bpbNew 4528 000072C4 BF[508C] <1> mov di, load_data - LOADDATA2 + bsBPB + ebpbNew 4529 000072C7 B91A00 <1> mov cx, BPBN_size 4530 000072CA F3A4 <1> rep movsb ; clone the FAT16 / FAT12 BPBN 4531 <1> ; to where the FAT32 BPBN lives 4532 <1> @@: 4533 000072CC 07 <1> pop es 4534 <1> 4535 <1> .outofmem: equ query_geometry.out_of_memory_error 4536 <1> 4537 000072CD FF36[2A0A] <1> push word [auxbuff_segorsel] 4538 000072D1 8F46F8 <1> pop word [bp + lsvFATSeg] 4539 000072D4 804EE702 <1> or byte [bp + ldFlags], ldfFATInvalid 4540 000072D8 B8FFFF <1> mov ax, -1 4541 000072DB 8946F4 <1> mov word [bp + lsvFATSector], ax 4542 000072DE 8946F6 <1> mov word [bp + lsvFATSector + 2], ax 4543 <1> 4544 000072E1 E89705 <1> call initialise_fs 4545 <1> 4546 000072E4 C606[458F]00 <1> mov byte [load_check_dir_attr], 0 4547 000072E9 8B36[5C8F] <1> mov si, word [load_yyname_input] 4548 000072ED 803C2F <1> cmp byte [si], '/' 4549 000072F0 7501 <1> jne @F 4550 000072F2 46 <1> inc si 4551 <1> @@: 4552 000072F3 803C00 <1> cmp byte [si], 0 4553 000072F6 750C <1> jne @F 4554 <1> ..@yy_filename_empty: 4555 000072F8 BA[8D6F] <1> mov dx, msg.yy_filename_empty 4556 000072FB B80A02 <1> mov ax, 020Ah 4557 000072FE E80226 <1> call setrc 4558 00007301 E915E7 <1> jmp bootcmd.fail 4559 <1> @@: 4560 00007304 16 <1> push ss 4561 00007305 07 <1> pop es 4562 00007306 E8E7EB <1> call boot_parse_fn ; get next pathname 4563 00007309 3C2F <1> cmp al, '/' 4564 0000730B 7509 <1> jne @F 4565 0000730D C606[458F]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 4566 00007312 8936[5E8F] <1> mov word [load_yyname_next], si 4567 <1> @@: 4568 <1> 4569 00007316 BFFFFF <1> mov di, -1 4570 00007319 89FE <1> mov si, di 4571 0000731B 897EF4 <1> mov [bp + lsvFATSector], di 4572 0000731E 8976F6 <1> mov [bp + lsvFATSector + 2], si 4573 <1> 4574 00007321 31C0 <1> xor ax, ax 4575 00007323 31D2 <1> xor dx, dx 4576 <1> 4577 <1> scan_dir_yyname_loop: 4578 00007325 8946EC <1> mov word [bp + ldDirCluster], ax 4579 00007328 8956EE <1> mov word [bp + ldDirCluster + 2], dx 4580 <1> 4581 0000732B 16 <1> push ss 4582 0000732C 07 <1> pop es 4583 0000732D BB[908C] <1> mov bx, load_yy_direntry 4584 <1> 4585 00007330 E88EF6 <1> call scan_dir_aux_for_file 4586 <1> 4587 00007333 803E[458F]10 <1> cmp byte [load_check_dir_attr], ATTR_DIRECTORY 4588 00007338 753A <1> jne got_yyentry 4589 <1> 4590 0000733A 56 <1> push si 4591 0000733B 57 <1> push di 4592 0000733C C606[458F]00 <1> mov byte [load_check_dir_attr], 0 4593 00007341 8B36[5E8F] <1> mov si, word [load_yyname_next] 4594 00007345 803C00 <1> cmp byte [si], 0 4595 00007348 7502 <1> jne @F 4596 0000734A EBAC <1> jmp ..@yy_filename_empty 4597 <1> @@: 4598 0000734C 06 <1> push es 4599 0000734D 16 <1> push ss 4600 0000734E 07 <1> pop es 4601 0000734F E89EEB <1> call boot_parse_fn ; get next pathname 4602 00007352 07 <1> pop es 4603 00007353 3C2F <1> cmp al, '/' 4604 00007355 7509 <1> jne @F 4605 00007357 C606[458F]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 4606 0000735C 8936[5E8F] <1> mov word [load_yyname_next], si 4607 <1> @@: 4608 00007360 5F <1> pop di 4609 00007361 5E <1> pop si 4610 <1> 4611 00007362 31D2 <1> xor dx, dx 4612 00007364 268B471A <1> mov ax, [es:bx + deClusterLow] 4613 <1> ; = first cluster (not FAT32) 4614 00007368 807EE620 <1> cmp byte [bp + ldFATType], 32 4615 0000736C 7504 <1> jne @F 4616 0000736E 268B5714 <1> mov dx, [es:bx + deClusterHigh] 4617 <1> ; dx:ax = first cluster (FAT32) 4618 <1> @@: 4619 <1> 4620 00007372 EBB1 <1> jmp scan_dir_yyname_loop 4621 <1> 4622 <1> 4623 <1> got_yyentry: 4624 <1> 4625 <1> 4626 <1> ; (boot32.asm code starts here) 4627 <1> 4628 00007374 8B1E[AC8C] <1> mov bx, [load_yy_direntry + deSize] 4629 00007378 A1[AE8C] <1> mov ax, [load_yy_direntry + deSize + 2] 4630 <1> ; ax:bx = file size 4631 0000737B 8A16[9C8C] <1> mov dl, [load_yy_direntry + 12] 4632 <1> ; dl = FAT+ size bits 4633 0000737F 88D6 <1> mov dh, dl 4634 00007381 81E207E0 <1> and dx, 0E007h ; obtain bits 7-5 and 2-0 4635 00007385 740C <1> jz @F 4636 00007387 BA[7F70] <1> mov dx, msg.yy_too_large 4637 0000738A B80B02 <1> mov ax, 020Bh 4638 0000738D E87325 <1> call setrc 4639 00007390 E986E6 <1> jmp bootcmd.fail 4640 <1> @@: 4641 00007393 895EC4 <1> mov word [bp + ldFileSize], bx 4642 00007396 8946C6 <1> mov word [bp + ldFileSize + 2], ax 4643 <1> 4644 00007399 09D8 <1> or ax, bx 4645 0000739B 7516 <1> jnz @F 4646 <1> 4647 0000739D F606[CF00]08 <1> testopt [internalflags3], dif3_in_if 4648 000073A2 7403E9FC11 <1> jnz if_exists_not_found 4649 000073A7 BA[9B70] <1> mov dx, msg.yy_empty 4650 000073AA B80C02 <1> mov ax, 020Ch 4651 000073AD E85325 <1> call setrc 4652 000073B0 E966E6 <1> jmp bootcmd.fail 4653 <1> @@: 4654 <1> 4655 <1> ; get starting cluster of file 4656 000073B3 31D2 <1> xor dx, dx 4657 000073B5 A1[AA8C] <1> mov ax, [load_yy_direntry + deClusterLow] 4658 <1> ; = first cluster (not FAT32) 4659 <1> 4660 000073B8 807EE620 <1> cmp byte [bp + ldFATType], 32 4661 000073BC 7504 <1> jne @F 4662 000073BE 8B16[A48C] <1> mov dx, [load_yy_direntry + deClusterHigh] 4663 <1> ; dx:ax = first cluster (FAT32) 4664 <1> @@: 4665 <1> 4666 000073C2 80E60F <1> and dh, 0Fh 4667 000073C5 8946F0 <1> mov word [bp + lsvFirstCluster], ax 4668 000073C8 8956F2 <1> mov word [bp + lsvFirstCluster + 2], dx 4669 <1> 4670 000073CB 8946C8 <1> mov word [bp + ldCurrentCluster], ax 4671 000073CE 8956CA <1> mov word [bp + ldCurrentCluster + 2], dx 4672 000073D1 31DB <1> xor bx, bx 4673 000073D3 895ECC <1> mov word [bp + ldCurrentSeek], bx 4674 000073D6 895ECE <1> mov word [bp + ldCurrentSeek + 2], bx 4675 000073D9 E8B3F7 <1> call check_clust 4676 000073DC 7303E9D704 <1> jc error_badchain 4677 <1> 4678 <1> load_yy_finish: 4679 000073E1 31ED <1> xor bp, bp 4680 000073E3 31DB <1> xor bx, bx 4681 000073E5 BE[D08B] <1> mov si, load_data_lowest 4682 000073E8 B95000 <1> mov cx, (LOAD_INPUT_FILE_SIZE + 1) >> 1 4683 <1> 4684 000073EB BF[B08C] <1> mov di, load_input_file 4685 000073EE F606[CB00]02 <1> testopt [internalflags2], dif2_input_file_boot 4686 000073F3 7415 <1> jz @F 4687 000073F5 8B1E[308F] <1> mov bx, word [load_input_file.active] 4688 000073F9 43 <1> inc bx 4689 000073FA B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 4690 000073FD F7E3 <1> mul bx 4691 <1> ; test dx, dx 4692 <1> ; jnz error 4693 000073FF 01C7 <1> add di, ax 4694 00007401 8B5586 <1> mov dx, word [di - LOAD_INPUT_FILE_SIZE - LOADDATA3 + ldFATType] 4695 00007404 81E200F0 <1> and dx, ifhfTestReserved1 | ifhfTestReserved2 | ifhfQuietInput | ifhfQuietOutput 4697 00007408 09D5 <1> or bp, dx 4698 <1> 4699 <1> @@: 4700 <1> 4701 0000740A 092E[F68B] <1> or word [load_data - LOADDATA2 + ldFATType], bp 4702 0000740E 16 <1> push ss 4703 0000740F 07 <1> pop es 4704 00007410 F3A5 <1> rep movsw 4705 <1> 4706 <1> ; hazard: this uses load_input_file and 4707 <1> ; load_data_lowest if we are already in 4708 <1> ; a yy_boot script. 4709 00007412 8026[CF00]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 4710 00007417 E8804B <1> call yy_reset_buf 4711 <1> 4712 0000741A 891E[308F] <1> mov word [load_input_file.active], bx 4713 0000741E 800E[CB00]02 <1> setopt [internalflags2], dif2_input_file_boot 4714 <1> 4715 00007423 8B36[328F] <1> mov si, word [load_input_file.goto_offset] 4716 00007427 85F6 <1> test si, si 4717 00007429 7403E9F84C <1> jnz cmd_goto.yy_entry 4718 <1> 4719 0000742E F606[CF00]08 <1> testopt [internalflags3], dif3_in_if 4720 00007433 7403E97811 <1> jnz if_exists_found_open 4721 00007438 C3 <1> retn 4722 <1> 4723 <1> 4724 <1> ; INP: [load_input_file], dif2_input_file_boot 4725 <1> ; OUT: most recent file closed, flag cleared if no longer file 4726 <1> ; CHG: di, bx, ax 4727 <1> yy_boot_close_file: 4728 00007439 A1[308F] <1> mov ax, word [load_input_file.active] 4729 0000743C 48 <1> dec ax 4730 0000743D 790B <1> jns .next 4731 0000743F 8026[CB00]FD <1> clropt [internalflags2], dif2_input_file_boot 4732 00007444 800E[CB00]04 <1> setopt [internalflags2], dif2_closed_input_file_boot 4733 00007449 C3 <1> retn 4734 <1> .next: 4735 0000744A A3[308F] <1> mov word [load_input_file.active], ax 4736 0000744D C3 <1> retn 4737 <1> 4738 <1> 4739 <1> ; INP: [load_input_file] 4740 <1> ; OUT: [load_data_lowest] = LOADDATA[123], lsv, BPB 4741 <1> ; CHG: es, ax, dx, di, si 4742 <1> yy_boot_get: 4743 0000744E 16 <1> push ss 4744 0000744F 07 <1> pop es 4745 <1> 4746 00007450 B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 4747 00007453 F726[308F] <1> mul word [load_input_file.active] 4748 <1> 4749 <1> ; test dx, dx 4750 <1> ; jnz .error 4751 <1> 4752 00007457 51 <1> push cx 4753 00007458 BF[D08B] <1> mov di, load_data_lowest 4754 0000745B B95000 <1> mov cx, (LOAD_INPUT_FILE_SIZE + 1) >> 1 4755 <1> 4756 0000745E BE[B08C] <1> mov si, load_input_file 4757 00007461 01C6 <1> add si, ax 4758 <1> 4759 00007463 F3A5 <1> rep movsw 4760 00007465 59 <1> pop cx 4761 00007466 C3 <1> retn 4762 <1> 4763 <1> 4764 <1> ; INP: [load_data_lowest] = LOADDATA3 4765 <1> ; OUT: [load_input_file] 4766 <1> ; CHG: es, ax, dx, di, si 4767 <1> ; Note: Preserves flags (ZF, CF) 4768 <1> yy_boot_update: 4769 00007467 9C <1> pushf 4770 <1> 4771 00007468 16 <1> push ss 4772 00007469 07 <1> pop es 4773 <1> 4774 0000746A B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 4775 0000746D F726[308F] <1> mul word [load_input_file.active] 4776 <1> 4777 <1> ; test dx, dx 4778 <1> ; jnz .error 4779 <1> 4780 00007471 51 <1> push cx 4781 00007472 BE[D08B] <1> mov si, load_data_lowest 4782 00007475 B90800 <1> mov cx, LOADDATA3_size >> 1 4783 <1> 4784 00007478 BF[B08C] <1> mov di, load_input_file 4785 0000747B 01C7 <1> add di, ax 4786 <1> 4787 0000747D F3A5 <1> rep movsw 4788 0000747F 59 <1> pop cx 4789 00007480 9D <1> popf ; ZF, CF 4790 00007481 C3 <1> retn 4791 <1> 4792 <1> 4793 <1> 4794 <1> ; INP: [load_input_file] = active file 4795 <1> ; cx = how many bytes to read 4796 <1> ; ds:dx -> buffer 4797 <1> ; OUT: CY if error reading 4798 <1> ; NC if success 4799 <1> ; ax = how many bytes read 4800 <1> ; CHG: bx, cx 4801 <1> ; STT: ds = es = ss 4802 <1> yy_boot_read: 4803 <1> lframe near 4804 <1> lvar word, length 4805 <1> lvar word, length_this_cluster 4806 <1> lvar dword, bytes_per_cluster 4807 <1> lvar dword, how_far_in_cluster 4808 00007482 5589E58D66F4 <1> lenter 4809 <1> lvar dword, pointer 4810 00007488 1E <1> push ds 4811 00007489 52 <1> push dx 4812 0000748A 31C0 <1> xor ax, ax 4813 <1> lvar word, did_guard_auxbuff 4814 0000748C 50 <1> push ax 4815 <1> lvar word, read_how_many 4816 0000748D 50 <1> push ax 4817 0000748E 52 <1> push dx 4818 0000748F 56 <1> push si 4819 00007490 57 <1> push di 4820 <1> 4821 00007491 FF36[D20A] <1> push word [errret] 4822 00007495 FF36[D40A] <1> push word [throwret] 4823 00007499 FF36[D60A] <1> push word [throwsp] 4824 <1> 4825 0000749D 55 <1> push bp 4826 <1> 4827 0000749E C706[D20A][0676] <1> mov word [errret], .err_ret 4828 000074A4 C706[D40A][0676] <1> mov word [throwret], .err_ret 4829 000074AA 8926[D60A] <1> mov word [throwsp], sp 4830 <1> 4831 000074AE E89DFF <1> call yy_boot_get 4832 <1> 4833 000074B1 E80091 <1> call guard_auxbuff 4834 000074B4 FF46EE <1> inc word [bp + ?did_guard_auxbuff] 4835 <1> 4836 000074B7 8B16[D68B] <1> mov dx, word [load_data - LOADDATA2 + ldFileSize + 2] 4837 000074BB A1[D48B] <1> mov ax, word [load_data - LOADDATA2 + ldFileSize] 4838 <1> 4839 000074BE 2B06[DC8B] <1> sub ax, word [load_data - LOADDATA2 + ldCurrentSeek] 4840 000074C2 1B16[DE8B] <1> sbb dx, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 4841 <1> 4842 000074C6 85D2 <1> test dx, dx 4843 000074C8 7506 <1> jnz .use_count 4844 000074CA 39C8 <1> cmp ax, cx 4845 000074CC 7302 <1> jae .use_count 4846 000074CE 89C1 <1> mov cx, ax 4847 <1> .use_count: 4848 000074D0 85C9 <1> test cx, cx 4849 000074D2 7503E90801 <1> jz .success 4850 000074D7 894EFE <1> mov word [bp + ?length], cx 4851 <1> 4852 <1> .next_cluster: 4853 000074DA 8B36[DE8B] <1> mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 4854 000074DE 8B3E[DC8B] <1> mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 4855 000074E2 A1[1B8C] <1> mov ax, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 4856 000074E5 F726[F88B] <1> mul word [load_data - LOADDATA2 + ldClusterSize] 4857 <1> 4858 000074E9 8946F8 <1> mov word [bp + ?bytes_per_cluster], ax 4859 000074EC 8956FA <1> mov word [bp + ?bytes_per_cluster + 2], dx 4860 000074EF 83E801 <1> sub ax, 1 4861 000074F2 83DA00 <1> sbb dx, 0 4862 000074F5 21D6 <1> and si, dx 4863 000074F7 21C7 <1> and di, ax ; how far are we into cluster 4864 <1> 4865 000074F9 897EF4 <1> mov word [bp + ?how_far_in_cluster], di 4866 000074FC 8976F6 <1> mov word [bp + ?how_far_in_cluster + 2], si 4867 <1> 4868 000074FF F7DE <1> neg si 4869 00007501 F7DF <1> neg di 4870 00007503 83DE00 <1> sbb si, byte 0 ; neg si:di 4871 <1> 4872 00007506 037EF8 <1> add di, word [bp + ?bytes_per_cluster] 4873 00007509 1376FA <1> adc si, word [bp + ?bytes_per_cluster + 2] 4874 <1> ; cluster size - how far we are 4875 <1> ; = how much to read from this cluster 4876 0000750C 85F6 <1> test si, si 4877 0000750E 7506 <1> jnz .use_count_2 4878 00007510 39CF <1> cmp di, cx 4879 00007512 7302 <1> jae .use_count_2 4880 00007514 89F9 <1> mov cx, di 4881 <1> .use_count_2: 4882 00007516 894EFC <1> mov word [bp + ?length_this_cluster], cx 4883 <1> 4884 <1> .next_sector: 4885 00007519 A1[D88B] <1> mov ax, word [load_data - LOADDATA2 + ldCurrentCluster] 4886 0000751C 8B16[DA8B] <1> mov dx, word [load_data - LOADDATA2 + ldCurrentCluster + 2] 4887 00007520 E86CF6 <1> call check_clust 4888 00007523 7303E9B800 <1> jc .error 4889 00007528 E883F5 <1> call clust_to_first_sector 4890 0000752B 8B1E[1B8C] <1> mov bx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 4891 0000752F 8B7EF4 <1> mov di, word [bp + ?how_far_in_cluster] 4892 00007532 8B76F6 <1> mov si, word [bp + ?how_far_in_cluster + 2] 4893 00007535 87D6 <1> xchg dx, si 4894 00007537 97 <1> xchg ax, di 4895 00007538 F7F3 <1> div bx 4896 <1> ; dx = byte offset into sector 4897 <1> ; ax = sector offset into cluster's data 4898 0000753A 01C7 <1> add di, ax 4899 0000753C 83D600 <1> adc si, 0 4900 0000753F 87D6 <1> xchg dx, si 4901 00007541 97 <1> xchg ax, di 4902 <1> ; dx:ax = sector in fs 4903 <1> ; si = byte offset 4904 <1> 4905 00007542 89F1 <1> mov cx, si ; = byte offset 4906 00007544 F7D9 <1> neg cx ; - byte offset 4907 00007546 01D9 <1> add cx, bx ; sector size - byte offset 4908 <1> ; = length this sector 4909 00007548 3B4EFC <1> cmp cx, word [bp + ?length_this_cluster] 4910 0000754B 7603 <1> jbe @F ; sector has less than requested --> 4911 0000754D 8B4EFC <1> mov cx, word [bp + ?length_this_cluster] 4912 <1> ; fill entire remaining request 4913 <1> @@: 4914 00007550 8B1E[2A0A] <1> mov bx, word [auxbuff_segorsel] 4915 00007554 E8DAF9 <1> call read_sector 4916 00007557 1E <1> push ds 4917 <1> 4918 00007558 06 <1> push es 4919 <1> ; es:si -> data in sector buffer 4920 00007559 C47EF0 <1> les di, [bp + ?pointer] 4921 <1> ; es:di -> buffer 4922 0000755C 014EEC <1> add word [bp + ?read_how_many], cx 4923 0000755F 294EFC <1> sub word [bp + ?length_this_cluster], cx 4924 00007562 294EFE <1> sub word [bp + ?length], cx 4925 00007565 010E[DC8B] <1> add word [load_data - LOADDATA2 + ldCurrentSeek], cx 4926 00007569 8316[DE8B]00 <1> adc word [load_data - LOADDATA2 + ldCurrentSeek + 2], 0 4927 0000756E 014EF4 <1> add word [bp + ?how_far_in_cluster], cx 4928 00007571 8356F600 <1> adc word [bp + ?how_far_in_cluster + 2], 0 4929 00007575 1F <1> pop ds ; ds:si -> data in sector buffer 4930 00007576 F3A4 <1> rep movsb ; copy 4931 00007578 897EF0 <1> mov word [bp + ?pointer], di 4932 <1> ; update pointer 4933 0000757B 1F <1> pop ds 4934 <1> 4935 0000757C 837EFC00 <1> cmp word [bp + ?length_this_cluster], 0 4936 00007580 7597 <1> jne .next_sector 4937 <1> 4938 00007582 8B7EF8 <1> mov di, word [bp + ?bytes_per_cluster] 4939 00007585 8B76FA <1> mov si, word [bp + ?bytes_per_cluster + 2] 4940 00007588 397EF4 <1> cmp word [bp + ?how_far_in_cluster], di 4941 0000758B 7505 <1> jne @F 4942 0000758D 3976F6 <1> cmp word [bp + ?how_far_in_cluster + 2], si 4943 00007590 7408 <1> je @FF 4944 <1> @@: 4945 00007592 837EFE00 <1> cmp word [bp + ?length], 0 4946 00007596 7548 <1> jne .error 4947 00007598 EB45 <1> jmp .success 4948 <1> 4949 <1> @@: 4950 0000759A A1[D88B] <1> mov ax, word [load_data - LOADDATA2 + ldCurrentCluster] 4951 0000759D 8B16[DA8B] <1> mov dx, word [load_data - LOADDATA2 + ldCurrentCluster + 2] 4952 000075A1 E8EBF5 <1> call check_clust 4953 000075A4 723A <1> jc .error 4954 000075A6 E832F5 <1> call clust_next.dxax 4955 000075A9 731B <1> jnc @F ; (NC) --> 4956 000075AB B8F6FF <1> mov ax, 0FFF8h - 2 4957 000075AE BAFF0F <1> mov dx, 0FFFh 4958 000075B1 8B3E[DC8B] <1> mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 4959 000075B5 8B36[DE8B] <1> mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 4960 000075B9 3B36[D48B] <1> cmp si, word [load_data - LOADDATA2 + ldFileSize] 4961 000075BD 7506 <1> jne .set_error 4962 000075BF 3B3E[D68B] <1> cmp di, word [load_data - LOADDATA2 + ldFileSize + 2] 4963 000075C3 7401 <1> je .do_not_set_error ; if same then NC --> 4964 <1> .set_error: 4965 000075C5 F9 <1> stc 4966 <1> .do_not_set_error: 4967 <1> @@: 4968 000075C6 9C <1> pushf 4969 000075C7 83C002 <1> add ax, 2 4970 000075CA 83D200 <1> adc dx, 0 4971 000075CD A3[D88B] <1> mov word [load_data - LOADDATA2 + ldCurrentCluster], ax 4972 000075D0 8916[DA8B] <1> mov word [load_data - LOADDATA2 + ldCurrentCluster + 2], dx 4973 000075D4 9D <1> popf ; CF 4974 000075D5 7209 <1> jc .error 4975 000075D7 8B4EFE <1> mov cx, word [bp + ?length] 4976 000075DA E303 <1> jcxz .success 4977 000075DC E9FBFE <1> jmp .next_cluster 4978 <1> 4979 <1> .success: 4980 000075DF A8 <1> db __TEST_IMM8 ; (skip stc, NC) 4981 <1> .error: 4982 000075E0 F9 <1> stc 4983 <1> 4984 000075E1 5D <1> pop bp 4985 <1> 4986 000075E2 8F06[D60A] <1> pop word [throwsp] 4987 000075E6 8F06[D40A] <1> pop word [throwret] ; restore throw destination 4988 000075EA 8F06[D20A] <1> pop word [errret] 4989 <1> 4990 000075EE 9C <1> pushf 4991 000075EF F646EE01 <1> testopt [bp + ?did_guard_auxbuff], 1 4992 000075F3 7405 <1> jz @F 4993 000075F5 8026[CF00]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 4994 <1> @@: 4995 000075FA 9D <1> popf ; CF 4996 <1> 4997 000075FB E869FE <1> call yy_boot_update 4998 <1> 4999 000075FE 5F <1> pop di 5000 000075FF 5E <1> pop si 5001 00007600 5A <1> pop dx 5002 00007601 58 <1> pop ax ; pop from ?read_how_many 5003 00007602 89EC5D <1> lleave 5004 00007605 C3 <1> retn 5005 <1> 5006 <1> .err_ret: 5007 00007606 8B26[D60A] <1> mov sp, word [throwsp] ; restore stack 5008 <1> ; (needed here if returned to errret) 5009 0000760A EBD4 <1> jmp .error 5010 <1> 5011 <1> 5012 <1> ; INP: [load_input_file] = active file 5013 <1> ; cx:dx = signed seek distance from current 5014 <1> ; OUT: - 5015 <1> ; CHG: ax, bx, cx, dx 5016 <1> ; STT: ds = es = ss 5017 <1> yy_boot_seek_current: 5018 <1> lframe near 5019 <1> lvar dword, length 5020 <1> lvar dword, length_this_cluster 5021 <1> lvar dword, bytes_per_cluster 5022 <1> lvar dword, how_far_in_cluster 5023 0000760C 5589E58D66F0 <1> lenter 5024 <1> lvar dword, seek_distance 5025 00007612 51 <1> push cx 5026 00007613 52 <1> push dx 5027 00007614 31C0 <1> xor ax, ax 5028 <1> lvar word, did_guard_auxbuff 5029 00007616 50 <1> push ax 5030 00007617 56 <1> push si 5031 00007618 57 <1> push di 5032 <1> 5033 00007619 FF36[D20A] <1> push word [errret] 5034 0000761D FF36[D40A] <1> push word [throwret] 5035 00007621 FF36[D60A] <1> push word [throwsp] 5036 <1> 5037 00007625 55 <1> push bp 5038 <1> 5039 00007626 C706[D20A][5078] <1> mov word [errret], .err_ret 5040 0000762C C706[D40A][5078] <1> mov word [throwret], .err_ret 5041 00007632 8926[D60A] <1> mov word [throwsp], sp 5042 <1> 5043 00007636 E815FE <1> call yy_boot_get 5044 <1> 5045 00007639 E8788F <1> call guard_auxbuff 5046 0000763C FF46EA <1> inc word [bp + ?did_guard_auxbuff] 5047 <1> 5048 0000763F 85C9 <1> test cx, cx 5049 00007641 7975 <1> jns .plus 5050 <1> 5051 00007643 8B36[DE8B] <1> mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 5052 00007647 8B3E[DC8B] <1> mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 5053 0000764B A1[1B8C] <1> mov ax, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 5054 0000764E F726[F88B] <1> mul word [load_data - LOADDATA2 + ldClusterSize] 5055 <1> 5056 00007652 8946F4 <1> mov word [bp + ?bytes_per_cluster], ax 5057 00007655 8956F6 <1> mov word [bp + ?bytes_per_cluster + 2], dx 5058 00007658 83E801 <1> sub ax, 1 5059 0000765B 83DA00 <1> sbb dx, 0 5060 0000765E F7D0 <1> not ax 5061 00007660 F7D2 <1> not dx 5062 <1> 5063 00007662 56 <1> push si 5064 00007663 57 <1> push di 5065 <1> 5066 00007664 21D6 <1> and si, dx 5067 00007666 21C7 <1> and di, ax ; start seek of current cluster 5068 <1> 5069 00007668 58 <1> pop ax 5070 00007669 5A <1> pop dx ; current seek 5071 <1> 5072 0000766A 0346EC <1> add ax, word [bp + ?seek_distance] 5073 0000766D 1356EE <1> adc dx, word [bp + ?seek_distance + 2] 5074 00007670 7203E9B801 <1> jnc .error ; target seek 5075 <1> 5076 <1> ; if the cluster is invalid, need to reset 5077 00007675 813E[DA8B]FF0F <1> cmp word [load_data - LOADDATA2 + ldCurrentCluster + 2], 0FFFh 5078 0000767B 7207 <1> jb @F 5079 0000767D 833E[D88B]F8 <1> cmp word [load_data - LOADDATA2 + ldCurrentCluster], 0FFF8h 5080 00007682 7308 <1> jae .minus_reset 5081 <1> @@: 5082 <1> 5083 00007684 39F2 <1> cmp dx, si ; is target seek 5084 <1> ; >= start seek of current cluster? 5085 00007686 7502 <1> jne @F 5086 00007688 39F8 <1> cmp ax, di 5087 <1> @@: 5088 0000768A 7322 <1> jae .minus_simple ; yes, simple --> 5089 <1> 5090 <1> .minus_reset: 5091 <1> ; reset current cluster to first, seek to 0 5092 0000768C FF36[028C] <1> push word [load_data - LOADDATA2 + lsvFirstCluster + 2] 5093 00007690 FF36[008C] <1> push word [load_data - LOADDATA2 + lsvFirstCluster] 5094 00007694 8F06[D88B] <1> pop word [load_data - LOADDATA2 + ldCurrentCluster] 5095 00007698 8F06[DA8B] <1> pop word [load_data - LOADDATA2 + ldCurrentCluster + 2] 5096 0000769C 8326[DC8B]00 <1> and word [load_data - LOADDATA2 + ldCurrentSeek], 0 5097 000076A1 8326[DE8B]00 <1> and word [load_data - LOADDATA2 + ldCurrentSeek + 2], 0 5098 <1> 5099 <1> ; set distance 5100 000076A6 8946EC <1> mov word [bp + ?seek_distance], ax 5101 000076A9 8956EE <1> mov word [bp + ?seek_distance + 2], dx 5102 <1> ; use positive seek code 5103 000076AC EB0A <1> jmp .plus 5104 <1> 5105 <1> .minus_simple: 5106 <1> ; just set seek, current cluster still valid 5107 000076AE A3[DC8B] <1> mov word [load_data - LOADDATA2 + ldCurrentSeek], ax 5108 000076B1 8916[DE8B] <1> mov word [load_data - LOADDATA2 + ldCurrentSeek + 2], dx 5109 000076B5 E97501 <1> jmp .return 5110 <1> 5111 <1> .plus: 5112 000076B8 8B16[D68B] <1> mov dx, word [load_data - LOADDATA2 + ldFileSize + 2] 5113 000076BC A1[D48B] <1> mov ax, word [load_data - LOADDATA2 + ldFileSize] 5114 <1> 5115 000076BF 2B06[DC8B] <1> sub ax, word [load_data - LOADDATA2 + ldCurrentSeek] 5116 000076C3 1B16[DE8B] <1> sbb dx, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 5117 <1> 5118 000076C7 720A <1> jc .eof 5119 <1> ; dx:ax = how far we can seek within file 5120 000076C9 3B56EE <1> cmp dx, word [bp + ?seek_distance + 2] 5121 000076CC 7503 <1> jne @F 5122 000076CE 3B46EC <1> cmp ax, word [bp + ?seek_distance] 5123 <1> @@: 5124 000076D1 771D <1> ja .not_eof 5125 <1> .eof: 5126 000076D3 8B46EC <1> mov ax, word [bp + ?seek_distance] 5127 000076D6 8B56EE <1> mov dx, word [bp + ?seek_distance + 2] 5128 000076D9 0106[DC8B] <1> add word [load_data - LOADDATA2 + ldCurrentSeek], ax 5129 000076DD 1116[DE8B] <1> adc word [load_data - LOADDATA2 + ldCurrentSeek + 2], dx 5130 000076E1 C706[D88B]F8FF <1> mov word [load_data - LOADDATA2 + ldCurrentCluster], 0FFF8h 5131 000076E7 C706[DA8B]FF0F <1> mov word [load_data - LOADDATA2 + ldCurrentCluster + 2], 0FFFh 5132 000076ED E93D01 <1> jmp .return 5133 <1> 5134 <1> .not_eof: 5135 000076F0 8B4EEC <1> mov cx, word [bp + ?seek_distance] 5136 000076F3 8B5EEE <1> mov bx, word [bp + ?seek_distance + 2] 5137 000076F6 85DB <1> test bx, bx 5138 000076F8 7507 <1> jnz @F 5139 000076FA 85C9 <1> test cx, cx 5140 000076FC 7503E92C01 <1> jz .return 5141 <1> @@: 5142 00007701 894EFC <1> mov word [bp + ?length], cx 5143 00007704 895EFE <1> mov word [bp + ?length + 2], bx 5144 <1> 5145 <1> ; bx:cx = length 5146 <1> .next_cluster: 5147 00007707 8B36[DE8B] <1> mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 5148 0000770B 8B3E[DC8B] <1> mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 5149 0000770F A1[1B8C] <1> mov ax, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 5150 00007712 F726[F88B] <1> mul word [load_data - LOADDATA2 + ldClusterSize] 5151 <1> 5152 00007716 8946F4 <1> mov word [bp + ?bytes_per_cluster], ax 5153 00007719 8956F6 <1> mov word [bp + ?bytes_per_cluster + 2], dx 5154 0000771C 83E801 <1> sub ax, 1 5155 0000771F 83DA00 <1> sbb dx, 0 5156 00007722 21D6 <1> and si, dx 5157 00007724 21C7 <1> and di, ax ; how far are we into cluster 5158 <1> 5159 00007726 897EF0 <1> mov word [bp + ?how_far_in_cluster], di 5160 00007729 8976F2 <1> mov word [bp + ?how_far_in_cluster + 2], si 5161 <1> 5162 0000772C F7DE <1> neg si 5163 0000772E F7DF <1> neg di 5164 00007730 83DE00 <1> sbb si, byte 0 ; neg si:di 5165 <1> 5166 00007733 037EF4 <1> add di, word [bp + ?bytes_per_cluster] 5167 00007736 1376F6 <1> adc si, word [bp + ?bytes_per_cluster + 2] 5168 <1> ; cluster size - how far we are 5169 <1> ; = how much to read from this cluster 5170 00007739 39DE <1> cmp si, bx 5171 0000773B 7502 <1> jne @F 5172 0000773D 39CF <1> cmp di, cx 5173 <1> @@: 5174 0000773F 7304 <1> jae .use_count_2 5175 00007741 89F9 <1> mov cx, di 5176 00007743 89F3 <1> mov bx, si 5177 <1> .use_count_2: 5178 <1> ; bx:cx = how far to seek in this cluster 5179 00007745 894EF8 <1> mov word [bp + ?length_this_cluster], cx 5180 00007748 895EFA <1> mov word [bp + ?length_this_cluster + 2], bx 5181 <1> 5182 <1> .next_sector: 5183 0000774B A1[D88B] <1> mov ax, word [load_data - LOADDATA2 + ldCurrentCluster] 5184 0000774E 8B16[DA8B] <1> mov dx, word [load_data - LOADDATA2 + ldCurrentCluster + 2] 5185 00007752 E83AF4 <1> call check_clust 5186 00007755 7303E9D300 <1> jc .error 5187 0000775A 8B1E[1B8C] <1> mov bx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 5188 0000775E 8B7EF0 <1> mov di, word [bp + ?how_far_in_cluster] 5189 00007761 8B76F2 <1> mov si, word [bp + ?how_far_in_cluster + 2] 5190 <1> 5191 00007764 87D6 <1> xchg dx, si 5192 00007766 97 <1> xchg ax, di 5193 00007767 F7F3 <1> div bx 5194 <1> ; dx = byte offset into sector 5195 <1> ; ax = sector offset into cluster's data 5196 00007769 87D6 <1> xchg dx, si 5197 0000776B 97 <1> xchg ax, di 5198 <1> ; si = byte offset 5199 <1> 5200 0000776C 89F1 <1> mov cx, si ; = byte offset 5201 0000776E F7D9 <1> neg cx ; - byte offset 5202 00007770 01D9 <1> add cx, bx ; sector size - byte offset 5203 <1> ; = length this sector 5204 00007772 837EFA00 <1> cmp word [bp + ?length_this_cluster + 2], 0 5205 00007776 7508 <1> jne @F ; fill remaining sector size 5206 00007778 3B4EF8 <1> cmp cx, word [bp + ?length_this_cluster] 5207 0000777B 7603 <1> jbe @F ; sector has less than requested --> 5208 0000777D 8B4EF8 <1> mov cx, word [bp + ?length_this_cluster] 5209 <1> ; fill entire remaining request 5210 <1> @@: 5211 00007780 294EF8 <1> sub word [bp + ?length_this_cluster], cx 5212 00007783 835EFA00 <1> sbb word [bp + ?length_this_cluster + 2], 0 5213 00007787 294EFC <1> sub word [bp + ?length], cx 5214 0000778A 835EFE00 <1> sbb word [bp + ?length + 2], 0 5215 0000778E 010E[DC8B] <1> add word [load_data - LOADDATA2 + ldCurrentSeek], cx 5216 00007792 8316[DE8B]00 <1> adc word [load_data - LOADDATA2 + ldCurrentSeek + 2], 0 5217 00007797 014EF0 <1> add word [bp + ?how_far_in_cluster], cx 5218 0000779A 8356F200 <1> adc word [bp + ?how_far_in_cluster + 2], 0 5219 <1> 5220 0000779E 837EFA00 <1> cmp word [bp + ?length_this_cluster + 2], 0 5221 000077A2 75A7 <1> jne .next_sector 5222 000077A4 837EF800 <1> cmp word [bp + ?length_this_cluster], 0 5223 000077A8 75A1 <1> jne .next_sector 5224 <1> 5225 000077AA 8B7EF4 <1> mov di, word [bp + ?bytes_per_cluster] 5226 000077AD 8B76F6 <1> mov si, word [bp + ?bytes_per_cluster + 2] 5227 000077B0 397EF0 <1> cmp word [bp + ?how_far_in_cluster], di 5228 000077B3 7505 <1> jne @F 5229 000077B5 3976F2 <1> cmp word [bp + ?how_far_in_cluster + 2], si 5230 000077B8 740E <1> je @FF 5231 <1> @@: 5232 000077BA 837EFE00 <1> cmp word [bp + ?length + 2], 0 5233 000077BE 756D <1> jne .error 5234 000077C0 837EFC00 <1> cmp word [bp + ?length], 0 5235 000077C4 7567 <1> jne .error 5236 000077C6 EB65 <1> jmp .return 5237 <1> 5238 <1> @@: 5239 000077C8 A1[D88B] <1> mov ax, word [load_data - LOADDATA2 + ldCurrentCluster] 5240 000077CB 8B16[DA8B] <1> mov dx, word [load_data - LOADDATA2 + ldCurrentCluster + 2] 5241 000077CF E8BDF3 <1> call check_clust 5242 000077D2 7259 <1> jc .error 5243 000077D4 E804F3 <1> call clust_next.dxax 5244 000077D7 732F <1> jnc @F ; (NC) --> 5245 000077D9 B8F6FF <1> mov ax, 0FFF8h - 2 5246 000077DC BAFF0F <1> mov dx, 0FFFh 5247 000077DF 8B3E[DC8B] <1> mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 5248 000077E3 8B36[DE8B] <1> mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 5249 000077E7 3B36[D48B] <1> cmp si, word [load_data - LOADDATA2 + ldFileSize] 5250 000077EB 7506 <1> jne .set_error 5251 000077ED 3B3E[D68B] <1> cmp di, word [load_data - LOADDATA2 + ldFileSize + 2] 5252 000077F1 7401 <1> je .do_not_set_error ; if same then NC --> 5253 <1> .set_error: 5254 000077F3 F9 <1> stc 5255 <1> .do_not_set_error: 5256 000077F4 9C <1> pushf 5257 000077F5 31C9 <1> xor cx, cx 5258 000077F7 31DB <1> xor bx, bx 5259 000077F9 874EFC <1> xchg cx, word [bp + ?length] 5260 000077FC 875EFE <1> xchg bx, word [bp + ?length + 2] 5261 000077FF 010E[DC8B] <1> add word [load_data - LOADDATA2 + ldCurrentSeek], cx 5262 00007803 111E[DE8B] <1> adc word [load_data - LOADDATA2 + ldCurrentSeek + 2], bx 5263 00007807 A8 <1> db __TEST_IMM8 ; (skip pushf) 5264 <1> @@: 5265 00007808 9C <1> pushf 5266 00007809 83C002 <1> add ax, 2 5267 0000780C 83D200 <1> adc dx, 0 5268 0000780F A3[D88B] <1> mov word [load_data - LOADDATA2 + ldCurrentCluster], ax 5269 00007812 8916[DA8B] <1> mov word [load_data - LOADDATA2 + ldCurrentCluster + 2], dx 5270 00007816 9D <1> popf ; CF 5271 00007817 7214 <1> jc .error 5272 00007819 8B4EFC <1> mov cx, word [bp + ?length] 5273 0000781C 8B5EFE <1> mov bx, word [bp + ?length + 2] 5274 0000781F 85DB <1> test bx, bx 5275 00007821 7403E9E1FE <1> jnz .next_cluster 5276 00007826 85C9 <1> test cx, cx 5277 00007828 7403E9DAFE <1> jnz .next_cluster 5278 <1> .return: 5279 <1> .error: 5280 <1> 5281 0000782D 5D <1> pop bp 5282 <1> 5283 0000782E 8F06[D60A] <1> pop word [throwsp] 5284 00007832 8F06[D40A] <1> pop word [throwret] ; restore throw destination 5285 00007836 8F06[D20A] <1> pop word [errret] 5286 <1> 5287 0000783A 9C <1> pushf 5288 0000783B F646EA01 <1> testopt [bp + ?did_guard_auxbuff], 1 5289 0000783F 7405 <1> jz @F 5290 00007841 8026[CF00]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 5291 <1> @@: 5292 00007846 9D <1> popf ; CF 5293 <1> 5294 00007847 E81DFC <1> call yy_boot_update 5295 <1> 5296 0000784A 5F <1> pop di 5297 0000784B 5E <1> pop si 5298 0000784C 89EC5D <1> lleave 5299 0000784F C3 <1> retn 5300 <1> 5301 <1> .err_ret: 5302 00007850 8B26[D60A] <1> mov sp, word [throwsp] ; restore stack 5303 <1> ; (needed here if returned to errret) 5304 00007854 EBD7 <1> jmp .error 5305 <1> 5306 <1> 5307 <1> ; INP: [load_input_file] = active file 5308 <1> ; cx:dx = 0 5309 <1> ; OUT: - 5310 <1> ; CHG: ax, bx, cx, dx 5311 <1> ; STT: ds = es = ss 5312 <1> yy_boot_seek_start: 5313 00007856 56 <1> push si 5314 00007857 57 <1> push di 5315 <1> 5316 00007858 E8F3FB <1> call yy_boot_get 5317 <1> 5318 <1> .reset: 5319 <1> ; reset current cluster to first, seek to 0 5320 0000785B FF36[028C] <1> push word [load_data - LOADDATA2 + lsvFirstCluster + 2] 5321 0000785F FF36[008C] <1> push word [load_data - LOADDATA2 + lsvFirstCluster] 5322 00007863 8F06[D88B] <1> pop word [load_data - LOADDATA2 + ldCurrentCluster] 5323 00007867 8F06[DA8B] <1> pop word [load_data - LOADDATA2 + ldCurrentCluster + 2] 5324 0000786B 8326[DC8B]00 <1> and word [load_data - LOADDATA2 + ldCurrentSeek], 0 5325 00007870 8326[DE8B]00 <1> and word [load_data - LOADDATA2 + ldCurrentSeek + 2], 0 5326 <1> 5327 00007875 E8EFFB <1> call yy_boot_update 5328 <1> 5329 00007878 5F <1> pop di 5330 00007879 5E <1> pop si 5331 0000787A C3 <1> retn 5332 <1> %endif 5333 <1> 5334 <1> 5335 <1> ; INP: bp = load_data - LOADDATA2 5336 <1> initialise_fs: 5337 <1> ; (boot.asm code starts here) 5338 <1> 5339 0000787B 31C0 <1> xor ax, ax 5340 <1> ; calculate some values that we need: 5341 <1> ; adjusted sectors per cluster (store in a word, 5342 <1> ; and decode EDR-DOS's special value 0 meaning 256) 5343 0000787D 8A460D <1> mov al, [bp + bsBPB + bpbSectorsPerCluster] 5344 00007880 FEC8 <1> dec al 5345 00007882 40 <1> inc ax 5346 00007883 8946E8 <1> mov [bp + ldClusterSize], ax 5347 <1> 5348 00007886 8B46D4 <1> mov ax, [bp + ldEntriesPerSector] 5349 <1> 5350 <1> ; number of sectors used for root directory (store in CX) 5351 00007889 31D2 <1> xor dx, dx 5352 0000788B 89C3 <1> mov bx, ax 5353 0000788D 48 <1> dec ax ; rounding up 5354 0000788E 034611 <1> add ax, [bp + bsBPB + bpbNumRootDirEnts] ; (0 iff FAT32) 5355 00007891 11D2 <1> adc dx, dx ; account for overflow (dx was zero) 5356 00007893 F7F3 <1> div bx ; get number of root sectors 5357 00007895 91 <1> xchg ax, cx ; cx = number of root secs 5358 <1> 5359 <1> 5360 <1> ; (iniload.asm code starts here) 5361 <1> 5362 00007896 51 <1> push cx ; number of root secs 5363 00007897 31C0 <1> xor ax, ax 5364 <1> ; first sector of root directory 5365 00007899 8A4610 <1> mov al, [bp + bsBPB + bpbNumFATs] ; ! ah = 0, hence ax = number of FATs 5366 0000789C 8B4E16 <1> mov cx, word [bp + bsBPB + bpbSectorsPerFAT] 5367 0000789F 31FF <1> xor di, di ; di:cx = sectors per FAT 5368 <1> ; iff FAT12, FAT16 5369 000078A1 85C9 <1> test cx, cx ; is FAT32 ? 5370 000078A3 7506 <1> jnz @F ; no --> 5371 000078A5 8B4E24 <1> mov cx, word [bp + bsBPB + ebpbSectorsPerFATLarge] 5372 000078A8 8B7E26 <1> mov di, word [bp + bsBPB + ebpbSectorsPerFATLarge + 2] ; for FAT32 5373 <1> @@: 5374 000078AB 50 <1> push ax 5375 000078AC F7E1 <1> mul cx 5376 <1> ; ax = low word SpF*nF 5377 <1> ; dx = high word 5378 000078AE 93 <1> xchg bx, ax 5379 000078AF 87CA <1> xchg cx, dx 5380 <1> ; cx:bx = first mul 5381 000078B1 58 <1> pop ax 5382 000078B2 F7E7 <1> mul di 5383 <1> ; ax = high word adjust 5384 <1> ; dx = third word 5385 000078B4 85D2 <1> test dx, dx 5386 000078B6 740C <1> jz @F 5387 <1> .error_badchain: 5388 <1> error_badchain: equ $ 5389 000078B8 BA[5F62] <1> mov dx, msg.boot_badchain 5390 000078BB B80D02 <1> mov ax, 020Dh 5391 000078BE E84220 <1> call setrc 5392 000078C1 E955E1 <1> jmp bootcmd.fail 5393 <1> 5394 <1> @@: 5395 000078C4 92 <1> xchg dx, ax 5396 <1> ; dx = high word adjust 5397 000078C5 01CA <1> add dx, cx 5398 <1> ; dx:bx = result 5399 000078C7 93 <1> xchg ax, bx 5400 <1> ; dx:ax = result 5401 000078C8 72EE <1> jc .error_badchain 5402 <1> 5403 000078CA 03460E <1> add ax, [bp + bsBPB + bpbReservedSectors] 5404 000078CD 83D200 <1> adc dx, byte 0 5405 000078D0 72E6 <1> jc .error_badchain 5406 <1> 5407 000078D2 59 <1> pop cx ; number of root sectors 5408 000078D3 31FF <1> xor di, di 5409 <1> 5410 <1> ; first sector of disk data area: 5411 000078D5 01C1 <1> add cx, ax 5412 000078D7 11D7 <1> adc di, dx 5413 000078D9 72DD <1> jc .error_badchain 5414 000078DB 894EFC <1> mov [bp + lsvDataStart], cx 5415 000078DE 897EFE <1> mov [bp + lsvDataStart + 2], di 5416 <1> 5417 000078E1 8946D0 <1> mov [bp + ldRootSector], ax 5418 000078E4 8956D2 <1> mov [bp + ldRootSector + 2], dx 5419 <1> 5420 <1> ; total sectors 5421 000078E7 31D2 <1> xor dx, dx 5422 000078E9 8B4613 <1> mov ax, [bp + bsBPB + bpbTotalSectors] 5423 000078EC 85C0 <1> test ax, ax 5424 000078EE 7506 <1> jnz @F 5425 000078F0 8B5622 <1> mov dx, [bp + bsBPB + bpbTotalSectorsLarge + 2] 5426 000078F3 8B4620 <1> mov ax, [bp + bsBPB + bpbTotalSectorsLarge] 5427 <1> 5428 <1> ; fall through and let it overwrite the field with the 5429 <1> ; already current contents. saves a jump. 5430 <1> @@: 5431 000078F6 895622 <1> mov [bp + bsBPB + bpbTotalSectorsLarge + 2], dx 5432 000078F9 894620 <1> mov [bp + bsBPB + bpbTotalSectorsLarge], ax 5433 <1> 5434 <1> ; dx:ax = total sectors 5435 <1> 5436 000078FC 8B5E16 <1> mov bx, [bp + bsBPB + bpbSectorsPerFAT] 5437 000078FF C646E620 <1> mov byte [bp + ldFATType], 32 5438 00007903 85DB <1> test bx, bx 5439 00007905 740B <1> jz @F 5440 <1> 5441 00007907 31C9 <1> xor cx, cx 5442 <1> 5443 00007909 895E24 <1> mov word [bp + bsBPB + ebpbSectorsPerFATLarge], bx 5444 0000790C 894E26 <1> mov word [bp + bsBPB + ebpbSectorsPerFATLarge + 2], cx 5445 0000790F 894E28 <1> mov word [bp + bsBPB + ebpbFSFlags], cx 5446 <1> ; FSVersion, RootCluster, FSINFOSector, BackupSector, Reserved: 5447 <1> ; uninitialised here (initialised by loaded_all later) 5448 <1> 5449 <1> @@: 5450 <1> ; dx:ax = total amount of sectors 5451 00007912 2B46FC <1> sub ax, word [bp + lsvDataStart] 5452 00007915 1B56FE <1> sbb dx, word [bp + lsvDataStart + 2] 5453 <1> 5454 <1> ; dx:ax = total amount of data sectors 5455 00007918 89C3 <1> mov bx, ax 5456 0000791A 92 <1> xchg ax, dx 5457 0000791B 31D2 <1> xor dx, dx 5458 0000791D F776E8 <1> div word [bp + ldClusterSize] 5459 00007920 93 <1> xchg bx, ax 5460 00007921 F776E8 <1> div word [bp + ldClusterSize] 5461 <1> ; bx:ax = quotient, dx = remainder 5462 <1> ; bx:ax = number of clusters 5463 00007924 85DB <1> test bx, bx 5464 00007926 741F <1> jz @FF 5465 <1> ; >= 1_0000h clusters, should be FAT32 5466 00007928 81FBFF0F <1> cmp bx, 0FFFh 5467 0000792C 770D <1> ja .badclusters 5468 0000792E 7505 <1> jne @F 5469 00007930 83F8F5 <1> cmp ax, 0FFF7h - 2 5470 00007933 7706 <1> ja .badclusters 5471 <1> @@: 5472 <1> ; check it is really FAT32 5473 00007935 837E1600 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], 0 5474 00007939 7447 <1> je .gotfattype 5475 <1> 5476 <1> .badclusters: 5477 0000793B BA[4562] <1> mov dx, msg.boot_badclusters 5478 0000793E B80E02 <1> mov ax, 020Eh 5479 00007941 E8BF1F <1> call setrc 5480 00007944 E9D2E0 <1> jmp bootcmd.fail 5481 <1> 5482 <1> @@: 5483 <1> ; <= FFFFh clusters, must be FAT16 or FAT12 5484 <1> ; check it is really not FAT32 5485 00007947 837E1600 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], 0 5486 0000794B 74EE <1> je .badclusters 5487 <1> 5488 0000794D 83F8F5 <1> cmp ax, 0FFF7h - 2 ; too much for FAT16 ? 5489 00007950 77E9 <1> ja .badclusters 5490 00007952 C646E610 <1> mov byte [bp + ldFATType], 16 5491 00007956 3DF50F <1> cmp ax, 0FF7h - 2 ; is it FAT12 ? 5492 00007959 7727 <1> ja .gotfattype ; no, is FAT16 --> 5493 <1> 5494 0000795B C646E60C <1> mov byte [bp + ldFATType], 12 5495 <1> 5496 0000795F F606[F78B]02 <1> testopt [load_ldflags], ldfFATInvalid 5497 00007964 751C <1> jnz .gotfattype 5498 <1> 5499 00007966 53 <1> push bx 5500 00007967 50 <1> push ax 5501 <1> ; (boot.asm code continues here) 5502 <1> 5503 <1> ; Load the entire FAT into memory. This is easily feasible for FAT12, 5504 <1> ; as the FAT can only contain at most 4096 entries. 5505 <1> ; (The exact condition should be "at most 4087 entries", or with a 5506 <1> ; specific FF7h semantic, "at most 4088 entries"; the more reliable 5507 <1> ; and portable alternative would be "at most 4080 entries".) 5508 <1> ; Thus, no more than 6 KiB need to be read, even though the FAT size 5509 <1> ; as indicated by word[sectors_per_fat] could be much higher. The 5510 <1> ; first loop condition below is to correctly handle the latter case. 5511 <1> ; (Sector size is assumed to be a power of two between 32 and 8192 5512 <1> ; bytes, inclusive. An 8 KiB buffer is necessary if the sector size 5513 <1> ; is 4 or 8 KiB, because reading the FAT can or will write to 8 KiB 5514 <1> ; of memory instead of only the relevant 6 KiB. This is always true 5515 <1> ; if the sector size is 8 KiB, and with 4 KiB sector size it is true 5516 <1> ; iff word[sectors_per_fat] is higher than one.) 5517 00007968 BF0018 <1> mov di, 6 << 10 ; maximum size of FAT12 to load 5518 0000796B 8B4E16 <1> mov cx, [bp + bsBPB + bpbSectorsPerFAT] 5519 <1> ; maximum size of this FS's FAT 5520 0000796E 31D2 <1> xor dx, dx 5521 00007970 8B460E <1> mov ax, [bp + bsBPB + bpbReservedSectors]; = first FAT sector 5522 00007973 8B5EF8 <1> mov bx, [bp + lsvFATSeg] 5523 <1> @@: 5524 00007976 E8B8F5 <1> call read_sector ; read next FAT sector 5525 00007979 2B7E0B <1> sub di, [bp + bsBPB + bpbBytesPerSector] 5526 <1> ; di = bytes still left to read 5527 0000797C 7602 <1> jbe @F ; if none --> 5528 <1> ; (jbe means jump if CF || ZF) 5529 0000797E E2F6 <1> loop @B ; if any FAT sector still remains --> 5530 <1> @@: ; one of the limits reached; FAT read 5531 00007980 58 <1> pop ax 5532 00007981 5B <1> pop bx 5533 <1> 5534 <1> .gotfattype: 5535 <1> 5536 <1> ; if bx:ax = 1, then entries 0, 1, 2 are valid 5537 00007982 83C001 <1> add ax, 1 5538 00007985 83D300 <1> adc bx, 0 5539 <1> ; max entry is x+1 (2 if x=1) 5540 <1> 5541 00007988 8946C0 <1> mov word [bp + ldMaxCluster], ax 5542 0000798B 895EC2 <1> mov word [bp + ldMaxCluster + 2], bx 5543 <1> 5544 <1> ; if bx:ax was = 1, then entries below 3 have to exist 5545 0000798E 83C001 <1> add ax, 1 5546 00007991 83D300 <1> adc bx, 0 5547 <1> ; if bx:ax was 1, bx:ax now = 3 5548 <1> 5549 00007994 89DA <1> mov dx, bx 5550 <1> 5551 00007996 807EE610 <1> cmp byte [bp + ldFATType], 16 5552 0000799A 720C <1> jb .check_fat_limit_12 5553 0000799C 7404 <1> je .check_fat_limit_16 5554 <1> .check_fat_limit_32: 5555 0000799E 01C0 <1> add ax, ax 5556 000079A0 11D2 <1> adc dx, dx 5557 <1> .check_fat_limit_16: 5558 000079A2 01C0 <1> add ax, ax 5559 000079A4 11D2 <1> adc dx, dx 5560 000079A6 EB0D <1> jmp @F 5561 <1> 5562 <1> .check_fat_limit_12: 5563 000079A8 89C2 <1> mov dx, ax 5564 000079AA 01C0 <1> add ax, ax 5565 000079AC 01D0 <1> add ax, dx ; * 3 5566 000079AE D1E8 <1> shr ax, 1 ; * 3 / 2 = * 1.5 5567 000079B0 83D000 <1> adc ax, 0 ; if the last nybble is needed 5568 000079B3 31D2 <1> xor dx, dx 5569 <1> 5570 <1> @@: 5571 000079B5 8B5E0B <1> mov bx, word [bp + bsBPB + bpbBytesPerSector] 5572 000079B8 4B <1> dec bx 5573 000079B9 01D8 <1> add ax, bx 5574 000079BB 83D200 <1> adc dx, 0 5575 000079BE 43 <1> inc bx 5576 <1> 5577 000079BF 91 <1> xchg cx, ax 5578 000079C0 89D0 <1> mov ax, dx 5579 000079C2 31D2 <1> xor dx, dx 5580 000079C4 F7F3 <1> div bx 5581 000079C6 91 <1> xchg cx, ax 5582 000079C7 F7F3 <1> div bx 5583 000079C9 87CA <1> xchg cx, dx 5584 <1> ; cx = remainder, dx:ax = number of sectors needed 5585 <1> 5586 000079CB 8B4E16 <1> mov cx, word [bp + bsBPB + bpbSectorsPerFAT] 5587 000079CE 31FF <1> xor di, di ; di:cx = sectors per FAT 5588 <1> ; iff FAT12, FAT16 5589 000079D0 85C9 <1> test cx, cx ; is FAT32 ? 5590 000079D2 7506 <1> jnz @F ; no --> 5591 000079D4 8B4E24 <1> mov cx, word [bp + bsBPB + ebpbSectorsPerFATLarge] 5592 000079D7 8B7E26 <1> mov di, word [bp + bsBPB + ebpbSectorsPerFATLarge + 2] ; for FAT32 5593 <1> @@: 5594 <1> 5595 000079DA 39D7 <1> cmp di, dx 5596 000079DC 7502 <1> jne @F 5597 000079DE 39C1 <1> cmp cx, ax 5598 <1> @@: 5599 000079E0 730C <1> jae @F 5600 <1> .badfat: 5601 000079E2 BA[7462] <1> mov dx, msg.boot_badfat 5602 000079E5 B80F02 <1> mov ax, 020Fh 5603 000079E8 E8181F <1> call setrc 5604 000079EB E92BE0 <1> jmp bootcmd.fail 5605 <1> 5606 <1> @@: 5607 000079EE C3 <1> retn 2636 %endif 2637 2638 2639 %include "bb.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug B commands (permanent breakpoints, break upwards) 5 <1> 6 <1> Copyright (C) 2008-2022 C. Masloch 7 <1> 8 <1> Usage of the works is permitted provided that this 9 <1> instrument is retained with the works, so that any entity 10 <1> that uses the works is notified of this instrument. 11 <1> 12 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 <1> 14 <1> %endif 15 <1> 16 <1> 17 <1> usesection lDEBUG_DATA_ENTRY 18 <1> 19 <1> bb_dispatch: 20 <1> .scan: 21 <1> %if _BREAKPOINTS 22 00008F92 50 <1> db 'P' 23 00008F93 4E <1> db 'N' 24 00008F94 43 <1> db 'C' 25 00008F95 44 <1> db 'D' 26 00008F96 45 <1> db 'E' 27 00008F97 54 <1> db 'T' 28 00008F98 4C <1> db 'L' 29 00008F99 49 <1> db 'I' 30 00008F9A 57 <1> db 'W' 31 <1> %if BPSIZE == 6 || BPSIZE == 9 32 00008F9B 4F <1> db 'O' 33 <1> %endif 34 <1> %endif 35 00008F9C 55 <1> db 'U' ; BU command 36 00008F9D 00 <1> db 0 ; placeholder, never matches 37 <1> .scanamount: equ $ - .scan 38 <1> 39 <1> align 2, db 0 40 <1> .offset: 41 <1> %if _BREAKPOINTS 42 00008F9E [1A7A] <1> dw point_set 43 00008FA0 [E07B] <1> dw point_number 44 00008FA2 [747E] <1> dw point_clear 45 00008FA4 [EE7E] <1> dw point_disable 46 00008FA6 [E27E] <1> dw point_enable 47 00008FA8 [F87E] <1> dw point_toggle 48 00008FAA [027F] <1> dw point_list 49 00008FAC [327C] <1> dw point_id 50 00008FAE [737D] <1> dw point_when 51 <1> %if BPSIZE == 6 || BPSIZE == 9 52 00008FB0 [177D] <1> dw point_offset 53 <1> %endif 54 <1> %endif 55 00008FB2 [A181] <1> dw bu_breakpoint 56 00008FB4 [BC98] <1> dw error 57 <1> .offsetamount: equ ($ - .offset) / 2 58 <1> 59 <1> %if .scanamount != .offsetamount 60 <1> %error bb dispatch mismatch 61 <1> %endif 62 <1> 63 <1> 64 <1> usesection lDEBUG_CODE 65 <1> 66 <1> bb: 67 <1> %if _BOOTLDR 68 000079EF F606[C500]40 <1> testopt [internalflags], nodosloaded 69 000079F4 740F <1> jz @F 70 000079F6 4E <1> dec si 71 000079F7 4E <1> dec si ; -> at 'B' 72 000079F8 BA[6C63] <1> mov dx, msg.boot 73 000079FB E8F032 <1> call isstring? ; check for "BOOT" 74 000079FE 7503E970DB <1> je bootcmd 75 00007A03 46 <1> inc si ; skip 'B' 76 00007A04 AC <1> lodsb ; load next 77 <1> @@: 78 <1> %endif 79 00007A05 E8B207 <1> call uppercase 80 00007A08 BF[928F] <1> mov di, bb_dispatch.scan 81 00007A0B B90C00 <1> mov cx, bb_dispatch.scanamount 82 00007A0E F2AE <1> repne scasb 83 <1> ; di -> behind the NUL if no valid subcommand 84 00007A10 81EF[938F] <1> sub di, bb_dispatch.scan + 1 85 00007A14 D1E7 <1> shl di, 1 86 00007A16 FFA5[9E8F] <1> jmp near word [bb_dispatch.offset + di] 87 <1> 88 <1> 89 <1> %if _BREAKPOINTS 90 <1> point_set: 91 00007A1A E88533 <1> call skipwhite 92 <1> 93 00007A1D E8DC06 <1> call getpointat ; "AT" keyword ? 94 00007A20 720B <1> jc .not_at ; no --> 95 00007A22 BF[607A] <1> mov di, .get_saved ; access saved address later 96 00007A25 E89206 <1> call findpointat ; do we find it ? 97 00007A28 7210 <1> jc .find_new ; no, treat as if "NEW" keyword given --> 98 <1> ; point index is in dx 99 00007A2A 52 <1> push dx 100 00007A2B EB51 <1> jmp @FF ; skip check whether used 101 <1> 102 <1> .not_at: 103 00007A2D BF[547A] <1> mov di, .get_addr ; get address from input command line later 104 00007A30 E8EA06 <1> call getpointindex 105 00007A33 7338 <1> jnc @F ; got an index --> 106 00007A35 7503E9821E <1> jz error ; "ALL" is invalid 107 <1> ; got "NEW" keyword 108 <1> .find_new: 109 00007A3A 31C9 <1> xor cx, cx 110 00007A3C 50 <1> push ax 111 <1> .new_loop: 112 00007A3D 89C8 <1> mov ax, cx ; try this index 113 00007A3F E86906 <1> call calcpointbit 114 <1> %if ((_NUM_B_BP+7)>>3) != 1 115 00007A42 84A7[0201] <1> test byte [b_bplist.used_mask+bx], ah 116 <1> %else 117 <1> test byte [b_bplist.used_mask], ah 118 <1> %endif 119 00007A46 7421 <1> jz .new_found ; found unused one --> 120 <1> 121 00007A48 41 <1> inc cx ; = next index 122 00007A49 83F910 <1> cmp cx, _NUM_B_BP ; valid ? 123 00007A4C 72EF <1> jb .new_loop ; yes, try next --> 124 <1> 125 00007A4E BA[BB70] <1> mov dx, msg.bb_no_new 126 00007A51 E9838A <1> jmp prnquit 127 <1> 128 <1> 129 <1> ; INP: al=, si-> input line 130 <1> ; OUT: al=, si-> after 131 <1> ; bx:dx = linear adddress 132 <1> ; does not return if error 133 <1> ; CHG: edxh 134 <1> .get_addr: 135 00007A54 8B1E[880C] <1> mov bx, word [reg_cs] 136 00007A58 E8B7BA <1> call getlinearaddr 137 00007A5B 730B <1> jnc .retn 138 00007A5D E95C1E <1> jmp error 139 <1> 140 <1> 141 <1> ; INP: al=, si-> input line 142 <1> ; OUT: bx:dx = linear address 143 <1> ; CHG: - 144 <1> .get_saved: 145 00007A60 8B16[B88F] <1> mov dx, word [..@bb_saved_linear] 146 00007A64 8B1E[BA8F] <1> mov bx, word [..@bb_saved_linear + 2] 147 <1> .retn: 148 00007A68 C3 <1> retn 149 <1> 150 <1> usesection lDEBUG_DATA_ENTRY 151 00008FB6 00 <1> align 4, db 0 152 <1> ..@bb_saved_linear: 153 00008FB8 00000000 <1> dd 0 154 <1> usesection lDEBUG_CODE 155 <1> 156 <1> 157 <1> .new_found: 158 00007A69 58 <1> pop ax 159 00007A6A 51 <1> push cx 160 00007A6B EB11 <1> jmp @FF 161 <1> 162 <1> @@: 163 00007A6D 52 <1> push dx 164 00007A6E 50 <1> push ax 165 00007A6F 89D0 <1> mov ax, dx 166 00007A71 E83706 <1> call calcpointbit 167 <1> %if ((_NUM_B_BP+7)>>3) != 1 168 00007A74 84A7[0201] <1> test byte [b_bplist.used_mask+bx], ah 169 <1> %else 170 <1> test byte [b_bplist.used_mask], ah 171 <1> %endif 172 00007A78 58 <1> pop ax 173 00007A79 7403E93E1E <1> jnz error 174 <1> @@: 175 00007A7E FFD7 <1> call di ; call either .get_addr or .get_saved 176 <1> ; in any case, bx:dx = linear address 177 00007A80 BF0080 <1> mov di, 8000h ; default counter 178 00007A83 52 <1> push dx 179 00007A84 31D2 <1> xor dx, dx 180 <1> 181 <1> usesection lDEBUG_DATA_ENTRY 182 <1> align 4, db 0 183 <1> ..@bb_id_start: 184 00008FBC 0000 <1> dw 0 185 <1> ..@bb_id_length: 186 00008FBE 0000 <1> dw 0 187 <1> ..@bb_when_start: 188 00008FC0 0000 <1> dw 0 189 <1> ..@bb_when_length: 190 00008FC2 0000 <1> dw 0 191 <1> usesection lDEBUG_CODE 192 <1> 193 <1> 194 00007A86 8916[BE8F] <1> mov word [..@bb_id_length], dx 195 00007A8A 8916[C28F] <1> mov word [..@bb_when_length], dx 196 <1> ; initialise to empty ID 197 00007A8E 52 <1> push dx 198 <1> .loop_additional: 199 00007A8F E81133 <1> call skipwh0 200 00007A92 4E <1> dec si 201 00007A93 BA[0A66] <1> mov dx, msg.number 202 00007A96 E85532 <1> call isstring? 203 00007A99 7435 <1> je .additional_number 204 00007A9B BA[1166] <1> mov dx, msg.counter 205 00007A9E E84D32 <1> call isstring? 206 00007AA1 742D <1> je .additional_number 207 00007AA3 BA[1966] <1> mov dx, msg.id 208 00007AA6 E84532 <1> call isstring? 209 00007AA9 7454 <1> je .additional_id 210 00007AAB BA[1C66] <1> mov dx, msg.when 211 00007AAE E83D32 <1> call isstring? 212 00007AB1 743E <1> je .additional_when 213 <1> %if BPSIZE == 6 || BPSIZE == 9 214 00007AB3 BA[2166] <1> mov dx, msg.offset 215 00007AB6 E83532 <1> call isstring? 216 00007AB9 7425 <1> je .additional_offset 217 <1> %endif 218 00007ABB AC <1> lodsb 219 00007ABC E88E32 <1> call iseol? 220 00007ABF 7445 <1> je .no_additional 221 00007AC1 5A <1> pop dx 222 00007AC2 85D2 <1> test dx, dx ; already got a number without keyword? 223 00007AC4 7403E9F31D <1> jnz error ; yes --> 224 00007AC9 42 <1> inc dx ; remember for subsequent iterations 225 00007ACA 52 <1> push dx 226 00007ACB E8D532 <1> call skipwh0 227 00007ACE EB0B <1> jmp @F 228 <1> 229 <1> .additional_number: 230 00007AD0 E8B932 <1> call skipequals 231 00007AD3 E87732 <1> call iseol? 232 00007AD6 7503E9E11D <1> je error 233 <1> @@: 234 00007ADB E8CE00 <1> call getcounter 235 00007ADE EBAF <1> jmp .loop_additional 236 <1> 237 <1> %if BPSIZE == 6 || BPSIZE == 9 238 <1> .additional_offset: 239 00007AE0 5A <1> pop dx 240 00007AE1 80CA01 <1> or dl, 1 ; remember for subsequent iterations 241 <1> ; not to accept number without keyword 242 00007AE4 52 <1> push dx 243 00007AE5 E8A432 <1> call skipequals 244 <1> %if _PM 245 <1> push bx 246 <1> call getdword 247 <1> mov word [bp_offset], dx 248 <1> mov word [bp_offset + 2], bx 249 <1> pop bx 250 <1> %else 251 00007AE8 E84131 <1> call getword 252 00007AEB 8916[B086] <1> mov word [bp_offset], dx 253 <1> %endif 254 00007AEF EB9E <1> jmp .loop_additional 255 <1> %endif 256 <1> 257 <1> .additional_when: 258 00007AF1 5A <1> pop dx 259 00007AF2 80CA01 <1> or dl, 1 ; remember for subsequent iterations 260 <1> ; not to accept number without keyword 261 00007AF5 52 <1> push dx 262 00007AF6 E89332 <1> call skipequals 263 00007AF9 4E <1> dec si 264 00007AFA E88400 <1> call get_when 265 00007AFD EB90 <1> jmp .loop_additional 266 <1> 267 <1> .additional_id: 268 00007AFF E88A32 <1> call skipequals 269 00007B02 4E <1> dec si 270 00007B03 E84B00 <1> call get_id 271 <1> 272 <1> .no_additional: 273 00007B06 5A <1> pop dx ; discard non-keyword NUMBER indicator 274 00007B07 5A <1> pop dx ; restore dx = low word of linear 275 <1> 276 00007B08 87DA <1> xchg bx, dx ; dx:bx = linear 277 00007B0A 93 <1> xchg bx, ax ; dx:ax = linear 278 00007B0B 5B <1> pop bx ; = 0-based point index to set 279 00007B0C 52 <1> push dx 280 00007B0D 50 <1> push ax ; on stack: dword linear 281 <1> 282 00007B0E 57 <1> push di 283 00007B0F 87D3 <1> xchg dx, bx ; dx = point index 284 <1> 285 <1> ; As for set_id, set_when will free a prior condition 286 <1> ; when writing the new one. However, we check for the 287 <1> ; appropriate buffer size being still free before 288 <1> ; calling set_when because we want to cancel the point 289 <1> ; initialisation if either the ID or the condition do 290 <1> ; not fit, without having yet written anything. 291 00007B11 E8E702 <1> call check_when_space ; CHG ax, bx, cx, si, di 292 <1> 293 <1> ; Note that point_clear and init both leave the 294 <1> ; empty word in the ID array. Therefore we can 295 <1> ; always handle this by freeing the prior value 296 <1> ; first, which is required if we're resetting 297 <1> ; an existing point with BP AT. 298 <1> ; The set_id function takes care of this. 299 00007B14 E85A01 <1> call set_id ; CHG ax, bx, cx, si, di 300 <1> 301 <1> ; After check_when_space then set_id both returned, 302 <1> ; we have finally checked all error conditions and 303 <1> ; are now actually modifying things. 304 00007B17 E8A502 <1> call set_when ; CHG ax, bx, cx, si, di 305 00007B1A 92 <1> xchg ax, dx ; ax = point index 306 00007B1B 5F <1> pop di ; preserve counter value 307 <1> 308 00007B1C 89C3 <1> mov bx, ax 309 00007B1E 01DB <1> add bx, bx 310 00007B20 01DB <1> add bx, bx 311 <1> %if BPSIZE == 4 312 <1> %elif BPSIZE == 5 313 <1> add bx, ax 314 <1> %elif BPSIZE == 6 315 00007B22 01C3 <1> add bx, ax ; * 5 316 00007B24 01C3 <1> add bx, ax ; * 6 317 <1> %elif BPSIZE == 9 318 <1> add bx, bx ; * 8 319 <1> add bx, ax ; * 9 320 <1> %else 321 <1> %error Unexpected breakpoint size 322 <1> %endif 323 00007B26 8F87[0601] <1> pop word [ b_bplist.bp + bx ] 324 <1> ; These two instructions need to stay in that order. 325 <1> ; For the non-PM version, the pop overwrites the byte 326 <1> ; that is then initialized to 0CCh (the breakpoint 327 <1> ; content byte). 328 <1> ; (This is not true for BPSIZE == 6. Instead, the pop 329 <1> ; overwrites the first byte of the preferred offset.) 330 00007B2A 8F87[0801] <1> pop word [ b_bplist.bp + bx + 2 ] 331 00007B2E C687[0B01]CC <1> mov byte [ b_bplist.bp + bx + BPSIZE - 1 ], 0CCh 332 <1> %if BPSIZE == 6 333 00007B33 FF36[B086] <1> push word [bp_offset] 334 00007B37 8F87[0901] <1> pop word [ b_bplist.bp + bx + 3 ] 335 <1> %elif BPSIZE == 9 336 <1> push word [bp_offset] 337 <1> pop word [ b_bplist.bp + bx + 4 ] 338 <1> push word [bp_offset + 2] 339 <1> pop word [ b_bplist.bp + bx + 6 ] 340 <1> %endif 341 00007B3B 89C3 <1> mov bx, ax 342 00007B3D 01DB <1> add bx, bx 343 00007B3F 89BF[6601] <1> mov word [ b_bplist.counter + bx ], di 344 00007B43 E86505 <1> call calcpointbit 345 <1> %if ((_NUM_B_BP+7)>>3) != 1 346 00007B46 08A7[0201] <1> or byte [b_bplist.used_mask+bx], ah 347 00007B4A F6D4 <1> not ah 348 00007B4C 20A7[0401] <1> and byte [b_bplist.disabled_mask+bx], ah 349 <1> %if _BREAKPOINTS_STICKY 350 <1> and byte [b_bplist.sticky_mask+bx], ah 351 <1> %endif 352 <1> %else 353 <1> or byte [b_bplist.used_mask], ah 354 <1> not ah 355 <1> and byte [b_bplist.disabled_mask], ah 356 <1> %if _BREAKPOINTS_STICKY 357 <1> and byte [b_bplist.sticky_mask], ah 358 <1> %endif 359 <1> %endif 360 00007B50 C3 <1> retn 361 <1> 362 <1> 363 <1> ; INP: si -> first non-blank character 364 <1> ; OUT: ..@bb_id_start and ..@bb_id_length set 365 <1> ; does not return if error (too long) 366 <1> ; CHG: ax, cx, si 367 <1> get_id: 368 00007B51 8936[BC8F] <1> mov word [..@bb_id_start], si 369 <1> @@: 370 00007B55 AC <1> lodsb 371 00007B56 E8F831 <1> call iseol?.notsemicolon 372 00007B59 75FA <1> jne @B 373 <1> ; si -> after EOL char 374 <1> ; si - 1 -> EOL char 375 <1> @@: 376 00007B5B 4E <1> dec si 377 00007B5C 3B36[BC8F] <1> cmp si, word [..@bb_id_start] 378 00007B60 740C <1> je @F 379 00007B62 807CFF20 <1> cmp byte [si - 1], 32 380 00007B66 74F3 <1> je @B 381 00007B68 807CFF09 <1> cmp byte [si - 1], 9 382 00007B6C 74ED <1> je @B 383 <1> @@: 384 00007B6E 89F1 <1> mov cx, si 385 00007B70 2B0E[BC8F] <1> sub cx, word [..@bb_id_start] 386 00007B74 890E[BE8F] <1> mov word [..@bb_id_length], cx 387 00007B78 83F93F <1> cmp cx, 63 388 00007B7B 7603E93C1D <1> ja error 389 <1> 390 <1> %if 0 391 <1> push dx 392 <1> mov dx, msg.id 393 <1> call putsz 394 <1> mov al, 32 395 <1> call putc 396 <1> mov al, '"' 397 <1> call putc 398 <1> mov dx, word [..@bb_id_start] 399 <1> mov cx, word [..@bb_id_length] 400 <1> call disp_message_length_cx 401 <1> mov al, '"' 402 <1> call putc 403 <1> mov dx, crlf 404 <1> call putsz 405 <1> pop dx 406 <1> %endif 407 00007B80 C3 <1> retn 408 <1> 409 <1> 410 <1> ; INP: si -> first non-blank character 411 <1> ; OUT: ..@bb_when_start and ..@bb_when_length set 412 <1> ; does not return if error 413 <1> ; al = character after the condition, si -> next 414 <1> ; CHG: ax, cx, si 415 <1> get_when: 416 00007B81 8936[C08F] <1> mov word [..@bb_when_start], si 417 <1> @@: 418 00007B85 AC <1> lodsb 419 00007B86 52 <1> push dx 420 00007B87 53 <1> push bx 421 00007B88 E8D92B <1> call getexpression 422 00007B8B 5B <1> pop bx 423 00007B8C 5A <1> pop dx 424 <1> ; si -> after condition char 425 <1> ; si - 1 -> last condition char 426 <1> @@: 427 00007B8D 4E <1> dec si 428 00007B8E 3B36[C08F] <1> cmp si, word [..@bb_when_start] 429 00007B92 740C <1> je @F 430 00007B94 807CFF20 <1> cmp byte [si - 1], 32 431 00007B98 74F3 <1> je @B 432 00007B9A 807CFF09 <1> cmp byte [si - 1], 9 433 00007B9E 74ED <1> je @B 434 <1> @@: 435 00007BA0 89F1 <1> mov cx, si 436 00007BA2 2B0E[C08F] <1> sub cx, word [..@bb_when_start] 437 00007BA6 890E[C28F] <1> mov word [..@bb_when_length], cx 438 <1> 439 00007BAA AC <1> lodsb 440 <1> %if 0 441 <1> push dx 442 <1> mov dx, msg.when 443 <1> call putsz 444 <1> mov al, 32 445 <1> call putc 446 <1> mov al, '"' 447 <1> call putc 448 <1> mov dx, word [..@bb_when_start] 449 <1> mov cx, word [..@bb_when_length] 450 <1> call disp_message_length_cx 451 <1> mov al, '"' 452 <1> call putc 453 <1> mov dx, crlf 454 <1> call putsz 455 <1> dec si 456 <1> lodsb 457 <1> pop dx 458 <1> %endif 459 00007BAB C3 <1> retn 460 <1> 461 <1> 462 <1> ; INP: al = first character, si -> next character 463 <1> ; di = default value 464 <1> ; OUT: di = counter value (default if EOL) 465 <1> ; al = first character after number, si -> next 466 <1> ; CHG: - 467 <1> ; does not return if error encountered 468 <1> getcounter: 469 <1> .: 470 00007BAC E8F431 <1> call skipwh0 471 00007BAF E89B31 <1> call iseol? 472 00007BB2 7407 <1> je .got_counter 473 00007BB4 52 <1> push dx 474 00007BB5 E87430 <1> call getword 475 00007BB8 89D7 <1> mov di, dx 476 00007BBA 5A <1> pop dx 477 <1> .got_counter: 478 00007BBB C3 <1> retn 479 <1> 480 <1> 481 <1> ; INP: al = first character, si -> next character 482 <1> ; OUT: di = counter value (defaults to 8000h) 483 <1> ; CHG: ax, si (flags not changed) 484 <1> ; does not return if error encountered 485 <1> .pushf_chkeol: 486 00007BBC BF0080 <1> mov di, 8000h ; default counter 487 00007BBF 9C <1> pushf 488 00007BC0 52 <1> push dx 489 00007BC1 4E <1> dec si 490 00007BC2 BA[0A66] <1> mov dx, msg.number 491 00007BC5 E82631 <1> call isstring? 492 00007BC8 7408 <1> je @F 493 00007BCA BA[1166] <1> mov dx, msg.counter 494 00007BCD E81E31 <1> call isstring? 495 00007BD0 7504 <1> jne @FF 496 <1> @@: 497 00007BD2 E8B731 <1> call skipequals 498 00007BD5 A8 <1> db __TEST_IMM8 ; (skip lodsb) 499 <1> @@: 500 00007BD6 AC <1> lodsb 501 00007BD7 5A <1> pop dx 502 00007BD8 E8D1FF <1> call . 503 00007BDB E88431 <1> call chkeol 504 00007BDE 9D <1> popf 505 00007BDF C3 <1> retn 506 <1> 507 <1> 508 <1> point_number: 509 00007BE0 E8BF31 <1> call skipwhite 510 <1> 511 00007BE3 E81605 <1> call getpointat ; "AT" keyword ? 512 00007BE6 720D <1> jc .not_at ; no --> 513 00007BE8 E8CF04 <1> call findpointat ; do we find it ? 514 00007BEB 7303E9CC1C <1> jc error ; not found --> 515 00007BF0 E8C9FF <1> call getcounter.pushf_chkeol 516 00007BF3 EB26 <1> jmp @F ; point index is in dx --> 517 <1> 518 <1> .not_at: 519 00007BF5 E82505 <1> call getpointindex 520 00007BF8 E8C1FF <1> call getcounter.pushf_chkeol 521 00007BFB 731E <1> jnc @F 522 00007BFD 7403E9BA1C <1> jnz error ; "NEW" is invalid --> 523 <1> 524 00007C02 31C9 <1> xor cx, cx 525 <1> .all_loop: 526 00007C04 89C8 <1> mov ax, cx 527 00007C06 89CA <1> mov dx, cx 528 00007C08 E8A004 <1> call calcpointbit 529 <1> %if ((_NUM_B_BP+7)>>3) != 1 530 00007C0B 84A7[0201] <1> test byte [b_bplist.used_mask+bx], ah 531 <1> %else 532 <1> test byte [b_bplist.used_mask], ah 533 <1> %endif 534 00007C0F 7403 <1> jz .all_next 535 00007C11 E81500 <1> call .setnumber 536 <1> .all_next: 537 00007C14 41 <1> inc cx 538 00007C15 83F910 <1> cmp cx, _NUM_B_BP 539 00007C18 72EA <1> jb .all_loop 540 00007C1A C3 <1> retn 541 <1> 542 <1> @@: 543 00007C1B 89D0 <1> mov ax, dx 544 00007C1D E88B04 <1> call calcpointbit 545 <1> %if ((_NUM_B_BP+7)>>3) != 1 546 00007C20 84A7[0201] <1> test byte [b_bplist.used_mask+bx], ah 547 <1> %else 548 <1> test byte [b_bplist.used_mask], ah 549 <1> %endif 550 00007C24 7503E9931C <1> jz error 551 <1> 552 <1> .setnumber: 553 00007C29 89D3 <1> mov bx, dx 554 00007C2B 01DB <1> add bx, bx 555 00007C2D 89BF[6601] <1> mov word [b_bplist.counter + bx], di 556 00007C31 C3 <1> retn 557 <1> 558 <1> 559 <1> point_id: 560 00007C32 E86D31 <1> call skipwhite 561 <1> 562 00007C35 E8C404 <1> call getpointat ; "AT" keyword ? 563 00007C38 720A <1> jc .not_at ; no --> 564 00007C3A E87D04 <1> call findpointat ; do we find it ? 565 00007C3D 7303E97A1C <1> jc error ; not found --> 566 00007C42 EB08 <1> jmp @F ; point index is in dx --> 567 <1> 568 <1> .not_at: 569 00007C44 E8D604 <1> call getpointindex 570 00007C47 7303E9701C <1> jc error ; "NEW" and "ALL" keywords are invalid --> 571 <1> 572 <1> @@: 573 00007C4C 50 <1> push ax 574 00007C4D 89D0 <1> mov ax, dx 575 00007C4F E85904 <1> call calcpointbit 576 <1> %if ((_NUM_B_BP+7)>>3) != 1 577 00007C52 84A7[0201] <1> test byte [b_bplist.used_mask+bx], ah 578 <1> %else 579 <1> test byte [b_bplist.used_mask], ah 580 <1> %endif 581 00007C56 7503E9611C <1> jz error 582 00007C5B 58 <1> pop ax 583 <1> 584 00007C5C E84431 <1> call skipwh0 585 <1> 586 00007C5F 4E <1> dec si 587 00007C60 52 <1> push dx 588 00007C61 BA[1966] <1> mov dx, msg.id 589 00007C64 E88730 <1> call isstring? 590 00007C67 7504 <1> jne .no_id_kw 591 00007C69 E82031 <1> call skipequals 592 00007C6C 4E <1> dec si 593 <1> .no_id_kw: 594 00007C6D 5A <1> pop dx 595 00007C6E E8E0FE <1> call get_id 596 <1> 597 <1> ; INP: ..@bb_id_start 598 <1> ; ..@bb_id_length 599 <1> ; dx = point index 600 <1> ; OUT: jumps to error if failure (too long) 601 <1> ; CHG: ax, bx, cx, si, di 602 <1> set_id: 603 00007C71 BBFFFF <1> mov bx, -1 604 00007C74 E84000 <1> call get_set_id_offset_length 605 00007C77 B10A <1> mov cl, 10 606 00007C79 89D8 <1> mov ax, bx 607 00007C7B D3EB <1> shr bx, cl ; bx = length of ID to free 608 <1> 609 00007C7D 8B36[C601] <1> mov si, word [b_bplist.idbuffer.free] 610 <1> ; offset free 611 00007C81 F7DE <1> neg si ; - offset free 612 00007C83 81C68001 <1> add si, b_bplist.idbuffer.length 613 <1> ; 1024 - offset free = amount free 614 00007C87 01DE <1> add si, bx ; amount free + length of ID to free 615 00007C89 8B0E[BE8F] <1> mov cx, word [..@bb_id_length] 616 00007C8D E33F <1> jcxz .empty ; if no ID to set --> 617 00007C8F 39CE <1> cmp si, cx ; enough free ? 618 00007C91 8B36[BC8F] <1> mov si, word [..@bb_id_start] 619 <1> ; -> ID string 620 00007C95 7303E9221C <1> jb error ; no --> 621 <1> 622 00007C9A 51 <1> push cx 623 00007C9B E83700 <1> call free_id ; actually free it now 624 00007C9E 59 <1> pop cx 625 00007C9F 51 <1> push cx 626 00007CA0 89CB <1> mov bx, cx ; length 627 00007CA2 B10A <1> mov cl, 10 ; offset part is 10 bits (0..1023) 628 00007CA4 D3E3 <1> shl bx, cl ; length is in top 6 bits (0..63) 629 00007CA6 59 <1> pop cx 630 00007CA7 8B3E[C601] <1> mov di, word [b_bplist.idbuffer.free] 631 <1> ; = offset of free part 632 00007CAB 010E[C601] <1> add word [b_bplist.idbuffer.free], cx 633 <1> ; mark space as used 634 00007CAF 09FB <1> or bx, di ; OR in the offset 635 00007CB1 81C7[CA01] <1> add di, b_bplist.idbuffer 636 <1> ; -> into buffer space 637 00007CB5 F3A4 <1> rep movsb ; write 638 <1> 639 <1> ; now remember this 640 <1> .after_empty: 641 <1> ; INP: dx = 0-based point index 642 <1> ; bx = word to set (-1 if not to modify) 643 <1> ; OUT: bx = word read 644 <1> get_set_id_offset_length: equ $ 645 00007CB7 87D3 <1> xchg dx, bx 646 00007CB9 D1E3 <1> shl bx, 1 647 00007CBB FFB7[8601] <1> push word [b_bplist.id + bx] 648 00007CBF 83FAFF <1> cmp dx, -1 649 00007CC2 7404 <1> je @F 650 00007CC4 8997[8601] <1> mov word [b_bplist.id + bx], dx 651 <1> @@: 652 00007CC8 5A <1> pop dx 653 00007CC9 D1EB <1> shr bx, 1 654 00007CCB 87D3 <1> xchg dx, bx 655 00007CCD C3 <1> retn 656 <1> 657 <1> .empty: 658 00007CCE E80400 <1> call free_id 659 00007CD1 31DB <1> xor bx, bx ; offset = 0 and length = 0 660 00007CD3 EBE2 <1> jmp .after_empty 661 <1> 662 <1> 663 <1> ; INP: ax = offset/length word of ID to free 664 <1> ; (length zero means none) 665 <1> ; b_bplist.id = ID array (ONE of which matches ax) 666 <1> ; CHG: ax, bx, cx 667 <1> ; OUT: b_bplist.id entries adjusted 668 <1> ; (the one that is being freed is unaffected) 669 <1> ; b_bplist.idbuffer adjusted 670 <1> ; STT: UP, ss = ds = es 671 <1> ; REM: The b_bplist.id array contains zeroes as 672 <1> ; indicators of unused entries. This implies 673 <1> ; that the length field is zero too. However, 674 <1> ; the canonical NULL entry is *all* zeros. 675 <1> free_id: 676 00007CD5 B10A <1> mov cl, 10 677 00007CD7 89C3 <1> mov bx, ax 678 00007CD9 81E3FF03 <1> and bx, 1023 ; bx = offset of ID to free 679 00007CDD D3E8 <1> shr ax, cl ; ax = length of ID to free 680 00007CDF 91 <1> xchg cx, ax ; cx = length of ID to free 681 <1> 682 00007CE0 56 <1> push si 683 00007CE1 57 <1> push di 684 <1> 685 00007CE2 E330 <1> jcxz .return ; if none to free --> 686 <1> 687 00007CE4 51 <1> push cx 688 00007CE5 8DBF[CA01] <1> lea di, [b_bplist.idbuffer + bx] 689 <1> ; -> ID to be freed 690 <1> ; (destination of following data) 691 00007CE9 89FE <1> mov si, di 692 00007CEB 01CE <1> add si, cx ; -> behind ID to be freed 693 <1> ; (source of following data) 694 00007CED 89F1 <1> mov cx, si 695 00007CEF F7D9 <1> neg cx ; minus pointer to first subsequent data 696 00007CF1 81C1[4A03] <1> add cx, b_bplist.idbuffer + b_bplist.idbuffer.length 697 <1> ; pointer behind buffer - pointer subsequent data 698 <1> ; = length of data to move 699 00007CF5 F3A4 <1> rep movsb ; now di -> first uninitialised byte 700 00007CF7 59 <1> pop cx ; = length of data freed 701 <1> 702 00007CF8 290E[C601] <1> sub word [b_bplist.idbuffer.free], cx 703 <1> ; mark as free 704 00007CFC 51 <1> push cx 705 00007CFD 30C0 <1> xor al, al 706 00007CFF F3AA <1> rep stosb ; clear the buffer trailer (uninitialised part) 707 00007D01 5F <1> pop di ; di = length of data freed 708 <1> 709 00007D02 BE[8601] <1> mov si, b_bplist.id 710 <1> %if _NUM_B_BP < 256 711 00007D05 B110 <1> mov cl, _NUM_B_BP 712 <1> %else 713 <1> mov cx, _NUM_B_BP 714 <1> %endif 715 <1> .loop: 716 00007D07 AD <1> lodsw 717 00007D08 25FF03 <1> and ax, 1023 ; get offset 718 00007D0B 39D8 <1> cmp ax, bx ; offset matches what we're freeing ?, OR 719 <1> ; is it below/equal the offset we're freeing ? 720 00007D0D 7603 <1> jbe .next ; yes --> (also jumps if ax == 0) 721 00007D0F 297CFE <1> sub word [si - 2], di ; adjust offset 722 <1> ; This subtraction shouldn't underflow the 10 bits 723 <1> ; used for the offset, so it should leave the top 724 <1> ; 6 bits for the ID length unchanged. 725 <1> .next: 726 00007D12 E2F3 <1> loop .loop 727 <1> 728 <1> .return: 729 00007D14 5F <1> pop di 730 00007D15 5E <1> pop si 731 00007D16 C3 <1> retn 732 <1> 733 <1> 734 <1> %if BPSIZE == 6 || BPSIZE == 9 735 <1> point_offset: 736 00007D17 E88830 <1> call skipwhite 737 <1> 738 00007D1A E8DF03 <1> call getpointat ; "AT" keyword ? 739 00007D1D 720A <1> jc .not_at ; no --> 740 00007D1F E89803 <1> call findpointat ; do we find it ? 741 00007D22 7303E9951B <1> jc error ; not found --> 742 00007D27 EB08 <1> jmp @F ; point index is in dx --> 743 <1> 744 <1> .not_at: 745 00007D29 E8F103 <1> call getpointindex 746 00007D2C 7303E98B1B <1> jc error ; "NEW" and "ALL" keywords are invalid --> 747 <1> 748 <1> @@: 749 00007D31 50 <1> push ax 750 00007D32 89D0 <1> mov ax, dx 751 00007D34 E87403 <1> call calcpointbit 752 <1> %if ((_NUM_B_BP+7)>>3) != 1 753 00007D37 84A7[0201] <1> test byte [b_bplist.used_mask+bx], ah 754 <1> %else 755 <1> test byte [b_bplist.used_mask], ah 756 <1> %endif 757 00007D3B 7503E97C1B <1> jz error 758 00007D40 58 <1> pop ax 759 <1> 760 00007D41 E85F30 <1> call skipwh0 761 00007D44 52 <1> push dx 762 00007D45 BAFFFF <1> mov dx, -1 763 <1> %if BPSIZE == 9 764 <1> mov bx, dx 765 <1> %endif 766 00007D48 E80230 <1> call iseol? 767 00007D4B 7414 <1> je @F 768 00007D4D 4E <1> dec si 769 00007D4E BA[2166] <1> mov dx, msg.offset 770 00007D51 E89A2F <1> call isstring? 771 00007D54 7504 <1> jne .no_offset_kw 772 00007D56 E83330 <1> call skipequals 773 00007D59 4E <1> dec si 774 <1> .no_offset_kw: 775 00007D5A AC <1> lodsb 776 <1> %if BPSIZE == 9 777 <1> call getdword ; bx:dx = offset 778 <1> %else 779 00007D5B E8CE2E <1> call getword ; dx = offset 780 <1> %endif 781 00007D5E E80130 <1> call chkeol 782 <1> @@: 783 00007D61 58 <1> pop ax 784 00007D62 89C7 <1> mov di, ax 785 00007D64 01FF <1> add di, di 786 00007D66 01FF <1> add di, di ; * 4 787 <1> %if BPSIZE == 6 788 00007D68 01C7 <1> add di, ax ; * 5 789 00007D6A 01C7 <1> add di, ax ; * 6 790 00007D6C 81C7[0901] <1> add di, b_bplist.bp + 3 791 <1> %elif BPSIZE == 9 792 <1> add di, di ; * 8 793 <1> add di, ax ; * 9 794 <1> add di, b_bplist.bp + 4 795 <1> %else 796 <1> %error Unexpected breakpoint size 797 <1> %endif 798 00007D70 92 <1> xchg ax, dx 799 00007D71 AB <1> stosw ; store low word of offset 800 <1> %if BPSIZE == 9 801 <1> xchg ax, bx 802 <1> stosw ; store high word of offset 803 <1> %endif 804 00007D72 C3 <1> retn 805 <1> %endif 806 <1> 807 <1> 808 <1> point_when: 809 00007D73 E82C30 <1> call skipwhite 810 <1> 811 00007D76 E88303 <1> call getpointat ; "AT" keyword ? 812 00007D79 720A <1> jc .not_at ; no --> 813 00007D7B E83C03 <1> call findpointat ; do we find it ? 814 00007D7E 7303E9391B <1> jc error ; not found --> 815 00007D83 EB08 <1> jmp @F ; point index is in dx --> 816 <1> 817 <1> .not_at: 818 00007D85 E89503 <1> call getpointindex 819 00007D88 7303E92F1B <1> jc error ; "NEW" and "ALL" keywords are invalid --> 820 <1> 821 <1> @@: 822 00007D8D 50 <1> push ax 823 00007D8E 89D0 <1> mov ax, dx 824 00007D90 E81803 <1> call calcpointbit 825 <1> %if ((_NUM_B_BP+7)>>3) != 1 826 00007D93 84A7[0201] <1> test byte [b_bplist.used_mask+bx], ah 827 <1> %else 828 <1> test byte [b_bplist.used_mask], ah 829 <1> %endif 830 00007D97 7503E9201B <1> jz error 831 00007D9C 58 <1> pop ax 832 <1> 833 00007D9D E80330 <1> call skipwh0 834 00007DA0 8326[C28F]00 <1> and word [..@bb_when_length], 0 835 00007DA5 E8A52F <1> call iseol? 836 00007DA8 7415 <1> je @F 837 00007DAA 4E <1> dec si 838 00007DAB 52 <1> push dx 839 00007DAC BA[1C66] <1> mov dx, msg.when 840 00007DAF E83C2F <1> call isstring? 841 00007DB2 7504 <1> jne .no_when_kw 842 00007DB4 E8D52F <1> call skipequals 843 00007DB7 4E <1> dec si 844 <1> .no_when_kw: 845 00007DB8 5A <1> pop dx 846 00007DB9 E8C5FD <1> call get_when 847 00007DBC E8A32F <1> call chkeol 848 <1> @@: 849 <1> 850 <1> 851 <1> ; INP: ..@bb_when_start 852 <1> ; ..@bb_when_length 853 <1> ; dx = point index 854 <1> ; OUT: jumps to error if failure (too long) 855 <1> ; CHG: ax, bx, cx, si, di 856 <1> ; STT: UP, ss = ds = es 857 <1> set_when: 858 00007DBF E83900 <1> call check_when_space ; cx = length (with terminating NUL) or 0, 859 <1> ; si -> clause (if cx != 0), 860 <1> ; ax = prior pointer or 0 861 00007DC2 E330 <1> jcxz .empty 862 <1> 863 00007DC4 51 <1> push cx 864 00007DC5 E86B00 <1> call free_when ; actually free it now (INP ax) 865 00007DC8 59 <1> pop cx 866 00007DC9 8B3E[C801] <1> mov di, word [b_bplist.whenbuffer.free] 867 <1> ; = offset of free part 868 00007DCD 010E[C801] <1> add word [b_bplist.whenbuffer.free], cx 869 <1> ; mark space as used 870 00007DD1 81C7[4A03] <1> add di, b_bplist.whenbuffer 871 <1> ; -> into buffer space 872 00007DD5 89FB <1> mov bx, di ; bx -> buffer for clause, for set function 873 <1> ; si -> new clause (left by check function) 874 00007DD7 F3A4 <1> rep movsb ; write (with space for the NUL) 875 00007DD9 C645FF00 <1> mov byte [di - 1], 0 ; actually write a NUL 876 <1> 877 <1> ; now remember this 878 <1> .after_empty: 879 <1> ; INP: dx = 0-based point index 880 <1> ; bx = word to set (-1 if not to modify) 881 <1> ; OUT: bx = word read 882 <1> get_set_when_offset: equ $ 883 00007DDD 87D3 <1> xchg dx, bx 884 00007DDF D1E3 <1> shl bx, 1 885 00007DE1 FFB7[A601] <1> push word [b_bplist.when + bx] 886 00007DE5 83FAFF <1> cmp dx, -1 887 00007DE8 7404 <1> je @F 888 00007DEA 8997[A601] <1> mov word [b_bplist.when + bx], dx 889 <1> @@: 890 00007DEE 5A <1> pop dx 891 00007DEF D1EB <1> shr bx, 1 892 00007DF1 87D3 <1> xchg dx, bx 893 00007DF3 C3 <1> retn 894 <1> 895 <1> .empty: 896 00007DF4 E83C00 <1> call free_when 897 00007DF7 31DB <1> xor bx, bx ; offset = 0 898 00007DF9 EBE2 <1> jmp .after_empty 899 <1> 900 <1> 901 <1> ; INP: ..@bb_when_start 902 <1> ; ..@bb_when_length 903 <1> ; dx = point index 904 <1> ; OUT: jumps to error if failure (too long) 905 <1> ; ax = prior pointer from array (to be freed), 906 <1> ; or 0 if no prior clause to free 907 <1> ; cx = length (including terminating NUL) 908 <1> ; or = 0 if no WHEN clause 909 <1> ; (if cx != 0) si -> WHEN clause data 910 <1> ; CHG: ax, bx, cx, si, di 911 <1> ; STT: UP, ss = ds = es 912 <1> check_when_space: 913 00007DFB BBFFFF <1> mov bx, -1 914 00007DFE E8DCFF <1> call get_set_when_offset 915 <1> 916 00007E01 53 <1> push bx 917 00007E02 85DB <1> test bx, bx 918 00007E04 740D <1> jz @F 919 00007E06 89DF <1> mov di, bx 920 00007E08 B9FFFF <1> mov cx, -1 921 00007E0B B000 <1> mov al, 0 922 00007E0D F2AE <1> repne scasb 923 00007E0F F7D1 <1> not cx ; = length to free (including terminating NUL) 924 00007E11 89CB <1> mov bx, cx 925 <1> @@: ; bx = length to free 926 00007E13 58 <1> pop ax ; ax -> prior clause in .whenbuffer 927 <1> 928 00007E14 8B36[C801] <1> mov si, word [b_bplist.whenbuffer.free] 929 <1> ; offset free 930 00007E18 F7DE <1> neg si ; - offset free 931 00007E1A 81C60004 <1> add si, b_bplist.whenbuffer.length 932 <1> ; 1024 - offset free = amount free 933 00007E1E 01DE <1> add si, bx ; amount free + length of condition to free 934 00007E20 8B0E[C28F] <1> mov cx, word [..@bb_when_length] 935 00007E24 E30C <1> jcxz .empty ; if no condition to set --> 936 00007E26 41 <1> inc cx ; count terminating NUL 937 00007E27 39CE <1> cmp si, cx ; enough free ? 938 00007E29 8B36[C08F] <1> mov si, word [..@bb_when_start] 939 <1> ; -> condition string 940 00007E2D 7303E98A1A <1> jb error ; no --> 941 <1> .empty: 942 00007E32 C3 <1> retn 943 <1> 944 <1> 945 <1> ; INP: ax = offset word of condition to free 946 <1> ; (zero means none) 947 <1> ; b_bplist.when = condition array (ONE of which matches ax) 948 <1> ; CHG: ax, bx, cx 949 <1> ; OUT: b_bplist.when entries adjusted 950 <1> ; (the one that is being freed is unaffected) 951 <1> ; b_bplist.whenbuffer adjusted 952 <1> ; STT: UP, ss = ds = es 953 <1> ; REM: The b_bplist.when array contains actual offsets 954 <1> ; into the b_bplist.whenbuffer space. Therefore 955 <1> ; a value of zero acts as a NULL pointer and valid 956 <1> ; values are >= b_bplist.whenbuffer. 957 <1> free_when: 958 00007E33 56 <1> push si 959 00007E34 57 <1> push di 960 <1> 961 00007E35 85C0 <1> test ax, ax 962 00007E37 7438 <1> jz .return 963 <1> 964 00007E39 89C7 <1> mov di, ax 965 00007E3B 89C3 <1> mov bx, ax 966 <1> ; -> condition to be freed 967 <1> ; (destination of following data) 968 00007E3D 57 <1> push di 969 00007E3E B9FFFF <1> mov cx, -1 970 00007E41 B000 <1> mov al, 0 971 00007E43 F2AE <1> repne scasb 972 00007E45 F7D1 <1> not cx ; = length to free (including terminating NUL) 973 00007E47 5F <1> pop di 974 00007E48 51 <1> push cx 975 00007E49 89FE <1> mov si, di 976 00007E4B 01CE <1> add si, cx ; -> behind condition to be freed 977 <1> ; (source of following data) 978 00007E4D 89F1 <1> mov cx, si 979 00007E4F F7D9 <1> neg cx ; minus pointer to first subsequent data 980 00007E51 81C1[4A07] <1> add cx, b_bplist.whenbuffer + b_bplist.whenbuffer.length 981 <1> ; pointer behind buffer - pointer subsequent data 982 <1> ; = length of data to move 983 00007E55 F3A4 <1> rep movsb ; now di -> first uninitialised byte 984 00007E57 59 <1> pop cx ; = length of data freed 985 <1> 986 00007E58 290E[C801] <1> sub word [b_bplist.whenbuffer.free], cx 987 <1> ; mark as free 988 00007E5C 51 <1> push cx 989 00007E5D 30C0 <1> xor al, al 990 00007E5F F3AA <1> rep stosb ; clear the buffer trailer (uninitialised part) 991 00007E61 5F <1> pop di ; di = length of data freed 992 <1> 993 00007E62 BE[A601] <1> mov si, b_bplist.when 994 <1> %if _NUM_B_BP < 256 995 00007E65 B110 <1> mov cl, _NUM_B_BP 996 <1> %else 997 <1> mov cx, _NUM_B_BP 998 <1> %endif 999 <1> .loop: 1000 00007E67 AD <1> lodsw 1001 00007E68 39D8 <1> cmp ax, bx ; offset we're freeing ?, OR 1002 <1> ; is it below/equal the offset we're freeing ? 1003 00007E6A 7603 <1> jbe .next ; yes --> (also jumps if ax == 0) 1004 00007E6C 297CFE <1> sub word [si - 2], di ; adjust offset 1005 <1> .next: 1006 00007E6F E2F6 <1> loop .loop 1007 <1> 1008 <1> .return: 1009 00007E71 5F <1> pop di 1010 00007E72 5E <1> pop si 1011 00007E73 C3 <1> retn 1012 <1> 1013 <1> 1014 <1> point_clear: 1015 00007E74 BF[797E] <1> mov di, .clear 1016 00007E77 EB1F <1> jmp point_clear_enable_disable_toggle_common 1017 <1> 1018 <1> .clear: 1019 00007E79 F7D0 <1> not ax 1020 <1> %if ((_NUM_B_BP+7)>>3) != 1 1021 00007E7B 20A7[0201] <1> and byte [b_bplist.used_mask+bx], ah 1022 00007E7F 20A7[0401] <1> and byte [b_bplist.disabled_mask+bx], ah 1023 <1> %else 1024 <1> and byte [b_bplist.used_mask], ah 1025 <1> and byte [b_bplist.disabled_mask], ah 1026 <1> %endif 1027 00007E83 51 <1> push cx 1028 <1> 1029 00007E84 31DB <1> xor bx, bx ; replace by empty word 1030 00007E86 E82EFE <1> call get_set_id_offset_length 1031 00007E89 93 <1> xchg ax, bx ; ax = word what to free 1032 00007E8A E848FE <1> call free_id ; actually free it now 1033 <1> 1034 00007E8D 31DB <1> xor bx, bx ; replace by empty word 1035 00007E8F E84BFF <1> call get_set_when_offset 1036 00007E92 93 <1> xchg ax, bx ; ax = word what to free 1037 00007E93 E89DFF <1> call free_when ; actually free it now 1038 <1> 1039 <1> %if 0 1040 <1> xor cx, cx 1041 <1> 1042 <1> mov bx, dx 1043 <1> add bx, bx ; * 2 1044 <1> mov word [b_bplist.counter + bx], cx 1045 <1> 1046 <1> add bx, bx ; * 4 1047 <1> %if BPSIZE == 4 1048 <1> %elif BPSIZE == 5 1049 <1> add bx, dx ; * 5 1050 <1> %elif BPSIZE == 6 1051 <1> add bx, dx ; * 5 1052 <1> add bx, dx ; * 6 1053 <1> %elif BPSIZE == 9 1054 <1> add bx, bx ; * 8 1055 <1> add bx, dx ; * 9 1056 <1> %else 1057 <1> %error Unexpected breakpoint size 1058 <1> %endif 1059 <1> add bx, b_bplist.bp 1060 <1> mov word [bx], cx 1061 <1> mov word [bx + 2], cx 1062 <1> %if BPSIZE == 4 1063 <1> %elif BPSIZE == 5 1064 <1> mov byte [bx + 4], cl 1065 <1> %elif BPSIZE == 6 1066 <1> mov word [bx + 4], cx 1067 <1> %elif BPSIZE == 9 1068 <1> mov word [bx + 4], cx 1069 <1> mov word [bx + 6], cx 1070 <1> mov byte [bx + 8], cl 1071 <1> %else 1072 <1> %error Unexpected breakpoint size 1073 <1> %endif 1074 <1> 1075 <1> %endif 1076 <1> 1077 00007E96 59 <1> pop cx 1078 00007E97 C3 <1> retn 1079 <1> 1080 <1> point_clear_enable_disable_toggle_common: 1081 00007E98 E8072F <1> call skipwhite 1082 <1> 1083 00007E9B E85E02 <1> call getpointat ; "AT" keyword ? 1084 00007E9E 720A <1> jc .not_at ; no --> 1085 00007EA0 E81702 <1> call findpointat ; do we find it ? 1086 00007EA3 7303E9141A <1> jc error ; not found --> 1087 00007EA8 EB25 <1> jmp @F ; point index is in dx --> 1088 <1> 1089 <1> .not_at: 1090 00007EAA E87002 <1> call getpointindex 1091 00007EAD 7320 <1> jnc @F ; point index is in dx, no keyword --> 1092 00007EAF 7403E9081A <1> jnz error ; "NEW" is invalid --> 1093 <1> 1094 00007EB4 E8AB2E <1> call chkeol 1095 00007EB7 31C9 <1> xor cx, cx 1096 <1> .all_loop: 1097 00007EB9 89C8 <1> mov ax, cx 1098 00007EBB E8ED01 <1> call calcpointbit 1099 <1> %if ((_NUM_B_BP+7)>>3) != 1 1100 00007EBE 84A7[0201] <1> test byte [b_bplist.used_mask+bx], ah 1101 <1> %else 1102 <1> test byte [b_bplist.used_mask], ah 1103 <1> %endif 1104 00007EC2 7404 <1> jz .all_next 1105 00007EC4 89CA <1> mov dx, cx 1106 00007EC6 FFD7 <1> call di 1107 <1> .all_next: 1108 00007EC8 41 <1> inc cx 1109 00007EC9 83F910 <1> cmp cx, _NUM_B_BP 1110 00007ECC 72EB <1> jb .all_loop 1111 00007ECE C3 <1> retn 1112 <1> 1113 <1> @@: 1114 00007ECF E8902E <1> call chkeol 1115 00007ED2 89D0 <1> mov ax, dx 1116 00007ED4 E8D401 <1> call calcpointbit 1117 <1> %if ((_NUM_B_BP+7)>>3) != 1 1118 00007ED7 84A7[0201] <1> test byte [b_bplist.used_mask+bx], ah 1119 <1> %else 1120 <1> test byte [b_bplist.used_mask], ah 1121 <1> %endif 1122 00007EDB 7503E9DC19 <1> jz error 1123 00007EE0 FFE7 <1> jmp di 1124 <1> 1125 <1> 1126 <1> point_enable: 1127 00007EE2 BF[E77E] <1> mov di, .enable 1128 00007EE5 EBB1 <1> jmp point_clear_enable_disable_toggle_common 1129 <1> 1130 <1> .enable: 1131 00007EE7 F7D0 <1> not ax 1132 <1> %if ((_NUM_B_BP+7)>>3) != 1 1133 00007EE9 20A7[0401] <1> and byte [b_bplist.disabled_mask+bx], ah 1134 <1> %else 1135 <1> and byte [b_bplist.disabled_mask], ah 1136 <1> %endif 1137 00007EED C3 <1> retn 1138 <1> 1139 <1> 1140 <1> point_disable: 1141 00007EEE BF[F37E] <1> mov di, .disable 1142 00007EF1 EBA5 <1> jmp point_clear_enable_disable_toggle_common 1143 <1> 1144 <1> .disable: 1145 <1> %if ((_NUM_B_BP+7)>>3) != 1 1146 00007EF3 08A7[0401] <1> or byte [b_bplist.disabled_mask+bx], ah 1147 <1> %else 1148 <1> or byte [b_bplist.disabled_mask], ah 1149 <1> %endif 1150 00007EF7 C3 <1> retn 1151 <1> 1152 <1> 1153 <1> point_toggle: 1154 00007EF8 BF[FD7E] <1> mov di, .toggle 1155 00007EFB EB9B <1> jmp point_clear_enable_disable_toggle_common 1156 <1> 1157 <1> .toggle: 1158 <1> %if ((_NUM_B_BP+7)>>3) != 1 1159 00007EFD 30A7[0401] <1> xor byte [b_bplist.disabled_mask+bx], ah 1160 <1> %else 1161 <1> xor byte [b_bplist.disabled_mask], ah 1162 <1> %endif 1163 00007F01 C3 <1> retn 1164 <1> 1165 <1> 1166 <1> point_list: 1167 00007F02 E89D2E <1> call skipwhite 1168 00007F05 E8452E <1> call iseol? 1169 00007F08 7503E97D00 <1> je .all 1170 <1> 1171 00007F0D E8EC01 <1> call getpointat ; "AT" keyword ? 1172 00007F10 7258 <1> jc .not_at ; no --> 1173 00007F12 E8A501 <1> call findpointat ; do we find it ? 1174 <1> ; Here we ignore the point index in dx, we just 1175 <1> ; take note that at least one point matching the 1176 <1> ; specified address exists. The points are matched 1177 <1> ; against the linear address in ..@bb_saved_linear. 1178 00007F15 7307 <1> jnc .all_matching 1179 <1> 1180 00007F17 BA[7C71] <1> mov dx, msg.bpnone_at 1181 00007F1A E8E332 <1> call putsz 1182 00007F1D C3 <1> retn 1183 <1> 1184 <1> 1185 <1> .all_matching: 1186 00007F1E 31ED <1> xor bp, bp 1187 00007F20 31DB <1> xor bx, bx 1188 00007F22 31D2 <1> xor dx, dx 1189 00007F24 BF[AE07] <1> mov di, line_out 1190 <1> .loop_matching: 1191 00007F27 89DE <1> mov si, bx 1192 00007F29 01F6 <1> add si, si 1193 00007F2B 01F6 <1> add si, si 1194 <1> %if BPSIZE == 4 1195 <1> %elif BPSIZE == 5 1196 <1> add si, bx 1197 <1> %elif BPSIZE == 6 1198 00007F2D 01DE <1> add si, bx ; * 5 1199 00007F2F 01DE <1> add si, bx ; * 6 1200 <1> %elif BPSIZE == 9 1201 <1> add si, si ; * 8 1202 <1> add si, bx ; * 9 1203 <1> %else 1204 <1> %error Unexpected breakpoint size 1205 <1> %endif 1206 00007F31 81C6[0601] <1> add si, b_bplist.bp 1207 00007F35 AD <1> lodsw 1208 00007F36 3906[B88F] <1> cmp word [..@bb_saved_linear], ax 1209 00007F3A 7526 <1> jne .next_matching 1210 <1> %if _PM 1211 <1> lodsw 1212 <1> %else 1213 00007F3C 31C0 <1> xor ax, ax 1214 00007F3E AC <1> lodsb 1215 <1> %endif 1216 00007F3F 3906[BA8F] <1> cmp word [..@bb_saved_linear + 2], ax 1217 00007F43 751D <1> jne .next_matching 1218 <1> 1219 00007F45 57 <1> push di 1220 00007F46 B020 <1> mov al, 32 1221 00007F48 B92800 <1> mov cx, 40 1222 00007F4B F3AA <1> rep stosb ; initialize field with blanks 1223 00007F4D 30C0 <1> xor al, al 1224 00007F4F AA <1> stosb ; terminate it 1225 00007F50 5F <1> pop di 1226 <1> 1227 00007F51 E88000 <1> call .single ; fill buffer 1228 <1> 1229 00007F54 52 <1> push dx 1230 00007F55 53 <1> push bx 1231 <1> %if 0 1232 <1> test dl, 1 ; an odd point ? 1233 <1> jnz .odd_matching ; yes --> 1234 <1> mov di, line_out + 40 ; write next point after the field 1235 <1> jmp .was_even_matching 1236 <1> .odd_matching: 1237 <1> %endif 1238 00007F56 E82C2F <1> call putsline_crlf ; put line with linebreak (and no excess blanks) 1239 00007F59 E83501 <1> call handle_bl_when 1240 00007F5C BF[AE07] <1> mov di, line_out ; write next point at start of field 1241 <1> .was_even_matching: 1242 00007F5F 5B <1> pop bx 1243 00007F60 5A <1> pop dx 1244 00007F61 42 <1> inc dx ; increment odd/even counter 1245 <1> .next_matching: 1246 00007F62 43 <1> inc bx ; increment breakpoint index 1247 00007F63 83FB10 <1> cmp bx, _NUM_B_BP 1248 00007F66 75BF <1> jne .loop_matching 1249 00007F68 EB51 <1> jmp .end 1250 <1> 1251 <1> 1252 <1> .not_at: 1253 00007F6A E8B001 <1> call getpointindex 1254 00007F6D 730A <1> jnc @F 1255 00007F6F 7403E94819 <1> jnz error ; "NEW" is invalid --> 1256 <1> 1257 00007F74 E8EB2D <1> call chkeol 1258 00007F77 EB11 <1> jmp .all 1259 <1> @@: 1260 00007F79 E8E62D <1> call chkeol 1261 00007F7C 89D3 <1> mov bx, dx 1262 00007F7E BF[AE07] <1> mov di, line_out 1263 00007F81 E85000 <1> call .single 1264 00007F84 E8FE2E <1> call putsline_crlf 1265 00007F87 E90701 <1> jmp handle_bl_when 1266 <1> 1267 <1> 1268 <1> .all: 1269 00007F8A 31ED <1> xor bp, bp ; high byte: any set points encountered yet, 1270 <1> ; low byte: current line has any set points 1271 00007F8C 31DB <1> xor bx, bx 1272 00007F8E BF[AE07] <1> mov di, line_out 1273 <1> .loop: 1274 00007F91 57 <1> push di 1275 00007F92 B020 <1> mov al, 32 1276 00007F94 B92800 <1> mov cx, 40 1277 00007F97 F3AA <1> rep stosb ; initialize field with blanks 1278 00007F99 30C0 <1> xor al, al 1279 00007F9B AA <1> stosb ; terminate it 1280 00007F9C 5F <1> pop di 1281 <1> 1282 00007F9D E83400 <1> call .single ; fill buffer 1283 <1> 1284 00007FA0 53 <1> push bx 1285 <1> %if 0 1286 <1> test bl, 1 ; an odd point ? 1287 <1> jnz .odd ; yes --> 1288 <1> mov di, line_out + 40 ; write next point after the field 1289 <1> jmp .was_even 1290 <1> .odd: 1291 <1> %endif 1292 00007FA1 F7C5FF00 <1> test bp, 00FFh ; any point set in this line ? 1293 00007FA5 740A <1> jz .skip_putsline ; no --> 1294 00007FA7 E8DB2E <1> call putsline_crlf ; put line with linebreak (and no excess blanks) 1295 00007FAA E8E400 <1> call handle_bl_when 1296 <1> 1297 00007FAD 81E500FF <1> and bp, ~00FFh ; clear flag for next line processing 1298 <1> .skip_putsline: 1299 00007FB1 BF[AE07] <1> mov di, line_out ; write next point at start of field 1300 <1> .was_even: 1301 00007FB4 5B <1> pop bx 1302 00007FB5 43 <1> inc bx 1303 00007FB6 83FB10 <1> cmp bx, _NUM_B_BP 1304 00007FB9 75D6 <1> jne .loop 1305 <1> .end: 1306 00007FBB 81FF[AE07] <1> cmp di, line_out 1307 00007FBF 7406 <1> je @F 1308 00007FC1 E8C12E <1> call putsline_crlf 1309 00007FC4 E8CA00 <1> call handle_bl_when 1310 <1> @@: 1311 00007FC7 F7C500FF <1> test bp, 0FF00h 1312 00007FCB 7506 <1> jnz @F 1313 00007FCD BA[5C71] <1> mov dx, msg.bpnone 1314 00007FD0 E82D32 <1> call putsz 1315 <1> @@: 1316 00007FD3 C3 <1> retn 1317 <1> 1318 <1> .single: 1319 00007FD4 BE[3671] <1> mov si, msg.bp 1320 00007FD7 E8D42D <1> call showstring 1321 00007FDA 53 <1> push bx 1322 00007FDB 89D8 <1> mov ax, bx 1323 00007FDD E8742E <1> call hexbyte ; store index of this point 1324 00007FE0 E8C800 <1> call calcpointbit 1325 00007FE3 BE[4071] <1> mov si, msg.bpunused 1326 <1> %if ((_NUM_B_BP+7)>>3) != 1 1327 00007FE6 84A7[0201] <1> test byte [b_bplist.used_mask+bx], ah 1328 <1> %else 1329 <1> test byte [b_bplist.used_mask], ah 1330 <1> %endif 1331 00007FEA 7508 <1> jnz @F ; if set --> 1332 00007FEC E8BF2D <1> call showstring 1333 00007FEF 31F6 <1> xor si, si 1334 00007FF1 E99B00 <1> jmp .unused 1335 <1> 1336 <1> @@: 1337 00007FF4 81CD0101 <1> or bp, 0101h ; flag that there was a point set in this line 1338 00007FF8 BE[3D71] <1> mov si, msg.bpdisabled 1339 <1> %if ((_NUM_B_BP+7)>>3) != 1 1340 00007FFB 84A7[0401] <1> test byte [b_bplist.disabled_mask+bx], ah 1341 <1> %else 1342 <1> test byte [b_bplist.disabled_mask], ah 1343 <1> %endif 1344 00007FFF 7503 <1> jnz .disabled ; disabled --> (D) 1345 00008001 BE[3A71] <1> mov si, msg.bpenabled 1346 <1> .disabled: 1347 00008004 E8A72D <1> call showstring 1348 00008007 BE[4871] <1> mov si, msg.bpaddress 1349 0000800A E8A12D <1> call showstring 1350 0000800D 58 <1> pop ax 1351 0000800E 50 <1> push ax 1352 0000800F 89C6 <1> mov si, ax 1353 00008011 01F6 <1> add si, si 1354 00008013 01F6 <1> add si, si 1355 <1> %if BPSIZE == 4 1356 <1> %elif BPSIZE == 5 1357 <1> add si, ax 1358 <1> %elif BPSIZE == 6 1359 00008015 01C6 <1> add si, ax ; * 5 1360 00008017 01C6 <1> add si, ax ; * 6 1361 <1> %elif BPSIZE == 9 1362 <1> add si, si ; * 8 1363 <1> add si, ax ; * 9 1364 <1> %else 1365 <1> %error Unexpected breakpoint size 1366 <1> %endif 1367 00008019 81C6[0601] <1> add si, b_bplist.bp ; -> point 1368 0000801D 52 <1> push dx 1369 0000801E AD <1> lodsw 1370 0000801F 92 <1> xchg ax, dx 1371 <1> %if _PM 1372 <1> lodsw 1373 <1> call hexword 1374 <1> %else 1375 00008020 31C0 <1> xor ax, ax 1376 00008022 AC <1> lodsb 1377 00008023 E82E2E <1> call hexbyte 1378 <1> %endif 1379 00008026 50 <1> push ax 1380 00008027 B05F <1> mov al, '_' 1381 00008029 AA <1> stosb 1382 0000802A 58 <1> pop ax 1383 0000802B 92 <1> xchg ax, dx 1384 0000802C E81E2E <1> call hexword ; display (linear) address 1385 <1> %if BPSIZE == 6 || BPSIZE == 9 1386 <1> ; INP: dx:ax = linear address 1387 <1> ; si -> (d)word offset 1388 <1> ; di -> where to store 1389 <1> ; OUT: cx = length displayed 1390 <1> ; si -> after offset 1391 <1> ; di -> after stored string 1392 <1> ; CHG: ax, dx 1393 0000802F E80F01 <1> call bp_display_offset ; BPSIZE implied 1394 <1> %else 1395 <1> xor cx, cx 1396 <1> %endif 1397 00008032 5A <1> pop dx 1398 00008033 AC <1> lodsb 1399 00008034 50 <1> push ax 1400 00008035 BE[4E71] <1> mov si, msg.bpcontent 1401 00008038 E8732D <1> call showstring 1402 0000803B 58 <1> pop ax 1403 0000803C E8152E <1> call hexbyte ; display content 1404 0000803F BE[5171] <1> mov si, msg.bpcounter 1405 00008042 E8692D <1> call showstring 1406 00008045 58 <1> pop ax 1407 00008046 50 <1> push ax 1408 00008047 89C3 <1> mov bx, ax 1409 00008049 52 <1> push dx 1410 0000804A 89C2 <1> mov dx, ax 1411 0000804C 01DB <1> add bx, bx 1412 0000804E 8B87[6601] <1> mov ax, word [b_bplist.counter + bx] 1413 00008052 E8F82D <1> call hexword 1414 <1> 1415 00008055 BBFFFF <1> mov bx, -1 1416 00008058 E85CFC <1> call get_set_id_offset_length 1417 0000805B F6C7FC <1> test bh, 63 << 2 ; length nonzero ? 1418 0000805E 7426 <1> jz @F ; no --> 1419 <1> 1420 <1> ; The maximum length of a short ID is based on 1421 <1> ; how much space there is assuming 80 columns. 1422 00008060 BE[2871] <1> mov si, msg.bb_hitpass_id.short 1423 00008063 D0E1 <1> shl cl, 1 1424 00008065 D0E1 <1> shl cl, 1 1425 00008067 F6D9 <1> neg cl 1426 00008069 80C18C <1> add cl, 35 << 2 1427 0000806C 38CF <1> cmp bh, cl ; long ? 1428 0000806E 7203 <1> jb .trigger_short_id 1429 <1> ; This jump MUST be a jb, not jbe. The jbe 1430 <1> ; would not match ZR for words where the 1431 <1> ; idbuffer offset is a nonzero value. 1432 00008070 BE[2071] <1> mov si, msg.bb_hitpass_id.long 1433 <1> .trigger_short_id: 1434 <1> 1435 00008073 E826B1 <1> call copy_single_counted_string 1436 00008076 88F9 <1> mov cl, bh 1437 00008078 D0E9 <1> shr cl, 1 1438 0000807A D0E9 <1> shr cl, 1 ; cx = length 1439 0000807C 81E3FF03 <1> and bx, 1023 ; bx = offset 1440 00008080 8DB7[CA01] <1> lea si, [b_bplist.idbuffer + bx] 1441 00008084 F3A4 <1> rep movsb 1442 <1> 1443 <1> @@: 1444 <1> 1445 00008086 BBFFFF <1> mov bx, -1 1446 00008089 E851FD <1> call get_set_when_offset 1447 0000808C 89DE <1> mov si, bx 1448 0000808E 5A <1> pop dx 1449 <1> 1450 <1> .unused: 1451 0000808F 5B <1> pop bx ; restore counter (if displaying all) 1452 00008090 C3 <1> retn 1453 <1> 1454 <1> 1455 <1> ; CHG: si, al 1456 <1> handle_bl_when: 1457 00008091 87D6 <1> xchg dx, si 1458 00008093 85D2 <1> test dx, dx 1459 00008095 7411 <1> jz @F 1460 00008097 52 <1> push dx 1461 00008098 BA[2F71] <1> mov dx, msg.bb_when 1462 0000809B E86231 <1> call putsz 1463 0000809E 5A <1> pop dx 1464 0000809F E85E31 <1> call putsz 1465 <1> %if 0 1466 <1> mov al, '$' 1467 <1> call putc 1468 <1> %endif 1469 000080A2 BA[0577] <1> mov dx, crlf 1470 000080A5 E85831 <1> call putsz 1471 <1> @@: 1472 000080A8 87D6 <1> xchg dx, si 1473 000080AA C3 <1> retn 1474 <1> 1475 <1> 1476 <1> ; INP: ax = 0-based index of point 1477 <1> ; OUT: (bx-> byte to access. only if at least 9 points) 1478 <1> ; (bx = 0 always if 8 or fewer points) 1479 <1> ; ah = value to access 1480 <1> ; CHG: al 1481 <1> calcpointbit: 1482 <1> %if ((_NUM_B_BP+7)>>3) != 1 1483 000080AB 89C3 <1> mov bx, ax 1484 <1> %endif 1485 000080AD 2407 <1> and al, 7 1486 000080AF B401 <1> mov ah, 1 1487 000080B1 91 <1> xchg ax, cx 1488 000080B2 D2E5 <1> shl ch, cl 1489 <1> %if ((_NUM_B_BP+7)>>3) != 1 1490 000080B4 B103 <1> mov cl, 3 1491 000080B6 D3EB <1> shr bx, cl 1492 <1> %else 1493 <1> xor bx, bx 1494 <1> %endif 1495 000080B8 91 <1> xchg ax, cx 1496 000080B9 C3 <1> retn 1497 <1> 1498 <1> 1499 <1> ; INP: bx:dx = linear address 1500 <1> ; OUT: NC if point found, 1501 <1> ; dx = point index 1502 <1> ; CY if point not found, 1503 <1> ; bx:dx unchanged 1504 <1> ; CHG: di 1505 <1> findpointat: 1506 <1> lframe near 1507 000080BA 5589E5 <1> lenter 1508 <1> lvar word, orig_ax 1509 000080BD 50 <1> push ax 1510 <1> lvar word, orig_si 1511 000080BE 56 <1> push si 1512 <1> lvar dword, orig_bxdx 1513 000080BF 53 <1> push bx 1514 000080C0 52 <1> push dx 1515 000080C1 31D2 <1> xor dx, dx 1516 <1> .loop: 1517 000080C3 89D0 <1> mov ax, dx 1518 000080C5 E8E3FF <1> call calcpointbit 1519 <1> %if ((_NUM_B_BP+7)>>3) != 1 1520 000080C8 84A7[0201] <1> test byte [b_bplist.used_mask + bx], ah 1521 <1> %else 1522 <1> test byte [b_bplist.used_mask], ah 1523 <1> %endif 1524 000080CC 741F <1> jz .next 1525 <1> 1526 000080CE 89D6 <1> mov si, dx 1527 000080D0 01F6 <1> add si, si 1528 000080D2 01F6 <1> add si, si 1529 <1> %if BPSIZE == 4 1530 <1> %elif BPSIZE == 5 1531 <1> add si, dx 1532 <1> %elif BPSIZE == 6 1533 000080D4 01D6 <1> add si, dx ; * 5 1534 000080D6 01D6 <1> add si, dx ; * 6 1535 <1> %elif BPSIZE == 9 1536 <1> add si, si ; * 8 1537 <1> add si, dx ; * 9 1538 <1> %else 1539 <1> %error Unexpected breakpoint size 1540 <1> %endif 1541 000080D8 81C6[0601] <1> add si, b_bplist.bp ; -> point 1542 000080DC AD <1> lodsw 1543 000080DD 3946F8 <1> cmp word [bp + ?orig_bxdx], ax 1544 000080E0 750B <1> jne .next 1545 <1> %if _PM 1546 <1> lodsw 1547 <1> %else 1548 000080E2 31C0 <1> xor ax, ax 1549 000080E4 AC <1> lodsb 1550 <1> %endif 1551 000080E5 3946FA <1> cmp word [bp + ?orig_bxdx + 2], ax 1552 000080E8 7503 <1> jne .next 1553 <1> ; (NC) 1554 000080EA 5B <1> pop bx ; discard dx on stack, clobbering bx 1555 000080EB EB08 <1> jmp .ret_with_dx 1556 <1> 1557 <1> .next: 1558 000080ED 42 <1> inc dx 1559 000080EE 83FA10 <1> cmp dx, _NUM_B_BP 1560 000080F1 72D0 <1> jb .loop 1561 <1> 1562 000080F3 F9 <1> stc 1563 <1> .ret: 1564 000080F4 5A <1> pop dx 1565 <1> .ret_with_dx: 1566 000080F5 5B <1> pop bx ; pop ?orig_bxdx 1567 000080F6 5E <1> pop si ; pop ?orig_si 1568 000080F7 58 <1> pop ax ; pop ?orig_ax 1569 000080F8 89EC5D <1> lleave 1570 000080FB C3 <1> lret 1571 <1> 1572 <1> 1573 <1> ; INP: si->, al= 1574 <1> ; OUT: CY if no "AT" keyword + address, 1575 <1> ; si, al unchanged 1576 <1> ; NC if "AT" keyword + address, 1577 <1> ; si->, al= after 1578 <1> ; bx:dx = dword [..@bb_saved_linear] = linear address 1579 <1> ; CHG: edx, bx 1580 <1> getpointat: 1581 000080FC 4E <1> dec si 1582 000080FD BA[346A] <1> mov dx, msg.at 1583 00008100 E8EB2B <1> call isstring? 1584 00008103 AC <1> lodsb 1585 00008104 7402 <1> je .at 1586 00008106 F9 <1> stc 1587 00008107 C3 <1> retn 1588 <1> 1589 <1> .at: 1590 00008108 8B1E[880C] <1> mov bx, word [reg_cs] 1591 0000810C E803B4 <1> call getlinearaddr 1592 0000810F 7303E9A817 <1> jc error 1593 00008114 8916[B88F] <1> mov word [..@bb_saved_linear], dx 1594 00008118 891E[BA8F] <1> mov word [..@bb_saved_linear + 2], bx 1595 0000811C C3 <1> retn 1596 <1> 1597 <1> 1598 <1> ; INP: si->, al= 1599 <1> ; OUT: NC if a point is specified, 1600 <1> ; dx = point index (0-based, below _NUM_B_BP) 1601 <1> ; CY if a keyword is specified, 1602 <1> ; ZR if "ALL" keyword specified 1603 <1> ; NZ if "NEW" keyword specified 1604 <1> getpointindex: 1605 0000811D 4E <1> dec si 1606 0000811E BA[B370] <1> mov dx, msg.all 1607 00008121 E8CA2B <1> call isstring? 1608 00008124 7418 <1> je .is_all ; (ZR) 1609 00008126 BA[B770] <1> mov dx, msg.new 1610 00008129 E8C22B <1> call isstring? 1611 0000812C 740E <1> je .is_new 1612 0000812E AC <1> lodsb 1613 0000812F E8FA2A <1> call getword 1614 00008132 83FA10 <1> cmp dx, _NUM_B_BP 1615 00008135 7203E98217 <1> jae error 1616 0000813A F8 <1> clc ; (NC) 1617 0000813B C3 <1> retn 1618 <1> 1619 <1> .is_new: 1620 0000813C 85F6 <1> test si, si ; (NZ) 1621 <1> .is_all: 1622 0000813E F9 <1> stc ; (CY) 1623 0000813F AC <1> lodsb ; al = separator, si-> after 1624 00008140 C3 <1> retn 1625 <1> %endif 1626 <1> 1627 <1> 1628 <1> %if BPSIZE == 6 || BPSIZE == 9 1629 <1> ; INP: dx:ax = linear address 1630 <1> ; si -> (d)word offset 1631 <1> ; di -> where to store 1632 <1> ; OUT: cx = length displayed 1633 <1> ; si -> after offset 1634 <1> ; di -> after stored string 1635 <1> ; CHG: ax, dx 1636 <1> bp_display_offset: 1637 <1> lframe 1638 <1> lvar dword, offset 1639 00008141 5589E55050 <1> lenter 1640 <1> lvar dword, linear 1641 00008146 52 <1> push dx 1642 00008147 50 <1> push ax 1643 00008148 B82020 <1> mov ax, " " 1644 <1> lvar word, prefix 1645 0000814B 50 <1> push ax 1646 <1> lvar word, start_write 1647 0000814C 57 <1> push di 1648 0000814D 53 <1> push bx 1649 0000814E AD <1> lodsw 1650 <1> %if _PM 1651 <1> xchg ax, dx 1652 <1> lodsw 1653 <1> cmp ax, -1 1654 <1> xchg ax, dx 1655 <1> jne @F 1656 <1> %else 1657 0000814F 31D2 <1> xor dx, dx 1658 <1> %endif 1659 00008151 83F8FF <1> cmp ax, -1 1660 00008154 7436 <1> je .skip 1661 <1> @@: 1662 00008156 8956FE <1> mov word [bp + ?offset + 2], dx 1663 00008159 8946FC <1> mov word [bp + ?offset], ax 1664 <1> 1665 0000815C 8B56FA <1> mov dx, word [bp + ?linear + 2] 1666 0000815F 8B46F8 <1> mov ax, word [bp + ?linear] 1667 00008162 2B46FC <1> sub ax, word [bp + ?offset] 1668 00008165 1B56FE <1> sbb dx, word [bp + ?offset + 2] 1669 <1> 1670 <1> %if _PM 1671 <1> call ispm 1672 <1> jnz .r86m 1673 <1> 1674 <1> push dx 1675 <1> push ax 1676 <1> mov ax, 6 1677 <1> mov bx, word [reg_cs] 1678 <1> int 31h 1679 <1> pop ax 1680 <1> pop bx 1681 <1> jc .try_r86m 1682 <1> 1683 <1> cmp cx, bx 1684 <1> jne .try_r86m 1685 <1> cmp dx, ax 1686 <1> jne .try_r86m 1687 <1> 1688 <1> mov ax, " " 1689 <1> stosw 1690 <1> mov ax, "CS" 1691 <1> stosw 1692 <1> jmp .offset 1693 <1> 1694 <1> .try_r86m: 1695 <1> mov byte [bp + ?prefix + 1], '$' 1696 <1> %endif 1697 <1> 1698 <1> .r86m: 1699 00008168 B90400 <1> mov cx, 4 1700 0000816B A80F <1> test al, 15 1701 0000816D 7527 <1> jnz .questionmarks 1702 0000816F F7C2F0FF <1> test dx, 0FFF0h 1703 00008173 7521 <1> jnz .questionmarks 1704 00008175 D3E8 <1> shr ax, cl 1705 00008177 D3CA <1> ror dx, cl 1706 00008179 09C2 <1> or dx, ax 1707 0000817B 8B46F6 <1> mov ax, word [bp + ?prefix] 1708 0000817E AB <1> stosw 1709 0000817F 92 <1> xchg ax, dx 1710 00008180 E8CA2C <1> call hexword 1711 <1> 1712 <1> .offset: 1713 00008183 B03A <1> mov al, ':' 1714 00008185 AA <1> stosb 1715 <1> %if _PM 1716 <1> mov ax, word [bp + ?offset + 2] 1717 <1> test ax, ax 1718 <1> jz @F 1719 <1> call hexword 1720 <1> @@: 1721 <1> %endif 1722 00008186 8B46FC <1> mov ax, word [bp + ?offset] 1723 00008189 E8C12C <1> call hexword 1724 <1> 1725 <1> .skip: 1726 0000818C 5B <1> pop bx 1727 0000818D 59 <1> pop cx ; get ?start_write 1728 0000818E F7D9 <1> neg cx 1729 00008190 01F9 <1> add cx, di 1730 00008192 89EC5D <1> lleave 1731 00008195 C3 <1> retn 1732 <1> 1733 <1> .questionmarks: 1734 00008196 B82020 <1> mov ax, " " 1735 00008199 AB <1> stosw 1736 0000819A B83F3F <1> mov ax, "??" 1737 0000819D AB <1> stosw 1738 0000819E AB <1> stosw 1739 0000819F EBE2 <1> jmp .offset 1740 <1> %endif 1741 <1> 1742 <1> 1743 <1> bu_breakpoint: 1744 000081A1 AC <1> lodsb 1745 000081A2 E8BD2B <1> call chkeol 1746 <1> %if _DEBUG 1747 <1> %if _DEBUG_COND 1748 000081A5 F606[D900]01 <1> testopt [internalflags6], dif6_debug_mode 1749 000081AA 7506 <1> jnz @F 1750 000081AC BA[0275] <1> mov dx, msg.bu_disabled 1751 000081AF E94E30 <1> jmp putsz 1752 <1> @@: 1753 <1> %endif 1754 000081B2 BA[E574] <1> mov dx, msg.bu 1755 000081B5 E84830 <1> call putsz 1756 000081B8 CC <1> int3 1757 000081B9 C3 <1> retn 1758 <1> %else 1759 <1> mov dx, msg.notbu 1760 <1> jmp putsz 1761 <1> %endif 2640 2641 2642 usesection lDEBUG_CODE 2643 2644 uppercase: 2645 000081BA 3C61 cmp al, 'a' 2646 000081BC 7206 jb .ret 2647 000081BE 3C7A cmp al, 'z' 2648 000081C0 7702 ja .ret 2649 000081C2 24DF and al, TOUPPER 2650 .ret: 2651 000081C4 C3 retn 2652 2653 2654 errorj4: 2655 000081C5 E9F416 jmp error 2656 2657 2658 %include "ee.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug E command (enter into memory) 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2022 C. Masloch 8 <1> 9 <1> Usage of the works is permitted provided that this 10 <1> instrument is retained with the works, so that any entity 11 <1> that uses the works is notified of this instrument. 12 <1> 13 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 14 <1> 15 <1> %endif 16 <1> 17 <1> 18 <1> usesection lDEBUG_CODE 19 <1> 20 <1> %if 0 21 <1> 22 <1> ee 0: 23 <1> push ss 24 <1> pop ds 25 <1> push ss 26 <1> pop es 27 <1> mov ax, word [ savesp ] 28 <1> inc ax 29 <1> inc ax 30 <1> mov sp, ax ; restore stack 31 <1> mov bx, word [e_addr + saSegSel] 32 <1> _386_PM_o32 33 <1> mov dx, word [ e_addr ] ; get back address 34 <1> 35 <1> 36 <1> ; Prompt mode. 37 <1> ee 1: 38 <1> mov word [ errret ], ee 0 39 <1> 40 <1> ; Begin loop over lines. 41 <1> ee 2: ; <--- next line 42 <1> mov word [e_addr + saSegSel], bx 43 <1> %if _PM 44 <1> call ispm 45 <1> jnz .86m 46 <1> .pm: 47 <1> mov word [e_addr + saSelector], bx 48 <1> jmp @F 49 <1> .86m: 50 <1> mov word [e_addr + saSegment], bx 51 <1> @@: 52 <1> %endif 53 <1> _386_PM_o32 54 <1> mov word [ e_addr ], dx ; save address 55 <1> mov di, line_out 56 <1> mov ax, bx ; print out segment and offset 57 <1> call hexword 58 <1> 59 <1> === 60 <1> 61 <1> 62 <1> mov al, '.' 63 <1> stosb 64 <1> call getline00 ; read input line 65 <1> call iseol? 66 <1> je .end 67 <1> %if _PM 68 <1> xor bx, bx 69 <1> %endif 70 <1> mov dx, 1 71 <1> call ee_checkplusminus 72 <1> jne .notplusminus 73 <1> cmp al, '+' 74 <1> je ee 3 75 <1> jmp short ee 2 76 <1> 77 <1> .notplusminus: 78 <1> 79 <1> === 80 <1> 81 <1> 82 <1> ; INP: al = character, si-> line 83 <1> ; bx:dx = increment to add/subtract if this is an add/sub request 84 <1> ; OUT: al, si unchanged 85 <1> ; NZ if no add/sub request 86 <1> ; ZR if add/sub request, 87 <1> ; [ e_addr ] offset adjusted 88 <1> ee_checkplusminus: 89 <1> cmp al, '-' 90 <1> jne .not 91 <1> cmp al, '+' 92 <1> jne .not 93 <1> push si 94 <1> push ax 95 <1> call skipwhite 96 <1> call iseol? 97 <1> pop ax 98 <1> pop si 99 <1> jne .not 100 <1> cmp al, '-' 101 <1> je .minus 102 <1> add word [ e_addr ], dx 103 <1> _386_PM adc word [ e_addr+2 ], bx 104 <1> jmp short .done 105 <1> 106 <1> .minus: 107 <1> sub word [ e_addr ], dx 108 <1> _386_PM sbb word [ e_addr+2 ], bx 109 <1> .done: 110 <1> cmp al, al 111 <1> .not: 112 <1> retn 113 <1> 114 <1> === 115 <1> 116 <1> 117 <1> ee 9: 118 <1> call getline00 119 <1> 120 <1> %endif 121 <1> 122 <1> 123 <1> ; E command - edit memory. 124 <1> ee: 125 000081C8 E87219 <1> call prephack 126 000081CB 8B1E[7C0C] <1> mov bx, word [reg_ds] 127 000081CF E8911B <1> call getaddr ; get address into bx:(e)dx 128 000081D2 E89F2B <1> call skipcomm0 129 000081D5 E8752B <1> call iseol? 130 000081D8 7429 <1> je ee1 ; if prompt mode 131 <1> 132 <1> eeparsestr: 133 000081DA 52 <1> push dx ; save destination offset 134 000081DB E8BE1B <1> call getstr ; get data bytes 135 000081DE 89F9 <1> mov cx, di 136 000081E0 BA[AE07] <1> mov dx, line_out 137 000081E3 29D1 <1> sub cx, dx ; length of byte string 138 000081E5 5F <1> pop di 139 000081E6 89C8 <1> mov ax, cx 140 000081E8 48 <1> dec ax 141 000081E9 01F8 <1> add ax, di 142 000081EB 72D8 <1> jc short errorj4 ; if it wraps around 143 000081ED E87619 <1> call dohack 144 000081F0 89D6 <1> mov si, dx 145 000081F2 8EC3 <1> mov es, bx 146 <1> %if _PM 147 <1> cmp byte [bAddr32], 0 148 <1> jz ee_2 149 <1> [cpu 386] 150 <1> mov dx, di ; dx was destroyed 151 <1> mov edi, edx 152 <1> movzx esi, si 153 <1> movzx ecx, cx 154 <1> a32 155 <1> __CPU__ 156 <1> ee_2: 157 <1> %endif 158 000081F4 F3A4 <1> rep movsb 159 <1> 160 <1> ; Restore ds + es and undo the interrupt vector hack. 161 <1> ; This code is also used by the `m' command. 162 <1> ee0a: 163 000081F6 16 <1> push ss ; restore ds 164 000081F7 1F <1> pop ds 165 000081F8 16 <1> push ss ; restore es 166 000081F9 07 <1> pop es 167 000081FA BF[E40A] <1> mov di, run2324 ; debuggee's int 23/24 values 168 000081FD E85619 <1> call prehak1 ; copy things back 169 00008200 E97719 <1> jmp unhack 170 <1> 171 <1> 172 <1> 173 <1> ; Prompt mode. 174 <1> ee1: 175 00008203 E8CA83 <1> call guard_re 176 <1> ; Begin loop over lines. 177 <1> ee2: ; <--- next line 178 00008206 89D8 <1> mov ax, bx ; print out segment and offset 179 00008208 E8422C <1> call hexword 180 0000820B B03A <1> mov al, ':' 181 0000820D AA <1> stosb 182 <1> _386_PM_o32 ; mov eax, edx 183 0000820E 89D0 <1> mov ax, dx 184 <1> %if _PM 185 <1> call test_d_b_bit ; 32-bit segment ? 186 <1> jz .16 ; no --> 187 <1> call hexword_high 188 <1> .16: 189 <1> %endif 190 00008210 E83A2C <1> call hexword 191 <1> 192 <1> ; Begin loop over bytes. 193 <1> ee3: ; <--- next byte 194 00008213 B82020 <1> mov ax, 32<<8|32 ; print old value of byte 195 00008216 AB <1> stosw 196 00008217 E84C19 <1> call dohack ; do the INT pointer hack 197 0000821A E8430A <1> call readmem ; read mem at BX:(E)DX 198 0000821D E85A19 <1> call unhack ; undo the INT pointer hack 199 00008220 E8312C <1> call hexbyte 200 00008223 B02E <1> mov al, '.' 201 00008225 AA <1> stosb 202 00008226 C606[CB0A]00 <1> mov byte [ linecounter ], 0 ; reset counter 203 0000822B 8026[C600]EF <1> clropt [internalflags], promptwaiting 204 00008230 53 <1> push bx 205 00008231 52 <1> push dx 206 00008232 E8542C <1> call putsline 207 00008235 5A <1> pop dx 208 00008236 5B <1> pop bx 209 00008237 BE[BE07] <1> mov si, line_out+16 ; address of buffer for characters 210 0000823A 31C9 <1> xor cx, cx ; number of characters so far 211 <1> 212 <1> ee4_next: 213 0000823C E82C35 <1> call getline_is_input_file? 214 0000823F 7238 <1> jc ee9_getc_tty ; if it's a TTY 215 <1> 216 <1> ee_getc_file: 217 00008241 800E[CA00]40 <1> setopt [internalflags2], dif2_did_getline_file 218 <1> ; set this flag so yy_reset_buf knows 219 <1> ; that we may have buffered the file 220 <1> 221 00008246 56 <1> push si 222 <1> %if _NEWFULLHANDLING 223 00008247 BF[0300] <1> mov di, line_in+3 ; read max 224 <1> %else 225 <1> mov di, line_in+2 226 <1> %endif 227 0000824A 8B36[320B] <1> mov si, word [bufnext] 228 <1> ee5: 229 0000824E 3B36[340B] <1> cmp si, word [bufend] 230 00008252 7207 <1> jb ee6 ; if there's a character already 231 00008254 E8473A <1> call fillbuf 232 00008257 B00D <1> mov al, 13 233 00008259 7217 <1> jc ee8 ; if eof 234 <1> ee6: 235 0000825B 803E[2C0B]0D <1> cmp byte [notatty], 13 236 00008260 750C <1> jne ee7 ; if no need to compress CR/LF 237 00008262 803C0A <1> cmp byte [si], 10 238 00008265 7507 <1> jne ee7 ; if not a line feed 239 00008267 46 <1> inc si ; skip it 240 00008268 FE06[2C0B] <1> inc byte [notatty] ; avoid repeating this 241 0000826C EBE0 <1> jmp ee5 ; next character 242 <1> 243 <1> ee7: 244 0000826E AC <1> lodsb ; get the character 245 0000826F A2[2C0B] <1> mov byte [notatty], al 246 <1> ee8: 247 00008272 8936[320B] <1> mov word [bufnext], si 248 00008276 5E <1> pop si 249 00008277 EB03 <1> jmp ee10_got_codepoint 250 <1> 251 <1> ee9_getc_tty: 252 00008279 E8E72F <1> call getc ; character input without echo 253 <1> ee10_got_codepoint: 254 0000827C 3C20 <1> cmp al, 32 ; (go to next byte) 255 0000827E 7441 <1> je ee13_write 256 00008280 3C2D <1> cmp al, '-' ; (go to prior byte) 257 00008282 743D <1> je ee13_write 258 00008284 3C2E <1> cmp al, '.' ; (exit E interactive mode) 259 00008286 7439 <1> je ee13_write 260 00008288 3C0A <1> cmp al, 10 261 0000828A 7435 <1> je ee13_write 262 0000828C E8C22A <1> call iseol?.notsemicolon; (also exit E interactive mode) 263 0000828F 7430 <1> je ee13_write ; all: done with this byte --> 264 00008291 3C08 <1> cmp al, 8 265 00008293 741D <1> je ee11_backspace ; if backspace --> 266 00008295 3C7F <1> cmp al, 7Fh 267 00008297 7419 <1> je ee11_backspace ; if DEL (handle like backspace) --> 268 00008299 83F902 <1> cmp cx, byte 2 ; otherwise, it should be a hex character 269 0000829C 739E <1> jae ee4_next ; if we have a full byte already 270 0000829E 8804 <1> mov byte [si], al 271 000082A0 E8AE29 <1> call getnyb 272 000082A3 7297 <1> jc ee4_next ; if it's not a hex character 273 000082A5 41 <1> inc cx 274 000082A6 AC <1> lodsb ; get the character back 275 000082A7 EB12 <1> jmp ee12_put_then_next 276 <1> 277 <1> ee112_priorbyte: 278 000082A9 E8762F <1> call putc ; display the minus 279 <1> _386_PM call test_d_b_bit ; 32-bit segment ? 280 <1> _386_PM jz .16 ; no --> 281 <1> _386_PM_o32 282 <1> .16: 283 000082AC 4A <1> dec dx ; decrement offset (16 bit or 32 bit) 284 000082AD BF[AE07] <1> mov di, line_out 285 000082B0 EB67 <1> jmp ee15_linebreak_and_ee2 286 <1> 287 <1> ee11_backspace: 288 000082B2 E388 <1> jcxz ee4_next ; if nothing to backspace over 289 000082B4 49 <1> dec cx 290 000082B5 4E <1> dec si 291 000082B6 E82A39 <1> call fullbsout 292 000082B9 EB81 <1> jmp ee4_next 293 <1> 294 <1> ee12_put_then_next: 295 000082BB E8642F <1> call putc 296 000082BE E97BFF <1> jmp ee4_next ; back for more 297 <1> 298 <1> ; We have a byte (if CX != 0). 299 <1> ; 300 <1> ; cx = number of digits we have (0..2) 301 <1> ; al = codepoint specifying how to proceed after writing 302 <1> ee13_write: 303 000082C1 E329 <1> jcxz ee14_done_write ; if no change for this byte 304 <1> 305 000082C3 50 <1> push ax ; preserve proceed control 306 000082C4 31C0 <1> xor ax, ax ; ah = 0, al = 0 307 000082C6 8804 <1> mov byte [si], al ; terminate the string 308 000082C8 29CE <1> sub si, cx ; point to beginning 309 <1> @@: 310 000082CA 00E4 <1> add ah, ah 311 000082CC 00E4 <1> add ah, ah 312 000082CE 00E4 <1> add ah, ah 313 000082D0 00E4 <1> add ah, ah ; prior value times 16 314 000082D2 00C4 <1> add ah, al ; add next digit (0 in first iteration) 315 000082D4 AC <1> lodsb ; load next digit (or NUL) 316 000082D5 E87929 <1> call getnyb 317 000082D8 73F0 <1> jnc @B ; if another digit --> (NC) 318 <1> ; (CY can only mean we reached the NUL) 319 000082DA 88E0 <1> mov al, ah ; get byte value 320 000082DC E88718 <1> call dohack ; do the INT pointer hack 321 000082DF E86C09 <1> call writemem ; write AL at BX:(E)DX 322 000082E2 BF[E40A] <1> mov di, run2324 ; debuggee's int 23/24 323 000082E5 E86E18 <1> call prehak1 ; copy things back 324 000082E8 E88F18 <1> call unhack ; undo the INT pointer hack 325 000082EB 58 <1> pop ax ; al = how to proceed 326 <1> 327 <1> ; End the loop over bytes. 328 <1> ee14_done_write: 329 000082EC BF[AE07] <1> mov di, line_out ; reset output buffer 330 <1> 331 000082EF 3C20 <1> cmp al, 32 ; (go to next byte) 332 000082F1 7414 <1> je ee_nextbyte 333 000082F3 3C2D <1> cmp al, '-' ; (go to prior byte) 334 000082F5 74B2 <1> je ee112_priorbyte 335 000082F7 3C2E <1> cmp al, '.' ; (exit E interactive mode) 336 000082F9 7425 <1> je ee16_end 337 000082FB 3C0A <1> cmp al, 10 338 000082FD 7421 <1> je ee16_end 339 000082FF E84F2A <1> call iseol?.notsemicolon; (also exit E interactive mode) 340 00008302 741C <1> je ee16_end 341 00008304 E9B515 <1> jmp error ; unexpected value 342 <1> 343 <1> ee_nextbyte: 344 <1> _386_PM call test_d_b_bit ; 32-bit segment ? 345 <1> _386_PM jz .16 ; no --> 346 <1> _386_PM_o32 347 <1> .16: 348 00008307 42 <1> inc dx ; increment offset (16 bit or 32 bit) 349 00008308 F6C207 <1> test dl, 7 350 0000830B 740C <1> jz ee15_linebreak_and_ee2 351 <1> ; if new line 352 0000830D F7D1 <1> not cx 353 0000830F 83C104 <1> add cx, byte 4 ; compute 3 - cx 354 00008312 B020 <1> mov al, 32 355 00008314 F3AA <1> rep stosb ; store that many spaces 356 00008316 E9FAFE <1> jmp ee3 ; back for more 357 <1> 358 <1> ee15_linebreak_and_ee2: 359 00008319 B80D0A <1> mov ax, 10 << 8 | 13 ; terminate this line 360 0000831C AB <1> stosw 361 0000831D E9E6FE <1> jmp ee2 ; back for a new line 362 <1> 363 <1> ee16_end: 364 00008320 E9622B <1> jmp putsline_crlf ; call putsline and return 2659 2660 2661 %include "ff.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug F command (find) 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2022 C. Masloch 8 <1> 9 <1> Usage of the works is permitted provided that this 10 <1> instrument is retained with the works, so that any entity 11 <1> that uses the works is notified of this instrument. 12 <1> 13 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 14 <1> 15 <1> %endif 16 <1> 17 <1> 18 <1> usesection lDEBUG_CODE 19 <1> 20 <1> ; F command - fill memory 21 <1> ff: 22 00008323 31C9 <1> xor cx, cx ; get address range (no default length) 23 00008325 8B1E[7C0C] <1> mov bx, word [reg_ds] 24 00008329 E88319 <1> call getrange ; get address range into bx:(e)dx 25 <1> _386_PM_o32 ; sub ecx, edx 26 0000832C 29D1 <1> sub cx, dx 27 <1> _386_PM_o32 ; inc ecx 28 0000832E 41 <1> inc cx ; (e)cx = number of bytes 29 0000832F 53 <1> push bx 30 <1> _386_PM_o32 ; push ecx 31 00008330 51 <1> push cx ; save it 32 <1> _386_PM_o32 ; push edx 33 00008331 52 <1> push dx ; save start address 34 <1> 35 00008332 4E <1> dec si 36 00008333 BA[3868] <1> mov dx, msg.range 37 00008336 E8B529 <1> call isstring? 38 00008339 AC <1> lodsb 39 0000833A 7515 <1> jne .notrange 40 <1> 41 0000833C 8B1E[7C0C] <1> mov bx, word [reg_ds] ; get search range 42 00008340 800E[CF00]04 <1> setopt [internalflags3], dif3_accept_getrange_0 43 00008345 E86C19 <1> call getrangeX.ecx_and_0_valid 44 <1> ; try to get second range 45 00008348 E8172A <1> call chkeol ; and insure end-of-line 46 <1> ; successful if it returned 47 <1> _386_PM_o32 ; mov esi, edx 48 0000834B 89D6 <1> mov si, dx ; bx:esi-> source string 49 <1> _386_PM_o32 ; sub ecx, edx 50 0000834D 29D1 <1> sub cx, dx ; ecx = count - 1 51 0000834F EB17 <1> jmp short @F 52 <1> 53 <1> .notrange: 54 00008351 E8202A <1> call skipcomm0 55 00008354 E8451A <1> call getstr ; get string of bytes 56 00008357 89F9 <1> mov cx, di 57 00008359 81E9[AE07] <1> sub cx, line_out 58 0000835D 7503E95A15 <1> jz error 59 00008362 49 <1> dec cx 60 <1> _386_PM movzx ecx, cx 61 00008363 8CDB <1> mov bx, ds 62 <1> _386_PM xor esi, esi 63 00008365 BE[AE07] <1> mov si, line_out 64 <1> 65 <1> @@: 66 <1> _386_PM_o32 ; pop edi 67 00008368 5F <1> pop di 68 <1> _386_PM_o32 ; pop eax 69 00008369 58 <1> pop ax 70 0000836A 07 <1> pop es 71 0000836B 8EDB <1> mov ds, bx 72 <1> %if _PM 73 <1> cmp byte [ss:bAddr32], 0 74 <1> jz ff16 75 <1> ff32: 76 <1> [cpu 386] 77 <1> inc ecx 78 <1> jz error 79 <1> cmp ecx, byte 1 80 <1> je .onebytesource 81 <1> xor edx, edx ; edx:eax = size 82 <1> div ecx 83 <1> test eax, eax 84 <1> jz .partial 85 <1> .loop: 86 <1> push esi 87 <1> push ecx 88 <1> a32 movsb 89 <1> dec ecx 90 <1> a32 rep movsb 91 <1> pop ecx 92 <1> pop esi 93 <1> dec eax 94 <1> jnz .loop 95 <1> .partial: 96 <1> mov ecx, edx ; get remainder (number of bytes in partial copy) 97 <1> jecxz ffret ; if no partial copy --> 98 <1> a32 rep movsb 99 <1> jmp short ffret ; done --> 100 <1> .onebytesource: 101 <1> mov ecx, eax ; size 102 <1> mov al, byte [esi] 103 <1> a32 rep stosb 104 <1> jmp short ffret 105 <1> __CPU__ 106 <1> ff16: 107 <1> %endif 108 0000836D 31D2 <1> xor dx, dx ; dx:ax = size 109 0000836F 83F801 <1> cmp ax, byte 1 110 00008372 83D200 <1> adc dx, byte 0 ; convert 0000:0000 to 0001:0000 (0 = 64 KiB) 111 00008375 41 <1> inc cx 112 00008376 7503 <1> jnz @F 113 <1> ; dx:ax = 1_0000h, remainder = 0, quotient = 1 114 <1> ; dx:ax = 1, remainder = 1, quotient = 0 115 <1> ; dx:ax = 1234h, remainder = 1234h, quotient = 0 116 00008378 92 <1> xchg ax, dx 117 00008379 EB07 <1> jmp @FF 118 <1> 119 <1> @@: 120 0000837B 83F901 <1> cmp cx, byte 1 121 0000837E 7419 <1> je .onebytesource ; a common optimization 122 00008380 F7F1 <1> div cx ; compute number of whole repetitions 123 <1> @@: 124 00008382 85C0 <1> test ax, ax 125 00008384 740B <1> jz .partial ; if less than one whole rep 126 <1> .loop: 127 00008386 56 <1> push si 128 00008387 51 <1> push cx 129 00008388 A4 <1> movsb 130 00008389 49 <1> dec cx 131 0000838A F3A4 <1> rep movsb 132 0000838C 59 <1> pop cx 133 0000838D 5E <1> pop si 134 0000838E 48 <1> dec ax 135 0000838F 75F5 <1> jnz .loop ; if more to go 136 <1> .partial: 137 00008391 89D1 <1> mov cx, dx ; get remainder (number of bytes in partial copy) 138 00008393 E30C <1> jcxz ffret ; if no partial copy --> 139 00008395 F3A4 <1> rep movsb 140 00008397 EB08 <1> jmp short ffret ; done --> 141 <1> .onebytesource: 142 00008399 89C1 <1> mov cx, ax ; size 143 0000839B 8A04 <1> mov al, byte [si] 144 0000839D AA <1> stosb ; cx=0 -> 64 kB 145 0000839E 49 <1> dec cx 146 0000839F F3AA <1> rep stosb 147 <1> ffret: 148 000083A1 16 <1> push ss ; restore ds 149 000083A2 1F <1> pop ds 150 000083A3 16 <1> push ss ; restore es 151 000083A4 07 <1> pop es 152 000083A5 C3 <1> retn 2662 2663 2664 %include "hh.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug H commands (hexadecimal calculation) 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2022 C. Masloch 8 <1> 9 <1> Usage of the works is permitted provided that this 10 <1> instrument is retained with the works, so that any entity 11 <1> that uses the works is notified of this instrument. 12 <1> 13 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 14 <1> 15 <1> %endif 16 <1> 17 <1> 18 <1> usesection lDEBUG_CODE 19 <1> 20 <1> %if _EXPRESSIONS 21 <1> 22 <1> ; H command - hex computation 23 <1> hh: 24 000083A6 E8CB29 <1> call skipcomm0 25 000083A9 4E <1> dec si 26 000083AA BA[EE68] <1> mov dx, msg.base 27 000083AD E83E29 <1> call isstring? 28 000083B0 7403E9CC00 <1> jne .normal 29 000083B5 E8D429 <1> call skipequals 30 000083B8 E8A923 <1> call getexpression 31 000083BB 85DB <1> test bx, bx 32 <1> @@: 33 000083BD 7403E9FA14 <1> jnz error 34 000083C2 83FA24 <1> cmp dx, 36 35 000083C5 77F6 <1> ja @B 36 000083C7 83FA02 <1> cmp dx, 2 37 000083CA 72F1 <1> jb @B 38 000083CC 52 <1> push dx 39 <1> 40 000083CD E8A429 <1> call skipcomm0 41 000083D0 4E <1> dec si 42 000083D1 BA[F368] <1> mov dx, msg.group 43 000083D4 E81729 <1> call isstring? 44 000083D7 BA0000 <1> mov dx, 0 45 000083DA 7513 <1> jne .gotgroup 46 000083DC E8AD29 <1> call skipequals 47 000083DF E88223 <1> call getexpression 48 000083E2 E88F29 <1> call skipcomm0 49 000083E5 85DB <1> test bx, bx 50 000083E7 75D4 <1> jnz @B 51 000083E9 83FA20 <1> cmp dx, 32 52 000083EC 77CF <1> ja @B 53 000083EE 4E <1> dec si 54 <1> .gotgroup: 55 000083EF 52 <1> push dx 56 000083F0 BA[F968] <1> mov dx, msg.width 57 000083F3 E8F828 <1> call isstring? 58 000083F6 BB0000 <1> mov bx, 0 59 000083F9 7515 <1> jne .gotwidth 60 000083FB E88E29 <1> call skipequals 61 000083FE E86323 <1> call getexpression 62 00008401 E87029 <1> call skipcomm0 63 00008404 85DB <1> test bx, bx 64 00008406 75B5 <1> jnz @B 65 00008408 83FA20 <1> cmp dx, 32 66 0000840B 77B0 <1> ja @B 67 0000840D 89D3 <1> mov bx, dx 68 0000840F A8 <1> db __TEST_IMM8 ; (skip lodsb) 69 <1> .gotwidth: 70 00008410 AC <1> lodsb 71 00008411 53 <1> push bx 72 00008412 E8E200 <1> call .compute 73 00008415 58 <1> pop ax 74 00008416 5E <1> pop si 75 00008417 59 <1> pop cx 76 00008418 BF[F007] <1> mov di, line_out + 66 77 <1> 78 0000841B E81901 <1> call .storeresult 79 <1> 80 0000841E 93 <1> xchg bx, ax ; ax:dx = number, bx = width 81 0000841F 92 <1> xchg ax, dx ; dx:ax = number 82 <1> lframe 83 00008420 5589E5 <1> lenter 84 <1> lvar dword, dividend 85 00008423 52 <1> push dx 86 00008424 50 <1> push ax 87 00008425 4B <1> dec bx 88 <1> lvar word, minwidth 89 00008426 53 <1> push bx 90 <1> lvar word, group 91 00008427 56 <1> push si 92 <1> lvar word, groupcounter 93 00008428 56 <1> push si 94 <1> 95 00008429 89FB <1> mov bx, di 96 0000842B FD <1> std ; _AMD_ERRATUM_109_WORKAROUND does not apply 97 <1> 98 <1> ; dword [bp + ?dividend] = number to display 99 <1> ; cx = base 100 <1> .loop_write: 101 <1> 102 0000842C 31D2 <1> xor dx, dx 103 0000842E 57 <1> push di 104 0000842F BF0400 <1> mov di, 4 105 <1> .loop_divide: 106 00008432 8B43FA <1> mov ax, [bp + ?dividend - 2 + di] 107 00008435 F7F1 <1> div cx 108 00008437 8943FA <1> mov word [bp + ?dividend - 2 + di], ax 109 0000843A 4F <1> dec di 110 0000843B 4F <1> dec di 111 0000843C 75F4 <1> jnz .loop_divide 112 <1> ; dx = last remainder 113 0000843E 5F <1> pop di 114 0000843F 92 <1> xchg ax, dx ; ax = remainder (next digit) 115 <1> ; dword [bp + ?dividend] = result of div 116 00008440 0430 <1> add al, '0' 117 00008442 3C39 <1> cmp al, '9' 118 00008444 7602 <1> jbe @F 119 00008446 0407 <1> add al, -('9'+1)+'A' 120 <1> @@: 121 00008448 AA <1> stosb 122 <1> 123 00008449 FF4EF6 <1> dec word [bp + ?groupcounter] 124 0000844C 7509 <1> jnz @F 125 0000844E FF76F8 <1> push word [bp + ?group] 126 00008451 8F46F6 <1> pop word [bp + ?groupcounter] 127 00008454 B05F <1> mov al, '_' 128 00008456 AA <1> stosb 129 <1> @@: 130 <1> 131 00008457 FF4EFA <1> dec word [bp + ?minwidth] 132 0000845A 79D0 <1> jns .loop_write 133 <1> 134 0000845C 837EFE00 <1> cmp word [bp + ?dividend + 2], 0 135 00008460 75CA <1> jnz .loop_write 136 00008462 837EFC00 <1> cmp word [bp + ?dividend], 0 137 <1> ; any more ? 138 00008466 75C4 <1> jnz .loop_write ; loop --> 139 <1> 140 00008468 FC <1> cld 141 <1> 142 00008469 29FB <1> sub bx, di 143 0000846B 89D9 <1> mov cx, bx 144 0000846D 89FE <1> mov si, di 145 0000846F 46 <1> inc si 146 <1> 147 00008470 BF[AE07] <1> mov di, line_out 148 <1> 149 00008473 803C5F <1> cmp byte [si], '_' 150 00008476 7502 <1> jne @F 151 00008478 46 <1> inc si 152 00008479 49 <1> dec cx 153 <1> ; never need to loop because next digit is always a digit 154 <1> 155 <1> @@: 156 0000847A F3A4 <1> rep movsb ; overlapping! 157 <1> 158 0000847C 89EC5D <1> lleave 159 0000847F EB73 <1> jmp short .putsline_crlf 160 <1> 161 <1> 162 <1> .normal: 163 00008481 AC <1> lodsb 164 00008482 56 <1> push si 165 00008483 50 <1> push ax 166 00008484 800E[A896]01 <1> or byte [hhflag], 1 ; set flag so no operator means add 167 00008489 E86B00 <1> call .compute 168 0000848C 58 <1> pop ax 169 0000848D 5E <1> pop si 170 0000848E E8A600 <1> call .storeresult 171 00008491 F606[A896]04 <1> test byte [hhflag], 4 ; any two-fold operation ? 172 00008496 741F <1> jz .single ; no --> 173 00008498 8A26[9900] <1> mov ah, byte [options2 + 1] 174 0000849C 80E410 <1> and ah, opt2_hh_compat >> 8 175 0000849F E87100 <1> call .store2 ; display "FFFFFFFF (-0001)" 176 000084A2 50 <1> push ax 177 000084A3 B82020 <1> mov ax, 32<<8|32 178 000084A6 AB <1> stosw 179 000084A7 58 <1> pop ax 180 000084A8 50 <1> push ax 181 000084A9 800E[A896]02 <1> or byte [hhflag], 2 ; set flag so no operator means sub 182 000084AE E84600 <1> call .compute 183 000084B1 58 <1> pop ax 184 000084B2 E85E00 <1> call .store2 ; display "FFFFFFFF (-0001)" 185 000084B5 EB3D <1> jmp short .putsline_crlf 186 <1> 187 <1> .single: 188 000084B7 B400 <1> mov ah, 0 189 000084B9 53 <1> push bx 190 000084BA 52 <1> push dx 191 000084BB E85500 <1> call .store2 192 <1> 193 000084BE B82020 <1> mov ax, (32 << 8) | 32 194 000084C1 AB <1> stosw 195 000084C2 B86465 <1> mov ax, "de" 196 000084C5 AB <1> stosw 197 000084C6 B86369 <1> mov ax, "ci" 198 000084C9 AB <1> stosw 199 000084CA B86D61 <1> mov ax, "ma" 200 000084CD AB <1> stosw 201 000084CE B86C3A <1> mov ax, "l:" 202 000084D1 AB <1> stosw 203 000084D2 B020 <1> mov al, 32 204 000084D4 AA <1> stosb 205 000084D5 58 <1> pop ax 206 000084D6 5A <1> pop dx 207 000084D7 E80329 <1> call decdword 208 000084DA 85D2 <1> test dx, dx ; result negative ? 209 000084DC 7916 <1> jns @F ; no --> 210 000084DE 50 <1> push ax 211 000084DF B82028 <1> mov ax, " (" 212 000084E2 AB <1> stosw 213 000084E3 B02D <1> mov al, "-" 214 000084E5 AA <1> stosb 215 000084E6 58 <1> pop ax 216 000084E7 F7DA <1> neg dx 217 000084E9 F7D8 <1> neg ax 218 000084EB 83DA00 <1> sbb dx, byte 0 ; neg bx:dx 219 000084EE E8EC28 <1> call decdword 220 000084F1 B029 <1> mov al, ")" 221 000084F3 AA <1> stosb 222 <1> @@: 223 <1> .putsline_crlf: 224 000084F4 E98E29 <1> jmp putsline_crlf 225 <1> 226 <1> 227 <1> .compute: 228 000084F7 E86A22 <1> call getdword 229 000084FA E86528 <1> call chkeol ; expect end of line here 230 <1> .comp_ret: 231 000084FD C3 <1> retn 232 <1> 233 <1> ; INP: bx:dx = result 234 <1> ; ah = flag, nonzero if to stay 86-DOS Debug compatible 235 <1> ; OUT: displayed 236 <1> ; CHG: di, bx, dx 237 <1> .store: 238 000084FE 50 <1> push ax 239 000084FF 84E4 <1> test ah, ah 240 00008501 7509 <1> jnz .store_nothigh 241 00008503 85DB <1> test bx, bx 242 00008505 7405 <1> jz .store_nothigh ; no need to display 32-bit value 243 00008507 89D8 <1> mov ax, bx 244 00008509 E84129 <1> call hexword 245 <1> .store_nothigh: 246 0000850C 89D0 <1> mov ax, dx 247 0000850E E83C29 <1> call hexword 248 00008511 58 <1> pop ax 249 00008512 C3 <1> retn 250 <1> 251 <1> .store2: 252 00008513 E8E8FF <1> call .store 253 00008516 50 <1> push ax 254 00008517 84E4 <1> test ah, ah 255 00008519 751A <1> jnz .store2_ret 256 0000851B 85DB <1> test bx, bx ; result negative ? 257 0000851D 7916 <1> jns .store2_ret ; no --> 258 0000851F B82028 <1> mov ax, " (" 259 00008522 AB <1> stosw 260 00008523 B02D <1> mov al, "-" 261 00008525 AA <1> stosb 262 00008526 F7DB <1> neg bx 263 00008528 F7DA <1> neg dx 264 0000852A 83DB00 <1> sbb bx, byte 0 ; neg bx:dx 265 0000852D 58 <1> pop ax 266 0000852E 50 <1> push ax 267 0000852F E8CCFF <1> call .store 268 00008532 B029 <1> mov al, ")" 269 00008534 AA <1> stosb 270 <1> .store2_ret: 271 00008535 58 <1> pop ax 272 00008536 C3 <1> retn 273 <1> 274 <1> 275 <1> .storeresult: 276 00008537 8916[C48F] <1> mov word [hhresult], dx 277 0000853B 891E[C68F] <1> mov word [hhresult + 2], bx 278 0000853F C3 <1> retn 279 <1> %else 280 <1> ; H command - hex addition and subtraction. 281 <1> hh: 282 <1> call getdword 283 <1> push bx 284 <1> push dx 285 <1> call skipcomm0 286 <1> call getdword 287 <1> call chkeol ; expect end of line here 288 <1> pop cx 289 <1> pop ax ; first value in AX:CX, second in BX:DX 290 <1> mov si, ax 291 <1> mov bp, cx ; first value in SI:BP now 292 <1> mov ax, cx 293 <1> add ax, dx 294 <1> push ax 295 <1> mov ax, si 296 <1> adc ax, bx 297 <1> jz .nothigh1 ; no need to display 32-bit value 298 <1> call hexword 299 <1> .nothigh1: 300 <1> pop ax 301 <1> call hexword 302 <1> mov ax, 2020h 303 <1> stosw 304 <1> mov ax, bp 305 <1> sub ax, dx 306 <1> push ax 307 <1> mov ax, si 308 <1> sbb ax, bx 309 <1> jz .nothigh2 ; no need to display 32-bit value 310 <1> or si, bx 311 <1> jz .nothigh2 ; both were zero, non-zero result only by carry --> 312 <1> call hexword 313 <1> .nothigh2: 314 <1> pop ax 315 <1> call hexword 316 <1> call putsline_crlf 317 <1> retn 318 <1> %endif 319 <1> 320 <1> 321 <1> usesection lDEBUG_DATA_ENTRY 322 <1> 323 <1> align 4, db 0 324 00008FC4 00000000 <1> hhresult: dd 0 2665 2666 2667 %include "iioo.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug I and O commands (port input/output) 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2022 C. Masloch 8 <1> 9 <1> Usage of the works is permitted provided that this 10 <1> instrument is retained with the works, so that any entity 11 <1> that uses the works is notified of this instrument. 12 <1> 13 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 14 <1> 15 <1> %endif 16 <1> 17 <1> 18 <1> usesection lDEBUG_CODE 19 <1> 20 <1> ; O command - output to I/O port. 21 <1> oo: 22 00008540 B44F <1> mov ah, 'O' 23 00008542 BB[4885] <1> mov bx, .tab 24 00008545 E95901 <1> jmp ii.common 25 <1> 26 <1> 27 <1> align 2, db 0 28 <1> .tab: 29 00008548 [4E85][5885][6285] <1> dw .byte, .word, .dword 30 <1> 31 <1> 32 <1> .byte: 33 0000854E E8E926 <1> call getbyte ; read value from command line 34 00008551 E80E28 <1> call chkeol ; expect end of line here 35 00008554 92 <1> xchg ax, dx ; al = value 36 00008555 5A <1> pop dx ; recover port number 37 00008556 EE <1> out dx, al ; send 38 00008557 C3 <1> retn 39 <1> 40 <1> .word: 41 00008558 E8D126 <1> call getword 42 0000855B E80428 <1> call chkeol 43 0000855E 92 <1> xchg ax, dx ; ax = value 44 0000855F 5A <1> pop dx 45 00008560 EF <1> out dx, ax 46 00008561 C3 <1> retn 47 <1> 48 <1> .dword: 49 <1> [cpu 386] 50 00008562 E8FF21 <1> call getdword 51 00008565 E8FA27 <1> call chkeol ; expect end of line here 52 00008568 53 <1> push bx 53 00008569 52 <1> push dx 54 0000856A 6658 <1> pop eax ; eax = value 55 0000856C 5A <1> pop dx 56 0000856D 66EF <1> out dx, eax 57 0000856F C3 <1> retn 58 <1> __CPU__ 59 <1> 60 <1> 61 <1> %include "if.asm" ; (jumps to .not_if for port Input commands) 1 <2> 2 <2> %if 0 3 <2> 4 <2> lDebug IF commands (conditional control flow) 5 <2> 6 <2> Copyright (C) 2008-2022 C. Masloch 7 <2> 8 <2> Usage of the works is permitted provided that this 9 <2> instrument is retained with the works, so that any entity 10 <2> that uses the works is notified of this instrument. 11 <2> 12 <2> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 <2> 14 <2> %endif 15 <2> 16 <2> 17 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 18 <2> if_exists_check: 19 00008570 16 <2> push ss 20 00008571 07 <2> pop es 21 00008572 8B3E[020C] <2> mov di, word [if_exists_si] 22 00008576 8B0E[060C] <2> mov cx, word [if_exists_length] 23 0000857A 8B36[040C] <2> mov si, word [if_exists_sp] 24 0000857E F3A4 <2> rep movsb 25 00008580 8B0E[060C] <2> mov cx, word [if_exists_length] 26 00008584 41 <2> inc cx 27 00008585 80E1FE <2> and cl, ~1 28 <2> 29 00008588 8B36[000C] <2> mov si, word [if_exists_then_address] 30 0000858C 85F6 <2> test si, si 31 0000858E 740A <2> jz .error 32 00008590 4E <2> dec si 33 00008591 BA[8164] <2> mov dx, msg.then 34 00008594 E85727 <2> call isstring? 35 00008597 7501 <2> jne .error 36 00008599 C3 <2> retn 37 <2> 38 <2> .error: 39 0000859A B80701 <2> mov ax, 107h 40 0000859D E86313 <2> call setrc 41 000085A0 E91913 <2> jmp error 42 <2> 43 <2> if_exists_not_found: 44 000085A3 E8CAFF <2> call if_exists_check 45 000085A6 F606[CC00]40 <2> testopt [internalflags3], dif3_if_not 46 000085AB 7512 <2> jnz if_exists_condition_met 47 <2> if_exists_condition_not_met: 48 000085AD E9507A <2> jmp cmd3 49 <2> 50 <2> if_exists_found_open: 51 000085B0 16 <2> push ss 52 000085B1 07 <2> pop es 53 000085B2 E8EF31 <2> call getline_close_file 54 <2> 55 <2> if_exists_found_closed: 56 000085B5 E8B8FF <2> call if_exists_check 57 000085B8 F606[CC00]40 <2> testopt [internalflags3], dif3_if_not 58 000085BD 75EE <2> jnz if_exists_condition_not_met 59 <2> if_exists_condition_met: 60 000085BF 8B26[040C] <2> mov sp, word [if_exists_sp] 61 000085C3 01CC <2> add sp, cx 62 000085C5 E8DA27 <2> call skipwhite 63 000085C8 5A <2> pop dx ; discard near return address 64 000085C9 8026[CF00]E7 <2> clropt [internalflags3], dif3_in_if | dif3_auxbuff_guarded_1 65 000085CE E9CA7D <2> jmp cmd3_notblank 66 <2> %endif 67 <2> 68 <2> 69 <2> ; IF command -- conditional 70 <2> ii: 71 000085D1 89F2 <2> mov dx, si 72 000085D3 50 <2> push ax 73 000085D4 8B44FE <2> mov ax, [si - 2] 74 000085D7 25DFDF <2> and ax, TOUPPER_W 75 000085DA 3D4946 <2> cmp ax, "IF" 76 000085DD 58 <2> pop ax 77 000085DE 7403E9B500 <2> jne .not_if 78 <2> 79 000085E3 E8BC27 <2> call skipwhite 80 000085E6 E8FA17 <2> call isoperator? 81 000085E9 7514 <2> jne .if 82 000085EB 89CB <2> mov bx, cx 83 000085ED 01DB <2> add bx, bx ; bh = 0 ! 84 000085EF 50 <2> push ax 85 000085F0 FF97[9A90] <2> call near [operatordispatchers+bx] 86 000085F4 58 <2> pop ax 87 000085F5 85DB <2> test bx, bx 88 000085F7 7403E99C00 <2> jnz .not_if 89 000085FC E8A327 <2> call skipwhite 90 <2> .if: 91 000085FF 8026[CC00]BF <2> clropt [internalflags3], dif3_if_not 92 00008604 4E <2> dec si 93 00008605 BA[8664] <2> mov dx, msg.not 94 00008608 E8E326 <2> call isstring? 95 0000860B AC <2> lodsb 96 0000860C 7508 <2> jne @F 97 0000860E E89227 <2> call skipwh0 98 00008611 800E[CC00]40 <2> setopt [internalflags3], dif3_if_not 99 <2> 100 <2> @@: 101 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 102 00008616 4E <2> dec si 103 00008617 BA[636F] <2> mov dx, msg.exists 104 0000861A E8D126 <2> call isstring? 105 0000861D AC <2> lodsb 106 0000861E 754C <2> jne .if_numeric 107 00008620 E88027 <2> call skipwh0 108 00008623 4E <2> dec si 109 00008624 BA[6A6F] <2> mov dx, msg.y 110 00008627 E8C426 <2> call isstring? 111 0000862A 7403E98D12 <2> jne error 112 0000862F E87027 <2> call skipwhite 113 <2> 114 00008632 4E <2> dec si 115 00008633 8936[020C] <2> mov word [if_exists_si], si 116 00008637 89F3 <2> mov bx, si 117 <2> @@: 118 00008639 AC <2> lodsb 119 0000863A E81427 <2> call iseol?.notsemicolon 120 0000863D 75FA <2> jne @B 121 0000863F 89F1 <2> mov cx, si ; -> after EOL byte 122 00008641 29D9 <2> sub cx, bx ; = length including EOL 123 00008643 890E[060C] <2> mov word [if_exists_length], cx 124 00008647 41 <2> inc cx ; round up 125 00008648 80E1FE <2> and cl, ~1 ; make even 126 0000864B 29CC <2> sub sp, cx 127 0000864D 8926[040C] <2> mov word [if_exists_sp], sp 128 00008651 89E7 <2> mov di, sp 129 00008653 89DE <2> mov si, bx 130 00008655 D1E9 <2> shr cx, 1 131 00008657 F3A5 <2> rep movsw 132 <2> 133 00008659 89DE <2> mov si, bx 134 0000865B AC <2> lodsb 135 0000865C 8326[000C]00 <2> and word [if_exists_then_address], 0 136 00008661 800E[CF00]08 <2> setopt [internalflags3], dif3_in_if 137 00008666 E8F236 <2> call yy 138 00008669 E95012 <2> jmp error 139 <2> %endif 140 <2> 141 <2> .if_numeric: 142 0000866C E8F520 <2> call getexpression 143 0000866F E8B71A <2> call toboolean 144 00008672 89D3 <2> mov bx, dx 145 00008674 BA[8164] <2> mov dx, msg.then 146 00008677 4E <2> dec si 147 00008678 E87326 <2> call isstring? 148 0000867B 7403E93C12 <2> jne error 149 00008680 E81F27 <2> call skipwhite 150 00008683 F606[CC00]40 <2> testopt [internalflags3], dif3_if_not 151 00008688 7403 <2> jz @F 152 0000868A 80F301 <2> xor bl, 1 153 <2> @@: 154 0000868D 85DB <2> test bx, bx 155 0000868F 7404 <2> jz .if_false 156 00008691 5B <2> pop bx ; discard near return address to cmd3 157 00008692 E9067D <2> jmp cmd3_notblank ; execute tail 158 <2> 159 <2> .if_false: 160 00008695 E97A3B <2> jmp resetrc 62 <1> ; I command - input from I/O port. 63 <1> .not_if: 64 00008698 89D6 <1> mov si, dx 65 0000869A 4E <1> dec si 66 0000869B AC <1> lodsb 67 <1> 68 0000869C B449 <1> mov ah, 'I' 69 0000869E BB[D486] <1> mov bx, .tab 70 <1> 71 <1> ; bx = jump table for byte, word, dword handler 72 <1> ; ah = letter of the command 73 <1> ; si, al etc. 74 <1> .common: 75 000086A1 50 <1> push ax 76 000086A2 E815FB <1> call uppercase 77 000086A5 3C57 <1> cmp al, 'W' 78 000086A7 7507 <1> jne .notw 79 <1> .incbx2: 80 000086A9 43 <1> inc bx 81 000086AA 43 <1> inc bx ; use word handler 82 000086AB E8F426 <1> call skipwhite ; skip the 'W' til next character 83 000086AE EB12 <1> jmp short .sizeset 84 <1> 85 <1> .notw: 86 000086B0 3C44 <1> cmp al, 'D' 87 000086B2 750E <1> jne .sizeset 88 <1> %if 1 89 000086B4 3264FE <1> xor ah, byte [si-2] 90 000086B7 7405 <1> jz .d ; "Id" or "Od" --> (uppercase command) 91 000086B9 80F420 <1> xor ah, 32 92 000086BC 7504 <1> jnz .sizeset ; no space is allowed between the command and 'D' --> 93 <1> ; "id" or "od" here (lowercase command) 94 <1> .d: 95 <1> %endif 96 000086BE 43 <1> _386 inc bx 97 000086BF 43 <1> _386 inc bx ; use dword handler 98 000086C0 EBE7 <1> _386_jmps .incbx2 ; bx += 2 and skip the 'D' 99 <1> ; no 386 here. try with D as part of port number 100 <1> .sizeset: 101 000086C2 E86725 <1> call getword ; get port 102 000086C5 59 <1> pop cx ; restore letter if necessary 103 000086C6 80FD49 <1> cmp ch, 'I' ; check whether I or O 104 000086C9 7504 <1> jne .o ; O --> 105 000086CB E89426 <1> call chkeol ; expect end of line here for I commands 106 000086CE A8 <1> db __TEST_IMM8 ; (skip push) 107 <1> .o: 108 000086CF 52 <1> push dx ; save port number for O commands 109 000086D0 2EFF27 <1> jmp near [cs:bx] 110 <1> 111 <1> 112 000086D3 00 <1> align 2, db 0 113 <1> .tab: 114 000086D4 [DA86][E086][E786] <1> dw .byte, .word, .dword 115 <1> 116 <1> .byte: 117 000086DA EC <1> in al, dx 118 000086DB E87627 <1> call hexbyte 119 000086DE EB04 <1> jmp short .done 120 <1> 121 <1> .word: 122 000086E0 ED <1> in ax, dx 123 <1> .doneword: 124 000086E1 E86927 <1> call hexword 125 <1> .done: 126 000086E4 E99E27 <1> jmp putsline_crlf 127 <1> 128 <1> .dword: 129 <1> [cpu 386] 130 000086E7 66ED <1> in eax, dx 131 000086E9 E85527 <1> call hexword_high 132 <1> __CPU__ 133 000086EC EBF3 <1> jmp short .doneword 134 <1> 135 <1> 136 000086EE E9CB11 <1> errorj5:jmp error 2668 2669 2670 usesection lDEBUG_CODE 2671 2672 2673 %if _PM 2674 ; OUT: NC 2675 ; ZR if in protected mode 2676 ; NZ otherwise 2677 ; STT: - 2678 ; ([internalflags] & nodosloaded, [internalflags] & protectedmode set up) 2679 ispm: 2680 push ax 2681 %if protectedmode & ~0FF00h 2682 %error Internal flags re-ordered, adjust code here 2683 %endif 2684 mov al, byte [ss:internalflags+1] ; get flag byte 2685 and al, protectedmode>>8 ; separate PM flag 2686 xor al, protectedmode>>8 ; ZR if in PM (NC) 2687 pop ax 2688 retn 2689 %endif 2690 2691 2692 setpspdbg: 2693 000086F1 8CD3 mov bx, ss 2694 setpsp: 2695 %if _BOOTLDR 2696 000086F3 F606[C500]40 testopt [internalflags], nodosloaded 2697 000086F8 7560 jnz .ret ; no PSPs --> 2698 %endif 2699 2700 %if _USESDA 2701 000086FA 833E[0A0B]FF cmp word [pSDA+0], byte -1 2702 000086FF 7411 je .int21 2703 2704 %if _PM 2705 push bx 2706 call selector_to_segment 2707 pop bx 2708 %endif 2709 2710 .86m: 2711 00008701 1E push ds 2712 00008702 56 push si 2713 00008703 BE[0C0B] mov si, pSDA + so16aSegSel 2714 00008706 E8B314 call update_dosdata_segment 2715 00008709 C574FE lds si, [si - so16aSegSel] 2716 0000870C 895C10 mov word [si+10h], bx 2717 0000870F 5E pop si 2718 00008710 1F pop ds 2719 00008711 C3 retn 2720 2721 .int21: 2722 %endif 2723 00008712 B450 mov ah, 50h 2724 %if _PM && _NOEXTENDER 2725 push bx 2726 call selector_to_segment 2727 pop bx 2728 call ispm 2729 jnz .int21_86m 2730 call _doscall.pm ; insure non-extended 2731 retn 2732 .int21_86m: 2733 %endif 2734 00008714 EB39 jmp _int21 2735 2736 2737 getpsp: 2738 %if _BOOTLDR 2739 00008716 31DB xor bx, bx 2740 00008718 F606[C500]40 testopt [internalflags], nodosloaded 2741 0000871D 753B jnz .ret ; no PSPs --> 2742 %endif 2743 %if _USESDA 2744 0000871F 833E[0A0B]FF cmp word [pSDA+0], byte -1 2745 00008724 7411 je .int21 2746 00008726 1E push ds 2747 00008727 56 push si 2748 00008728 BE[0C0B] mov si, pSDA + so16aSegSel 2749 0000872B E88E14 call update_dosdata_segment 2750 0000872E C574FE lds si, [si - so16aSegSel] 2751 00008731 8B5C10 mov bx, word [si + 10h] 2752 00008734 5E pop si 2753 00008735 1F pop ds 2754 %if _PM 2755 call ispm 2756 jnz .ret 2757 mov ax, 2 2758 int 31h 2759 mov bx, ax 2760 %endif 2761 00008736 C3 retn 2762 2763 .int21: 2764 %endif 2765 00008737 B451 mov ah, 51h 2766 %if _PM && _NOEXTENDER 2767 call ispm 2768 jnz .int21_86m 2769 call _doscall.pm ; insure non-extended 2770 mov ax, 2 2771 int 31h 2772 mov bx, ax 2773 retn 2774 .int21_86m: 2775 %endif 2776 00008739 EB14 jmp _int21 2777 2778 2779 _doscall_return_es: 2780 _doscall_return_es_parameter_es_ds: 2781 lframe near 2782 lpar word, es_ds_value 2783 lpar_return 2784 %if _PM 2785 lvar word, int_number 2786 lenter 2787 mov word [bp + ?int_number], 21h 2788 pushf 2789 call ispm 2790 jnz .rm 2791 .pm: 2792 popf 2793 push word [bp + ?es_ds_value] 2794 push word [bp + ?es_ds_value] 2795 push word [bp + ?int_number] 2796 push word [bp + ?frame_bp] 2797 call intcall_return_parameter_es_parameter_ds 2798 pop word [bp + ?es_ds_value] ; discard returned ds 2799 pop word [bp + ?es_ds_value] ; get es 2800 jmp .ret 2801 .rm: 2802 popf 2803 %else 2804 0000873B 5589E5 lenter 2805 %endif 2806 0000873E 06 push es 2807 0000873F 1E push ds 2808 00008740 8E5E04 mov ds, word [bp + ?es_ds_value] 2809 00008743 8E4604 mov es, word [bp + ?es_ds_value] 2810 00008746 CD21 int 21h 2811 00008748 8C4604 mov word [bp + ?es_ds_value], es 2812 0000874B 1F pop ds 2813 0000874C 07 pop es 2814 .ret: 2815 0000874D 5D lleave 2816 0000874E C3 lret 2817 2818 2819 ; Execute real Int21 instruction. If this is in PM it might get extended. 2820 _int21: 2821 %if _BOOTLDR 2822 0000874F 9C pushf 2823 00008750 F606[C500]40 testopt [internalflags], nodosloaded 2824 00008755 7504 jnz .reterr ; no Int21 --> (throw?) 2825 00008757 9D popf 2826 %endif 2827 00008758 CD21 int 21h 2828 setpsp.ret: equ $ 2829 getpsp.ret: equ $ 2830 0000875A C3 retn 2831 %if _BOOTLDR 2832 .reterr: 2833 0000875B 9D popf 2834 0000875C B80100 mov ax, 1 2835 0000875F F9 stc 2836 00008760 C3 retn 2837 %endif 2838 2839 2840 %if _PM 2841 intcall_return_parameter_es_parameter_ds: 2842 lframe near 2843 lpar word, es_value 2844 lpar word, ds_value 2845 lpar_return 2846 lpar word, int_number 2847 lpar word, bp_value 2848 lvar 32h, 86m_call_struc 2849 lenter 2850 push es 2851 mov word [bp + ?86m_call_struc +00h], di ; edi 2852 mov word [bp + ?86m_call_struc +04h], si ; esi 2853 mov word [bp + ?86m_call_struc +10h], bx ; ebx 2854 mov word [bp + ?86m_call_struc +14h], dx ; edx 2855 mov word [bp + ?86m_call_struc +18h], cx ; ecx 2856 mov word [bp + ?86m_call_struc +1Ch], ax ; eax 2857 mov ax, word [bp + ?bp_value] 2858 mov word [bp + ?86m_call_struc +08h], ax ; bp 2859 mov al, 0 ; (preserve flags!) 2860 lahf 2861 xchg al, ah 2862 mov word [bp + ?86m_call_struc +20h], ax ; flags 2863 xor ax, ax 2864 mov word [bp + ?86m_call_struc +0Ch + 2], ax 2865 mov word [bp + ?86m_call_struc +0Ch], ax 2866 mov word [bp + ?86m_call_struc +2Eh], ax ; sp 2867 mov word [bp + ?86m_call_struc +30h], ax ; ss 2868 mov ax, word [bp + ?es_value] ; usually [pspdbg] 2869 mov word [bp + ?86m_call_struc +22h], ax ; es 2870 mov ax, word [bp + ?ds_value] ; usually [pspdbg] 2871 mov word [bp + ?86m_call_struc +24h], ax ; ds 2872 push ss 2873 pop es ; => stack 2874 lea di, [bp + ?86m_call_struc] ; -> 86-Mode call structure 2875 _386 movzx edi, di ; (previously checked b[dpmi32] here) 2876 mov bx, word [bp + ?int_number] ; int# 2877 xor cx, cx 2878 mov ax, 0300h 2879 int 31h 2880 mov ah, byte [bp + ?86m_call_struc +20h] ; flags 2881 sahf 2882 mov di, word [bp + ?86m_call_struc +00h] ; edi 2883 mov si, word [bp + ?86m_call_struc +04h] ; esi 2884 mov bx, word [bp + ?86m_call_struc +10h] ; ebx 2885 mov dx, word [bp + ?86m_call_struc +14h] ; edx 2886 mov cx, word [bp + ?86m_call_struc +18h] ; ecx 2887 mov ax, word [bp + ?86m_call_struc +1Ch] ; eax 2888 push word [bp + ?86m_call_struc +22h] ; return es value 2889 pop word [bp + ?es_value] ; in the parameter 2890 push word [bp + ?86m_call_struc +24h] ; return ds value 2891 pop word [bp + ?ds_value] ; in the parameter 2892 pop es 2893 lleave 2894 lret 2895 2896 intcall: 2897 lframe near 2898 lpar word, es_ds_value 2899 lpar word, int_number 2900 lenter 2901 push word [bp + ?es_ds_value] ; es 2902 push word [bp + ?es_ds_value] ; ds 2903 push word [bp + ?int_number] ; int number 2904 push word [bp + ?frame_bp] ; bp 2905 call intcall_return_parameter_es_parameter_ds 2906 ; (discard returned parameters ?es_value, ?ds_value, done by lleave) 2907 lleave , forcerestoresp 2908 lret 2909 2910 2911 call_int2D: 2912 call ispm 2913 jnz short .rm 2914 subcpu 286 2915 push word [ss:pspdbg] ; es ds value. generally unused 2916 push 2Dh ; interrupt 2Dh 2917 call intcall ; call it 2918 retn 2919 subcpureset 2920 .rm: 2921 int 2Dh ; directly call int 2Dh 2922 retn 2923 2924 2925 ; Called in PM only, ds unknown. 2926 ; 2927 ; INP: - 2928 ; OUT: CY if no DOS extender available ("MS-DOS" on Int2F.168A) 2929 ; NC if DOS extender available 2930 ; CHG: - 2931 isextenderavailable: 2932 subcpu 286 2933 push ds 2934 push es 2935 pusha 2936 push ss 2937 pop ds 2938 mov si, msg.msdos 2939 _386 movzx esi, si 2940 mov ax, 168Ah 2941 int 2Fh 2942 cmp al, 1 ; CY if al is zero 2943 cmc ; NC if al is zero, CY else 2944 popa 2945 pop es 2946 pop ds 2947 retn 2948 subcpureset 2949 2950 nodosextinst: 2951 push ss 2952 pop ds 2953 mov dx, nodosext 2954 jmp putsz 2955 %endif 2956 2957 2958 2959 %include "ll.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug L commands (load sector, load program) 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2022 C. Masloch 8 <1> 9 <1> Usage of the works is permitted provided that this 10 <1> instrument is retained with the works, so that any entity 11 <1> that uses the works is notified of this instrument. 12 <1> 13 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 14 <1> 15 <1> %endif 16 <1> 17 <1> 18 <1> usesection lDEBUG_CODE 19 <1> 20 <1> ; L command - read a program, or disk sectors, from disk. 21 <1> ll: 22 <1> %if _BOOTLDR 23 00008761 F606[C500]40 <1> testopt [internalflags], nodosloaded 24 00008766 7406 <1> jz @F 25 00008768 BA[655F] <1> mov dx, msg.nobootsupp 26 0000876B E9922A <1> jmp putsz 27 <1> @@: 28 <1> %endif 29 <1> 30 0000876E E88D14 <1> call parselw ; parse L and W argument format 31 00008771 7433 <1> jz ll1 ; if request to read program 32 <1> %if _PM && _NOEXTENDER 33 <1> call ispm 34 <1> jnz .rm 35 <1> call isextenderavailable 36 <1> jc nodosextinst 37 <1> .rm: 38 <1> %endif 39 00008773 36F606[C400]06 <1> testopt [ss:internalflags], newpacket| ntpacket 40 00008779 7423 <1> jz .oldint 41 0000877B 88C2 <1> mov dl, al ; zero-based drive 42 0000877D BE0060 <1> mov si, 6000h ; read, assume "file data" 43 <1> %if _VDD 44 00008780 F606[C400]04 <1> testopt [internalflags], ntpacket 45 00008785 750A <1> jnz .vdd 46 <1> %endif 47 00008787 FEC2 <1> inc dl ; one-based drive 48 00008789 B80573 <1> mov ax, 7305h ; ds:(e)bx-> packet 49 0000878C F9 <1> stc 50 0000878D CD21 <1> int 21h ; use int 21h here, not doscall 51 0000878F EB0F <1> jmp short .done 52 <1> %if _VDD 53 <1> .vdd: 54 00008791 A1[EC0A] <1> mov ax, word [hVdd] 55 00008794 B90500 <1> mov cx, 5 56 <1> %if _PM 57 <1> add cl, byte [dpmi32] 58 <1> %endif 59 00008797 C4C4580290 <1> DispatchCall 60 0000879C EB02 <1> jmp short .done 61 <1> %endif 62 <1> .oldint: 63 0000879E CD25 <1> int 25h 64 <1> .done: 65 000087A0 BA[637C] <1> mov dx, reading 66 000087A3 E9E80D <1> jmp ww1 67 <1> 68 <1> ; For .COM or .EXE files, we can only load at cs:100. Check that first. 69 <1> ll1: 70 000087A6 E8F413 <1> call InDos 71 000087A9 7519 <1> jnz not_while_indos 72 000087AB E8227E <1> call guard_re 73 000087AE F606[D40B]06 <1> test byte [fileext], EXT_COM| EXT_EXE 74 000087B3 7423 <1> jz ll4 ; if not .COM or .EXE file 75 000087B5 3B1E[880C] <1> cmp bx, word [reg_cs] 76 000087B9 7506 <1> jne ll2 ; if segment is wrong 77 000087BB 81FA0001 <1> cmp dx, 100h 78 000087BF 7417 <1> je ll4 ; if address is OK (or not given) 79 <1> ll2: 80 000087C1 E9F810 <1> jmp error ; can only load .COM or .EXE at cs:100 81 <1> 82 <1> not_while_indos: 83 000087C4 B80501 <1> mov ax, 0105h 84 000087C7 E83911 <1> call setrc 85 000087CA BA[6F5D] <1> mov dx, msg.not_while_indos 86 000087CD E92A2A <1> jmp putsz_error 87 <1> 88 <1> 89 <1> ; load (any) file (if not .EXE or .COM, load at BX:DX) 90 <1> ll3: 91 000087D0 803E[D40B]00 <1> cmp byte [fileext], 0 92 000087D5 7501 <1> jne ll4 93 000087D7 C3 <1> retn 94 <1> 95 <1> ; open file and get length 96 <1> ll4: 97 000087D8 89DE <1> mov si, bx ; save destination address, segment 98 000087DA 89D7 <1> mov di, dx ; and offset 99 000087DC B8003D <1> mov ax, 3D00h ; open file for reading 100 000087DF BA8000 <1> mov dx, DTA 101 <1> doscall 2334 000087E2 CD21 <2> int 21h 102 000087E4 7303E99001 <1> jc ll16 ; error 103 000087E9 93 <1> xchg ax, bx ; mov bx, ax 104 000087EA B80242 <1> mov ax, 4202h ; lseek 105 000087ED 31C9 <1> xor cx, cx 106 000087EF 31D2 <1> xor dx, dx 107 000087F1 CD21 <1> int 21h 108 <1> 109 <1> ; Split off file types 110 <1> ; At this point: 111 <1> ; bx file handle 112 <1> ; dx:ax file length 113 <1> ; si:di load address (CS:100h for .EXE or .COM) 114 <1> 115 000087F3 F606[D40B]06 <1> test byte [fileext], EXT_COM | EXT_EXE 116 000087F8 7403E98000 <1> jnz ll13 ; if .COM or .EXE file 117 <1> 118 <1> %if _PM 119 <1> ;--- dont load a file in protected mode, 120 <1> ;--- the read loop makes some segment register arithmetic 121 <1> call ispm 122 <1> jnz .rm 123 <1> mov dx, nopmsupp 124 <1> call putsz 125 <1> jmp ll12 126 <1> .rm: 127 <1> %endif 128 <1> 129 <1> ; Load it ourselves. 130 <1> ; For non-.com/.exe files, we just do a read, and set BX:CX to the 131 <1> ; number of bytes read. 132 <1> ; 133 <1> ; si:di = address where to load 134 <1> 135 000087FD E8AC3E <1> call ensuredebuggeeloaded ; make sure a debuggee is loaded 136 00008800 7531 <1> jnz ll9.common ; if have no process --> 137 <1> ; si:di = preserved if had a process, 138 <1> ; else si:di = cs:ip (psp:100h) 139 <1> ; ? Can we ever get NC, ZR return here ? 140 <1> 141 00008802 8E06[DE0A] <1> mov es, word [pspdbe] 142 <1> 143 <1> ; Check the size against available space. 144 00008806 56 <1> push si 145 00008807 53 <1> push bx 146 <1> 147 00008808 263B360200 <1> cmp si, word [es:ALASAP] 148 0000880D 9C <1> pushf 149 0000880E F7DE <1> neg si 150 00008810 9D <1> popf 151 00008811 7305 <1> jae ll6 ; if loading past end of mem, allow through ffff 152 00008813 2603360200 <1> add si, word [es:ALASAP] ; si = number of paragraphs available 153 <1> ll6: 154 00008818 B90400 <1> mov cx, 4 155 0000881B 31DB <1> xor bx, bx ; bx:si = amount of paragraphs 156 <1> ll7: 157 0000881D D1E6 <1> shl si, 1 158 0000881F D1D3 <1> rcl bx, 1 159 00008821 E2FA <1> loop ll7 ; bx:si = amount of bytes from paragraphs 160 00008823 29FE <1> sub si, di 161 00008825 19CB <1> sbb bx, cx ; bx:si = amount of bytes left 162 00008827 7208 <1> jb ll9 ; if already we're out of space --> 163 00008829 39D3 <1> cmp bx, dx ; cmp bx:si, dx:ax (compare high word) 164 0000882B 7502 <1> jne @F ; if high word differs --> 165 0000882D 39C6 <1> cmp si, ax ; compare low word 166 <1> @@: 167 0000882F 730A <1> jae ll10 ; if not out of space --> 168 <1> ll9: 169 00008831 5B <1> pop bx ; out of space 170 00008832 5E <1> pop si 171 <1> .common: 172 00008833 BA[3E7F] <1> mov dx, doserr8 ; not enough memory 173 00008836 E8C729 <1> call putsz ; print string 174 00008839 EB2E <1> jmp short ll12 ; finally close file --> 175 <1> 176 <1> ll10: 177 0000883B 5B <1> pop bx 178 0000883C 5E <1> pop si 179 <1> 180 <1> ; Store length in registers 181 <1> 182 <1> ; seems a bit unwise to modify registers if a debuggee is running 183 <1> ; but MS DEBUG does it as well 184 <1> 185 <1> %if 0 186 <1> mov cx,[reg_cs] 187 <1> cmp cx,[pspdbe] 188 <1> jnz .noregmodify 189 <1> cmp word [reg_eip], 100h 190 <1> jnz .noregmodify 191 <1> %endif 192 0000883D 8916[600C] <1> mov word [reg_ebx], dx 193 00008841 A3[640C] <1> mov word [reg_ecx], ax 194 <1> .noregmodify: 195 <1> 196 <1> ; Rewind the file 197 00008844 B80042 <1> mov ax, 4200h ; lseek 198 00008847 31C9 <1> xor cx, cx 199 00008849 31D2 <1> xor dx, dx 200 0000884B CD21 <1> int 21h 201 <1> 202 0000884D BA0F00 <1> mov dx, 0Fh 203 00008850 21FA <1> and dx, di 204 00008852 B104 <1> mov cl, 4 205 00008854 D3EF <1> shr di, cl 206 00008856 01FE <1> add si, di ; si:dx -> address to read to 207 <1> 208 <1> ; Loop over chunks to read 209 <1> ll11: 210 00008858 B43F <1> mov ah, 3Fh ; read from file into DS:(E)DX 211 0000885A B900FE <1> mov cx, 0FE00h ; read up to this many bytes 212 0000885D 8EDE <1> mov ds, si 213 0000885F CD21 <1> int 21h ; ax = how many bytes read 214 <1> 215 00008861 81C6E00F <1> add si, 0FE0h ; (won't work in protected mode!) 216 00008865 39C8 <1> cmp ax, cx ; read a full chunk ? 217 00008867 74EF <1> je ll11 ; yes, end of file maybe not yet reached --> 218 <1> 219 <1> ; Close the file and finish up. 220 <1> ll12: 221 00008869 B43E <1> mov ah, 3Eh ; close file 222 0000886B CD21 <1> int 21h 223 0000886D 16 <1> push ss ; restore ds 224 0000886E 1F <1> pop ds 225 <1> 226 0000886F C536[460C] <1> lds si, [execblk.cmdline] 227 00008873 BF8000 <1> mov di, 80h ; es:di -> PSP command line field 228 00008876 89F9 <1> mov cx, di ; counter = 128 bytes 229 00008878 F3A4 <1> rep movsb ; copy over 230 0000887A 16 <1> push ss 231 0000887B 1F <1> pop ds 232 0000887C C3 <1> retn ; done 233 <1> 234 <1> 235 <1> ll13: 236 <1> ; file is .EXE or .COM 237 <1> 238 <1> ; Previously: adjust .exe size by 200h (who knows why) 239 <1> ; ecm: this is wrong. It needs to be adjusted by the header size, 240 <1> ; which is stored (as number of paragraphs) in the .EXE header. 241 <1> ; The header size is often 200h, but not always. 242 0000887D 52 <1> push dx 243 0000887E 50 <1> push ax 244 <1> 245 0000887F B80042 <1> mov ax, 4200h ; lseek set 246 00008882 31C9 <1> xor cx, cx 247 00008884 31D2 <1> xor dx, dx 248 00008886 CD21 <1> int 21h 249 00008888 16 <1> push ss 250 00008889 1F <1> pop ds 251 <1> 252 0000888A 89E5 <1> mov bp, sp 253 0000888C B91C00 <1> mov cx, EXEHEADER_size 254 0000888F 29CC <1> sub sp, cx 255 00008891 89E2 <1> mov dx, sp 256 00008893 89E6 <1> mov si, sp 257 00008895 B43F <1> mov ah, 3Fh 258 00008897 CD21 <1> int 21h 259 <1> 260 <1> ; Close the file 261 00008899 50 <1> push ax 262 0000889A B43E <1> mov ah, 3Eh ; close file 263 0000889C CD21 <1> int 21h 264 0000889E 58 <1> pop ax 265 <1> 266 0000889F 39C8 <1> cmp ax, cx 267 000088A1 7526 <1> jne .no_exe ; (ax = 0 if empty file) 268 000088A3 813C4D5A <1> cmp word [si + exeSignature], "MZ" 269 000088A7 7406 <1> je @F 270 000088A9 813C5A4D <1> cmp word [si + exeSignature], "ZM" 271 000088AD 751A <1> jne .no_exe 272 <1> @@: 273 <1> 274 <1> ; This possibly should honour the size of the image in pages 275 <1> ; as indicated by the header, instead of the file size. 276 <1> ; Oh well, for now we use the file size (on stack). 277 000088AF 8B4408 <1> mov ax, [si + exeHeaderSize] 278 000088B2 31F6 <1> xor si, si 279 000088B4 B90400 <1> mov cx, 4 280 <1> @@: 281 000088B7 D1E0 <1> shl ax, 1 282 000088B9 D1D6 <1> rcl si, 1 283 000088BB E2FA <1> loop @B ; si:ax <<= 4 284 <1> 285 000088BD 89EC <1> mov sp, bp 286 000088BF 5B <1> pop bx 287 000088C0 5A <1> pop dx 288 <1> 289 000088C1 29C3 <1> sub bx, ax 290 000088C3 19F2 <1> sbb dx, si ; file size minus header size 291 <1> 292 000088C5 B001 <1> mov al, 1 ; indicate nonzero filesize 293 000088C7 EB04 <1> jmp @F 294 <1> 295 <1> .no_exe: 296 000088C9 89EC <1> mov sp, bp 297 000088CB 5B <1> pop bx 298 000088CC 5A <1> pop dx ; full file size 299 <1> @@: 300 <1> 301 <1> ; Clear registers 302 <1> 303 <1> ll14: 304 000088CD 50 <1> push ax ; zero if empty file 305 000088CE 53 <1> push bx 306 000088CF 52 <1> push dx 307 <1> ; mov word [reg_ebx], dx 308 <1> ; mov word [reg_ecx], bx 309 <1> 310 <1> ;--- cancel current process (unless there is none) 311 <1> ;--- this will also put cpu back in real-mode!!! 312 <1> 313 000088D0 E83B10 <1> call terminate_attached_process 314 000088D3 7503E9A400 <1> jz ll_attached_unterminated 315 <1> %if _PM 316 <1> call ispm 317 <1> jz ll_still_pm 318 <1> %endif 319 <1> 320 000088D8 E8233F <1> call zeroregs 321 <1> 322 000088DB 8F06[600C] <1> pop word [reg_ebx] 323 000088DF 8F06[640C] <1> pop word [reg_ecx] 324 <1> 325 <1> ; Fix up interrupt vectors in PSP 326 000088E3 BE0E00 <1> mov si, CCIV ; address of original INT 23 and 24 (in PSP) 327 000088E6 BF[E40A] <1> mov di, run2324 328 000088E9 A5 <1> movsw 329 000088EA A5 <1> movsw 330 000088EB A5 <1> movsw 331 000088EC A5 <1> movsw 332 <1> 333 <1> ; Prior to our report in 2022 May, the FreeDOS kernel 334 <1> ; incorrectly returned NC without loading a process 335 <1> ; when passed a file that is empty (0 byte). Refer 336 <1> ; to https://github.com/FDOS/kernel/issues/70 337 000088ED 58 <1> pop ax ; zero if empty file 338 000088EE 85C0 <1> test ax, ax 339 000088F0 B00B <1> mov al, 0Bh ; ax = 000Bh (Invalid format) 340 000088F2 7503E98200 <1> jz ll16 341 <1> 342 <1> ; Actual program loading. Use the DOS interrupt. 343 000088F7 B8014B <1> mov ax, 4B01h ; load program 344 000088FA BA8000 <1> mov dx, DTA ; offset of file to load 345 000088FD BB[440C] <1> mov bx, execblk ; parameter block 346 00008900 CD21 <1> int 21h ; load it 347 00008902 7275 <1> jc ll16 ; if error 348 00008904 89E0 <1> mov ax, sp 349 00008906 2B062E00 <1> sub ax, [SPSAV] 350 0000890A 3D8000 <1> cmp ax, 80h 351 0000890D 7203 <1> jb ll15 ; if in range 352 0000890F B88000 <1> mov ax, 80h 353 <1> ll15: 354 00008912 A3[DC0A] <1> mov word [spadjust], ax 355 00008915 C436[520C] <1> les si, [execblk.sssp] 356 00008919 26AD <1> es lodsw ; recover ax 357 0000891B A3[5C0C] <1> mov word [reg_eax], ax 358 0000891E 8936[6C0C] <1> mov word [reg_esp], si 359 00008922 8C06[840C] <1> mov word [reg_ss], es 360 00008926 C436[560C] <1> les si, [execblk.csip] 361 0000892A 8936[940C] <1> mov word [reg_eip], si 362 0000892E 8C06[880C] <1> mov word [reg_cs], es 363 00008932 16 <1> push ss 364 00008933 07 <1> pop es 365 00008934 E8DFFD <1> call getpsp 366 00008937 93 <1> xchg ax, bx ; ax = PSP, clobber bx 367 00008938 A3[DE0A] <1> mov word [pspdbe], ax 368 0000893B 8026[C600]7F <1> clropt [internalflags], attachedterm 369 00008940 BF[7C0C] <1> mov di, reg_ds 370 00008943 AB <1> stosw 371 00008944 AF <1> scasw 372 00008945 AB <1> stosw ; reg_es 373 00008946 50 <1> push ax 374 00008947 E8A7FD <1> call setpspdbg 375 <1> 376 <1> ; Finish up. Set termination address. 377 0000894A B82225 <1> mov ax, 2522h ; set interrupt vector 22h 378 0000894D BA[3787] <1> mov dx, int22 ; ds => lDEBUG_DATA_ENTRY 379 00008950 CD21 <1> int 21h 380 00008952 1F <1> pop ds 381 00008953 89160A00 <1> mov word [TPIV], dx 382 00008957 8C160C00 <1> mov word [TPIV+2], ss ; => lDEBUG_DATA_ENTRY 383 0000895B 16 <1> push ss 384 0000895C 1F <1> pop ds 385 <1> 386 <1> ; Set up initial addresses for 'a', 'd', and 'u' commands. 387 <1> adusetup: 388 0000895D A1[940C] <1> mov ax, word [reg_eip] 389 00008960 8B0E[960C] <1> mov cx, word [reg_eip+2] 390 00008964 8B1E[880C] <1> mov bx, word [reg_cs] 391 00008968 BA0900 <1> mov dx, var_addr_entries.amount 392 0000896B BF[420B] <1> mov di, var_addr_entries 393 <1> 394 <1> .loop: 395 0000896E AB <1> stosw ; IP 396 <1> %if saSegSel == 4 397 0000896F 890D <1> mov word [di], cx 398 00008971 AF <1> scasw ; skip this word 399 <1> %endif 400 00008972 93 <1> xchg ax, bx 401 00008973 AB <1> stosw ; CS 402 <1> %if _PM 403 <1> %if SEGADR_size != 10 404 <1> %error Unexpected SEGADR size 405 <1> %endif 406 <1> call ispm 407 <1> jnz .86m 408 <1> .pm: 409 <1> scasw ; skip saSegment 410 <1> stosw ; store saSelector 411 <1> jmp @F 412 <1> .86m: 413 <1> stosw ; store saSegment 414 <1> scasw ; skip saSelector 415 <1> @@: 416 <1> %else 417 <1> %if SEGADR_size == 10 418 <1> %error Unexpected SEGADR size 419 <1> %endif 420 <1> %endif 421 00008974 93 <1> xchg ax, bx ; d_addr 422 <1> 423 00008975 4A <1> dec dx 424 00008976 75F6 <1> jnz .loop 425 00008978 C3 <1> retn 426 <1> 427 <1> ; Error messages. Print and quit. 428 <1> ll16: 429 00008979 E9FD0C <1> jmp ww15 ; print error message 430 <1> 431 <1> 432 <1> ll_attached_unterminated: 433 0000897C E812AF <1> call getrunint 434 0000897F E87E28 <1> call putsz 435 00008982 BA[A86D] <1> mov dx, msg.ll_unterm 436 <1> %if _PM 437 <1> jmp @F 438 <1> 439 <1> ll_still_pm: 440 <1> mov dx, msg.cannotpmload 441 <1> %endif 442 <1> @@: 443 00008985 E87828 <1> call putsz 444 00008988 E97576 <1> jmp cmd3 2960 2961 2962 %include "mm.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug M commands (move, machine type) 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2022 C. Masloch 8 <1> 9 <1> Usage of the works is permitted provided that this 10 <1> instrument is retained with the works, so that any entity 11 <1> that uses the works is notified of this instrument. 12 <1> 13 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 14 <1> 15 <1> %endif 16 <1> 17 <1> 18 <1> usesection lDEBUG_CODE 19 <1> 20 <1> ; M command - move from place to place. 21 <1> ; 22 <1> ; First check for machine-related M commands. 23 <1> ; Those are: M, MNC, M?, MC, MC2, MC3, M [one expression] 24 <1> ; Move M command has more than one expression. 25 <1> mm: 26 0000898B 89F2 <1> mov dx, si ; - 1 -> input 27 0000898D 56 <1> push si 28 0000898E E8BC23 <1> call iseol? 29 00008991 747B <1> je mc ; no argument, CPU-related M command 30 00008993 8A24 <1> mov ah, byte [ si ] 31 00008995 50 <1> push ax 32 00008996 25DFDF <1> and ax, ~(2020h) 33 00008999 3D4E43 <1> cmp ax, "NC" 34 0000899C 58 <1> pop ax 35 0000899D 7506 <1> jne @F 36 0000899F BA[616F] <1> mov dx, msg.c0 + 1 ; - 1 -> C0 string 37 000089A2 46 <1> inc si ; skip 'N' 38 000089A3 EB07 <1> jmp .checkend 39 <1> 40 <1> @@: 41 000089A5 3C3F <1> cmp al, '?' 42 000089A7 750F <1> jne @F 43 000089A9 BA[636F] <1> mov dx, msg.cr + 1 ; - 1 -> empty string 44 <1> .checkend: 45 000089AC E8F323 <1> call skipwhite ; skip '?' or 'C' (in "NC") 46 000089AF E89B23 <1> call iseol? 47 000089B2 745A <1> je mc 48 000089B4 5E <1> pop si 49 000089B5 56 <1> push si 50 000089B6 4E <1> dec si 51 000089B7 AC <1> lodsb 52 <1> @@: 53 000089B8 56 <1> push si 54 000089B9 E8A81D <1> call getexpression 55 000089BC 5A <1> pop dx ; - 1 -> input 56 000089BD E88D23 <1> call iseol? 57 000089C0 744C <1> je mc ; one argument, CPU-related 58 <1> 59 000089C2 5E <1> pop si 60 000089C3 4E <1> dec si 61 000089C4 AC <1> lodsb ; reload 62 <1> 63 <1> ; It is a normal M command (Move) 64 000089C5 E80912 <1> call parsecm ; parse arguments (DS:ESI, ES:EDI, ECX) 65 000089C8 51 <1> push cx 66 <1> %if _PM 67 <1> call ispm 68 <1> jnz .rm 69 <1> mov ax, ds 70 <1> mov cx, es 71 <1> cmp ax, cx 72 <1> je .pmsimple ; same selector, simple --> 73 <1> 74 <1> mov ax, 0006h 75 <1> mov bx, ds 76 <1> int 31h ; get selector's base 77 <1> jc error 78 <1> push cx 79 <1> push dx 80 <1> mov ax, 0006h 81 <1> mov bx, es 82 <1> int 31h ; get selector's base 83 <1> jc error ; throw 84 <1> cmp byte [ss:bAddr32], 0 85 <1> je .pm16 86 <1> [cpu 386] 87 <1> pop eax 88 <1> push cx 89 <1> push dx 90 <1> pop edx ; mov edx, cxdx 91 <1> add eax, esi ; add offset to source selector's base 92 <1> jc error 93 <1> add edx, edi ; add offset to destination selector's base 94 <1> jc error ; if overflow (> 4 GiB) --> 95 <1> cmp eax, edx ; compare linear source to linear destination 96 <1> jmp short m3 ; and decide whether to move up or down --> 97 <1> __CPU__ 98 <1> 99 <1> .rm: 100 <1> mov ax, ds 101 <1> mov bx, ds 102 <1> mov dx, es 103 <1> mov cl, 12 104 <1> shr bx, cl 105 <1> shr dx, cl 106 <1> push dx 107 <1> mov dx, es 108 <1> mov cl, 4 109 <1> shl ax, cl 110 <1> shl dx, cl 111 <1> pop cx 112 <1> db __TEST_IMM16 ; (skip 2 pop instructions) 113 <1> 114 <1> .pm16: 115 <1> pop ax 116 <1> pop bx 117 <1> add ax, si 118 <1> adc bx, byte 0 ; add offset to source selector's base 119 <1> jc error 120 <1> add dx, di 121 <1> adc cx, byte 0 ; add offset to destination selector's base 122 <1> jc error ; if overflow (> 4 GiB) --> 123 <1> cmp bx, cx ; compare linear source to linear destination 124 <1> jne m3 125 <1> cmp ax, dx 126 <1> jmp short m3 ; and decide whether to move up or down --> 127 <1> 128 <1> .pmsimple: 129 <1> _386_o32 ; cmp esi, edi 130 <1> cmp si, di 131 <1> %else 132 000089C9 89FA <1> mov dx, di 133 000089CB 8CC3 <1> mov bx, es 134 000089CD B104 <1> mov cl, 4 135 000089CF D3EA <1> shr dx, cl 136 000089D1 01DA <1> add dx, bx ; upper 16 bits of destination 137 000089D3 89F0 <1> mov ax, si 138 000089D5 D3E8 <1> shr ax, cl 139 000089D7 8CDB <1> mov bx, ds 140 000089D9 01D8 <1> add ax, bx 141 000089DB 39D0 <1> cmp ax, dx 142 000089DD 750B <1> jne m3 ; if we know which is larger 143 000089DF 89F0 <1> mov ax, si 144 000089E1 240F <1> and al, 0Fh 145 000089E3 89FB <1> mov bx, di 146 000089E5 80E30F <1> and bl, 0Fh 147 000089E8 38D8 <1> cmp al, bl 148 <1> %endif 149 000089EA 59 <1> m3: pop cx 150 000089EB 9F <1> lahf 151 000089EC 1E <1> push ds 152 000089ED 06 <1> push es 153 000089EE 16 <1> push ss ; ds := cs 154 000089EF 1F <1> pop ds 155 000089F0 E87311 <1> call dohack ; do the interrupt pointer hack 156 000089F3 07 <1> pop es 157 000089F4 1F <1> pop ds 158 000089F5 9E <1> sahf 159 000089F6 730F <1> jae .forward ; if forward copy is OK 160 <1> _386_PM_o32 161 000089F8 01CE <1> add si, cx 162 <1> _386_PM_o32 163 000089FA 01CF <1> add di, cx ; point both behind data 164 000089FC FD <1> std ; _AMD_ERRATUM_109_WORKAROUND as below 165 <1> 166 <1> 167 <1> numdef AMD_ERRATUM_109_WORKAROUND, 1 168 <1> ; Refer to comment in init.asm init_movp. 169 <1> 170 <1> %if _AMD_ERRATUM_109_WORKAROUND 171 <1> _386_PM_a32 172 000089FD E308 <1> jcxz @FF 173 <1> _386_PM_o32 174 000089FF 83F914 <1> cmp cx, strict byte 20 175 00008A02 7703 <1> ja @FF 176 <1> @@: 177 <1> _386_PM_a32 178 00008A04 A4 <1> movsb 179 <1> _386_PM_a32 180 00008A05 E2FD <1> loop @B 181 <1> @@: 182 <1> %endif 183 <1> .forward: 184 <1> _386_PM_a32 185 00008A07 F3A4 <1> rep movsb ; do the move 186 <1> _386_PM_a32 187 00008A09 A4 <1> movsb ; one more byte (length of zero means 64 KiB. or 4 GiB..) 188 <1> .was32: 189 00008A0A FC <1> cld ; restore flag 190 00008A0B E9E8F7 <1> jmp ee0a ; restore segments and undo the interrupt pointer hack 191 <1> 192 <1> 193 <1> ; Other M command: set machine type. 194 <1> ; 195 <1> ; INP: dx -> numeric input (expression 0..6, C, C0, C2, C3) 196 <1> ; or dx -> EOL 197 <1> ; word [ss:sp] = to discard 198 <1> mc: 199 00008A0E 89D6 <1> mov si, dx 200 00008A10 5A <1> pop dx ; discard 201 00008A11 4E <1> dec si 202 00008A12 E88D23 <1> call skipwhite ; reload 203 00008A15 E83523 <1> call iseol? 204 00008A18 7460 <1> je mquery ; if just an M or M? (query machine type) --> 205 00008A1A E81D22 <1> call getbyte ; get numeric input 206 00008A1D E84223 <1> call chkeol ; insure valid 207 00008A20 92 <1> xchg ax, dx 208 00008A21 3C06 <1> cmp al, 6 209 00008A23 7725 <1> ja mc_fpu 210 <1> 211 <1> mc_cpu: 212 00008A25 A2[0E0B] <1> mov byte [machine], al ; set machine type 213 00008A28 A2[100B] <1> mov byte [mach_87], al ; coprocessor type, too 214 <1> 215 <1> mc_encode: 216 00008A2B 803E[0F0B]00 <1> cmp byte [has_87], 0 217 00008A30 B0C0 <1> mov al, 0C0h 218 00008A32 7412 <1> je .done 219 00008A34 803E[0E0B]03 <1> cmp byte [machine], 3 220 00008A39 B00C <1> mov al, 0Ch 221 00008A3B 7509 <1> jne .done 222 00008A3D 803E[100B]02 <1> cmp byte [mach_87], 2 223 00008A42 7502 <1> jne .done 224 00008A44 B0C2 <1> mov al, 0C2h 225 <1> .done: 226 00008A46 A2[110B] <1> mov byte [encodedmach87], al 227 00008A49 C3 <1> retn 228 <1> 229 <1> mc_fpu: 230 00008A4A 8A26[0E0B] <1> mov ah, byte [machine] 231 00008A4E 3C0C <1> cmp al, 0Ch ; MC command ? 232 00008A50 741D <1> je mcc_ah 233 00008A52 3CC0 <1> cmp al, 0C0h ; MC0 command or MNC command ? 234 00008A54 7410 <1> je mnc 235 00008A56 80FC03 <1> cmp ah, 3 ; MC2 or MC3 only valid for machine 386 236 00008A59 7508 <1> jne .error 237 00008A5B 3CC2 <1> cmp al, 0C2h ; MC2 command ? 238 00008A5D 740E <1> je mcc_2 239 00008A5F 3CC3 <1> cmp al, 0C3h ; MC3 command ? 240 00008A61 740C <1> je mcc_3 ; (ah = 3) 241 <1> .error: ; invalid input 242 00008A63 E9560E <1> jmp error 243 <1> 244 <1> mnc: 245 00008A66 C606[0F0B]00 <1> mov byte [has_87], 0 ; clear coprocessor flag 246 00008A6B EBBE <1> jmp mc_encode ; done 247 <1> 248 <1> mcc_2: 249 00008A6D B402 <1> mov ah, 2 ; set type to 287 250 <1> mcc_3: ; (if jumping here ah = 3) set type to 387 251 <1> mcc_ah: 252 00008A6F C606[0F0B]01 <1> mov byte [has_87], 1 ; set coprocessor flag 253 00008A74 8826[100B] <1> mov byte [mach_87], ah ; set coprocessor type 254 00008A78 EBB1 <1> jmp mc_encode ; done 255 <1> 256 <1> 257 <1> ; Display machine type. 258 <1> mquery: 259 00008A7A BE[7B7C] <1> mov si, msg8088 260 00008A7D A0[0E0B] <1> mov al, byte [machine] 261 00008A80 3C00 <1> cmp al, 0 262 00008A82 7407 <1> je .88or86 ; if 8088 263 00008A84 BE[837C] <1> mov si, msgx86 264 00008A87 0430 <1> add al, '0' 265 00008A89 8804 <1> mov byte [si], al 266 <1> .88or86: 267 00008A8B E82023 <1> call showstring 268 00008A8E BE[877C] <1> mov si, no_copr 269 00008A91 803E[0F0B]00 <1> cmp byte [has_87], 0 270 00008A96 740F <1> je .m12 ; if no coprocessor 271 00008A98 BE[9C7C] <1> mov si, has_copr 272 00008A9B A0[100B] <1> mov al, byte [mach_87] 273 00008A9E 3A06[0E0B] <1> cmp al, byte [machine] 274 00008AA2 7403 <1> je .m12 ; if has coprocessor same as processor 275 00008AA4 BE[AE7C] <1> mov si, has_287 276 <1> .m12: 277 00008AA7 E80423 <1> call showstring ; show string 278 00008AAA E9D823 <1> jmp putsline_crlf ; call puts and quit 2963 2964 2965 usesection lDEBUG_CODE 2966 2967 ; N command - change the name of the program being debugged. 2968 nn: 2969 00008AAD 16 push ss 2970 00008AAE 07 pop es 2971 %if _BOOTLDR 2972 00008AAF 36F606[C500]40 testopt [ss:internalflags], nodosloaded 2973 00008AB5 7406 jz @F 2974 00008AB7 BA[655F] mov dx, msg.nobootsupp 2975 00008ABA E94327 jmp putsz 2976 @@: 2977 %endif 2978 00008ABD BF8000 mov di, DTA ; destination address 2979 2980 ; Copy and canonicalize file name. 2981 nn1: 2982 00008AC0 81FF[6200] cmp di, N_BUFFER_END 2983 00008AC4 7313 jae .toolong 2984 00008AC6 E85101 call ifsep ; check for separators CR, blank, tab, comma, ;, = 2985 00008AC9 7428 je nn3 ; if end of file name 2986 00008ACB 363A06[2E0B] cmp al, byte [ss:swch1] 2987 ; The use of ss here appears to be intended to 2988 ; allow loading from ds different from the 2989 ; data entry and PSP segment, However, the 2990 ; subsequent copy of the command tail around 2991 ; nn4 does not participate in this scheme. 2992 ; So if this is used make sure to adjust that. 2993 00008AD0 7421 je nn3 ; if '/' (and '/' is the switch character) 2994 00008AD2 E8E5F6 call uppercase 2995 00008AD5 AA stosb 2996 00008AD6 AC lodsb 2997 00008AD7 EBE7 jmp short nn1 ; back for more 2998 2999 .toolong: 3000 nn4.toolong: 3001 00008AD9 16 push ss 3002 00008ADA 1F pop ds 3003 00008ADB BA[EF65] mov dx, msg.n_toolongname 3004 00008ADE E81F27 call putsz 3005 00008AE1 BF[5F00] mov di, N_BUFFER_END - 3 3006 00008AE4 B000 mov al, 0 ; truncate the name 3007 00008AE6 AA stosb 3008 00008AE7 A2[D40B] mov byte [fileext], al ; invalid / none 3009 00008AEA 893E[460C] mov word [execblk.cmdline], di 3010 00008AEE B8000D mov ax, 13 << 8 ; 0 in low byte (tail length), CR in high byte 3011 00008AF1 AB stosw 3012 00008AF2 C3 retn 3013 3014 3015 nn3: 3016 00008AF3 16 push ss 3017 00008AF4 1F pop ds 3018 00008AF5 B000 mov al, 0 ; null terminate the file name string 3019 00008AF7 AA stosb 3020 00008AF8 893E[460C] mov word [execblk.cmdline], di 3021 ; save start of command tail 3022 3023 %if _DEBUG4 3024 push dx 3025 mov dx, DTA 3026 call d4disp_msg 3027 mov dx, crlf 3028 call d4disp_msg 3029 pop dx 3030 %endif 3031 ; Determine file extension 3032 00008AFC 81FF8100 cmp di, DTA+1 3033 00008B00 7438 je nn3d ; if no file name at all 3034 00008B02 81FF8500 cmp di, DTA+5 3035 00008B06 7230 jb nn3c ; if no extension (name too short) 3036 00008B08 B008 mov al, EXT_HEX 3037 00008B0A 817DFB2E48 cmp word [di-5], ".H" 3038 00008B0F 7507 jne nn3a ; if not .HEX 3039 00008B11 817DFD4558 cmp word [di-3], "EX" 3040 00008B16 7422 je nn3d ; if .HEX 3041 nn3a: 3042 00008B18 B004 mov al, EXT_EXE 3043 00008B1A 817DFB2E45 cmp word [di-5], ".E" 3044 00008B1F 7507 jne nn3b ; if not .EXE 3045 00008B21 817DFD5845 cmp word [di-3], "XE" 3046 00008B26 7412 je nn3d ; if .EXE 3047 nn3b: 3048 00008B28 B002 mov al, EXT_COM 3049 00008B2A 817DFB2E43 cmp word [di-5], ".C" 3050 00008B2F 7507 jne nn3c ; if not .COM 3051 00008B31 817DFD4F4D cmp word [di-3], "OM" 3052 00008B36 7402 je nn3d ; if .COM 3053 nn3c: 3054 00008B38 B001 mov al, EXT_OTHER 3055 nn3d: 3056 00008B3A A2[D40B] mov byte [fileext], al 3057 3058 ; Finish the N command 3059 00008B3D 57 push di 3060 00008B3E BF[AE07] mov di, line_out 3061 00008B41 4E dec si 3062 nn4: 3063 00008B42 AC lodsb ; copy the remainder to line_out 3064 00008B43 AA stosb 3065 00008B44 E80A22 call iseol?.notsemicolon 3066 00008B47 75F9 jne nn4 3067 3068 00008B49 E85110 call InDos 3069 00008B4C 740E jz .fcb_setup 3070 %if _DEVICE 3071 00008B4E F606[DA00]40 testopt [internalflags6], dif6_device_mode 3072 00008B53 7505 jnz @F 3073 %endif 3074 00008B55 8326[5C0C]00 and word [reg_eax], 0 3075 @@: 3076 00008B5A EB23 jmp .fcb_none 3077 3078 .fcb_setup: 3079 ; Set up FCBs. 3080 00008B5C BE[AE07] mov si, line_out 3081 00008B5F BF5C00 mov di, 5Ch 3082 00008B62 E85F00 call nn6 ; do first FCB 3083 %if _DEVICE 3084 00008B65 F606[DA00]40 testopt [internalflags6], dif6_device_mode 3085 00008B6A 7503 jnz @F 3086 %endif 3087 00008B6C A2[5C0C] mov byte [reg_eax], al 3088 @@: 3089 00008B6F BF6C00 mov di, 6Ch 3090 00008B72 E84F00 call nn6 ; second FCB 3091 %if _DEVICE 3092 00008B75 F606[DA00]40 testopt [internalflags6], dif6_device_mode 3093 00008B7A 7503 jnz @F 3094 %endif 3095 00008B7C A2[5D0C] mov byte [reg_eax+1], al 3096 @@: 3097 .fcb_none: 3098 3099 ; Copy command tail. 3100 00008B7F BE[AE07] mov si, line_out 3101 00008B82 5F pop di 3102 00008B83 81FF[6000] cmp di, N_BUFFER_END - 2 3103 00008B87 7203E94DFF jae .toolong 3104 00008B8C 57 push di 3105 00008B8D 47 inc di 3106 nn5: 3107 00008B8E AC lodsb 3108 00008B8F AA stosb 3109 00008B90 81FF[6200] cmp di, N_BUFFER_END 3110 00008B94 731F jae .toolong 3111 00008B96 E8B821 call iseol?.notsemicolon 3112 00008B99 75F3 jne nn5 ; if not end of string 3113 ; test al, al 3114 ; jnz @B 3115 00008B9B C645FF0D mov byte [di - 1], 13 ; (just overwrite this unconditionally) 3116 ; @@: ; jump destination from above if al == 13 3117 @@: ; jump destination from .toolong 3118 00008B9F 57 push di 3119 00008BA0 89F9 mov cx, di 3120 00008BA2 81E9[6200] sub cx, N_BUFFER_END 3121 00008BA6 F7D9 neg cx 3122 00008BA8 31C0 xor ax, ax 3123 00008BAA F3AA rep stosb 3124 00008BAC 5F pop di 3125 00008BAD 58 pop ax ; recover old DI 3126 00008BAE 97 xchg ax, di 3127 00008BAF 29F8 sub ax, di ; compute length of tail 3128 00008BB1 48 dec ax 3129 00008BB2 48 dec ax 3130 00008BB3 AA stosb 3131 %if _DEBUG4 3132 mov dx, DTA 3133 call d4disp_msg 3134 mov dx, crlf 3135 call d4disp_msg 3136 %endif 3137 00008BB4 C3 retn ; done 3138 3139 .toolong: 3140 00008BB5 BA[D465] mov dx, msg.n_toolongtail 3141 00008BB8 E84526 call putsz 3142 00008BBB BF[6200] mov di, N_BUFFER_END 3143 00008BBE C645FF0D mov byte [di - 1], 13 3144 00008BC2 EBDB jmp @B 3145 3146 3147 ; Subroutine to process an FCB. 3148 ; 3149 ; INP: di -> FCB 3150 ; si -> input 3151 nn6: 3152 00008BC4 AC lodsb 3153 00008BC5 E88921 call iseol?.notsemicolon 3154 00008BC8 740B je nn7 ; if end 3155 00008BCA E84D00 call ifsep 3156 00008BCD 74F5 je nn6 ; if separator (other than CR) 3157 00008BCF 3A06[2D0B] cmp al, byte [switchar] 3158 00008BD3 741B je nn10 ; if switch character 3159 nn7: 3160 00008BD5 4E dec si 3161 00008BD6 B80129 mov ax, 2901h ; parse filename 3162 doscall 2334 00008BD9 CD21 <1> int 21h 3163 00008BDB 50 push ax ; save AL 3164 nn8: 3165 00008BDC AC lodsb ; skip till separator 3166 00008BDD E83A00 call ifsep 3167 00008BE0 7406 je nn9 ; if separator character (including CR) 3168 00008BE2 3A06[2E0B] cmp al, byte [swch1] 3169 00008BE6 75F4 jne nn8 ; if not switchar (sort of) 3170 nn9: 3171 00008BE8 4E dec si 3172 00008BE9 58 pop ax ; recover AL 3173 00008BEA 3C01 cmp al, 1 3174 00008BEC 7501 jne nn9a ; if not 1 3175 00008BEE 48 dec ax 3176 nn9a: 3177 00008BEF C3 retn 3178 3179 ; Handle a switch (differently). 3180 00008BF0 AC nn10: lodsb 3181 00008BF1 E85D21 call iseol?.notsemicolon 3182 00008BF4 74DF je nn7 ; if end of string 3183 00008BF6 E82100 call ifsep 3184 00008BF9 74F5 je nn10 ; if another separator (other than CR) 3185 00008BFB B000 mov al, 0 3186 00008BFD AA stosb 3187 00008BFE 4E dec si 3188 00008BFF AC lodsb 3189 00008C00 3C61 cmp al, 'a' 3190 00008C02 7206 jb nn11 ; if not a lower case letter 3191 00008C04 3C7A cmp al, 'z' 3192 00008C06 7702 ja nn11 3193 00008C08 24DF and al, TOUPPER ; convert to upper case 3194 00008C0A AA nn11: stosb 3195 00008C0B B82020 mov ax, 32<<8|32 3196 00008C0E AB stosw 3197 00008C0F AB stosw 3198 00008C10 AB stosw 3199 00008C11 AB stosw 3200 00008C12 AB stosw 3201 00008C13 31C0 xor ax, ax 3202 00008C15 AB stosw 3203 00008C16 AB stosw 3204 00008C17 AB stosw 3205 00008C18 AB stosw 3206 00008C19 C3 retn ; return with al = 0 3207 3208 3209 ; Compare character with separators 3210 ; 3211 ; INP: al = character 3212 ; OUT: ZR if al is CR, NUL, blank, tab, comma, semicolon, or equal sign 3213 ; NZ else 3214 ; REM: This is only used for parsing FCBs. 3215 ifsep: 3216 00008C1A E83021 call iseol? ; semicolon or CR or NUL 3217 00008C1D 740E je .return 3218 00008C1F 3C20 cmp al, 32 3219 00008C21 740A je .return 3220 00008C23 3C09 cmp al, 9 3221 00008C25 7406 je .return 3222 00008C27 3C2C cmp al, ',' 3223 00008C29 7402 je .return 3224 00008C2B 3C3D cmp al, '=' 3225 .return: 3226 00008C2D C3 retn 3227 3228 3229 ; Ensure segment in bx is writeable 3230 ; 3231 ; INP: bx = selector/segment 3232 ; OUT: NC if in 86M, bx unchanged 3233 ; NC if in PM and bx not a code segment, bx unchanged 3234 ; NC if in PM and was a code segment, 3235 ; bx = word [scratchsel], set up to mirror INP:bx selector 3236 ; CY if in PM and a failure occurred, segment not writeable 3237 ; CHG: bx 3238 ; STT: (if in PM) es = ss = debugger data selector 3239 %if _PM 3240 verifysegm: 3241 call ispm 3242 jnz .rm ; (NC) 3243 push ax 3244 _386_o32 ; push edi 3245 push di 3246 push bp 3247 mov bp, sp 3248 sub sp, 8 3249 mov di, sp 3250 _386 movzx edi, di 3251 mov ax, 000Bh ; get descriptor 3252 int 31h 3253 jc @F 3254 test byte [di+5], 8 ; code segment ? 3255 jz @F ; (NC) no --> 3256 and byte [di+5], 0F3h ; reset CODE+conforming attr 3257 or byte [di+5], 2 ; set writable 3258 mov bx, word [scratchsel] 3259 mov ax, 000Ch 3260 int 31h 3261 @@: 3262 mov sp, bp 3263 pop bp 3264 _386_o32 ; pop edi 3265 pop di 3266 pop ax 3267 .rm: 3268 retn 3269 3270 subcpu 286 3271 ; INP: dx = 86 Mode segment to access 3272 ; OUT: bx = scratch selector, addressing that segment 3273 ; CHG: - 3274 ; STT: ss = lDEBUG_DATA_ENTRY selector, in PM 3275 setrmsegm: 3276 mov bx, word [ss:scratchsel] 3277 setrmaddr: ;<--- set selector in BX to segment address in DX 3278 .: 3279 push dx 3280 push ax 3281 push cx 3282 mov cx, dx 3283 shl dx, 4 3284 shr cx, 12 3285 mov ax, 7 3286 int 31h 3287 pop cx 3288 pop ax 3289 pop dx 3290 retn 3291 3292 subcpureset 3293 %endif 3294 3295 ; Read a byte relative to cs:eip 3296 ; 3297 ; INP: reg_cs, reg_eip 3298 ; cx = (signed) eip adjustment 3299 ; OUT: al = byte at that address 3300 ; (e)bx = new offset (eip+adjustment) 3301 ; CHG: - 3302 getcseipbyte: 3303 00008C2E 06 push es 3304 %if _PM 3305 mov bx, word [reg_cs] 3306 mov es, bx 3307 call test_d_b_bit 3308 jz .16 3309 [cpu 386] 3310 mov ebx, dword [reg_eip] 3311 push edx 3312 movsx edx, cx 3313 add ebx, edx 3314 mov al, byte [es:ebx] 3315 pop edx 3316 pop es 3317 retn 3318 __CPU__ 3319 .16: 3320 %else 3321 00008C2F 8E06[880C] mov es, word [reg_cs] 3322 %endif 3323 00008C33 8B1E[940C] mov bx, word [reg_eip] 3324 00008C37 01CB add bx, cx 3325 00008C39 268A07 mov al, byte [es:bx] 3326 00008C3C 07 pop es 3327 00008C3D C3 retn 3328 3329 ; Write to a byte relative to cs:eip 3330 ; 3331 ; INP: reg_cs, reg_eip 3332 ; cx = (signed) eip adjustment 3333 ; OUT: al = byte at that address 3334 ; CHG: (e)bx 3335 setcseipbyte: 3336 00008C3E 06 push es 3337 %if _PM 3338 mov bx, word [reg_cs] 3339 call verifysegm 3340 jc .ret 3341 mov es, bx 3342 call test_d_b_bit 3343 jz .16 3344 [cpu 386] 3345 mov ebx, dword [reg_eip] 3346 push edx 3347 movsx edx, cx 3348 mov byte [es:ebx+edx],al 3349 pop edx 3350 pop es 3351 retn 3352 __CPU__ 3353 .16: 3354 %else 3355 00008C3F 8E06[880C] mov es, word [reg_cs] 3356 %endif 3357 00008C43 8B1E[940C] mov bx, word [reg_eip] 3358 00008C47 01CB add bx, cx 3359 00008C49 268807 mov byte [es:bx], al 3360 .ret: 3361 00008C4C 07 pop es 3362 00008C4D C3 retn 3363 3364 ; Exchange byte with memory 3365 ; 3366 ; INP: bx:(e)dx-> destination byte 3367 ; al = source byte 3368 ; OUT: CY if failed due to segment not writable 3369 ; NC if successful, 3370 ; al = previous value of destination byte 3371 ; CHG: ah 3372 writemem: 3373 %if _DEBUG1 3374 push dx 3375 push ax 3376 3377 call getlinear.do_not_use_test 3378 jc @F ; already an error ? then return --> (CY) 3379 push bx 3380 push cx 3381 mov bx, test_records_Writemem 3382 call handle_test_case_multiple_16 3383 ; check whether this should testcase the error 3384 ; CY to indicate error from this call 3385 pop cx 3386 pop bx 3387 @@: 3388 pop ax 3389 pop dx 3390 jnc .do_not_use_test 3391 retn ; return CY here 3392 3393 %endif 3394 .do_not_use_test: 3395 3396 00008C4E 88C4 mov ah, al 3397 %if _PM 3398 call ispm 3399 jnz .16 ; (NC from ispm) --> 3400 call verifysegm ; make bx a writeable segment 3401 jc .ret 3402 call test_d_b_bit 3403 jz .16 ; (NC from test_d_b_bit) --> 3404 [cpu 386] 3405 push ds 3406 mov ds, bx 3407 xchg al, byte [edx] 3408 cmp ah, byte [edx] 3409 pop ds 3410 __CPU__ 3411 jmp short .cmp 3412 .16: 3413 %endif 3414 00008C50 1E push ds 3415 00008C51 8EDB mov ds, bx 3416 00008C53 53 push bx 3417 00008C54 89D3 mov bx, dx 3418 00008C56 8607 xchg al, byte [bx] 3419 00008C58 3A27 cmp ah, byte [bx] 3420 00008C5A 5B pop bx 3421 00008C5B 1F pop ds 3422 .cmp: 3423 00008C5C 7401 je .ret ; (NC) 3424 00008C5E F9 stc ; Failed to compare (i.e. memory wasn't our byte after writing). 3425 ; This check catches ROM that will silently fail to write. 3426 .ret: 3427 00008C5F C3 retn 3428 3429 3430 ;--- read byte at BX:EDX into AL 3431 3432 readmem: 3433 %if _DEBUG1 3434 push dx 3435 push ax 3436 3437 call getlinear.do_not_use_test 3438 jc @F ; already an error ? then return --> (CY) 3439 push bx 3440 push cx 3441 mov bx, test_records_Readmem 3442 call handle_test_case_multiple_16 3443 ; check whether this should testcase the error 3444 ; CY to indicate error from this call 3445 pop cx 3446 pop bx 3447 @@: 3448 pop ax 3449 pop dx 3450 jnc .do_not_use_test 3451 mov al, byte [test_readmem_value] 3452 ; return a most likely wrong value 3453 retn 3454 3455 %endif 3456 .do_not_use_test: 3457 3458 %if _PM 3459 call test_d_b_bit 3460 jz .16 3461 [cpu 386] 3462 push ds 3463 mov ds, bx 3464 mov al, byte [edx] 3465 pop ds 3466 retn 3467 __CPU__ 3468 .16: 3469 %endif 3470 00008C60 1E push ds 3471 00008C61 53 push bx 3472 00008C62 8EDB mov ds, bx 3473 00008C64 89D3 mov bx, dx 3474 00008C66 8A07 mov al, byte [bx] 3475 00008C68 5B pop bx 3476 00008C69 1F pop ds 3477 00008C6A C3 retn 3478 3479 3480 ; Q command - quit. 3481 qq: 3482 00008C6B E86279 call guard_re 3483 00008C6E 31C9 xor cx, cx ; no qq mode selected 3484 00008C70 4E dec si 3485 .loop: 3486 00008C71 AC lodsb 3487 00008C72 E845F5 call uppercase 3488 00008C75 3C41 cmp al, 'A' 3489 00008C77 741C je qq_a 3490 00008C79 B501 mov ch, qqmode_b; QB mode (breakpoint before terminate) 3491 00008C7B 3C42 cmp al, 'B' 3492 00008C7D 7412 je .otherletter 3493 00008C7F B502 mov ch, qqmode_c; QC mode (terminate device in a container MCB) 3494 00008C81 3C43 cmp al, 'C' 3495 00008C83 740C je .otherletter 3496 00008C85 B504 mov ch, qqmode_d; QD mode (terminate device in initialisation) 3497 00008C87 3C44 cmp al, 'D' 3498 00008C89 7406 je .otherletter 3499 00008C8B 880E[C88F] mov byte [qq_mode], cl 3500 00008C8F EB1E jmp qq_default 3501 3502 .otherletter: 3503 00008C91 08E9 or cl, ch 3504 00008C93 EBDC jmp .loop 3505 3506 usesection lDEBUG_DATA_ENTRY 3507 00008FC8 00 qq_mode: db 0 3508 qqmode_b: equ 1 3509 qqmode_c: equ 2 3510 qqmode_d: equ 4 3511 usesection lDEBUG_CODE 3512 3513 qq_a: 3514 00008C95 AC lodsb 3515 00008C96 E8C920 call chkeol 3516 00008C99 E8720C call terminate_attached_process 3517 00008C9C BB[186E] mov bx, msg.qq_a_unterminated 3518 00008C9F 7403 jz .attached_unterminated 3519 00008CA1 BB[3D6E] mov bx, msg.qq_a_terminated 3520 .attached_unterminated: 3521 00008CA4 E8EAAB call getrunint 3522 00008CA7 E85625 call putsz 3523 00008CAA 89DA mov dx, bx 3524 00008CAC E95125 jmp putsz 3525 3526 3527 qq_default: 3528 00008CAF E8B020 call chkeol 3529 %if _DEVICE 3530 00008CB2 F606[DA00]40 testopt [internalflags6], dif6_device_mode 3531 00008CB7 740B jz .nondevice 3532 00008CB9 F6C106 test cl, qqmode_c | qqmode_d 3533 00008CBC 7506 jnz .deviceselected 3534 00008CBE BA[966E] mov dx, msg.qq_device_none_selected 3535 00008CC1 E93C25 jmp putsz 3536 3537 .deviceselected: 3538 .nondevice: 3539 %endif 3540 %if _BOOTLDR 3541 ; Test whether we are in non-DOS mode, and were 3542 ; currently entered in protected mode. Since 3543 ; this will make the entire operation fail, 3544 ; it has to be checked for before modifying 3545 ; or releasing any of the resources. 3546 ; (Does this ever occur? No?) 3547 00008CC4 F606[C500]40 testopt [internalflags], nodosloaded 3548 00008CC9 7414 jz .notpmnodos 3549 %if _PM 3550 call ispm 3551 %if _TSR ; same message, reuse code 3552 jz .cannotpmquit 3553 %else 3554 jnz .notpmnodos_nodos 3555 mov dx, msg.cannotpmquit 3556 jmp putsz 3557 %endif 3558 %endif 3559 .notpmnodos_nodos: 3560 00008CCB E8A839 call bootgetmemorysize ; dx => behind usable memory 3561 00008CCE A1[628F] mov ax, word [ boot_new_memsizekib ] 3562 00008CD1 B106 mov cl, 6 3563 00008CD3 D3E0 shl ax, cl 3564 00008CD5 39D0 cmp ax, dx ; same? 3565 00008CD7 7406 je @F 3566 00008CD9 BA[5D64] mov dx, msg.cannotbootquit_memsizes 3567 00008CDC E92125 jmp .putsz 3568 %if !_TSR || !_PM 3569 .putsz equ putsz 3570 %endif 3571 3572 @@: 3573 .notpmnodos: 3574 %endif 3575 %if _PM 3576 %if _TSR 3577 ; Test whether we are in TSR mode, and were 3578 ; currently entered in protected mode. Since 3579 ; this will make the entire operation fail, 3580 ; it has to be checked for before modifying 3581 ; or releasing any of the resources. 3582 testopt [internalflags], tsrmode 3583 jz .notpmtsr 3584 call ispm 3585 jnz .notpmtsr 3586 3587 ; This isn't yet implemented. Broken down: 3588 ; * Uses terminate_attached_process which returns in real mode. 3589 ; * Exception vectors are implicitly restored/discarded by that. 3590 ; * (RM) Interrupt vectors are currently restored in real mode. Unnecessary. 3591 ; * The VDD is un-registered in real mode. Necessary? 3592 ; * Normal 21.4C is used to return to the real parent. 3593 ; * We have to discard our DOS process resources. Any DPMI TSR resources? 3594 ; * We must again gain control in debuggee's mode after discarding them. 3595 ; * We must return to the debuggee and seemlessly discard our memory. The 3596 ; stack trick possibly/probably does not work in protected mode. 3597 3598 .cannotpmquit: 3599 mov dx, msg.cannotpmquit 3600 .putsz: 3601 jmp putsz 3602 3603 .notpmtsr: 3604 %endif 3605 3606 %if (nohook2F)&~0FF00h 3607 %fatal Internal flags re-ordered, adjust code here 3608 %endif 3609 mov ax, [internalflags] 3610 mov al, __TEST_IMM8 3611 xchg al, [dpmidisable] ; disable DPMI hook 3612 ; (SMC in section lDEBUG_DATA_ENTRY) 3613 push ax 3614 setopt [internalflags], nohook2F ; avoid a new hook while terminating 3615 %endif 3616 3617 3618 qq_restore_interrupts_simulated: 3619 00008CDF 31ED xor bp, bp 3620 %if _CATCHINT2D 3621 .2D: 3622 00008CE1 F606[D000]08 testopt [internalflags4], dif4_int_2D_hooked 3623 00008CE6 741C jz .noint2D 3624 3625 00008CE8 B02D mov al, 2Dh ; interrupt number 3626 00008CEA BE[B682] mov si, int2D ; -> IISP entry header 3627 00008CED BA0800 mov dx, opt4_int_2D_force >> 16 3628 00008CF0 E87D38 call UnhookInterruptForceSim 3629 ; try unhooking it 3630 00008CF3 16 push ss 3631 00008CF4 07 pop es 3632 00008CF5 730D jnc .got2D 3633 3634 .not2D: 3635 00008CF7 C706[F26C]3244 mov word [msg.serial_cannot_unhook.int], "2D" 3636 00008CFD BA[D76C] mov dx, msg.serial_cannot_unhook.nowarn 3637 00008D00 E8FD24 call putsz 3638 00008D03 45 inc bp 3639 3640 .got2D: 3641 .noint2D: 3642 %endif 3643 3644 3645 %if _CATCHINT08 3646 .08: 3647 00008D04 F606[D000]04 testopt [internalflags4], dif4_int_08_hooked 3648 00008D09 741C jz .noint08 3649 3650 00008D0B B008 mov al, 08h ; interrupt number 3651 00008D0D BE[B686] mov si, intr8 ; -> IISP entry header 3652 00008D10 BA0400 mov dx, opt4_int_08_force >> 16 3653 00008D13 E85A38 call UnhookInterruptForceSim 3654 ; try unhooking it 3655 00008D16 16 push ss 3656 00008D17 07 pop es 3657 00008D18 730D jnc .got08 3658 3659 .not08: 3660 00008D1A C706[F26C]3038 mov word [msg.serial_cannot_unhook.int], "08" 3661 00008D20 BA[D76C] mov dx, msg.serial_cannot_unhook.nowarn 3662 00008D23 E8DA24 call putsz 3663 00008D26 45 inc bp 3664 3665 .got08: 3666 .noint08: 3667 %endif 3668 3669 3670 .serial: 3671 00008D27 F606[D000]01 testopt [internalflags4], dif4_int_serial_hooked 3672 00008D2C 7420 jz .done_serial 3673 00008D2E BE[AC96] mov si, serial_interrupt_handler 3674 00008D31 A0[120C] mov al, byte [serial_installed_intnum] 3675 00008D34 BA0100 mov dx, opt4_int_serial_force >> 16 3676 00008D37 E83638 call UnhookInterruptForceSim 3677 00008D3A 16 push ss 3678 00008D3B 07 pop es 3679 00008D3C 7310 jnc .done_serial ; if it succeeded --> 3680 3681 00008D3E BF[F26C] mov di, msg.serial_cannot_unhook.int 3682 00008D41 A0[120C] mov al, byte [serial_installed_intnum] 3683 00008D44 E80D21 call hexbyte 3684 00008D47 BA[D76C] mov dx, msg.serial_cannot_unhook.nowarn 3685 00008D4A E8B324 call putsz 3686 00008D4D 45 inc bp 3687 3688 .done_serial: 3689 3690 %if _PM 3691 .2F: 3692 testopt [internalflags], hooked2F 3693 jz .noint2F 3694 3695 mov al, 2Fh ; interrupt number 3696 mov si, debug2F ; -> IISP entry header 3697 mov dx, opt4_int_2F_force >> 16 3698 call UnhookInterruptForceSim 3699 ; try unhooking it 3700 push ss 3701 pop es 3702 jnc .got2F 3703 3704 .not2F: 3705 mov word [msg.serial_cannot_unhook.int], "2F" 3706 mov dx, msg.serial_cannot_unhook.nowarn 3707 call putsz 3708 inc bp 3709 3710 .got2F: 3711 .noint2F: 3712 %endif 3713 3714 3715 %if CATCHINTAMOUNT && ! (_DEBUG && ! _DEBUG_COND) 3716 %if _DEBUG 3717 00008D4E F606[D900]01 testopt [internalflags6], dif6_debug_mode 3718 00008D53 752D jnz .skipints 3719 %endif 3720 ; Simulate to restore interrupt vectors. 3721 00008D55 BE[280C] mov si, inttab 3722 00008D58 BF[3D0C] mov di, intforcetab 3723 00008D5B B90600 mov cx, inttab_number 3724 00008D5E 31D2 xor dx, dx 3725 .nextintsim: 3726 00008D60 AC lodsb 3727 00008D61 93 xchg ax, bx ; bl = number 3728 00008D62 AD lodsw ; si -> list 3729 00008D63 96 xchg ax, si ; si -> entry, ax -> list 3730 00008D64 93 xchg ax, bx ; al = number, bx -> list 3731 00008D65 57 push di 3732 00008D66 8A35 mov dh, byte [di] 3733 00008D68 E80538 call UnhookInterruptForceSim 3734 00008D6B 5F pop di 3735 00008D6C 16 push ss 3736 00008D6D 07 pop es 3737 00008D6E 730D jnc @F 3738 00008D70 BF[F26C] mov di, msg.serial_cannot_unhook.int 3739 00008D73 E8DE20 call hexbyte 3740 00008D76 BA[D76C] mov dx, msg.serial_cannot_unhook.nowarn 3741 00008D79 E88424 call putsz 3742 00008D7C 45 inc bp 3743 @@: 3744 00008D7D 47 inc di 3745 00008D7E 87DE xchg bx, si ; si -> list 3746 00008D80 E2DE loop .nextintsim 3747 .skipints: 3748 %endif 3749 3750 00008D82 BA[3873] mov dx, msg.empty_message 3751 00008D85 85ED test bp, bp 3752 00008D87 7403E9FF02 jnz qq_attached_unterminated.common 3753 3754 3755 %if _DEVICE 3756 qq_device_prepare: 3757 00008D8C F606[DA00]40 testopt [internalflags6], dif6_device_mode 3758 00008D91 7503E97E01 jz qq_nondevice 3759 3760 %if _PM 3761 mov dx, msg.qq_device_pm 3762 call ispm 3763 jz @F ; in PM --> 3764 %endif 3765 3766 ; Try quitting early in device init ? 3767 00008D96 F606[C88F]04 testopt [qq_mode], qqmode_d 3768 00008D9B 7430 jz .device_c ; no, must be container quit --> 3769 3770 .device_d: 3771 00008D9D BE[5C0C] mov si, regs 3772 00008DA0 BF[DC0C] mov di, device_quittable_regs 3773 00008DA3 B92000 mov cx, words(regs.size) 3774 00008DA6 F3A7 repe cmpsw ; can quit to device init ? 3775 00008DA8 7511 jne .check_device_c 3776 00008DAA C43E[0E0C] les di, [device_header_address] 3777 00008DAE B0FF mov al, -1 3778 00008DB0 B104 mov cl, 4 3779 00008DB2 F3AE repe scasb ; is next device pointer still -1 ? 3780 00008DB4 16 push ss 3781 00008DB5 07 pop es 3782 00008DB6 7503E95901 je qq_device_got ; yes --> 3783 3784 .check_device_c: 3785 ; Cannot quit to device init. Clear the flag 3786 ; so we know later on that we're trying QC. 3787 00008DBB 8026[C88F]FB clropt [qq_mode], qqmode_d 3788 00008DC0 F606[C88F]02 testopt [qq_mode], qqmode_c 3789 ; actually want to try QC ? 3790 00008DC5 7506 jnz .device_c ; yes --> 3791 3792 00008DC7 BA[E16E] mov dx, msg.qq_device_no_d 3793 @@: 3794 00008DCA E9BE02 jmp qq_attached_unterminated.common 3795 3796 .device_c: 3797 00008DCD B80258 mov ax, 5802h 3798 00008DD0 CD21 int 21h 3799 00008DD2 B400 mov ah, 0 3800 00008DD4 50 push ax ; preserve UMB link 3801 00008DD5 B80358 mov ax, 5803h 3802 00008DD8 BB0100 mov bx, 1 3803 00008DDB CD21 int 21h ; enable UMB link 3804 ; we want to support the case in which 3805 ; the first UMCB may have changed. so 3806 ; instead of searching for it again we 3807 ; just request the link enabled. 3808 3809 00008DDD B452 mov ah, 52h 3810 00008DDF CD21 int 21h 3811 00008DE1 89DF mov di, bx 3812 00008DE3 268B57FE mov dx, word [es:bx - 2] 3813 00008DE7 B93000 mov cx, 30h 3814 00008DEA 83FFBE cmp di, - (30h + 12h) 3815 00008DED 7603E90F01 ja .no_c 3816 3817 .nulloop: 3818 00008DF2 BE[586F] mov si, msg.NULblank 3819 00008DF5 A7 cmpsw ; di += 2, si += 2. compare 3820 00008DF6 750A jne .nulnext 3821 .nulcheck: 3822 00008DF8 57 push di 3823 00008DF9 51 push cx 3824 00008DFA B103 mov cl, 3 ; 3 more words to go 3825 00008DFC F3A7 repe cmpsw ; match ? 3826 00008DFE 59 pop cx 3827 00008DFF 5F pop di 3828 00008E00 7406 je .nulfound 3829 .nulnext: 3830 00008E02 4F dec di ; di -= 1 so it ends up 1 higher than prior 3831 00008E03 E2ED loop .nulloop 3832 00008E05 E9F900 jmp .no_c 3833 3834 .nulfound: 3835 00008E08 83EF0C sub di, 3 * 2 + 4 + 2 ; (strategy, interrupt, flags are words, 3836 ; next device pointer is a dword. 3837 ; additional plus 2 for the cmpsw output.) 3838 3839 ; es:di -> NUL device header 3840 .devloop: 3841 00008E0B A1[0E0C] mov ax, word [device_header_address] 3842 00008E0E 263B05 cmp ax, word [es:di] 3843 00008E11 7509 jne .devnext 3844 00008E13 A1[100C] mov ax, word [device_header_address + 2] 3845 00008E16 263B4502 cmp ax, word [es:di + 2] 3846 00008E1A 7411 je .mcb 3847 .devnext: 3848 00008E1C 41 inc cx 3849 00008E1D 7903E9DF00 js .no_c 3850 3851 00008E22 26C43D les di, [es:di] 3852 00008E25 83FFFF cmp di, -1 3853 00008E28 75E1 jne .devloop 3854 00008E2A E9D400 jmp .no_c 3855 3856 .mcb: 3857 3858 00008E2D 893E[CC8F] mov word [.device_reference], di 3859 00008E31 8C06[CE8F] mov word [.device_reference + 2], es 3860 3861 00008E35 8326[D68F]00 and word [.counter], 0 3862 00008E3A 89C7 mov di, ax ; => start of memory allocated to us 3863 00008E3C 8B0E[0C0C] mov cx, word [device_mcb_paragraphs] 3864 ; = amount paragraphs allocated to us 3865 00008E40 01CF add di, cx ; => behind memory allocated to us 3866 3867 ; dx => first MCB 3868 .mcbloop: 3869 00008E42 8EC2 mov es, dx 3870 00008E44 89D6 mov si, dx ; => MCB 3871 00008E46 2603360300 add si, word [es:3] 3872 00008E4B 46 inc si ; => next MCB (or behind current MCB) 3873 00008E4C 26803E00004D cmp byte [es:0], 'M' ; valid MCB ? 3874 00008E52 740B je @F 3875 00008E54 26803E00005A cmp byte [es:0], 'Z' 3876 00008E5A 7403E9A200 jne .no_c ; no --> 3877 @@: 3878 00008E5F 39C2 cmp dx, ax ; start of MCB < allocation ? 3879 00008E61 731F jae .mcbnext ; no --> 3880 00008E63 39FE cmp si, di ; end of MCB > allocation ? 3881 00008E65 721B jb .mcbnext ; no --> 3882 3883 00008E67 26833E010000 cmp word [es:1], 0 ; free ? 3884 00008E6D 7413 je .mcbnext ; do not match --> 3885 00008E6F 48 dec ax ; => our (sub) MCB 3886 00008E70 39C2 cmp dx, ax ; matches (DEVLOAD style) ? 3887 00008E72 7520 jne .mcbcontainer ; no --> 3888 00008E74 26390E0300 cmp word [es:3], cx ; size matches ? 3889 00008E79 7519 jne .mcbcontainer ; no --> 3890 00008E7B 8326[D08F]00 and word [.container_segment], 0 3891 00008E80 EB7E jmp .mcbdone ; found a non-container MCB 3892 3893 .mcbnext: 3894 00008E82 FF06[D68F] inc word [.counter] ; safeguard against infinite loop 3895 00008E86 7479 jz .no_c 3896 00008E88 89F2 mov dx, si ; => next MCB 3897 00008E8A 26803E00004D cmp byte [es:0], 'M' ; prior was 'M' ? 3898 00008E90 74B0 je .mcbloop ; yes, so loop --> 3899 00008E92 EB6D jmp .no_c 3900 3901 .mcbcontainer: 3902 00008E94 40 inc ax ; => allocated block (device header) 3903 00008E95 26833E010050 cmp word [es:1], 50h ; SD owner system ? 3904 00008E9B 73E5 jae .mcbnext 3905 00008E9D 26813E08005344 cmp word [es:8], "SD" 3906 00008EA4 75DC jne .mcbnext ; no --> 3907 3908 00008EA6 26FF360000 push word [es:0] 3909 00008EAB 8F06[D48F] pop word [.container_is_z] 3910 00008EAF 8936[D28F] mov word [.container_end], si 3911 00008EB3 8916[D08F] mov word [.container_segment], dx 3912 00008EB7 42 inc dx ; => sub-MCB 3913 .submcbloop: 3914 00008EB8 8EC2 mov es, dx 3915 00008EBA 89D6 mov si, dx 3916 00008EBC 2603360300 add si, word [es:3] 3917 00008EC1 46 inc si ; => next sub or MCB (or behind Z MCB) 3918 00008EC2 39C2 cmp dx, ax 3919 00008EC4 731C jae .submcbnext 3920 00008EC6 39FE cmp si, di 3921 00008EC8 7218 jb .submcbnext 3922 3923 00008ECA 50 push ax 3924 00008ECB 48 dec ax ; => our (sub) MCB 3925 00008ECC 39C2 cmp dx, ax ; matched start of allocation ? 3926 00008ECE 58 pop ax 3927 00008ECF 7511 jne .submcbnext 3928 00008ED1 26390E0300 cmp word [es:3], cx ; matches allocation size ? 3929 00008ED6 750A jne .submcbnext 3930 00008ED8 26833E010000 cmp word [es:1], 0 ; is not free ? 3931 00008EDE 7402 je .submcbnext 3932 00008EE0 EB1E jmp .mcbdone ; all yes, found it --> 3933 3934 .submcbnext: 3935 00008EE2 FF06[D68F] inc word [.counter] ; safeguard against infinite loop 3936 00008EE6 7419 jz .no_c 3937 00008EE8 89F2 mov dx, si ; => next sub MCB or after container 3938 00008EEA 8B36[D28F] mov si, word [.container_end] 3939 00008EEE 39F2 cmp dx, si ; after container ? 3940 00008EF0 72C6 jb .submcbloop ; no --> 3941 ; This jump could be a jne but generally 3942 ; we can assume that the container does 3943 ; not overflow across the 1 MiB limit. 3944 ; And this is more hardened against errors. 3945 00008EF2 89F2 mov dx, si ; insure we use actual container end 3946 00008EF4 803E[D48F]5A cmp byte [.container_is_z], 'Z' 3947 ; container had a Z ? 3948 00008EF9 7403E944FF jne .mcbloop ; no --> 3949 ; if here, loop now, dx already updated and 3950 ; furthermore es does not point at container! 3951 00008EFE EB01 jmp .no_c 3952 3953 usesection lDEBUG_DATA_ENTRY 3954 00008FC9 00 align 4, db 0 3955 00008FCC 00000000 .device_reference: dd 0 3956 00008FD0 0000 .container_segment: dw 0 3957 00008FD2 0000 .container_end: dw 0 3958 00008FD4 0000 .container_is_z: dw 0 3959 00008FD6 0000 .counter: dw 0 3960 usesection lDEBUG_CODE 3961 3962 .mcbdone: 3963 3964 00008F00 A8 db __TEST_IMM8 ; (skip stc, NC) 3965 .no_c: 3966 00008F01 F9 stc 3967 00008F02 5B pop bx 3968 00008F03 9C pushf 3969 00008F04 B80358 mov ax, 5803h 3970 00008F07 CD21 int 21h ; restore UMB link 3971 00008F09 9D popf 3972 00008F0A 16 push ss 3973 00008F0B 07 pop es 3974 00008F0C 7306 jnc @F 3975 00008F0E BA[206F] mov dx, msg.qq_device_no_c 3976 00008F11 E97701 jmp qq_attached_unterminated.common 3977 3978 @@: 3979 3980 qq_device_got: 3981 qq_nondevice: 3982 %endif 3983 3984 3985 qq_restore_interrupts: 3986 %if _CATCHINT2D 3987 .2D: 3988 00008F14 F606[D000]08 testopt [internalflags4], dif4_int_2D_hooked 3989 00008F19 741E jz .noint2D 3990 3991 00008F1B B02D mov al, 2Dh ; interrupt number 3992 00008F1D BE[B682] mov si, int2D ; -> IISP entry header 3993 00008F20 BA0800 mov dx, opt4_int_2D_force >> 16 3994 00008F23 E81B36 call UnhookInterruptForce 3995 ; try unhooking it 3996 00008F26 730C jnc .got2D 3997 3998 .not2D: 3999 00008F28 C706[F26C]3244 mov word [msg.serial_cannot_unhook.int], "2D" 4000 00008F2E BA[D76C] mov dx, msg.serial_cannot_unhook.nowarn 4001 00008F31 E95701 jmp qq_attached_unterminated.common 4002 4003 .got2D: 4004 00008F34 8026[D000]F7 clropt [internalflags4], dif4_int_2D_hooked 4005 .noint2D: 4006 %endif 4007 4008 4009 %if _CATCHINT08 4010 .08: 4011 00008F39 F606[D000]04 testopt [internalflags4], dif4_int_08_hooked 4012 00008F3E 7421 jz .noint08 4013 4014 00008F40 B008 mov al, 08h ; interrupt number 4015 00008F42 BE[B686] mov si, intr8 ; -> IISP entry header 4016 00008F45 BA0400 mov dx, opt4_int_08_force >> 16 4017 00008F48 E8F635 call UnhookInterruptForce 4018 ; try unhooking it 4019 00008F4B 730C jnc .got08 4020 4021 .not08: 4022 00008F4D C706[F26C]3038 mov word [msg.serial_cannot_unhook.int], "08" 4023 00008F53 BA[D76C] mov dx, msg.serial_cannot_unhook.nowarn 4024 00008F56 E93201 jmp qq_attached_unterminated.common 4025 4026 .got08: 4027 00008F59 8026[D000]FB clropt [internalflags4], dif4_int_08_hooked 4028 00008F5E E8E536 call update_inttab_optional 4029 .noint08: 4030 %endif 4031 4032 4033 .serial: 4034 00008F61 F606[E50B]01 testopt [serial_flags], sf_init_done 4035 00008F66 740D jz @F 4036 00008F68 E8F833 call serial_clean_up ; unhook interrupt 4037 00008F6B 8026[E50B]FE clropt [serial_flags], sf_init_done ; clear (in case return to cmd3) 4038 00008F70 8026[9500]BF clropt [options], enable_serial ; do not output to serial any longer 4039 @@: 4040 00008F75 F606[D000]01 testopt [internalflags4], dif4_int_serial_hooked 4041 00008F7A 7419 jz .done_serial 4042 00008F7C E82F34 call serial_uninstall_interrupt_handler 4043 00008F7F 7314 jnc .done_serial ; if it succeeded --> 4044 4045 00008F81 BF[F26C] mov di, msg.serial_cannot_unhook.int 4046 00008F84 A0[120C] mov al, byte [serial_installed_intnum] 4047 00008F87 E8CA1E call hexbyte 4048 00008F8A BA[D76C] mov dx, msg.serial_cannot_unhook.nowarn 4049 00008F8D C606[B496]00 mov byte [serial_interrupt_handler + ieEOI], 0 4050 ; we do not issue EOI any longer 4051 00008F92 E9F600 jmp qq_attached_unterminated.common 4052 4053 4054 .done_serial: 4055 4056 %if _PM 4057 .2F: 4058 testopt [internalflags], hooked2F 4059 jz .noint2F 4060 4061 mov al, 2Fh ; interrupt number 4062 mov si, debug2F ; -> IISP entry header 4063 mov dx, opt4_int_2F_force >> 16 4064 call UnhookInterruptForce 4065 ; try unhooking it 4066 jnc .got2F 4067 4068 .not2F: 4069 mov word [msg.serial_cannot_unhook.int], "2F" 4070 mov dx, msg.serial_cannot_unhook.nowarn 4071 jmp qq_attached_unterminated.common 4072 4073 .got2F: 4074 clropt [internalflags], hooked2F 4075 clropt [internalflags4], dif4_int_2F_hooked 4076 call update_inttab_optional 4077 .noint2F: 4078 %endif 4079 4080 4081 %if _BOOTLDR 4082 00008F95 F606[C500]40 testopt [internalflags], nodosloaded 4083 00008F9A 7518 jnz .restoreints 4084 %endif 4085 %if _DEVICE 4086 00008F9C F606[DA00]40 testopt [internalflags6], dif6_device_mode 4087 00008FA1 7511 jnz .restoreints 4088 %endif 4089 4090 4091 ; Cancel child's process if any. 4092 ; This will drop to real mode if debuggee is in protected mode. 4093 %if _TSR || _DEVICE 4094 00008FA3 F606[C600]40 testopt [internalflags], tsrmode 4095 00008FA8 7402 jz .terminate_attached 4096 4097 %if _PM 4098 call ispm 4099 jz @F ; in PM --> 4100 testopt [internalflags], canswitchmode 4101 jz @FF ; in 86 Mode and cannot switch to PM --> 4102 4103 setopt [internalflags], modeswitched ; set flag for resetmode 4104 mov al, 0 4105 call sr_state ; save state 4106 call switchmode ; switch to PM 4107 ; ! handle_mode_changed not called here ! 4108 ; do not call InDos or other functions using seg/sels 4109 @@: 4110 call pm_reset_handlers 4111 ; ! this calls resetmode 4112 4113 ; remember that we cannot access Protected Mode any longer 4114 clropt [internalflags], canswitchmode | switchbuffer 4115 @@: 4116 %endif 4117 4118 00008FAA EB08 jmp .restoreints 4119 4120 .terminate_attached: 4121 %endif 4122 4123 00008FAC E85F09 call terminate_attached_process 4124 00008FAF 7503E9CE00 jz qq_attached_unterminated 4125 %if _PM 4126 call ispm 4127 jnz @F 4128 4129 mov dx, msg.qq_still_pm 4130 jmp qq_attached_unterminated.common 4131 @@: 4132 %endif 4133 4134 .restoreints: 4135 %if CATCHINTAMOUNT && ! (_DEBUG && ! _DEBUG_COND) 4136 %if _DEBUG 4137 00008FB4 F606[D900]01 testopt [internalflags6], dif6_debug_mode 4138 00008FB9 751C jnz .skiprestoreints 4139 %endif 4140 ; Restore interrupt vectors. 4141 00008FBB BE[280C] mov si, inttab 4142 00008FBE BF[3D0C] mov di, intforcetab 4143 00008FC1 B90600 mov cx, inttab_number 4144 00008FC4 31D2 xor dx, dx 4145 .nextint: 4146 00008FC6 AC lodsb 4147 00008FC7 93 xchg ax, bx ; bl = number 4148 00008FC8 AD lodsw ; si -> list 4149 00008FC9 96 xchg ax, si ; si -> entry, ax -> list 4150 00008FCA 93 xchg ax, bx ; al = number, bx -> list 4151 00008FCB 57 push di 4152 00008FCC 8A35 mov dh, byte [di] 4153 00008FCE E87035 call UnhookInterruptForce 4154 00008FD1 5F pop di 4155 00008FD2 47 inc di 4156 00008FD3 87DE xchg bx, si ; si -> list 4157 00008FD5 E2EF loop .nextint 4158 .skiprestoreints: 4159 %endif 4160 4161 4162 %if _PM 4163 pop ax ; (discard) 4164 %endif 4165 4166 4167 qqlate: 4168 %if _SYMBOLIC 4169 ; Free XMS symbol table. 86 Mode memory backed symbol table 4170 ; is freed by our process's termination. 4171 call zz_free_xms 4172 %endif 4173 4174 ; Release the registered VDD. 4175 %if _VDD 4176 00008FD7 F606[C400]04 testopt [internalflags], ntpacket 4177 00008FDC 7408 jz .novdd 4178 00008FDE A1[EC0A] mov ax, word [hVdd] 4179 00008FE1 C4C4580190 UnRegisterModule 4180 .novdd: 4181 %endif 4182 4183 %if _VXCHG 4184 00008FE6 F606[D800]01 testopt [internalflags6], dif6_vv_mode 4185 00008FEB 7403 jz @F 4186 4187 00008FED E8DB0A call vv_disable 4188 @@: 4189 %endif 4190 4191 ; Restore termination address. 4192 %if _BOOTLDR 4193 00008FF0 F606[C500]40 testopt [internalflags], nodosloaded 4194 00008FF5 7403E98701 jnz .bootterminate ; terminate --> 4195 %endif 4196 %if _DEVICE 4197 00008FFA F606[DA00]40 testopt [internalflags6], dif6_device_mode 4198 00008FFF 7403E98A00 jnz .deviceterminate 4199 %endif 4200 %if _TSR || _DEVICE 4201 %if _TSR 4202 00009004 F606[C600]40 testopt [internalflags], tsrmode 4203 00009009 7457 jz .nontsrterminate 4204 %else 4205 jmp .nontsrterminate 4206 %endif 4207 4208 .tsrterminate: 4209 0000900B 31F6 xor si, si 4210 0000900D E8A475 call guard_auxbuff 4211 00009010 8E06[2A0A] mov es, word [auxbuff_segorsel] 4212 00009014 31FF xor di, di 4213 00009016 31C0 xor ax, ax 4214 00009018 B90800 mov cx, 8 4215 0000901B F3AB rep stosw ; 10h MCB bytes 4216 0000901D B94000 mov cx, 40h 4217 00009020 F3A5 rep movsw ; 80h PSP bytes 4218 00009022 8CC0 mov ax, es 4219 00009024 40 inc ax 4220 00009025 26A30100 mov word [es:1], ax ; fake MCB 4221 00009029 1E push ds 4222 0000902A 8ED8 mov ds, ax 4223 0000902C C70634001800 mov word [34h], 18h 4224 00009032 A33600 mov word [36h], ax ; insure default PHT and fix segment 4225 00009035 C70632000100 mov word [32h], 1 ; only one PHT entry (zero might crash) 4226 0000903B C6061800FF mov byte [18h], -1 ; PHT entry is closed 4227 00009040 C7062C000000 mov word [2Ch], 0 ; PSP clear 4228 00009046 E82A01 call .setparent ; make it self-owned, just in case 4229 00009049 8CD3 mov bx, ss 4230 0000904B 4B dec bx 4231 %if _DEVICE 4232 0000904C 36F606[DA00]40 testopt [ss:internalflags6], dif6_device_mode 4233 00009052 7403 jz @F 4234 00009054 83EB04 sub bx, deviceshim_size_p + paras(10h) 4235 @@: 4236 %endif 4237 00009057 8EDB mov ds, bx ; => our (real) MCB 4238 00009059 A30100 mov word [1], ax ; parent = fake PSP 4239 0000905C 1F pop ds 4240 0000905D E81301 call .setparent ; make the fake PSP our parent 4241 00009060 EB1B jmp short terminate_00 ; see ya 4242 4243 .nontsrterminate: 4244 %endif 4245 00009062 BE[FC0A] mov si, psp22 ; restore termination address 4246 00009065 BF0A00 mov di, TPIV 4247 00009068 A5 movsw 4248 00009069 A5 movsw 4249 0000906A BF1600 mov di, 16h ; restore PSP of parent 4250 0000906D A5 movsw 4251 ; Really done. 4252 4253 0000906E F606[C88F]01 testopt [qq_mode], qqmode_b 4254 00009073 7401 jz @F 4255 00009075 CC int3 4256 4257 @@: 4258 00009076 B44C mov ah, 4Ch ; quit 4259 00009078 A0[0B0C] mov al, byte [qqtermcode] 4260 ; return code 4261 0000907B CD21 int 21h 4262 4263 4264 terminate_00: ; used by terminate_attached_process 4265 0000907D B8004C mov ax, 4C00h ; quit 4266 00009080 CD21 int 21h 4267 4268 4269 qq_attached_unterminated: 4270 00009082 E80CA8 call getrunint 4271 00009085 E87821 call putsz 4272 00009088 BA[E66D] mov dx, msg.qq_unterm 4273 4274 .common: 4275 ; Restore state: 4276 %if _PM 4277 %if (nohook2F)&~0FF00h 4278 %fatal Internal flags re-ordered, adjust code here 4279 %endif 4280 pop ax 4281 mov [dpmidisable], al ; (SMC in section lDEBUG_DATA_ENTRY) 4282 and ah, nohook2F>>8 4283 clropt [internalflags], nohook2F 4284 or [internalflags+1], ah 4285 %endif 4286 0000908B E97221 jmp putsz 4287 4288 4289 %if _DEVICE 4290 qqlate.deviceterminate: 4291 0000908E F606[C88F]04 testopt [qq_mode], qqmode_d 4292 00009093 743F jz .mode_c 4293 4294 .mode_d: 4295 ; We modify the device request header 4296 ; only now, so in case of being unable 4297 ; to release something then the debugger 4298 ; will remain usable and stay resident. 4299 00009095 8E06[800C] mov es, word [reg_es] 4300 00009099 8B1E[600C] mov bx, word [reg_ebx] 4301 0000909D 8CD8 mov ax, ds 4302 0000909F 83E804 sub ax, paras(deviceshim_size + 10h) 4303 000090A2 26C747030381 mov word [es:bx + 3], 8103h ; error, done, code: unknown command 4304 000090A8 2683670E00 and word [es:bx + 0Eh], 0 4305 000090AD 26894710 mov word [es:bx + 0Eh + 2], ax ; -> behind memory in use 4306 ; es reset in run 4307 4308 000090B1 31DB xor bx, bx ; = 0 4309 000090B3 8B0E3200 mov cx, word [32h] ; get amount of handles 4310 .loop: 4311 000090B7 B43E mov ah, 3Eh 4312 000090B9 CD21 int 21h ; close it 4313 000090BB 43 inc bx ; next handle 4314 000090BC E2F9 loop .loop ; loop for all process handles --> 4315 4316 %if _DEBUG 4317 ; avoid hooking interrupts again: 4318 000090BE 2EC606[B83E]E9 mov byte [cs:..@patch_tsr_quit_run], __JMP_REL16 4319 ; (SMC in section lDEBUG_CODE) 4320 %endif 4321 000090C4 F606[C88F]01 testopt [qq_mode], qqmode_b 4322 000090C9 7406 jz @F 4323 000090CB C706[940C][B397] mov word [reg_eip], entry_int3_retf 4324 @@: 4325 000090D1 E9C1AD jmp run ; run this 4326 4327 4328 .mode_c: 4329 qqlate_device_container: 4330 000090D4 06 push es 4331 000090D5 C43E[CC8F] les di, [qq_device_prepare.device_reference] 4332 000090D9 8CC2 mov dx, es ; => device header pointing to ours 4333 000090DB 8CD0 mov ax, ss 4334 000090DD 83E804 sub ax, deviceshim_size_p + paras(10h) 4335 ; ! ax is re-used in .handlecontainer 4336 000090E0 8EC0 mov es, ax ; => our device header 4337 000090E2 26FF360200 push word [es:0 + 2] 4338 000090E7 26FF360000 push word [es:0] ; get our next link 4339 000090EC 8EC2 mov es, dx 4340 000090EE 268F05 pop word [es:di] 4341 000090F1 268F4502 pop word [es:di + 2] ; update their next link 4342 000090F5 8EC0 mov es, ax 4343 000090F7 26830E0000FF or word [es:0], -1 4344 000090FD 26830E0200FF or word [es:0 + 2], -1 ; de-initialise our next link 4345 00009103 07 pop es 4346 4347 00009104 31C9 xor cx, cx ; flag: do not shrink our allocation 4348 00009106 8B1E[D08F] mov bx, word [qq_device_prepare.container_segment] 4349 0000910A 85DB test bx, bx ; are we in a container ? 4350 0000910C 7459 jz .nocontainer ; no --> 4351 .handlecontainer: 4352 0000910E 0306[0C0C] add ax, word [device_mcb_paragraphs] 4353 ; => behind our allocation 4354 00009112 89C2 mov dx, ax 4355 00009114 2B16[D28F] sub dx, word [qq_device_prepare.container_end] 4356 ; are we last in container ? 4357 00009118 1E push ds 4358 00009119 8EDB mov ds, bx ; => container 4359 4360 0000911B 7418 je .notrail ; yes, easier --> 4361 4362 0000911D 48 dec ax ; => last paragraph allocated to us 4363 ; (buffer for trailer container MCB) 4364 0000911E 8EC0 mov es, ax 4365 00009120 31F6 xor si, si 4366 00009122 31FF xor di, di 4367 ; copy over MCB letter, owner, and name/type 4368 00009124 B90800 mov cx, words(16) 4369 00009127 F3A5 rep movsw 4370 00009129 36C606[D48F]4D mov byte [ss:qq_device_prepare.container_is_z], 'M' 4371 ; tell subsequent handler to use 'M' 4372 0000912F 2689160300 mov word [es:3], dx ; set new size 4373 00009134 41 inc cx ; flag: shrink our allocation 4374 4375 .notrail: 4376 00009135 8CD2 mov dx, ss 4377 00009137 83EA04 sub dx, deviceshim_size_p + paras(10h) 4378 0000913A 89D0 mov ax, dx 4379 0000913C 4A dec dx 4380 0000913D 8EC2 mov es, dx ; => device mode MCB 4381 0000913F 50 push ax 4382 00009140 36A0[D48F] mov al, byte [ss:qq_device_prepare.container_is_z] 4383 00009144 26A20000 mov byte [es:0], al ; set our letter to M or Z 4384 ; (Z only if container had Z and also 4385 ; there is no trailing container created) 4386 00009148 58 pop ax 4387 ; Name and owner should be set already. 4388 4389 00009149 26290E0300 sub word [es:3], cx ; -= 1 in case we have trail 4390 0000914E 26A30100 mov word [es:1], ax ; insure valid owner 4391 00009152 29DA sub dx, bx ; device mode MCB minus container MCB 4392 00009154 4A dec dx ; account for MCB paragraph to get MCB size 4393 00009155 89160300 mov word [3], dx ; adjust size 4394 00009159 C60600004D mov byte [0], 'M' ; set M unconditionally 4395 0000915E 85D2 test dx, dx ; size zero ? 4396 00009160 7504 jnz @F 4397 00009162 89160100 mov word [1], dx ; yes, zero the owner too 4398 @@: 4399 00009166 1F pop ds 4400 4401 .nocontainer: 4402 00009167 E9A1FE jmp qqlate.tsrterminate 4403 %endif 4404 4405 4406 usesection lDEBUG_DATA_ENTRY 4407 4408 %if _TSR || _DEVICE 4409 qq.proceedtsrtermination: 4410 00008FD8 FA cli 4411 00008FD9 FC cld 4412 00008FDA 8CC8 mov ax, cs 4413 00008FDC 8ED8 mov ds, ax 4414 00008FDE 8ED0 mov ss, ax 4415 00008FE0 BC[E00B] mov sp, stack_end 4416 00008FE3 FB sti 4417 00008FE4 832E[6C0C]12 sub word [reg_esp], 2+4+((qq.tsrfreecode_size+1)&~1) 4418 00008FE9 8B3E[6C0C] mov di, word [reg_esp] ; -> stack frame 4419 00008FED 8E06[840C] mov es, word [reg_ss] 4420 00008FF1 A1[7C0C] mov ax, word [reg_ds] 4421 00008FF4 AB stosw ; debuggee's ds 4422 00008FF5 A1[940C] mov ax, word [reg_eip] 4423 00008FF8 AB stosw 4424 00008FF9 A1[880C] mov ax, word [reg_cs] 4425 00008FFC AB stosw ; debuggee's cs:ip 4426 00008FFD 06 push es 4427 00008FFE 57 push di 4428 00008FFF BE[3C90] mov si, qq.tsrfreecode 4429 00009002 B90600 mov cx, ((qq.tsrfreecode_size+1)>>1) 4430 00009005 F3A5 rep movsw ; code on stack 4431 00009007 8CC8 mov ax, cs 4432 00009009 48 dec ax 4433 %if _DEVICE 4434 0000900A F606[DA00]40 testopt [internalflags6], dif6_device_mode 4435 0000900F 7403 jz @F 4436 00009011 83E804 sub ax, deviceshim_size_p + paras(10h) 4437 @@: 4438 %endif 4439 00009014 A3[7C0C] mov word [reg_ds], ax ; = our MCB 4440 00009017 8F06[940C] pop word [reg_eip] 4441 0000901B 8F06[880C] pop word [reg_cs] ; -> code on stack (at int3) 4442 0000901F F606[C88F]01 testopt [qq_mode], qqmode_b 4443 ; QB mode ? 4444 00009024 7504 jnz @F ; yes, leave pointing cs:ip at int3 4445 00009026 FF06[940C] inc word [reg_eip] ; point cs:ip past the int3 4446 @@: 4447 0000902A F606[9F00]80 testopt [options3], opt3_tsr_quit_leave_tf 4448 0000902F 7505 jnz @F 4449 00009031 8026[990C]FE clropt [reg_efl], 100h ; clear TF 4450 @@: 4451 4452 00009036 E8FAF1 call entry_to_code_seg 4453 00009039 [6A91] dw .proceedtsrcode 4454 4455 4456 usesection lDEBUG_CODE 4457 4458 code_insure_low_byte_not_0CCh 4459 .proceedtsrcode: 4460 %if _DEBUG 4461 ; avoid hooking interrupts again: 4462 0000916A 2EC606[B83E]E9 mov byte [cs:..@patch_tsr_quit_run], __JMP_REL16 4463 ; (SMC in section lDEBUG_CODE) 4464 %endif 4465 00009170 E922AD jmp run ; run this 4466 4467 4468 usesection lDEBUG_DATA_ENTRY 4469 4470 0000903B 00 align 2, db 0 4471 ; (Update: Explicitly clears TF now, except if the 4472 ; option opt3_tsr_quit_leave_tf is set. See above.) 4473 ; 4474 ; Note that since we are in control of debuggee's TF and 4475 ; reset it every time the debugger is entered, this code 4476 ; will not be entered with TF set. It might be entered 4477 ; with IF set and an interrupt might occur; the only harm 4478 ; done then is that the interrupt handler has less stack 4479 ; available. All flags must be preserved by this code. 4480 qq.tsrfreecode: 4481 0000903C CC int3 ; breakpoint for QB mode, 1 byte 4482 0000903D C70601000000 mov word [1], 0 ; free the MCB 4483 00009043 1F pop ds ; restore debuggee's ds 4484 00009044 CA0C00 retf ((qq.tsrfreecode_size+1)&~1) ; jump 4485 qq.tsrfreecode_size: equ $-qq.tsrfreecode 4486 4487 4488 usesection lDEBUG_CODE 4489 4490 qqlate.setparent: 4491 00009173 A31600 mov word [16h], ax 4492 00009176 C7060A00[D88F] mov word [0Ah], qq.proceedtsrtermination 4493 0000917C 8C160C00 mov word [0Ah+2], ss 4494 00009180 C3 retn 4495 %endif 4496 4497 %if _BOOTLDR 4498 qqlate.bootterminate: 4499 00009181 812E[6C0C]BE00 sub word [reg_esp], 2*8+4+((qq.bootfreecode_size+1)&~1) 4500 00009187 8B3E[6C0C] mov di, word [reg_esp] ; -> stack frame 4501 0000918B 8E06[840C] mov es, word [reg_ss] 4502 0000918F A1[7C0C] mov ax, word [reg_ds] 4503 00009192 AB stosw 4504 00009193 A1[800C] mov ax, word [reg_es] 4505 00009196 AB stosw 4506 00009197 A1[740C] mov ax, word [reg_esi] 4507 0000919A AB stosw 4508 0000919B A1[780C] mov ax, word [reg_edi] 4509 0000919E AB stosw 4510 0000919F A1[5C0C] mov ax, word [reg_eax] 4511 000091A2 AB stosw 4512 000091A3 A1[640C] mov ax, word [reg_ecx] 4513 000091A6 AB stosw 4514 000091A7 A1[600C] mov ax, word [reg_ebx] 4515 000091AA AB stosw 4516 000091AB A1[680C] mov ax, word [reg_edx] 4517 000091AE AB stosw 4518 000091AF A1[940C] mov ax, word [reg_eip] 4519 000091B2 AB stosw 4520 000091B3 A1[880C] mov ax, word [reg_cs] 4521 000091B6 AB stosw ; debuggee's cs:ip 4522 000091B7 06 push es 4523 000091B8 57 push di 4524 000091B9 1E push ds 4525 000091BA 0E push cs 4526 000091BB 1F pop ds ; => lDEBUG_CODE 4527 000091BC BE[3492] mov si, qq.bootfreecode 4528 000091BF B95500 mov cx, ((qq.bootfreecode_size+1)>>1) 4529 000091C2 F3A5 rep movsw ; code on stack 4530 000091C4 1F pop ds 4531 4532 000091C5 16 push ss 4533 000091C6 07 pop es 4534 4535 000091C7 A1[628F] mov ax, word [ boot_new_memsizekib ] 4536 000091CA B106 mov cl, 6 4537 000091CC D3E0 shl ax, cl ; ax => source of EBDA (new position) 4538 000091CE 8B16[648F] mov dx, word [ boot_old_memsizekib ] 4539 000091D2 D3E2 shl dx, cl ; dx => destination of EBDA (old position) 4540 000091D4 31C9 xor cx, cx ; size of EBDA to move (if none) 4541 000091D6 1E push ds 4542 000091D7 8ED9 mov ds, cx 4543 000091D9 8B1E0E04 mov bx, word [40Eh] ; new ref in word [0:40Eh] (if none) 4544 000091DD 1F pop ds 4545 000091DE 803E[668F]00 cmp byte [ boot_ebdaflag ], 0 ; any EBDA ? 4546 000091E3 7412 jz .noebda 4547 4548 000091E5 1E push ds 4549 000091E6 8ED8 mov ds, ax ; => EBDA 4550 000091E8 31DB xor bx, bx 4551 000091EA 8A1E0000 mov bl, byte [ 0 ] ; EBDA size in KiB 4552 000091EE B106 mov cl, 6 4553 000091F0 D3E3 shl bx, cl ; *64, to paragraphs 4554 000091F2 89D9 mov cx, bx ; = size of EBDA to move (in paragraphs) 4555 000091F4 89D3 mov bx, dx ; = new EBDA reference to put in word [0:40Eh] 4556 000091F6 1F pop ds 4557 4558 .noebda: 4559 000091F7 A3[5C0C] mov word [reg_eax], ax ; => relocated (new) EBDA position 4560 ; (in front of debugger image) 4561 000091FA 891E[600C] mov word [reg_ebx], bx ; = what to put in word [0:40Eh], 4562 ; unchanged content of that word if no EBDA 4563 000091FE 890E[640C] mov word [reg_ecx], cx ; = EBDA size, 0 if no EBDA 4564 00009202 8916[680C] mov word [reg_edx], dx ; = original (old) EBDA position 4565 ; = original mem size (in paras) 4566 ; (behind/in debugger image) 4567 00009206 C706[7C0C]0000 mov word [reg_ds], 0 4568 4569 0000920C 8F06[940C] pop word [reg_eip] 4570 00009210 8F06[880C] pop word [reg_cs] ; -> code on stack 4571 00009214 F606[C88F]01 testopt [qq_mode], qqmode_b 4572 ; QB mode ? 4573 00009219 7504 jnz @F ; yes, leave pointing cs:ip at int3 4574 0000921B FF06[940C] inc word [reg_eip] ; point cs:ip past the int3 4575 @@: 4576 0000921F F606[9F00]80 testopt [options3], opt3_tsr_quit_leave_tf 4577 00009224 7505 jnz @F 4578 00009226 8026[990C]FE clropt [reg_efl], 100h ; clear TF 4579 @@: 4580 ; call dumpregs 4581 %if _DEBUG 4582 ; avoid hooking interrupts again: 4583 0000922B 2EC606[B83E]E9 mov byte [cs:..@patch_tsr_quit_run], __JMP_REL16 4584 ; (SMC in section lDEBUG_CODE) 4585 %endif 4586 ; jmp cmd3 4587 00009231 E961AC jmp run ; run this 4588 4589 4590 align 2, db 0 4591 qq.bootfreecode: 4592 00009234 CC int3 ; breakpoint for QB mode, 1 byte 4593 00009235 9C pushf 4594 00009236 E81800 call movp ; move EBDA back (if any) 4595 00009239 891E0E04 mov word [40Eh], bx ; back relocate EBDA (if any) 4596 0000923D B106 mov cl, 6 4597 0000923F D3EA shr dx, cl ; = to KiB 4598 00009241 89161304 mov word [413h], dx ; back relocate mem size 4599 00009245 9D popf 4600 00009246 1F pop ds 4601 00009247 07 pop es 4602 00009248 5E pop si 4603 00009249 5F pop di 4604 0000924A 58 pop ax 4605 0000924B 59 pop cx 4606 0000924C 5B pop bx 4607 0000924D 5A pop dx 4608 0000924E CAAA00 retf ((qq.bootfreecode_size+1)&~1) 4609 4610 4611 ; Move paragraphs 4612 ; 4613 ; INP: ax:0-> source 4614 ; dx:0-> destination 4615 ; cx = number of paragraphs 4616 ; CHG: - 4617 ; Note: Doesn't work correctly on HMA; doesn't always wrap to LMA either. 4618 ; Do not provide a wrapped/HMA source or destination! 4619 movp: 4620 00009251 51 push cx 4621 00009252 1E push ds 4622 00009253 56 push si 4623 00009254 06 push es 4624 00009255 57 push di 4625 4626 00009256 39D0 cmp ax, dx ; source above destination ? 4627 00009258 770A ja .up ; yes, move up (forwards) --> 4628 0000925A 747B je .return ; same, no need to move --> 4629 0000925C 50 push ax 4630 0000925D 01C8 add ax, cx ; (expected not to carry) 4631 0000925F 39D0 cmp ax, dx ; end of source is above destination ? 4632 00009261 58 pop ax 4633 00009262 7730 ja .down ; yes, move from top down --> 4634 ; Here, the end of source is below-or-equal the destination, 4635 ; so they do not overlap. In this case we prefer moving up. 4636 4637 .up: 4638 00009264 50 push ax 4639 00009265 52 push dx 4640 .uploop: 4641 00009266 8ED8 mov ds, ax 4642 00009268 8EC2 mov es, dx 4643 0000926A 31FF xor di, di 4644 0000926C 31F6 xor si, si ; -> start of segment 4645 0000926E 81E90010 sub cx, 1000h ; 64 KiB left ? 4646 00009272 7610 jbe .uplast ; no --> 4647 00009274 51 push cx 4648 00009275 B90080 mov cx, 10000h /2 4649 00009278 F3A5 rep movsw ; move 64 KiB 4650 0000927A 59 pop cx 4651 0000927B 050010 add ax, 1000h 4652 0000927E 81C20010 add dx, 1000h ; -> next segment 4653 00009282 EBE2 jmp short .uploop ; proceed for more --> 4654 .uplast: 4655 00009284 81C10010 add cx, 1000h ; restore counter 4656 00009288 D1E1 shl cx, 1 4657 0000928A D1E1 shl cx, 1 4658 0000928C D1E1 shl cx, 1 ; *8, paragraphs to words 4659 0000928E F3A5 rep movsw ; move last part 4660 00009290 5A pop dx 4661 00009291 58 pop ax 4662 00009292 EB43 jmp short .return 4663 4664 .down: 4665 00009294 FD std ; _AMD_ERRATUM_109_WORKAROUND as below 4666 .dnloop: 4667 00009295 81E90010 sub cx, 1000h ; 64 KiB left ? 4668 00009299 761A jbe .dnlast ; no --> 4669 0000929B 50 push ax 4670 0000929C 52 push dx 4671 0000929D 01C8 add ax, cx 4672 0000929F 01CA add dx, cx 4673 000092A1 8ED8 mov ds, ax ; -> 64 KiB not yet moved 4674 000092A3 8EC2 mov es, dx 4675 000092A5 5A pop dx 4676 000092A6 58 pop ax 4677 000092A7 BFFEFF mov di, -2 4678 000092AA 89FE mov si, di ; moved from last word down 4679 000092AC 51 push cx 4680 000092AD B90080 mov cx, 10000h /2 4681 000092B0 F3A5 rep movsw ; move 64 KiB 4682 000092B2 59 pop cx 4683 000092B3 EBE0 jmp short .dnloop ; proceed for more --> 4684 .dnlast: 4685 000092B5 81C10010 add cx, 1000h ; restore counter 4686 000092B9 D1E1 shl cx, 1 4687 000092BB D1E1 shl cx, 1 4688 000092BD D1E1 shl cx, 1 ; *8, paragraphs to words 4689 000092BF 89CF mov di, cx 4690 000092C1 4F dec di 4691 000092C2 D1E7 shl di, 1 ; words to offset, -> last word 4692 000092C4 89FE mov si, di 4693 000092C6 8ED8 mov ds, ax 4694 000092C8 8EC2 mov es, dx ; first segment correct 4695 4696 4697 numdef AMD_ERRATUM_109_WORKAROUND, 1 4698 ; Refer to comment in init.asm init_movp. 4699 4700 %if _AMD_ERRATUM_109_WORKAROUND 4701 000092CA E308 jcxz @FF 4702 000092CC 83F914 cmp cx, 20 4703 000092CF 7703 ja @FF 4704 @@: 4705 000092D1 A5 movsw 4706 000092D2 E2FD loop @B 4707 @@: 4708 %endif 4709 000092D4 F3A5 rep movsw ; move first part 4710 000092D6 FC cld 4711 .return: 4712 000092D7 5F pop di 4713 000092D8 07 pop es 4714 000092D9 5E pop si 4715 000092DA 1F pop ds 4716 000092DB 59 pop cx 4717 000092DC C3 retn 4718 qq.bootfreecode_size: equ $-qq.bootfreecode 4719 %endif 4720 4721 4722 %include "ss.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug S commands (search, sleep) 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2022 C. Masloch 8 <1> 9 <1> Usage of the works is permitted provided that this 10 <1> instrument is retained with the works, so that any entity 11 <1> that uses the works is notified of this instrument. 12 <1> 13 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 14 <1> 15 <1> %endif 16 <1> 17 <1> 18 <1> usesection lDEBUG_CODE 19 <1> 20 <1> sleepcmd: 21 000092DD E8931A <1> call skipcomma 22 000092E0 E88114 <1> call getdword 23 000092E3 53 <1> push bx 24 000092E4 52 <1> push dx 25 000092E5 E8BB1A <1> call skipwh0 26 000092E8 E8621A <1> call iseol? 27 000092EB 7421 <1> je .seconds 28 000092ED 4E <1> dec si 29 000092EE BA[4A6A] <1> mov dx, msg.seconds 30 000092F1 E8FA19 <1> call isstring? 31 000092F4 7414 <1> je .seconds_check_eol 32 000092F6 BA[526A] <1> mov dx, msg.ticks 33 000092F9 E8F219 <1> call isstring? 34 <1> .error_NZ: 35 000092FC 7403E9BB05 <1> jne error 36 <1> .ticks_check_eol: 37 00009301 AC <1> lodsb 38 00009302 E85D1A <1> call chkeol 39 <1> 40 00009305 B80100 <1> mov ax, 1 41 00009308 EB07 <1> jmp .common 42 <1> 43 <1> .seconds_check_eol: 44 0000930A AC <1> lodsb 45 0000930B E8541A <1> call chkeol 46 <1> .seconds: 47 0000930E B81200 <1> mov ax, 18 48 <1> .common: 49 00009311 5A <1> pop dx 50 00009312 50 <1> push ax 51 00009313 F7E2 <1> mul dx ; dx:ax = low word times multiplier 52 00009315 89D3 <1> mov bx, dx 53 00009317 89C1 <1> mov cx, ax ; bx:cx = low word times multiplier 54 00009319 58 <1> pop ax 55 0000931A 5A <1> pop dx 56 0000931B F7E2 <1> mul dx ; dx:ax = high word times multiplier 57 0000931D 01C3 <1> add bx, ax 58 0000931F 83D200 <1> adc dx, 0 ; dx:bx:cx = entire result 59 00009322 75D8 <1> jnz .error_NZ 60 <1> 61 00009324 85C9 <1> test cx, cx 62 00009326 7504 <1> jnz @F 63 00009328 85DB <1> test bx, bx 64 0000932A 7435 <1> jz .end 65 <1> @@: 66 <1> 67 0000932C B84000 <1> mov ax, 40h ; bimodal segment/selector 68 0000932F 8EC0 <1> mov es, ax 69 <1> .loop_reset: 70 00009331 268B166C00 <1> mov dx, word [es:6Ch] 71 <1> .loop: 72 00009336 263B166C00 <1> cmp dx, word [es:6Ch] 73 0000933B 7518 <1> jne .next 74 0000933D E87FA8 <1> call handle_serial_flags_ctrl_c 75 00009340 F606[9F00]40 <1> testopt [options3], opt3_check_ctrlc_0bh 76 00009345 7509 <1> jnz @F ; already called function 0Bh --> 77 00009347 E85308 <1> call InDos 78 0000934A 7504 <1> jnz @F 79 0000934C B40B <1> mov ah, 0Bh 80 <1> doscall ; allow to break with Ctrl-C 2334 0000934E CD21 <2> int 21h 81 <1> @@: 82 00009350 E8C421 <1> call idle 83 00009353 EBE1 <1> jmp .loop 84 <1> 85 <1> .next: 86 00009355 83E901 <1> sub cx, 1 87 00009358 83DB00 <1> sbb bx, 0 88 0000935B 75D4 <1> jnz .loop_reset 89 0000935D E302 <1> jcxz .end 90 0000935F EBD0 <1> jmp .loop_reset 91 <1> 92 <1> .end: 93 00009361 C3 <1> retn 94 <1> 95 <1> 96 <1> ; S command - search for a string of bytes. 97 <1> sss: 98 00009362 4E <1> dec si 99 00009363 4E <1> dec si ; -> at 'S' 100 00009364 BA[446A] <1> mov dx, msg.sleep 101 00009367 E88419 <1> call isstring? ; check for "SLEEP" 102 0000936A 7503E96EFF <1> je sleepcmd 103 0000936F 46 <1> inc si ; skip 'S' 104 00009370 AC <1> lodsb ; load next 105 <1> 106 00009371 8026[CF00]7F <1> clropt [internalflags3], dif3_sss_is_reverse 107 <1> 108 00009376 8B1E[7C0C] <1> mov bx, word [reg_ds] ; get search range 109 <1> _386_PM_o32 ; xor ecx, ecx 110 0000937A 31C9 <1> xor cx, cx 111 0000937C E83009 <1> call getrangeX ; get address range into BX:(E)DX..BX:(E)CX 112 0000937F E8F219 <1> call skipcomm0 113 <1> _386_PM_o32 ; push edx 114 00009382 52 <1> push dx 115 <1> _386_PM_o32 ; push ecx 116 00009383 51 <1> push cx 117 00009384 53 <1> push bx 118 <1> 119 00009385 BA[A068] <1> mov dx, msg.reverse 120 00009388 4E <1> dec si 121 00009389 E86219 <1> call isstring? 122 0000938C 7509 <1> jne @F 123 <1> 124 0000938E 800E[CF00]80 <1> setopt [internalflags3], dif3_sss_is_reverse 125 00009393 E80C1A <1> call skipwhite 126 00009396 4E <1> dec si 127 <1> @@: 128 00009397 BA[3868] <1> mov dx, msg.range 129 0000939A E85119 <1> call isstring? 130 0000939D AC <1> lodsb 131 0000939E 7512 <1> jne .notrange 132 <1> 133 000093A0 8B1E[7C0C] <1> mov bx, word [reg_ds] ; get search range 134 000093A4 31C9 <1> xor cx, cx 135 000093A6 E80609 <1> call getrangeX ; try to get second range 136 000093A9 E8B619 <1> call chkeol ; and insure end-of-line 137 <1> ; successful if it returned 138 <1> _386_PM_o32 ; mov esi, edx 139 000093AC 89D6 <1> mov si, dx ; bx:esi-> source string 140 <1> _386_PM_o32 ; sub ecx, edx 141 000093AE 29D1 <1> sub cx, dx ; ecx = count - 1 142 000093B0 EB23 <1> jmp short .setesedi 143 <1> 144 <1> .notrange: 145 000093B2 E8E709 <1> call getstr ; get string of bytes 146 000093B5 81EF[AE07] <1> sub di, line_out ; di = number of bytes to look for 147 000093B9 7503E9FE04 <1> jz error 148 000093BE 89F9 <1> mov cx, di 149 000093C0 4F <1> dec di ; minus one 150 000093C1 BE[AE07] <1> mov si, line_out 151 000093C4 57 <1> push di 152 000093C5 E8EC71 <1> call guard_auxbuff 153 000093C8 8E06[2A0A] <1> mov es, word [auxbuff_segorsel] 154 000093CC 31FF <1> xor di, di 155 000093CE F3A4 <1> rep movsb ; move to auxbuff 156 <1> _386_PM_o32 ; xor esi, esi 157 000093D0 31F6 <1> xor si, si 158 000093D2 8CC3 <1> mov bx, es ; bx:esi -> auxbuff 159 000093D4 59 <1> pop cx 160 <1> _386_PM movzx ecx, cx ; ecx = count - 1 161 <1> .setesedi: 162 000093D5 16 <1> push ss 163 000093D6 07 <1> pop es 164 000093D7 BF[840B] <1> mov di, search_results 165 000093DA 31C0 <1> xor ax, ax 166 000093DC A3[C40B] <1> mov word [sscounter], ax 167 000093DF A3[C60B] <1> mov word [sscounter + 2], ax 168 000093E2 51 <1> push cx 169 <1> %if _PM 170 <1> mov cx, (6 * 16) >> 1 171 <1> %else 172 000093E3 B92000 <1> mov cx, (4 * 16) >> 1 173 <1> %endif 174 000093E6 F3AB <1> rep stosw 175 000093E8 59 <1> pop cx 176 <1> 177 000093E9 E85107 <1> call prephack ; set up for the interrupt vector hack 178 000093EC E87707 <1> call dohack 179 000093EF 8EDB <1> mov ds, bx 180 000093F1 07 <1> pop es 181 <1> _386_PM_jmpn .386init ; 386 --> 182 <1> .init: 183 000093F2 5B <1> pop bx 184 000093F3 5A <1> pop dx 185 <1> .init_popped: 186 000093F4 29D3 <1> sub bx, dx ; bx = number of bytes in search range minus one 187 000093F6 29CB <1> sub bx, cx ; = number of possible positions of string minus 1 188 000093F8 7303E9BF04 <1> jb error 189 000093FD 89D7 <1> mov di, dx 190 000093FF 89CA <1> mov dx, cx 191 00009401 89D9 <1> mov cx, bx 192 <1> 193 <1> ; ds:si-> search string, length (dx+1) 194 <1> ; es:di-> data to search in, (cx+1) bytes 195 00009403 36F606[CF00]80 <1> testopt [ss:internalflags3], dif3_sss_is_reverse 196 00009409 7516 <1> jnz .reverse 197 <1> .loop: 198 0000940B 0C01 <1> or al, 1 ; NZ (iff cx==0, repne scasb doesn't change ZF) 199 0000940D 56 <1> push si 200 0000940E AC <1> lodsb ; first character in al 201 0000940F F2AE <1> repne scasb ; look for first byte 202 00009411 7408 <1> je .foundbyte 203 00009413 AE <1> scasb ; count in cx was cnt-1 204 00009414 7536 <1> jne .done 205 <1> .found_last_byte: 206 00009416 E85600 <1> call .handle_found_byte 207 00009419 EB31 <1> jmp .done 208 <1> 209 <1> .foundbyte: 210 0000941B E85100 <1> call .handle_found_byte 211 0000941E 5E <1> pop si 212 0000941F EBEA <1> jmp .loop ; cx = 0 if one to search, 213 <1> ; cx = 1 if two to search, etc 214 <1> 215 <1> .reverse: 216 00009421 01CF <1> add di, cx ; -> last position to check 217 <1> .reverseloop: 218 00009423 0C01 <1> or al, 1 ; NZ (iff cx==0, repne scasb doesn't change ZF) 219 00009425 56 <1> push si 220 00009426 AC <1> lodsb ; first character in al 221 00009427 FD <1> std ; no AMD erratum workaround needed 222 00009428 F2AE <1> repne scasb ; look for first byte 223 0000942A 7411 <1> je .reversefoundbyte 224 0000942C AE <1> scasb ; count in cx was cnt-1 225 0000942D 751D <1> jne .done 226 <1> .reversefound_last_byte: 227 0000942F FC <1> cld 228 00009430 83C702 <1> add di, 2 229 00009433 38C0 <1> cmp al, al ; ZR for case if dx = 0 230 00009435 E83700 <1> call .handle_found_byte 231 00009438 83EF02 <1> sub di, 2 232 0000943B EB0F <1> jmp .done 233 <1> 234 <1> .reversefoundbyte: 235 0000943D FC <1> cld 236 0000943E 83C702 <1> add di, 2 237 00009441 38C0 <1> cmp al, al ; ZR for case if dx = 0 238 00009443 E82900 <1> call .handle_found_byte 239 00009446 83EF02 <1> sub di, 2 240 00009449 5E <1> pop si 241 0000944A EBD7 <1> jmp .reverseloop ; cx = 0 if one to search, 242 <1> ; cx = 1 if two to search, etc 243 <1> 244 <1> .done: 245 0000944C 5E <1> pop si ; discard 246 <1> .commondone: 247 0000944D FC <1> cld 248 0000944E 16 <1> push ss 249 0000944F 1F <1> pop ds 250 00009450 E82707 <1> call unhack 251 00009453 BF[AE07] <1> mov di, line_out 252 <1> 253 00009456 A1[C60B] <1> mov ax, word [sscounter + 2] 254 00009459 85C0 <1> test ax, ax 255 0000945B 7403 <1> jz .nohighcounter 256 0000945D E8ED19 <1> call hexword 257 <1> .nohighcounter: 258 <1> 259 00009460 A1[C40B] <1> mov ax, word [sscounter] 260 00009463 E8E719 <1> call hexword 261 00009466 E8201A <1> call putsline 262 00009469 BA[AC81] <1> mov dx, msg.matches 263 0000946C E9911D <1> jmp putsz 264 <1> 265 <1> 266 <1> ; INP: ZR 267 <1> .handle_found_byte: 268 0000946F 51 <1> push cx 269 00009470 57 <1> push di 270 00009471 89D1 <1> mov cx, dx 271 00009473 F3A6 <1> repe cmpsb ; compare string behind first byte 272 <1> ; If we're searching for a single-byte value then 273 <1> ; dx is equal to zero here. In that case cx gets 274 <1> ; the value zero and then repe cmpsb does not 275 <1> ; alter ZF, meaning it will stay ZR (as noted for 276 <1> ; the comment INP section). 277 00009475 5F <1> pop di 278 00009476 7402 <1> je .display ; if equal 279 <1> .next: 280 00009478 59 <1> pop cx 281 00009479 C3 <1> retn 282 <1> 283 <1> .display: 284 0000947A 8CC3 <1> mov bx, es 285 0000947C 57 <1> push di 286 0000947D 1E <1> push ds 287 0000947E 06 <1> push es 288 0000947F 16 <1> push ss 289 00009480 1F <1> pop ds 290 00009481 E8F606 <1> call unhack ; undo the interrupt vector hack and restore es 291 00009484 57 <1> push di 292 00009485 833E[C60B]00 <1> cmp word [sscounter + 2], 0 293 0000948A 7518 <1> jne @F 294 0000948C 8B3E[C40B] <1> mov di, word [sscounter] 295 00009490 83FF10 <1> cmp di, 16 296 00009493 730F <1> jae @F 297 <1> %if _PM 298 <1> add di, di ; * 2 299 <1> mov ax, di 300 <1> add di, di ; * 4 301 <1> add di, ax ; * 4 + * 2 = * 6 302 <1> %else 303 00009495 01FF <1> add di, di 304 00009497 01FF <1> add di, di ; * 4 305 <1> %endif 306 00009499 81C7[840B] <1> add di, search_results 307 0000949D 58 <1> pop ax 308 0000949E 50 <1> push ax 309 0000949F 48 <1> dec ax 310 000094A0 AB <1> stosw 311 <1> %if _PM 312 <1> xor ax, ax 313 <1> stosw 314 <1> %endif 315 000094A1 89D8 <1> mov ax, bx 316 000094A3 AB <1> stosw 317 <1> 318 <1> @@: 319 000094A4 8306[C40B]01 <1> add word [sscounter], 1 320 000094A9 8316[C60B]00 <1> adc word [sscounter + 2], 0 321 000094AE 89D8 <1> mov ax, bx 322 000094B0 BF[AE07] <1> mov di, line_out 323 000094B3 E89719 <1> call hexword ; 4 (segment) 324 000094B6 B03A <1> mov al, ':' 325 000094B8 AA <1> stosb ; +1=5 326 000094B9 58 <1> pop ax 327 000094BA 48 <1> dec ax 328 000094BB E88F19 <1> call hexword 329 <1> %if _SDUMP 330 000094BE F606[9600]80 <1> testopt [options], ss_no_dump 331 000094C3 753D <1> jnz @F 332 000094C5 F9 <1> stc 333 000094C6 11D0 <1> adc ax, dx ; -> behind result 334 000094C8 7638 <1> jbe .noresult ; end of segment 335 000094CA 89C6 <1> mov si, ax 336 000094CC B82020 <1> mov ax, 32<<8|32 337 000094CF AB <1> stosw 338 000094D0 8D5D30 <1> lea bx, [di+3*16] 339 000094D3 89F1 <1> mov cx, si 340 000094D5 F7D9 <1> neg cx 341 000094D7 83F910 <1> cmp cx, byte 16 342 000094DA 7603 <1> jbe .cxdone 343 000094DC B91000 <1> mov cx, 16 344 <1> .cxdone: 345 000094DF 1F <1> pop ds 346 000094E0 1E <1> push ds ; restore search's segment 347 000094E1 51 <1> push cx 348 <1> .disploop: 349 000094E2 AC <1> lodsb 350 000094E3 E86980 <1> call dd_store 351 000094E6 B020 <1> mov al, 32 352 000094E8 AA <1> stosb 353 000094E9 E2F7 <1> loop .disploop 354 000094EB 59 <1> pop cx 355 000094EC 16 <1> push ss 356 000094ED 1F <1> pop ds 357 000094EE F7D9 <1> neg cx 358 000094F0 83C110 <1> add cx, byte 16 359 000094F3 7407 <1> jz .noblanks 360 <1> .loopblanks: 361 000094F5 B82020 <1> mov ax, 32<<8|32 362 000094F8 AB <1> stosw 363 000094F9 AA <1> stosb 364 000094FA E2F9 <1> loop .loopblanks 365 <1> .noblanks: 366 000094FC C645E72D <1> mov byte [di-(1+(8*3))], '-' 367 00009500 89DF <1> mov di, bx 368 <1> .noresult: 369 <1> @@: 370 <1> %endif ; _SDUMP 371 00009502 52 <1> push dx 372 00009503 E87F19 <1> call putsline_crlf 373 00009506 E85D06 <1> call dohack 374 00009509 5A <1> pop dx 375 0000950A 07 <1> pop es 376 0000950B 1F <1> pop ds 377 0000950C 5F <1> pop di 378 0000950D E968FF <1> jmp .next 379 <1> 380 <1> %if _PM 381 <1> .386init: 382 <1> [cpu 386] 383 <1> pop ebx 384 <1> pop edx 385 <1> call ispm 386 <1> jnz .init_popped ; not PM --> 387 <1> sub ebx, edx ; ebx = number of bytes in search range minus one 388 <1> sub ebx, ecx ; = number of possible positions of string minus 1 389 <1> jb error 390 <1> mov edi, edx 391 <1> mov edx, ecx 392 <1> mov ecx, ebx 393 <1> 394 <1> ; ds:esi-> search string, length (edx+1) 395 <1> ; es:edi-> data to search in, (ecx+1) bytes 396 <1> ; Although 386+ RM still uses 64 KiB segments, it allows 397 <1> ; us to use the 32-bit addressing variant of the string 398 <1> ; instructions as long as we never access any byte above 399 <1> ; the 64 KiB limit. (Even if the index register contains 400 <1> ; 00010000h after an instruction executed.) 401 <1> testopt [ss:internalflags3], dif3_sss_is_reverse 402 <1> jnz .386reverse 403 <1> .386loop: 404 <1> or al, 1 ; NZ (iff cx==0, repne scasb doesn't change ZF) 405 <1> push esi 406 <1> a32 lodsb ; first character in al 407 <1> a32 repne scasb ; look for first byte 408 <1> je .386foundbyte 409 <1> a32 scasb ; count in ecx was cnt-1 410 <1> jne .386done 411 <1> .386found_last_byte: 412 <1> call .386handle_found_byte 413 <1> jmp .386done 414 <1> 415 <1> .386foundbyte: 416 <1> call .386handle_found_byte 417 <1> pop esi 418 <1> jmp .386loop ; ecx = 0 if one to search, 419 <1> ; ecx = 1 if two to search, etc 420 <1> 421 <1> .386reverse: 422 <1> add edi, ecx ; -> last position to check 423 <1> .386reverseloop: 424 <1> or al, 1 ; NZ (iff cx==0, repne scasb doesn't change ZF) 425 <1> push esi 426 <1> a32 lodsb ; first character in al 427 <1> std ; no AMD erratum workaround needed 428 <1> a32 repne scasb ; look for first byte 429 <1> je .386reversefoundbyte 430 <1> a32 scasb ; count in ecx was cnt-1 431 <1> jne .386done 432 <1> .386reversefound_last_byte: 433 <1> cld 434 <1> add edi, 2 435 <1> cmp al, al ; ZR for case if edx = 0 436 <1> call .386handle_found_byte 437 <1> sub edi, 2 438 <1> jmp .386done 439 <1> 440 <1> .386reversefoundbyte: 441 <1> cld 442 <1> add edi, 2 443 <1> cmp al, al ; ZR for case if edx = 0 444 <1> call .386handle_found_byte 445 <1> sub edi, 2 446 <1> pop esi 447 <1> jmp .386reverseloop ; ecx = 0 if one to search, 448 <1> ; ecx = 1 if two to search, etc 449 <1> 450 <1> .386done: 451 <1> pop esi ; discard 452 <1> jmp .commondone 453 <1> 454 <1> 455 <1> ; INP: ZR 456 <1> .386handle_found_byte: 457 <1> push ecx 458 <1> push edi 459 <1> mov ecx, edx 460 <1> a32 repe cmpsb ; compare string behind first byte 461 <1> ; If we're searching for a single-byte value then 462 <1> ; edx is equal to zero here. In that case ecx gets 463 <1> ; the value zero and then a32 repe cmpsb does not 464 <1> ; alter ZF, meaning it will stay ZR (as noted for 465 <1> ; the comment INP section). 466 <1> pop edi 467 <1> je .386display ; if equal 468 <1> .386next: 469 <1> pop ecx 470 <1> retn 471 <1> 472 <1> .386display: 473 <1> mov bx, es 474 <1> push edi 475 <1> push ds 476 <1> push es 477 <1> push ss 478 <1> pop ds 479 <1> call unhack ; undo the interrupt vector hack and restore es 480 <1> push edi 481 <1> mov edi, dword [sscounter] 482 <1> cmp edi, 16 483 <1> jae @F 484 <1> add di, di ; * 2 485 <1> mov ax, di 486 <1> add di, di ; * 4 487 <1> add di, ax ; * 4 + * 2 = * 6 488 <1> add di, search_results 489 <1> pop eax 490 <1> push eax 491 <1> dec eax 492 <1> stosd 493 <1> mov ax, bx 494 <1> stosw 495 <1> 496 <1> @@: 497 <1> inc dword [sscounter] 498 <1> mov ax, bx 499 <1> mov di, line_out 500 <1> call hexword ; 4 (segment) 501 <1> mov al, ':' 502 <1> stosb ; +1=5 503 <1> pop eax 504 <1> dec eax 505 <1> call test_d_b_bit 506 <1> jz .noa32 507 <1> call hexword_high 508 <1> .noa32: 509 <1> call hexword 510 <1> %if _SDUMP 511 <1> testopt [options], ss_no_dump 512 <1> jnz @F 513 <1> stc 514 <1> adc eax, edx ; -> behind result 515 <1> jbe .386noresult ; end of segment 516 <1> mov esi, eax 517 <1> mov ax, 32<<8|32 518 <1> stosw 519 <1> lea bx, [di+3*16] 520 <1> mov ecx, esi 521 <1> neg ecx 522 <1> cmp ecx, byte 16 523 <1> jbe .386cxdone 524 <1> mov cx, 16 525 <1> .386cxdone: 526 <1> pop ds 527 <1> push ds ; restore search's segment 528 <1> push cx 529 <1> .386disploop: 530 <1> a32 lodsb 531 <1> call dd_store 532 <1> mov al, 32 533 <1> stosb 534 <1> loop .386disploop 535 <1> pop cx 536 <1> push ss 537 <1> pop ds 538 <1> neg cx 539 <1> add cx, byte 16 540 <1> jz .386noblanks 541 <1> .386loopblanks: 542 <1> mov ax, 32<<8|32 543 <1> stosw 544 <1> stosb 545 <1> loop .386loopblanks 546 <1> .386noblanks: 547 <1> mov byte [di-(1+(8*3))], '-' 548 <1> mov di, bx 549 <1> .386noresult: 550 <1> @@: 551 <1> %endif ; _SDUMP 552 <1> push dx 553 <1> call putsline_crlf 554 <1> call dohack 555 <1> pop dx 556 <1> pop es 557 <1> pop ds 558 <1> pop edi 559 <1> jmp .386next 560 <1> __CPU__ 561 <1> %endif ; _PM 4723 4724 4725 usesection lDEBUG_CODE 4726 4727 %if 0 4728 getdebuggeebyte: 4729 push bp 4730 mov bp, sp 4731 sub sp, byte 4 4732 push bx 4733 push cx 4734 %define _dedata -4 4735 %define _bp 0 4736 %define _ip 2 4737 %define _adroffset 4 4738 %define _adrsegment 8 4739 test byte [], memorydump 4740 jz .realmemory 4741 4742 jmp short .return 4743 .realmemory32: 4744 .realmemory: 4745 mov ax, word [ bp + _adrsegment ] 4746 mov bx, word [ bp + _adroffset ] 4747 push ds 4748 mov ds, ax 4749 push word [ bx ] 4750 pop word [ bp + _dedata ] 4751 push word [ bx +2 ] 4752 pop word [ bp + _dedata +2 ] 4753 pop ds 4754 ; test ax, ax 4755 ; jnz .return 4756 mov dx, ax 4757 mov cl, 4 4758 shl ax, cl 4759 mov cl, 12 4760 shr dx, cl 4761 add ax, bx 4762 adc dx, byte 0 4763 jnz .return 4764 sub ax, 23h*4 4765 jb .return 4766 cmp ax, 2*4 4767 jae .return 4768 4769 push ds 4770 xor bx, bx 4771 mov ds, bx 4772 push si 4773 push di 4774 mov si, 22h*4 4775 mov di, hackints.dummy22 4776 movsw 4777 movsw 4778 mov bl, 8 4779 add si, bx 4780 add di, bx 4781 movsw 4782 movsw 4783 4784 mov cl, byte [ bx - 4 + hackints2324 ] 4785 mov byte [ bp + _dedata ], cl 4786 .return: 4787 pop cx 4788 pop bx 4789 pop ax 4790 pop dx 4791 pop bp 4792 retn 6 4793 4794 4795 ; Interrupt hack table 4796 ; 4797 ; This contains the Int23 and Int24 handler we want to show 4798 ; the user. As we'll retrieve a dword per access, 4799 align 4, db 0 4800 hackints: 4801 .dummy22: dd 0 4802 .23: dd 0 4803 .24: dd 0 4804 .dummy25: dd 0 4805 %endif 4806 4807 4808 %include "ww.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug W commands (write sector, write program) 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2022 C. Masloch 8 <1> 9 <1> Usage of the works is permitted provided that this 10 <1> instrument is retained with the works, so that any entity 11 <1> that uses the works is notified of this instrument. 12 <1> 13 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 14 <1> 15 <1> %endif 16 <1> 17 <1> 18 <1> usesection lDEBUG_CODE 19 <1> 20 <1> lockdrive: 21 00009510 50 <1> push ax 22 00009511 53 <1> push bx 23 00009512 51 <1> push cx 24 00009513 52 <1> push dx 25 00009514 88C3 <1> mov bl, al 26 00009516 FEC3 <1> inc bl 27 00009518 B700 <1> mov bh, 0 28 0000951A B94A08 <1> mov cx, 084Ah 29 0000951D BA0100 <1> mov dx, 0001h 30 00009520 B80D44 <1> mov ax, 440Dh 31 00009523 CD21 <1> int 21h 32 00009525 5A <1> pop dx 33 00009526 59 <1> pop cx 34 00009527 5B <1> pop bx 35 00009528 58 <1> pop ax 36 00009529 C3 <1> retn 37 <1> 38 <1> unlockdrive: 39 0000952A 50 <1> push ax 40 0000952B 53 <1> push bx 41 0000952C 51 <1> push cx 42 0000952D 52 <1> push dx 43 0000952E 88C3 <1> mov bl, al 44 00009530 FEC3 <1> inc bl 45 00009532 B700 <1> mov bh, 0 46 00009534 B96A08 <1> mov cx, 086Ah 47 00009537 BA0100 <1> mov dx, 0001h 48 0000953A B80D44 <1> mov ax, 440Dh 49 0000953D CD21 <1> int 21h 50 0000953F 5A <1> pop dx 51 00009540 59 <1> pop cx 52 00009541 5B <1> pop bx 53 00009542 58 <1> pop ax 54 00009543 C3 <1> retn 55 <1> 56 <1> 57 <1> ; W command - write a program, or disk sectors, to disk. 58 <1> ww: 59 <1> %if _BOOTLDR 60 00009544 F606[C500]40 <1> testopt [internalflags], nodosloaded 61 00009549 7406 <1> jz @F 62 0000954B BA[655F] <1> mov dx, msg.nobootsupp 63 0000954E E9AF1C <1> jmp putsz 64 <1> @@: 65 <1> %endif 66 <1> 67 00009551 E8AA06 <1> call parselw ; parse L and W argument format 68 00009554 746A <1> jz ww4 ; if request to write program 69 <1> %if _PM && _NOEXTENDER 70 <1> call ispm 71 <1> jnz .rm 72 <1> call isextenderavailable 73 <1> jc nodosextinst 74 <1> .rm: 75 <1> %endif 76 00009556 36F606[C400]06 <1> testopt [ss:internalflags], newpacket| ntpacket 77 0000955C 742B <1> jz .oldint 78 0000955E 88C2 <1> mov dl, al ; A: = 0, ... 79 00009560 BE0160 <1> mov si, 6001h ; write, assume "file data" 80 <1> %if _VDD 81 00009563 F606[C400]04 <1> testopt [internalflags], ntpacket 82 00009568 7512 <1> jnz .vdd 83 <1> %endif 84 0000956A FEC2 <1> inc dl ; A: = 1, ... 85 0000956C E8A1FF <1> call lockdrive 86 0000956F B80573 <1> mov ax, 7305h ; ds:(e)bx-> packet 87 00009572 F9 <1> stc 88 00009573 CD21 <1> int 21h ; use int 21h here, not doscall 89 00009575 9C <1> pushf 90 00009576 E8B1FF <1> call unlockdrive 91 00009579 9D <1> popf 92 0000957A EB0F <1> jmp short .done 93 <1> %if _VDD 94 <1> .vdd: 95 0000957C A1[EC0A] <1> mov ax, word [hVdd] 96 0000957F B90500 <1> mov cx, 5 97 <1> %if _PM 98 <1> add cl, byte [dpmi32] 99 <1> %endif 100 00009582 C4C4580290 <1> DispatchCall 101 00009587 EB02 <1> jmp short .done 102 <1> %endif 103 <1> .oldint: 104 00009589 CD26 <1> int 26h 105 <1> .done: 106 0000958B BA[697C] <1> mov dx, writing 107 <1> ww1: 108 0000958E 8CD3 <1> mov bx, ss ; restore segment registers 109 00009590 8EDB <1> mov ds, bx 110 00009592 8B26[CC0A] <1> mov sp, word [savesp] 111 00009596 8EC3 <1> mov es, bx 112 00009598 7323 <1> jnc ww3 ; if no error 113 0000959A 3C0C <1> cmp al, 0Ch 114 0000959C 7602 <1> jbe ww2 ; if in range 115 0000959E B00C <1> mov al, 0Ch 116 <1> ww2: 117 000095A0 98 <1> cbw ; ah = 0 118 000095A1 BB[9A7B] <1> mov bx, dskerrs ; -> byte table 119 000095A4 D7 <1> xlatb ; get offset from dskerrs 120 000095A5 01D8 <1> add ax, bx ; -> message 121 000095A7 BF[AE07] <1> mov di, line_out 122 000095AA 89C6 <1> mov si, ax 123 000095AC E8FF17 <1> call showstring 124 000095AF 89D6 <1> mov si, dx 125 000095B1 E8FA17 <1> call showstring 126 000095B4 BE[6F7C] <1> mov si, drive 127 000095B7 E8F417 <1> call showstring 128 000095BA E8C818 <1> call putsline_crlf 129 <1> ww3: 130 000095BD E9406A <1> jmp cmd3 ; can't return because Int26 leaves stack wrong 131 <1> 132 <1> ; Write to file. First check the file extension. 133 <1> ; size of file is in client's BX:CX, 134 <1> ; default start address is DS:100h 135 <1> 136 <1> ww4: 137 000095C0 E8DA05 <1> call InDos 138 000095C3 7403E9FCF1 <1> jnz not_while_indos 139 <1> 140 000095C8 A0[D40B] <1> mov al, byte [fileext] ; get flags of file extension 141 000095CB A80C <1> test al, EXT_EXE + EXT_HEX 142 000095CD 7405 <1> jz ww5 ; if not EXE or HEX 143 000095CF BA[8B7E] <1> mov dx, nowhexe 144 000095D2 EB07 <1> jmp short ww6 145 <1> 146 <1> ww5: 147 000095D4 3C00 <1> cmp al, 0 148 000095D6 7506 <1> jnz ww7 ; if extension exists 149 000095D8 BA[B17E] <1> mov dx, nownull 150 <1> ww6: 151 000095DB E9CC00 <1> jmp ww16 152 <1> 153 <1> ; File extension is OK; write it. First, create the file. 154 <1> ww7: 155 <1> %if _PM 156 <1> call ispm 157 <1> jnz ww7_1 158 <1> mov dx, nopmsupp 159 <1> jmp putsz 160 <1> ww7_1: 161 <1> %endif 162 000095DE BD[AE07] <1> mov bp, line_out 163 000095E1 80FEFE <1> cmp dh, 0FEh 164 000095E4 7207 <1> jb ww8 ; if (dx < 0xFE00) 165 000095E6 80EEFE <1> sub dh, 0FEh ; dx -= 0xFE00; 166 000095E9 81C3E00F <1> add bx, 0FE0h 167 <1> ww8: 168 000095ED 89560A <1> mov word [bp+10], dx ; save lower part of address in line_out+10 169 000095F0 89DE <1> mov si, bx ; upper part goes into si 170 000095F2 B43C <1> mov ah, 3Ch ; create file 171 000095F4 31C9 <1> xor cx, cx ; no attributes 172 000095F6 BA8000 <1> mov dx, DTA 173 <1> doscall 2334 000095F9 CD21 <2> int 21h 174 000095FB 727C <1> jc ww15 ; if error 175 000095FD 50 <1> push ax ; save file handle 176 <1> 177 <1> ; Print message about writing. 178 000095FE BA[D47E] <1> mov dx, wwmsg1 179 00009601 E8FC1B <1> call putsz ; print string 180 00009604 A1[600C] <1> mov ax, word [reg_ebx] 181 00009607 83F810 <1> cmp ax, 10h 182 0000960A 7202 <1> jb ww9 ; if not too large 183 0000960C 31C0 <1> xor ax, ax ; too large: zero it out 184 <1> ww9: 185 0000960E 894608 <1> mov word [bp+8], ax 186 00009611 85C0 <1> test ax, ax 187 00009613 7403 <1> jz ww10 188 00009615 E84718 <1> call hexnyb 189 <1> ww10: 190 00009618 A1[640C] <1> mov ax, word [reg_ecx] 191 0000961B 894606 <1> mov word [bp+6], ax 192 0000961E E82C18 <1> call hexword 193 00009621 E86518 <1> call putsline ; print size 194 00009624 BA[DD7E] <1> mov dx, wwmsg2 195 00009627 E8D61B <1> call putsz ; print string 196 <1> 197 <1> ; Now write the file. Size remaining is in line_out+6. 198 0000962A 5B <1> pop bx ; recover file handle 199 0000962B 8B560A <1> mov dx, word [bp+10] ; address to write from is si:dx 200 <1> ww11: 201 0000962E B800FE <1> mov ax, 0FE00h 202 00009631 29D0 <1> sub ax, dx 203 00009633 807E0800 <1> cmp byte [bp+8], 0 204 00009637 7508 <1> jnz ww12 ; if more than 0FE00h bytes remaining 205 00009639 3B4606 <1> cmp ax, word [bp+6] 206 0000963C 7203 <1> jb ww12 ; ditto 207 0000963E 8B4606 <1> mov ax, word [bp+6] 208 <1> ww12: 209 00009641 91 <1> xchg ax, cx ; mov cx, ax 210 00009642 8EDE <1> mov ds, si 211 00009644 B440 <1> mov ah, 40h ; write to file 212 00009646 CD21 <1> int 21h ; use INT, not doscall 213 00009648 16 <1> push ss ; restore DS 214 00009649 1F <1> pop ds 215 0000964A 39C8 <1> cmp ax, cx 216 0000964C 7515 <1> jne ww13 ; if disk full 217 0000964E 31D2 <1> xor dx, dx ; next time write from xxxx:0 218 00009650 81C6E00F <1> add si, 0FE0h ; update segment pointer 219 00009654 294E06 <1> sub word [bp+6], cx 220 00009657 9F <1> lahf 221 00009658 805E0800 <1> sbb byte [bp+8], 0 222 0000965C 75D0 <1> jnz ww11 ; if more to go 223 0000965E 9E <1> sahf 224 0000965F 75CD <1> jnz ww11 ; ditto 225 00009661 EB11 <1> jmp short ww14 ; done 226 <1> 227 <1> ww13: 228 00009663 BA[E67E] <1> mov dx, diskful 229 00009666 E8971B <1> call putsz ; print string 230 00009669 E80800 <1> call ww14 ; close file 231 <1> 232 0000966C B441 <1> mov ah, 41h ; unlink file 233 0000966E BA8000 <1> mov dx, DTA 234 <1> doscall 2334 00009671 CD21 <2> int 21h 235 00009673 C3 <1> retn 236 <1> 237 <1> ; Close the file. 238 <1> ww14: 239 00009674 B43E <1> mov ah, 3Eh ; close file 240 00009676 CD21 <1> int 21h 241 00009678 C3 <1> retn 242 <1> 243 <1> ; Error opening file. This is also called by the load command. 244 <1> ww15: 245 00009679 83F802 <1> cmp ax, byte 2 246 0000967C BA[0C7F] <1> mov dx, doserr2 ; File not found 247 0000967F 7429 <1> je ww16 248 00009681 83F803 <1> cmp ax, byte 3 249 00009684 BA[1D7F] <1> mov dx, doserr3 ; Path not found 250 00009687 7421 <1> je ww16 251 00009689 83F805 <1> cmp ax, byte 5 252 0000968C BA[2E7F] <1> mov dx, doserr5 ; Access denied 253 0000968F 7419 <1> je ww16 254 00009691 83F808 <1> cmp ax, byte 8 255 00009694 BA[3E7F] <1> mov dx, doserr8 ; Insufficient memory 256 00009697 7411 <1> je ww16 257 00009699 83F80B <1> cmp ax, byte 11 258 0000969C BA[547F] <1> mov dx, doserr11 ; Invalid format 259 0000969F 7409 <1> je ww16 260 000096A1 BF[F87E] <1> mov di, openerr1 261 000096A4 E8A617 <1> call hexword 262 000096A7 BA[F27E] <1> mov dx, openerr ; Error ____ opening file 263 <1> ww16: 264 000096AA E9531B <1> jmp putsz 4809 4810 4811 usesection lDEBUG_CODE 4812 4813 %ifn _EMS 4814 xx: equ error 4815 %else 4816 ; X commands - manipulate EMS memory. 4817 ; 4818 ; Reference: 4819 ; http://www.nondot.org/sabre/os/files/MemManagement/LIMEMS41.txt 4820 4821 000096AD 3C3F xx: cmp al, '?' 4822 000096AF 741F je xhelp ; if a call for help 4823 000096B1 0C20 or al, TOLOWER 4824 000096B3 3C61 cmp al, 'a' 4825 000096B5 7423 je xa ; if XA command 4826 000096B7 3C64 cmp al, 'd' 4827 000096B9 7446 je xd ; if XD command 4828 000096BB 3C6D cmp al, 'm' 4829 000096BD 7503E97E00 je xm ; if XM command 4830 000096C2 3C72 cmp al, 'r' 4831 000096C4 7459 je xr ; if XR command 4832 000096C6 3C73 cmp al, 's' 4833 000096C8 7503E9A900 je xs ; if XS command 4834 000096CD E9EC01 jmp error 4835 4836 000096D0 AC xhelp: lodsb 4837 000096D1 E88E16 call chkeol 4838 000096D4 BA[EF5D] mov dx, msg.xhelp 4839 000096D7 E9261B jmp putsz ; print string and return 4840 4841 ; XA - Allocate EMS. 4842 000096DA E88201 xa: call emschk 4843 000096DD E89316 call skipcomma 4844 000096E0 E84915 call getword ; get argument into DX 4845 000096E3 E87C16 call chkeol ; expect end of line here 4846 000096E6 89D3 mov bx, dx 4847 4848 000096E8 B8005A mov ax, 5A00h ; use the EMS 4.0 version to alloc 0 pages 4849 000096EB 85DB test bx, bx 4850 000096ED 7402 jz short .nullcnt 4851 000096EF B443 mov ah, 43h ; allocate handle 4852 .nullcnt: 4853 000096F1 E83C01 call emscall 4854 000096F4 92 xchg ax, dx ; mov ax, dx 4855 000096F5 BF[6080] mov di, xaans1 4856 000096F8 E85217 call hexword 4857 000096FB BA[4F80] mov dx, xaans 4858 000096FE E9FF1A jmp putsz ; print string and return 4859 4860 ; XD - Deallocate EMS handle. 4861 00009701 E85B01 xd: call emschk 4862 00009704 E86C16 call skipcomma 4863 00009707 E82215 call getword ; get argument into DX 4864 0000970A E85516 call chkeol ; expect end of line here 4865 4866 0000970D B445 mov ah, 45h ; deallocate handle 4867 0000970F E81E01 call emscall 4868 00009712 92 xchg ax, dx ; mov ax,dx 4869 00009713 BF[6E80] mov di, xdans1 4870 00009716 E83417 call hexword 4871 00009719 BA[6780] mov dx, xdans 4872 0000971C E9E11A jmp putsz ; print string and return 4873 4874 ; XR - Reallocate EMS handle. 4875 0000971F E83D01 xr: call emschk 4876 00009722 E84E16 call skipcomma 4877 00009725 E80415 call getword ; get handle argument into DX 4878 00009728 89D3 mov bx, dx 4879 0000972A E84716 call skipcomm0 4880 0000972D E8FC14 call getword ; get count argument into DX 4881 00009730 E82F16 call chkeol ; expect end of line here 4882 00009733 87DA xchg bx, dx 4883 4884 00009735 B451 mov ah, 51h ; reallocate handle 4885 00009737 E8F600 call emscall 4886 0000973A BA[8180] mov dx, xrans 4887 0000973D E9C01A jmp putsz ; print string and return 4888 4889 ; XM - Map EMS memory to physical page. 4890 00009740 E81C01 xm: call emschk 4891 00009743 E82D16 call skipcomma 4892 00009746 E8E314 call getword ; get logical page (FFFFh means unmap) 4893 00009749 89D3 mov bx, dx ; save it in BX 4894 0000974B E82616 call skipcomm0 4895 0000974E E8E914 call getbyte ; get physical page (DL) 4896 00009751 52 push dx 4897 00009752 E81F16 call skipcomm0 4898 00009755 E8D414 call getword ; get handle into DX 4899 00009758 E80716 call chkeol ; expect end of line 4900 0000975B 58 pop ax ; recover physical page into AL 4901 0000975C 50 push ax 4902 0000975D B444 mov ah, 44h ; function 5 - map memory 4903 0000975F E8CE00 call emscall 4904 00009762 BF[A380] mov di, xmans1 4905 00009765 93 xchg ax, bx ; mov ax, bx 4906 00009766 E8E416 call hexword 4907 00009769 BF[C080] mov di, xmans2 4908 0000976C 58 pop ax 4909 0000976D E8E416 call hexbyte 4910 00009770 BA[9680] mov dx, xmans 4911 00009773 E98A1A jmp putsz ; print string and return 4912 4913 ; XS - Print EMS status. 4914 xs: 4915 00009776 E8E600 call emschk 4916 00009779 AC lodsb 4917 0000977A E8E515 call chkeol ; no arguments allowed 4918 4919 ; First print out the handles and handle sizes. This can be done either 4920 ; by trying all possible handles or getting a handle table. 4921 ; The latter is preferable, if it fits in memory. 4922 0000977D B44B mov ah, 4Bh ; function 12 - get handle count 4923 0000977F E8AE00 call emscall 4924 00009782 83FB42 cmp bx, (line_out_end-line_out)/4 4925 00009785 762B jbe short xs3 ; if we can do it by getting the table 4926 00009787 31D2 xor dx, dx ; handle 4927 4928 xs1: 4929 ; try EMS 4.0 function 5402h to get total number of handles 4930 00009789 B80254 mov ax, 5402h 4931 0000978C E8CB00 call emscall.witherrors 4932 0000978F 89D9 mov cx, bx ; cx = number of handles 4933 00009791 7403 jz @F 4934 4935 00009793 B9FF00 mov cx, 0FFh ; total number of handles (assumed) 4936 ; this does not match the prior code here, 4937 ; which used 100h handles assuming that 4938 ; 0FFh is the last valid handle number. 4939 ; however, if we assume that there are 0FFh 4940 ; valid handles then the last number is 0FEh! 4941 @@: 4942 4943 00009796 B44C mov ah, 4Ch ; function 13 - get handle pages 4944 00009798 E8BF00 call emscall.witherrors 4945 0000979B 750D jnz short .err 4946 0000979D 93 xchg ax, bx ; mov ax,bx 4947 0000979E E8D200 call hndlshow 4948 .cont: 4949 000097A1 42 inc dx ; increment handle number to access 4950 000097A2 7404 jz @F ; (if 0000h handles, do not loop forever) 4951 000097A4 39CA cmp dx, cx ; end of the loop ? 4952 000097A6 72E1 jb short xs1 ; if more to be done --> 4953 @@: 4954 000097A8 EB1F jmp short xs5 ; done with this part 4955 4956 .err: 4957 000097AA 80FC83 cmp ah, 83h ; no such handle? 4958 000097AD 74F2 je short .cont ; just skip --> 4959 000097AF E98300 jmp emscall.errorhandle ; if other error --> 4960 4961 ; Get the information in tabular form. 4962 xs3: 4963 000097B2 B44D mov ah, 4Dh ; function 14 - get all handle pages 4964 000097B4 BF[AE07] mov di, line_out 4965 000097B7 E87600 call emscall 4966 000097BA 85DB test bx, bx 4967 000097BC 740B jz short xs5 4968 000097BE 89FE mov si, di 4969 xs4: 4970 000097C0 AD lodsw 4971 000097C1 92 xchg ax, dx 4972 000097C2 AD lodsw 4973 000097C3 E8AD00 call hndlshow 4974 000097C6 4B dec bx 4975 000097C7 75F7 jnz short xs4 ; if more to go 4976 4977 xs5: 4978 000097C9 BA[0577] mov dx, crlf 4979 000097CC E8311A call putsz ; print string 4980 4981 ; Next print the mappable physical address array. 4982 ; The size of the array shouldn't be a problem. 4983 000097CF B80058 mov ax, 5800h ; function 25 - get mappable phys. address array 4984 000097D2 BF[AE07] mov di, line_out ; address to put array 4985 000097D5 E85800 call emscall 4986 000097D8 BA[4881] mov dx, xsnopgs 4987 000097DB E328 jcxz xs7 ; NO mappable pages! 4988 4989 000097DD 89FE mov si, di 4990 xs6: 4991 000097DF 51 push cx 4992 000097E0 AD lodsw 4993 000097E1 BF[0481] mov di, xsstr2b 4994 000097E4 E86616 call hexword 4995 000097E7 AD lodsw 4996 000097E8 BF[F780] mov di, xsstr2a 4997 000097EB E86616 call hexbyte 4998 000097EE BA[EC80] mov dx, xsstr2 4999 000097F1 E80C1A call putsz ; print string 5000 000097F4 59 pop cx ; end of loop 5001 000097F5 F6C101 test cl, 1 5002 000097F8 7406 jz short xs_nonl 5003 000097FA BA[0577] mov dx, crlf ; blank line 5004 000097FD E8001A call putsz ; print string 5005 xs_nonl: 5006 00009800 E2DD loop xs6 5007 00009802 BA[0577] mov dx, crlf ; blank line 5008 xs7: 5009 00009805 E8F819 call putsz ; print string 5010 5011 ; Finally, print the cumulative totals. 5012 00009808 B442 mov ah, 42h ; function 3 - get unallocated page count 5013 0000980A E82300 call emscall 5014 0000980D 89D0 mov ax, dx ; total pages available 5015 0000980F 29D8 sub ax, bx ; number of pages allocated 5016 00009811 BB[3E81] mov bx, xsstrpg 5017 00009814 E87300 call sumshow ; print the line 5018 00009817 B44B mov ah, 4Bh ; function 12 - get handle count 5019 00009819 E81400 call emscall 5020 0000981C 53 push bx ; number of handles allocated 5021 5022 ; try EMS 4.0 function 5402h to get total number of handles 5023 0000981D B80254 mov ax, 5402h 5024 00009820 E83700 call emscall.witherrors ; don't use emscall, this function may fail! 5025 00009823 89DA mov dx, bx 5026 00009825 7403 jz @F 5027 5028 00009827 BAFF00 mov dx, 0FFh ; total number of handles 5029 @@: 5030 0000982A 58 pop ax ; ax = number of handles allocated 5031 0000982B BB[4281] mov bx, xsstrhd 5032 0000982E EB5A jmp sumshow ; print the line 5033 5034 ; Call EMS 5035 emscall: 5036 00009830 E82700 call .witherrors 5037 00009833 7429 jz short .ret ; return if OK 5038 .errorhandle: 5039 00009835 88E0 mov al, ah 5040 00009837 3C8B cmp al, 8Bh 5041 00009839 7F0D jg short .ce2 ; if out of range (signed comparison intended) 5042 0000983B 98 cbw 5043 0000983C 89C3 mov bx, ax 5044 0000983E D1E3 shl bx, 1 5045 00009840 8B97[2C81] mov dx, word [emserrs+100h+bx] 5046 00009844 85D2 test dx, dx 5047 00009846 7528 jnz short .ce4 ; if there's a word there 5048 .ce2: 5049 00009848 BA[4480] mov dx, emserrx 5050 0000984B E8B219 call putsz 5051 0000984E BF[AE07] mov di, line_out 5052 00009851 E80016 call hexbyte 5053 00009854 E82E16 call putsline_crlf 5054 00009857 E9A667 jmp cmd3 ; quit 5055 5056 .witherrors: 5057 %if _PM 5058 call ispm 5059 jnz short .rm 5060 subcpu 286 5061 push word [ss:pspdbg] 5062 push 67h 5063 call intcall 5064 db __TEST_IMM16 ; (skip int opcode) 5065 subcpureset 5066 .rm: 5067 %endif 5068 0000985A CD67 int 67h 5069 0000985C 84E4 test ah, ah 5070 .ret: 5071 emschk.ret: 5072 0000985E C3 retn 5073 5074 5075 ; Check for EMS 5076 ; maybe should disable this while bootloaded ? 5077 emschk: 5078 0000985F B067 mov al, 67h 5079 00009861 E8322C call intchk ; ZR if offset = -1 or segment = 0 5080 ; CHG: ax, dx, bx 5081 00009864 7407 jz .failed 5082 00009866 B446 mov ah, 46h 5083 00009868 E8EFFF call emscall.witherrors ; get version 5084 0000986B 74F1 jz short .ret ; success --> 5085 .failed: 5086 0000986D BA[657F] mov dx, emsnot 5087 emscall.ce4: 5088 00009870 E9646C jmp prnquit ; otherwise abort with message --> 5089 5090 ; HNDLSHOW - Print XS line giving the handle and pages allocated. 5091 ; 5092 ; Entry DX Handle 5093 ; AX Number of pages 5094 ; 5095 ; Exit Line printed 5096 ; 5097 ; Uses ax, di 5098 hndlshow: 5099 00009873 BF[D580] mov di, xsstr1b 5100 00009876 E8D415 call hexword 5101 00009879 89D0 mov ax, dx 5102 0000987B BF[CC80] mov di, xsstr1a 5103 0000987E E8CC15 call hexword 5104 00009881 52 push dx 5105 00009882 BA[C580] mov dx, xsstr1 5106 00009885 E87819 call putsz ; print string 5107 00009888 5A pop dx 5108 00009889 C3 retn 5109 5110 ; SUMSHOW - Print summary line for XS command. 5111 ; 5112 ; Entry AX Number of xxxx's that have been used 5113 ; DX Total number of xxxx's 5114 ; BX Name of xxxx 5115 ; 5116 ; Exit String printed 5117 ; 5118 ; Uses AX, CX, DX, DI 5119 sumshow: 5120 0000988A BF[0B81] mov di, xsstr3 5121 0000988D 57 push di 5122 0000988E E81600 call trimhex 5123 00009891 92 xchg ax, dx ; mov ax,dx 5124 00009892 BF[1B81] mov di, xsstr3a 5125 00009895 E80F00 call trimhex 5126 00009898 5A pop dx ; mov dx,xsstr3 5127 00009899 E86419 call putsz ; print string 5128 0000989C 89DA mov dx, bx 5129 0000989E E85F19 call putsz ; print string 5130 000098A1 BA[2581] mov dx, xsstr4 5131 000098A4 E95919 jmp putsz ; print string and return 5132 5133 ; TRIMHEX - Print word without leading zeroes. 5134 ; 5135 ; Entry AX Number to print 5136 ; DI Where to print it 5137 ; 5138 ; Uses AX, CX, DI. 5139 trimhex: 5140 000098A7 E8A315 call hexword 5141 000098AA 83EF04 sub di, 4 ; back up DI to start of word 5142 000098AD B90300 mov cx, 3 5143 000098B0 B030 mov al, '0' 5144 .loop: 5145 000098B2 AE scasb 5146 000098B3 7506 jne .done ; return if not a '0' 5147 000098B5 C645FF20 mov byte [di-1], ' ' 5148 000098B9 E2F7 loop .loop 5149 .done: 5150 000098BB C3 retn 5151 %endif ; _EMS 5152 5153 ; Error handlers. 5154 error: 5155 000098BC 16 push ss 5156 000098BD 07 pop es 5157 000098BE 16 push ss 5158 000098BF 1F pop ds 5159 000098C0 89F1 mov cx, si 5160 000098C2 81E9[0300] sub cx, line_in+3 5161 000098C6 81F90001 cmp cx, 256 5162 000098CA 7705 ja .invalid 5163 000098CC 030E[300B] add cx, word [promptlen]; number of spaces to skip 5164 000098D0 A9 db __TEST_IMM16 ; (skip xor) 5165 .invalid: 5166 000098D1 31C9 xor cx, cx ; if we're really messed up 5167 000098D3 8B26[D60A] mov sp, [throwsp] 5168 000098D7 FF26[D40A] jmp near [throwret] 5169 ; INP: cx = number of spaces to indent 5170 5171 ; This is the default address in throwret. 5172 ; Display the error, then jump to errret. 5173 errhandler: 5174 000098DB E81423 call get_columns ; ax = columns 5175 .: 5176 000098DE 29C1 sub cx, ax 5177 000098E0 73FC jnc . 5178 000098E2 01C1 add cx, ax 5179 000098E4 7407 jz err2 5180 000098E6 B020 mov al, 32 5181 .loop: 5182 000098E8 E83719 call putc 5183 000098EB E2FB loop .loop 5184 err2: 5185 000098ED BA[FD76] mov dx, errcarat 5186 000098F0 E80D19 call putsz ; print string 5187 000098F3 B8FF01 mov ax, 01FFh 5188 000098F6 E80A00 call setrc 5189 000098F9 C706[D20B][4A04] mov word [lastcmd], dmycmd 5190 ; cancel command repetition 5191 000098FF FF26[D20A] jmp near [errret] ; return to the prompt (cmd3, aa01) 5192 5193 5194 setrc: 5195 00009903 833E[360B]00 cmp word [rc], 0 5196 00009908 7503 jne .ret 5197 0000990A A3[360B] mov word [rc], ax 5198 .ret: 5199 0000990D C3 retn 5200 5201 5202 ; Terminate the attached process, if any 5203 ; 5204 ; OUT: NZ if now no process attached 5205 ; ZR if still a process attached, 5206 ; ie we failed to terminate this one 5207 terminate_attached_process: 5208 0000990E F606[C600]80 testopt [internalflags], attachedterm 5209 00009913 752C jnz @F 5210 5211 00009915 8026[990C]FC clropt [reg_efl], 300h ; clear TF and IF 5212 0000991A 8C0E[880C] mov word [reg_cs], cs 5213 0000991E C706[940C][7D90] mov word [reg_eip], terminate_00 5214 00009924 50 push ax ; (dummy to take space for return address) 5215 00009925 8C16[840C] mov word [reg_ss], ss 5216 00009929 8926[6C0C] mov word [reg_esp], sp ; save current ss:sp 5217 0000992D 58 pop ax ; (discard) 5218 0000992E 31C0 xor ax, ax 5219 00009930 A3[960C] mov word [reg_eip+2], ax 5220 00009933 A3[6E0C] mov word [reg_esp+2], ax 5221 00009936 A3[9A0C] mov word [reg_efl+2], ax 5222 %if _PM 5223 mov word [reg_es], ax 5224 mov word [reg_ds], ax 5225 mov word [reg_fs], ax 5226 mov word [reg_gs], ax ; insure valid segregs in PM 5227 %endif 5228 00009939 E859A5 call run 5229 ; The dummy stack space above is to hold the return address 5230 ; of this call. The debugger stack is used by this run. 5231 5232 %if _SYMBOLIC 5233 clropt [internalflags2], dif2_createdprocess 5234 %endif 5235 0000993C F606[C600]80 testopt [internalflags], attachedterm 5236 @@: 5237 00009941 C3 retn 5238 5239 5240 %include "vv.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug code and command (V) to flip video screens 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2022 C. Masloch 8 <1> 9 <1> Usage of the works is permitted provided that this 10 <1> instrument is retained with the works, so that any entity 11 <1> that uses the works is notified of this instrument. 12 <1> 13 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 14 <1> 15 <1> %endif 16 <1> 17 <1> 18 <1> %if _VXCHG 19 <1> 20 <1> ;--- show debuggee screen, wait for a keypress, then restore debugger screen 21 <1> 22 <1> vv: 23 00009942 4E <1> dec si 24 00009943 BA[3E68] <1> mov dx, msg.on 25 00009946 E8A513 <1> call isstring? 26 00009949 750A <1> jne @F 27 <1> vv_on: 28 0000994B AC <1> lodsb 29 0000994C E81314 <1> call chkeol 30 0000994F 800E[A800]01 <1> setopt [options6], opt6_vv_mode 31 00009954 C3 <1> retn 32 <1> 33 <1> @@: 34 00009955 BA[4168] <1> mov dx, msg.off 35 00009958 E89313 <1> call isstring? 36 0000995B 752C <1> jne @F 37 <1> vv_off: 38 0000995D E84214 <1> call skipwhite 39 00009960 4E <1> dec si 40 00009961 BA[4A6C] <1> mov dx, msg.keep 41 00009964 E88713 <1> call isstring? 42 00009967 7505 <1> jne .notkeep 43 00009969 800E[A800]02 <1> setopt [options6], opt6_vv_keep 44 <1> .notkeep: 45 0000996E E83114 <1> call skipwhite 46 00009971 4E <1> dec si 47 00009972 BA[486C] <1> mov dx, msg.nokeep 48 00009975 E87613 <1> call isstring? 49 00009978 7505 <1> jne .notnokeep 50 0000997A 8026[A800]FD <1> clropt [options6], opt6_vv_keep 51 <1> .notnokeep: 52 0000997F AC <1> lodsb 53 00009980 E8DF13 <1> call chkeol 54 00009983 8026[A800]FE <1> clropt [options6], opt6_vv_mode 55 00009988 C3 <1> retn 56 <1> 57 <1> @@: 58 00009989 AC <1> lodsb 59 0000998A E8D513 <1> call chkeol 60 <1> 61 0000998D F606[D800]01 <1> testopt [internalflags6], dif6_vv_mode 62 00009992 7506 <1> jnz @F 63 00009994 BA[6868] <1> mov dx, msg.vv_disabled 64 00009997 E96618 <1> jmp putsz 65 <1> 66 <1> @@: 67 0000999A B000 <1> mov al, 0 68 0000999C E83500 <1> call swapscreen 69 0000999F 06 <1> push es 70 000099A0 B84000 <1> mov ax, 0040h ; swapscreen has restored cursor pos in BIOS variable 71 000099A3 8EC0 <1> mov es, ax ; but we also want to see it on the screen. 72 000099A5 268B165000 <1> mov dx, [es:50h] 73 000099AA 268A3E6200 <1> mov bh, [es:62h] 74 000099AF 07 <1> pop es 75 000099B0 B402 <1> mov ah, 2 ; set cursor pos 76 000099B2 CD10 <1> int 10h 77 <1> 78 000099B4 F606[A800]10 <1> testopt [options6], opt6_vv_int16 79 000099B9 750F <1> jnz .int16 80 <1> .terminal: 81 000099BB 800E[CC00]10 <1> setopt [internalflags3], dif3_input_terminal_override 82 <1> ; make sure we get terminal input 83 000099C0 E8A018 <1> call getc 84 000099C3 8026[CC00]EF <1> clropt [internalflags3], dif3_input_terminal_override 85 000099C8 EB04 <1> jmp @F 86 <1> 87 <1> .int16: 88 <1> ; mov ah, 10h 89 000099CA 31C0 <1> xor ax, ax 90 000099CC CD16 <1> int 16h 91 <1> @@: 92 <1> 93 000099CE B001 <1> mov al, 1 94 000099D0 E80100 <1> call swapscreen 95 000099D3 C3 <1> retn 96 <1> 97 <1> 98 <1> ;--- AL=0: save debugger screen, restore debuggee screen 99 <1> ;--- AL=1: save debuggee screen, restore debugger screen 100 <1> 101 <1> swapscreen: 102 000099D4 F606[D800]01 <1> testopt [internalflags6], dif6_vv_mode 103 000099D9 7442 <1> jz .done 104 <1> 105 000099DB BE[180B] <1> mov si, xmsmove 106 000099DE 837C0A00 <1> cmp word [si + XMSM.dsthdl], 0 107 000099E2 7439 <1> jz .done 108 <1> 109 000099E4 B10E <1> mov cl, 14 110 000099E6 D3E0 <1> shl ax, cl ; 0 -> 0000, 1 -> 4000h 111 000099E8 89440C <1> mov word [si + XMSM.dstadr], ax 112 000099EB B84000 <1> mov ax, 40h ; bimodal selector/segment 113 000099EE 8EC0 <1> mov es, ax 114 000099F0 26A14C00 <1> mov ax, [es:4Ch] 115 000099F4 8904 <1> mov word [si + XMSM.size_], ax 116 000099F6 26A14E00 <1> mov ax, [es:4Eh] 117 000099FA 894406 <1> mov word [si + XMSM.srcadr + 0], ax 118 <1> 119 000099FD 26A15000 <1> mov ax, [es:50h]; cursor pos 120 00009A01 8706[280B] <1> xchg ax, [csrpos] 121 00009A05 26A35000 <1> mov [es:50h], ax 122 <1> 123 00009A09 B40B <1> mov ah, 0Bh 124 00009A0B E82C00 <1> call runxms 125 00009A0E E80D00 <1> call swapsrcdst 126 00009A11 80740740 <1> xor byte [si + XMSM.srcadr + 1], 40h 127 00009A15 B40B <1> mov ah, 0Bh 128 00009A17 E82000 <1> call runxms 129 00009A1A E80100 <1> call swapsrcdst 130 <1> ; xor byte [si + XMSM.dstadr + 1], 40h 131 <1> .done: 132 00009A1D C3 <1> retn 133 <1> 134 <1> swapsrcdst: 135 00009A1E 8B4404 <1> mov ax, [si + XMSM.srchdl] 136 00009A21 8B4C06 <1> mov cx, word [si + XMSM.srcadr + 0] 137 00009A24 8B5408 <1> mov dx, word [si + XMSM.srcadr + 2] 138 00009A27 87440A <1> xchg ax, [si + XMSM.dsthdl] 139 00009A2A 874C0C <1> xchg cx, word [si + XMSM.dstadr + 0] 140 00009A2D 87540E <1> xchg dx, word [si + XMSM.dstadr + 2] 141 00009A30 894404 <1> mov [si + XMSM.srchdl], ax 142 00009A33 894C06 <1> mov word [si + XMSM.srcadr + 0], cx 143 00009A36 895408 <1> mov word [si + XMSM.srcadr + 2], dx 144 00009A39 C3 <1> retn 145 <1> runxms: 146 00009A3A 1E <1> push ds 147 00009A3B 07 <1> pop es 148 <1> %if _PM 149 <1> call ispm 150 <1> jz @F 151 <1> %endif 152 00009A3C FF1E[140B] <1> call far [xmsdrv] 153 00009A40 C3 <1> retn 154 <1> %if _PM 155 <1> @@: 156 <1> %ifn _ONLYNON386 157 <1> _no386 jmp .286 158 <1> subcpu 386 159 <1> push dword 0 ; ss:sp 160 <1> push dword [xmsdrv] 161 <1> ; cs:ip 162 <1> push dword 0 ; fs,gs 163 <1> push word [pspdbg] 164 <1> ; ds 165 <1> push word 0 ; es 166 <1> pushf 167 <1> pushad 168 <1> mov edi, esp 169 <1> xor cx, cx 170 <1> mov bh, 0 171 <1> mov ax, 0301h 172 <1> int 31h 173 <1> popad 174 <1> add sp, 50 - 32 ; sizeof RMCS - 32 175 <1> ; ie discard fl, segregs, cs:ip, ss:sp 176 <1> retn 177 <1> subcpureset 178 <1> %endif 179 <1> %ifn _ONLY386 180 <1> .286: 181 <1> subcpu 286 182 <1> push word 0 183 <1> push word 0 ; ss:sp 184 <1> push word [xmsdrv + 2] 185 <1> push word [xmsdrv] 186 <1> ; cs:ip 187 <1> push word 0 188 <1> push word 0 ; fs,gs 189 <1> push word [pspdbg] 190 <1> ; ds 191 <1> push word 0 ; es 192 <1> pushf 193 <1> push word 0 194 <1> push ax 195 <1> push word 0 196 <1> push cx 197 <1> push word 0 198 <1> push dx 199 <1> push word 0 200 <1> push bx 201 <1> push word 0 202 <1> push word 0 203 <1> push word 0 ; esp 204 <1> push bp 205 <1> push word 0 206 <1> push si 207 <1> push word 0 208 <1> push di 209 <1> mov di, sp 210 <1> xor cx, cx 211 <1> mov bh, 0 212 <1> mov ax, 0301h 213 <1> int 31h 214 <1> pop di 215 <1> pop ax 216 <1> pop si 217 <1> pop ax 218 <1> pop bp 219 <1> pop ax 220 <1> pop ax ; esp 221 <1> pop ax 222 <1> pop bx 223 <1> pop ax 224 <1> pop dx 225 <1> pop ax 226 <1> pop cx 227 <1> pop ax 228 <1> pop ax ; ax 229 <1> add sp, 50 - 32 + 2 ; sizeof RMCS - 32 + 2 230 <1> ; ie discard eaxh and fl, segregs, cs:ip, ss:sp 231 <1> retn 232 <1> subcpureset 233 <1> %endif 234 <1> %endif 235 <1> 236 <1> vv_set: 237 00009A41 F606[A800]01 <1> testopt [options6], opt6_vv_mode 238 00009A46 7508 <1> jnz .checkenable 239 <1> 240 <1> .checkdisable: 241 00009A48 F606[D800]01 <1> testopt [internalflags6], dif6_vv_mode 242 00009A4D 757C <1> jnz vv_disable 243 00009A4F C3 <1> retn 244 <1> 245 <1> .checkenable: 246 00009A50 F606[D800]01 <1> testopt [internalflags6], dif6_vv_mode 247 00009A55 7401 <1> jz vv_enable 248 <1> .ret: 249 00009A57 C3 <1> retn 250 <1> 251 <1> vv_enable: 252 00009A58 B02F <1> mov al, 2Fh 253 00009A5A E8392A <1> call intchk 254 00009A5D 745F <1> jz .noxmm 255 <1> 256 00009A5F B80043 <1> mov ax, 4300h ; check if XMM is here 257 <1> %if _PM 258 <1> call .call2F 259 <1> %else 260 00009A62 CD2F <1> int 2Fh 261 <1> %endif 262 00009A64 3C80 <1> cmp al, 80h 263 00009A66 7556 <1> jnz .noxmm ; no - no screen flip 264 00009A68 B81043 <1> mov ax, 4310h 265 <1> %if _PM 266 <1> call .call2F 267 <1> mov word [xmsdrv + 0], bx 268 <1> mov word [xmsdrv + 2], dx 269 <1> %else 270 00009A6B CD2F <1> int 2Fh 271 00009A6D 891E[140B] <1> mov word [xmsdrv + 0], bx 272 00009A71 8C06[160B] <1> mov word [xmsdrv + 2], es 273 <1> %endif 274 <1> 275 00009A75 BA2000 <1> mov dx, 32 ; alloc 32 KiB EMB 276 00009A78 B409 <1> mov ah, 9 277 00009A7A E8BDFF <1> call runxms 278 00009A7D 83F801 <1> cmp ax, 1 279 00009A80 753C <1> jnz .noxmm 280 00009A82 BE[180B] <1> mov si, xmsmove 281 00009A85 89540A <1> mov [si + XMSM.dsthdl], dx ; save the handle in block move struct. 282 00009A88 C6440D40 <1> mov byte [si + XMSM.dstadr + 1], 40h 283 <1> ; the XMS memory will be used to 284 <1> ; save/restore 2 screens, with a max 285 <1> ; capacity per screen of 16 KiB 286 00009A8C B84000 <1> mov ax, 40h ; bi-modal segment/selector 287 00009A8F 8EC0 <1> mov es, ax 288 00009A91 26A14C00 <1> mov ax, [es:4Ch] ; current screen size, might change! 289 00009A95 8904 <1> mov word [si + XMSM.size_], ax 290 00009A97 26A14E00 <1> mov ax, [es:4Eh] ; page start in video memory 291 00009A9B 894406 <1> mov word [si + XMSM.srcadr + 0], ax 292 00009A9E C7440800B8 <1> mov word [si + XMSM.srcadr + 2], 0B800h 293 <1> ; neither page start nor page base 294 <1> ; are currently tracked! 295 00009AA3 26A15000 <1> mov ax, [es:50h] 296 00009AA7 A3[280B] <1> mov [csrpos], ax 297 00009AAA 26A08400 <1> mov al, [es:84h] 298 00009AAE A2[2A0B] <1> mov [vrows], al 299 00009AB1 B40B <1> mov ah, 0Bh ; save current screen now 300 00009AB3 E884FF <1> call runxms 301 <1> 302 00009AB6 800E[D800]01 <1> setopt [internalflags6], dif6_vv_mode 303 00009ABB 1E <1> push ds 304 00009ABC 07 <1> pop es 305 00009ABD C3 <1> retn 306 <1> 307 <1> .noxmm: 308 00009ABE 8026[A800]FE <1> clropt [options6], opt6_vv_mode 309 00009AC3 1E <1> push ds 310 00009AC4 07 <1> pop es 311 00009AC5 BA[4568] <1> mov dx, msg.vv_enable_failure 312 00009AC8 E93517 <1> jmp putsz 313 <1> 314 <1> %if _PM 315 <1> .call2F: 316 <1> call ispm 317 <1> jz @F 318 <1> push es 319 <1> int 2Fh 320 <1> mov dx, es 321 <1> pop es 322 <1> retn 323 <1> 324 <1> @@: 325 <1> subcpu 286 326 <1> push word [pspdbg] 327 <1> push word [pspdbg] 328 <1> push word 2Fh 329 <1> push bp 330 <1> call intcall_return_parameter_es_parameter_ds 331 <1> pop dx ; discard returned ds 332 <1> pop dx ; get es 333 <1> subcpureset 334 <1> retn 335 <1> %endif 336 <1> 337 <1> vv_disable: 338 00009ACB 8B16[220B] <1> mov dx, word [xmsmove + XMSM.dsthdl] 339 00009ACF 85D2 <1> test dx, dx 340 00009AD1 741B <1> jz @F 341 00009AD3 F606[A800]02 <1> testopt [options6], opt6_vv_keep 342 00009AD8 7507 <1> jnz .keep 343 00009ADA 52 <1> push dx 344 00009ADB B000 <1> mov al, 0 ; restore debuggee screen 345 00009ADD E8F4FE <1> call swapscreen 346 00009AE0 5A <1> pop dx 347 <1> .keep: 348 00009AE1 B40A <1> mov ah, 0Ah ; and free XMS handle 349 00009AE3 E854FF <1> call runxms 350 00009AE6 31C0 <1> xor ax, ax 351 00009AE8 A3[220B] <1> mov word [xmsmove + XMSM.dsthdl], ax 352 00009AEB A3[1C0B] <1> mov word [xmsmove + XMSM.srchdl], ax 353 <1> 354 <1> @@: 355 00009AEE 8026[D800]FE <1> clropt [internalflags6], dif6_vv_mode 356 00009AF3 C3 <1> retn 357 <1> %else 358 <1> 359 <1> vv equ error 360 <1> 361 <1> %endif 5241 5242 5243 %if _DEVICE && _DEVICE_SET_2324 5244 usesection lDEBUG_DATA_ENTRY 5245 devint23: 5246 00009047 F9 stc 5247 00009048 CB retf 5248 5249 devint24: 5250 00009049 B003 mov al, 3 5251 0000904B CF iret 5252 5253 usesection lDEBUG_CODE 5254 %endif 5255 5256 5257 ;--- this is called by "run" 5258 ;--- better don't use INTs inside 5259 ;--- set debuggee's INT 23/24 5260 5261 ; Low-level functions to reset to debuggee's interrupt vectors 23h/24h 5262 ; INP: - 5263 ; OUT: - 5264 ; CHG: bx, (e)dx, cx, ax 5265 ; STT: ds = our segment 5266 ; Do not use Int21, even if not in InDOS mode 5267 setint2324: 5268 %if _BOOTLDR 5269 00009AF4 F606[C500]40 testopt [internalflags], nodosloaded 5270 00009AF9 7514 jnz .ret ; don't touch int23/24 --> 5271 %endif 5272 %if _PM 5273 call ispm 5274 jz .pm 5275 %endif 5276 00009AFB 06 push es 5277 00009AFC 57 push di 5278 00009AFD 56 push si 5279 5280 00009AFE 31FF xor di, di 5281 00009B00 8EC7 mov es, di 5282 00009B02 BF8C00 mov di, 23h *4 5283 00009B05 BE[E40A] mov si, run2324 5284 00009B08 A5 movsw 5285 00009B09 A5 movsw 5286 00009B0A A5 movsw 5287 00009B0B A5 movsw 5288 5289 %if _PM 5290 call hook2F 5291 %endif 5292 00009B0C 5E pop si 5293 00009B0D 5F pop di 5294 00009B0E 07 pop es 5295 .ret: 5296 00009B0F C3 retn 5297 %if _PM 5298 .pm: 5299 push si 5300 mov si, run2324 5301 mov bx, 0223h 5302 .loop: 5303 _386_o32 ; mov edx, dword [si+0] 5304 mov dx, word [si+0] 5305 mov cx, word [si+4] 5306 mov ax, 0205h 5307 int 31h 5308 add si, 6 5309 inc bl 5310 dec bh 5311 jnz .loop 5312 pop si 5313 retn 5314 %endif 5315 5316 ; Low-level functions to save debuggee's interrupt vectors 23h/24h 5317 ; and set our interrupt vectors instead 5318 ; INP: - 5319 ; OUT: - 5320 ; CHG: - 5321 ; STT: ds = our segment 5322 ; Do not use Int21, even if not in InDOS mode 5323 getint2324: 5324 %if _BOOTLDR 5325 00009B10 F606[C500]40 testopt [internalflags], nodosloaded 5326 00009B15 7525 jnz .ret ; don't touch int23/24 --> 5327 %endif 5328 %if _PM 5329 call ispm 5330 jz .pm 5331 %endif 5332 00009B17 56 push si 5333 00009B18 57 push di 5334 00009B19 06 push es 5335 5336 00009B1A 1E push ds 5337 00009B1B 07 pop es 5338 00009B1C 31FF xor di, di 5339 00009B1E 8EDF mov ds, di 5340 00009B20 BF[E40A] mov di, run2324 5341 00009B23 BE8C00 mov si, 23h *4 5342 00009B26 56 push si 5343 00009B27 A5 movsw ; save interrupt vector 23h 5344 00009B28 A5 movsw 5345 00009B29 A5 movsw ; save interrupt vector 24h 5346 00009B2A A5 movsw 5347 00009B2B 5F pop di 5348 00009B2C 06 push es 5349 00009B2D 1F pop ds 5350 00009B2E 31F6 xor si, si 5351 00009B30 8EC6 mov es, si 5352 00009B32 BE0E00 mov si, CCIV 5353 00009B35 A5 movsw 5354 00009B36 A5 movsw 5355 00009B37 A5 movsw 5356 00009B38 A5 movsw 5357 5358 00009B39 07 pop es 5359 00009B3A 5F pop di 5360 00009B3B 5E pop si 5361 .ret: 5362 00009B3C C3 retn 5363 %if _PM 5364 subcpu 286 5365 .pm: 5366 _386_o32 5367 pusha 5368 mov di, run2324 5369 mov bx, 0223h 5370 .loop: 5371 mov ax, 0204h 5372 int 31h 5373 _386_o32 ; mov dword [di+0], edx 5374 mov word [di+0], dx 5375 mov word [di+4], cx 5376 add di, byte 6 5377 inc bl 5378 dec bh 5379 jnz .loop 5380 %if _ONLYNON386 5381 db __TEST_IMM8 ; (skip pusha) 5382 %else 5383 db __TEST_IMM16 ; (skip pushad) 5384 %endif 5385 5386 restoredbgi2324: 5387 setdbgi2324: 5388 _386_o32 5389 pusha 5390 mov si, dbg2324 5391 mov bx, 0223h 5392 _386 xor edx, edx 5393 .loop: 5394 lodsw 5395 mov dx, ax 5396 mov cx, word [cssel] 5397 mov ax, 0205h 5398 int 31h 5399 inc bl 5400 dec bh 5401 jnz .loop 5402 _386_o32 5403 popa 5404 retn 5405 subcpureset 5406 %endif 5407 5408 %if 0 5409 The next three subroutines concern the handling of Int23 and 24. 5410 These interrupt vectors are saved and restored when running the 5411 child process, but are not active when DEBUG itself is running. 5412 It is still useful for the programmer to be able to check where Int23 5413 and 24 point, so these values are copied into the interrupt table 5414 during parts of the C, D, (DX, DI,) E, M, and S commands, so that 5415 they appear to be in effect. The E command also copies these values 5416 back. 5417 5418 Between calls to dohack and unhack, there should be no calls to DOS, 5419 so that there is no possibility of these vectors being used when 5420 DEBUG itself is running. 5421 5422 ; As long as no DOS is loaded anyway, Int23 and Int24 won't be touched 5423 by us, so the whole hack is unnecessary and will be skipped. 5424 %endif 5425 5426 ; PREPHACK - Set up for interrupt vector substitution. 5427 ; Entry es = cs 5428 prephack: 5429 00009B3D 803E[F80A]00 cmp byte [hakstat], 0 5430 00009B42 7509 jne .err ; if hack status error --> 5431 00009B44 57 push di 5432 00009B45 BF[F00A] mov di, sav2324 ; debugger's Int2324 5433 00009B48 E80B00 call prehak1 5434 00009B4B 5F pop di 5435 00009B4C C3 retn 5436 5437 .err: 5438 00009B4D 52 push dx 5439 00009B4E BA[3E7E] mov dx, ph_msg 5440 00009B51 E8AC16 call putsz ; display error 5441 00009B54 5A pop dx 5442 00009B55 C3 retn 5443 5444 ; INP: di-> saved interrupt vectors 5445 ; OUT: - 5446 ; CHG: - 5447 prehak1: 5448 %if _PM 5449 call ispm 5450 jz .pm ; nothing to do 5451 %endif 5452 00009B56 1E push ds 5453 00009B57 56 push si 5454 00009B58 31F6 xor si, si 5455 00009B5A 8EDE mov ds, si 5456 00009B5C BE8C00 mov si, 23h *4 5457 00009B5F A5 movsw 5458 00009B60 A5 movsw 5459 00009B61 A5 movsw 5460 00009B62 A5 movsw 5461 00009B63 5E pop si 5462 00009B64 1F pop ds 5463 .pm: 5464 00009B65 C3 retn 5465 5466 5467 ; DOHACK - Fake the interrupt vectors 23h and 24h to debuggee's 5468 ; UNHACK - Restore interrupt vectors 23h and 24h to our values 5469 ; It's OK to do either of these twice in a row. 5470 ; In particular, the S command may do unhack twice in a row. 5471 ; INP: ds = our segment 5472 ; OUT: es = our segment 5473 ; CHG: - 5474 ; STT: Do not use Int21 5475 dohack: 5476 00009B66 16 push ss 5477 00009B67 07 pop es 5478 %if _BOOTLDR 5479 00009B68 F606[C500]40 testopt [internalflags], nodosloaded 5480 00009B6D 752D jnz unhack.ret ; nothing to hack --> 5481 %endif 5482 00009B6F 56 push si 5483 00009B70 C606[F80A]01 mov byte [hakstat], 1 5484 00009B75 BE[E40A] mov si, run2324 ; debuggee's interrupt vectors 5485 %if _PM 5486 call ispm 5487 jnz unhack.common 5488 subcpu 286 5489 _386_o32 5490 pusha 5491 mov bx, 0223h 5492 .pm_loop: 5493 _386_o32 5494 mov dx, word [si+0+0] 5495 mov cx, word [si+0+4] 5496 mov ax, 205h 5497 int 31h 5498 add si, byte 6 5499 inc bl 5500 dec bh 5501 jnz .pm_loop 5502 _386_o32 5503 popa 5504 pop si 5505 retn 5506 subcpureset 5507 %else 5508 00009B78 EB12 jmp short unhack.common 5509 %endif 5510 5511 unhack: 5512 00009B7A 16 push ss 5513 00009B7B 07 pop es 5514 %if _BOOTLDR 5515 00009B7C F606[C500]40 testopt [internalflags], nodosloaded 5516 00009B81 7519 jnz .ret ; nothing to hack --> 5517 %endif 5518 00009B83 C606[F80A]00 mov byte [hakstat], 0 5519 %if _PM 5520 call ispm 5521 jz restoredbgi2324 5522 %endif 5523 00009B88 56 push si 5524 00009B89 BE[F00A] mov si, sav2324 ; debugger's interrupt vectors 5525 .common: 5526 00009B8C 57 push di 5527 00009B8D 06 push es 5528 00009B8E 31FF xor di, di 5529 00009B90 8EC7 mov es, di 5530 00009B92 BF8C00 mov di, 23h *4 5531 00009B95 A5 movsw 5532 00009B96 A5 movsw 5533 00009B97 A5 movsw 5534 00009B98 A5 movsw 5535 00009B99 07 pop es 5536 00009B9A 5F pop di 5537 00009B9B 5E pop si 5538 .ret: 5539 00009B9C C3 retn 5540 5541 5542 ; OUT: NZ if InDOS mode 5543 ; ZR if not 5544 ; CHG: - 5545 ; STT: ss = ds 5546 InDos: 5547 %if _BOOTLDR 5548 00009B9D F606[C500]40 testopt [internalflags], nodosloaded 5549 00009BA2 7517 jnz .return ; always "in DOS" --> 5550 %endif 5551 00009BA4 F606[9400]08 testopt [options], fakeindos 5552 00009BA9 7510 jnz .return ; faking InDOS on anyway --> 5553 .real_indos: 5554 00009BAB 1E push ds 5555 00009BAC 56 push si 5556 00009BAD BE[080B] mov si, pInDOS + so16aSegSel 5557 00009BB0 E80900 call update_dosdata_segment 5558 00009BB3 C574FE lds si, [si - so16aSegSel] 5559 00009BB6 803C00 cmp byte [si], 0 5560 00009BB9 5E pop si 5561 00009BBA 1F pop ds 5562 .return: 5563 00009BBB C3 retn 5564 5565 5566 ; INP: si -> word seg or sel, word segment, word selector 5567 update_dosdata_segment: 5568 00009BBC F606[CB00]20 testopt [internalflags2], dif2_int31_segment 5569 00009BC1 740D jz .ret 5570 00009BC3 52 push dx 5571 00009BC4 50 push ax 5572 00009BC5 53 push bx 5573 00009BC6 B031 mov al, 31h 5574 00009BC8 E8B028 call get_86m_interrupt_handler_no_dos 5575 %if _PM 5576 cmp word [si + soaSegment], dx 5577 je @F 5578 5579 call ispm 5580 jnz .realmode 5581 5582 mov bx, dx 5583 mov ax, 0002h 5584 int 31h 5585 5586 mov word [si + soaSegSel], ax 5587 mov word [si + soaSelector], ax 5588 jmp @F 5589 5590 .realmode: 5591 mov word [si + soaSegSel], dx 5592 and word [si + soaSelector], 0 5593 5594 @@: 5595 mov word [si + soaSegment], dx 5596 pop bx 5597 pop ax 5598 %else 5599 00009BCB 5B pop bx 5600 00009BCC 58 pop ax 5601 00009BCD 8914 mov word [si + soaSegSel], dx 5602 %endif 5603 00009BCF 5A pop dx 5604 .ret: 5605 00009BD0 C3 retn 5606 5607 5608 ; PARSECM - Parse command line for C and M commands. 5609 ; Entry AL First nonwhite character of parameters 5610 ; SI Address of the character after that 5611 ; Exit DS:ESI Address from first parameter 5612 ; ES:EDI Address from second parameter 5613 ; ECX Length of address range minus one 5614 ; [bAddr32] Set if any high word non-zero 5615 5616 parsecm: 5617 00009BD1 E869FF call prephack 5618 00009BD4 8B1E[7C0C] mov bx, word [reg_ds] ; get source range 5619 00009BD8 31C9 xor cx, cx 5620 00009BDA E8D200 call getrange ; get address range into bx:(e)dx bx:(e)cx 5621 00009BDD 53 push bx ; save segment first address 5622 00009BDE E89311 call skipcomm0 5623 00009BE1 8B1E[7C0C] mov bx, word [reg_ds] 5624 _386_PM_o32 ; sub ecx, edx 5625 00009BE5 29D1 sub cx, dx ; number of bytes minus one 5626 _386_PM_o32 ; push edx 5627 00009BE7 52 push dx 5628 _386_PM_o32 ; push ecx 5629 00009BE8 51 push cx 5630 %if _PM 5631 mov cl, byte [bAddr32] 5632 push cx 5633 call getaddr ; get destination address into bx:edx 5634 pop cx 5635 or byte [bAddr32], cl ; if either is 32-bit, handle both as 32-bit 5636 %else 5637 00009BE9 E87701 call getaddr ; get destination address into bx:dx 5638 %endif 5639 _386_PM_o32 5640 00009BEC 59 pop cx ; pop ecx 5641 _386_PM_o32 ; mov edi, edx 5642 00009BED 89D7 mov di, dx 5643 _386_PM_o32 5644 00009BEF 01CA add dx, cx ; add edx, ecx 5645 00009BF1 7208 jc short errorj7 ; if it wrapped around 5646 00009BF3 E86C11 call chkeol ; expect end of line 5647 00009BF6 8EC3 mov es, bx 5648 _386_PM_o32 ; pop esi 5649 00009BF8 5E pop si 5650 00009BF9 1F pop ds 5651 00009BFA C3 retn 5652 5653 errorj7: 5654 00009BFB E9BEFC jmp error 5655 5656 ; PARSELW - Parse command line for L and W commands. 5657 ; 5658 ; Entry AL First nonwhite character of parameters 5659 ; SI Address of the character after that 5660 ; 5661 ; Exit If there is at most one argument (program load/write), then the 5662 ; zero flag is set, and registers are set as follows: 5663 ; bx:(e)dx Transfer address 5664 ; 5665 ; If there are more arguments (absolute disk read/write), then the 5666 ; zero flag is clear, and registers are set as follows: 5667 ; 5668 ; DOS versions prior to 3.31: 5669 ; AL Drive number 5670 ; CX Number of sectors to read 5671 ; DX Beginning logical sector number 5672 ; DS:BX Transfer address 5673 ; 5674 ; Later DOS versions: 5675 ; AL Drive number 5676 ; BX Offset of packet 5677 ; CX 0FFFFh 5678 5679 usesection lDEBUG_DATA_ENTRY 5680 align 4, db 0 5681 0000904C 00000000 packet: dd 0 ; sector number 5682 00009050 0000 dw 0 ; number of sectors to read 5683 00009052 00000000 dd 0 ; transfer address Segm:OOOO 5684 %if _PM 5685 dw 0 ; transfer address might be Segm:OOOOOOOO! 5686 %endif 5687 5688 usesection lDEBUG_CODE 5689 parselw: 5690 00009BFE 8B1E[880C] mov bx, word [reg_cs] ; default segment 5691 00009C02 6631D2 _386 xor edx, edx 5692 00009C05 BA0001 mov dx, 100h ; default offset 5693 00009C08 E84211 call iseol? 5694 00009C0B 7468 je plw2 ; if no arguments 5695 00009C0D E85301 call getaddr ; get buffer address into bx:(e)dx 5696 00009C10 E86111 call skipcomm0 5697 00009C13 E83711 call iseol? 5698 00009C16 745D je plw2 ; if only one argument 5699 00009C18 53 push bx ; save segment 5700 00009C19 52 push dx ; save offset 5701 00009C1A BB8000 mov bx, 80h ; max number of sectors to read 5702 00009C1D F7DA neg dx 5703 00009C1F 7406 jz plw1 ; if address is zero 5704 00009C21 B109 mov cl, 9 5705 00009C23 D3EA shr dx, cl ; max number of sectors which can be read 5706 00009C25 89D7 mov di, dx 5707 plw1: 5708 00009C27 803C3A cmp byte [si], ':' ; drive letter specification ? 5709 00009C2A 750F jne @F ; no --> 5710 5711 00009C2C 50 push ax 5712 00009C2D E88AE5 call uppercase 5713 00009C30 2C41 sub al, 'A' 5714 00009C32 3C20 cmp al, 32 ; valid drive ? 5715 00009C34 88C2 mov dl, al ; put drive number 5716 00009C36 46 inc si ; -> past the colon 5717 00009C37 58 pop ax 5718 00009C38 7205 jb @FF ; got it --> 5719 00009C3A 4E dec si ; -> at colon 5720 5721 @@: 5722 00009C3B E8FC0F call getbyte ; get drive number (DL) 5723 00009C3E A8 db __TEST_IMM8 ; (skip lodsb) 5724 @@: 5725 00009C3F AC lodsb 5726 00009C40 E83111 call skipcomm0 5727 00009C43 52 push dx 5728 00009C44 80C241 add dl, 'A' 5729 00009C47 8816[797C] mov byte [driveno], dl 5730 00009C4B E8160B call getdword ; get relative sector number 5731 00009C4E E82311 call skipcomm0 5732 00009C51 53 push bx ; save sector number high 5733 00009C52 52 push dx ; save sector number low 5734 00009C53 56 push si ; in case we find an error 5735 00009C54 E8D50F call getword ; get sector count 5736 00009C57 4A dec dx 5737 00009C58 39FA cmp dx, di 5738 00009C5A 739F jae errorj7 ; if too many sectors 5739 00009C5C 42 inc dx 5740 00009C5D 89D1 mov cx, dx 5741 00009C5F E80011 call chkeol ; expect end of line 5742 00009C62 F606[C400]07 testopt [internalflags], oldpacket| newpacket| ntpacket 5743 00009C67 750D jnz plw3 ; if using a packet --> 5744 00009C69 5E pop si ; in case of error 5745 00009C6A 5A pop dx ; get LoWord starting logical sector number 5746 00009C6B 5B pop bx ; get HiWord 5747 00009C6C 85DB test bx, bx ; just a 16-bit sector number possible 5748 00009C6E 758B jnz errorj7 ; if too big 5749 00009C70 58 pop ax ; drive number 5750 00009C71 5B pop bx ; transfer buffer ofs 5751 00009C72 1F pop ds ; transfer buffer seg 5752 00009C73 85C9 test cx, cx ; NZ 5753 plw2: 5754 00009C75 C3 retn 5755 5756 ; disk I/O packet for Int25/Int26, Int21.7305, VDD 5757 plw3: 5758 00009C76 5B pop bx ; discard si 5759 00009C77 BB[4C90] mov bx, packet 5760 00009C7A 8F07 pop word [bx+0] ; LoWord sector number 5761 00009C7C 8F4702 pop word [bx+2] ; HiWord sector number 5762 00009C7F 894F04 mov word [bx+4], cx ; number of sectors 5763 00009C82 58 pop ax ; drive number 5764 00009C83 8F4706 pop word [bx+6] ; transfer address ofs 5765 00009C86 5A pop dx 5766 00009C87 31C9 xor cx, cx 5767 %if _PM 5768 call ispm 5769 jnz plw3_1 5770 cmp byte [dpmi32], 0 5771 jz plw3_1 5772 [cpu 386] 5773 mov word [bx+10], dx ; save segment of transfer buffer 5774 movzx ebx, bx 5775 shr edx, 16 ; get HiWord(offset) 5776 cmp byte [bAddr32], 1 5777 jz plw3_1 5778 xor dx, dx 5779 __CPU__ 5780 plw3_1: 5781 %endif 5782 00009C89 895708 mov word [bx+8], dx ; transfer address seg 5783 00009C8C 49 dec cx ; NZ and make cx = -1 5784 00009C8D C3 retn 5785 5786 5787 %include "expr.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug expression evaluator 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2012 C. Masloch 8 <1> 9 <1> Usage of the works is permitted provided that this 10 <1> instrument is retained with the works, so that any entity 11 <1> that uses the works is notified of this instrument. 12 <1> 13 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 14 <1> 15 <1> %endif 16 <1> 17 <1> 18 <1> usesection lDEBUG_CODE 19 <1> 20 <1> ;--- get a valid offset for segment in BX 21 <1> 22 <1> ; INP: bx = segment 23 <1> ; al = first character, si -> next character 24 <1> ; ah = 1 if might be a segment or pointer 25 <1> ; ah = 0 if must be an offset 26 <1> ; OUT: CY if pointer type return, bx:dx = pointer 27 <1> ; DebugX on a 386: 28 <1> ; edx = offset (even if 16-bit PM/86M segment) 29 <1> ; ah = 1 if a 32-bit segment, 0 if a 16-bit segment 30 <1> ; DebugX otherwise: 31 <1> ; dx = offset 32 <1> ; ah = 0 33 <1> ; Debug: 34 <1> ; dx = offset 35 <1> ; al, si refer to next part of command line 36 <1> ; CHG: Debug: ah, DebugX: - 37 <1> ; REM: The byte [bAddr32] is no longer changed by this 38 <1> ; function. The caller has to use the status that 39 <1> ; is returned in ah, if desired. 40 <1> getofsforbx: 41 00009C8E 51 <1> push cx ; preserve 42 00009C8F 53 <1> push bx ; preserve 43 00009C90 88E5 <1> mov ch, ah ; ch = 0 if must be an offset 44 <1> %if _PM 45 <1> _386 xor edx, edx ; properly initialize high word 46 <1> call test_d_b_bit 47 <1> jz .16 ; 16-bit segment --> 48 <1> [cpu 386] 49 <1> call getdword 50 <1> push bx 51 <1> push dx 52 <1> pop edx ; edx = 32-bit offset 53 <1> call checkpointer 54 <1> mov ah, 1 ; return 32-bit offset flag 55 <1> jmp .ret_pop_NC 56 <1> __CPU__ 57 <1> %endif 58 <1> 59 <1> .16: 60 00009C92 E8CF0A <1> call getexpression 61 00009C95 E80700 <1> call checkpointer 62 00009C98 E8960F <1> call getword.checksignificantbits 63 <1> %if _PM 64 <1> mov ah, 0 ; return 16-bit offset flag 65 <1> %endif 66 <1> .ret_pop_NC: 67 00009C9B 5B <1> pop bx 68 00009C9C 59 <1> pop cx ; restore 69 00009C9D F8 <1> clc 70 00009C9E C3 <1> retn 71 <1> 72 <1> checkpointer: 73 00009C9F 84E4 <1> test ah, ah ; pointer type ? 74 00009CA1 7908 <1> jns .ret ; no --> 75 00009CA3 84ED <1> test ch, ch ; can be a pointer or segment ? 76 00009CA5 7405 <1> jz errorj10 ; no --> 77 00009CA7 59 <1> pop cx ; discard a near return address 78 00009CA8 59 <1> pop cx ; discard bx 79 00009CA9 59 <1> pop cx ; restore cx 80 <1> %if _PM 81 <1> _386 movzx edx, dx ; edx = dx 82 <1> mov ah, 0 ; always treat as 16-bit offset 83 <1> %endif 84 00009CAA F9 <1> stc ; return a pointer type 85 00009CAB C3 <1> .ret: retn 86 <1> 87 00009CAC E90DFC <1> errorj10: jmp error 88 <1> 89 <1> 90 <1> ; GETRANGE - Get address range from input line. 91 <1> ; a range consists of either start and end address 92 <1> ; or a start address, a 'L' and a length. 93 <1> ; Entry AL First character of range 94 <1> ; SI Address of next character 95 <1> ; BX Default segment to use 96 <1> ; CX Default length to use (or 0 if not allowed) 97 <1> ; Exit AL First character beyond range 98 <1> ; SI Address of the character after that 99 <1> ; BX:(E)DX First address in range 100 <1> ; BX:(E)CX Last address in range 101 <1> ; Uses AH 102 <1> 103 <1> getrangeX: 104 <1> %if _PM 105 <1> clropt [internalflags3], dif3_accept_getrange_0 106 <1> _386 movzx ecx, cx 107 <1> .ecx_and_0_valid: 108 <1> _386_PM_o32 109 <1> push cx 110 <1> call getaddrX 111 <1> jmp short getrange.common 112 <1> %else 113 <1> .ecx_and_0_valid: equ getrange.ecx_and_0_valid 114 <1> %endif 115 <1> 116 <1> getrange: 117 00009CAF 8026[CF00]FB <1> clropt [internalflags3], dif3_accept_getrange_0 118 <1> _386_PM movzx ecx, cx 119 <1> .ecx_and_0_valid: 120 <1> _386_PM_o32 121 00009CB4 51 <1> push cx ; save the default length 122 00009CB5 E8AB00 <1> call getaddr ; get address into bx:(e)dx (sets bAddr32) (returns edx) 123 <1> .common: 124 00009CB8 56 <1> push si 125 00009CB9 E8B810 <1> call skipcomm0 126 00009CBC E88E10 <1> call iseol? 127 00009CBF 751C <1> jne gr2 128 00009CC1 5E <1> pop si ; restore si and cx 129 <1> _386_PM_o32 130 00009CC2 59 <1> pop cx 131 00009CC3 4E <1> dec si ; restore al 132 00009CC4 AC <1> lodsb 133 00009CC5 F606[CF00]04 <1> testopt [internalflags3], dif3_accept_getrange_0 134 00009CCA 7502 <1> jnz @F 135 <1> _386_PM_a32 136 00009CCC E3DE <1> jcxz errorj10 ; if a range is mandatory 137 <1> @@: 138 00009CCE 30E4 <1> xor ah, ah 139 <1> gr3.addcheck: 140 <1> _386_PM cmp byte [bAddr32], 0 141 <1> _386_PM je .16 142 <1> _386_PM dec ecx 143 <1> _386_PM add ecx, edx 144 <1> _386_PM jnc gr1 ; if no wraparound 145 <1> _386_PM or ecx, byte -1 ; go to end of segment 146 <1> _386_PM jmp short .checkgr3 147 <1> .16: 148 <1> _386_PM cmp ecx, 0FFFFh ; was high ? 149 <1> _386_PM jbe @F ; no --> (ecxh = 0) 150 <1> _386_PM xor ecx, ecx ; ecxh = 0 and prepare so as to 151 <1> ; result in cx = FFFFh after dec 152 <1> @@: 153 00009CD0 49 <1> dec cx 154 00009CD1 01D1 <1> add cx, dx 155 00009CD3 7307 <1> jnc gr1 ; if no wraparound 156 00009CD5 B9FFFF <1> mov cx, -1 ; go to end of segment 157 <1> .checkgr3: 158 00009CD8 84E4 <1> test ah, ah 159 00009CDA 75D0 <1> jnz short errorj10 ; if specified length wrapped --> 160 <1> gr1: 161 00009CDC C3 <1> retn 162 <1> 163 <1> gr2: 164 <1> _386_PM add sp, byte 2 ; for the ecxh on stack 165 00009CDD 83C404 <1> add sp, byte 4 ; discard saved cx, si 166 00009CE0 E8D7E4 <1> call uppercase 167 00009CE3 3C4C <1> cmp al, 'L' 168 00009CE5 740E <1> je gr3 ; if a range is given 169 <1> ; call skipwh0 ; get next nonblank 170 <1> _386_PM_o32 ; xchg ecx, edx 171 00009CE7 87CA <1> xchg cx, dx 172 00009CE9 B400 <1> mov ah, 0 ; must be offset 173 00009CEB E8A0FF <1> call getofsforbx_remember_bitness 174 <1> ; (DebugX: returns edx no matter what) 175 <1> _386_PM_o32 ; xchg ecx, edx 176 00009CEE 87CA <1> xchg cx, dx 177 <1> _386_PM_o32 ; cmp edx, ecx 178 00009CF0 39CA <1> cmp dx, cx 179 00009CF2 776C <1> ja errorj2 ; if empty range --> 180 00009CF4 C3 <1> retn 181 <1> 182 <1> gr3: 183 00009CF5 4E <1> dec si ; -> at 'L' 184 00009CF6 52 <1> push dx 185 00009CF7 BA[3168] <1> mov dx, msg.length 186 00009CFA E8F10F <1> call isstring? 187 00009CFD 5A <1> pop dx 188 00009CFE 7501 <1> jne .notlength 189 00009D00 A8 <1> db __TEST_IMM8 ; (skip inc, si -> terminator after "LENGTH") 190 <1> .notlength: 191 00009D01 46 <1> inc si ; -> behind 'L' 192 00009D02 E86E10 <1> call skipcomma ; discard the 'L' 193 <1> ;--- a range is entered with the L/ength argument 194 <1> ;--- get a valid length for segment in BX 195 00009D05 52 <1> push dx 196 00009D06 53 <1> push bx 197 <1> _386_PM call test_d_b_bit 198 <1> _386_PM pushf 199 00009D07 E85A0A <1> call getdword 200 <1> 201 00009D0A 4E <1> dec si 202 00009D0B 52 <1> push dx 203 00009D0C B90400 <1> mov cx, 4 ; shift count = 4 (do times 16) 204 00009D0F BA[1368] <1> mov dx, msg.paragraphs 205 00009D12 E8D90F <1> call isstring? 206 00009D15 7422 <1> je .gotsize 207 00009D17 BA[1E68] <1> mov dx, msg.paras 208 00009D1A E8D10F <1> call isstring? 209 00009D1D 741A <1> je .gotsize 210 00009D1F B102 <1> mov cl, 2 ; shift count = 2 (do times 4) 211 00009D21 BA[2468] <1> mov dx, msg.dwords 212 00009D24 E8C70F <1> call isstring? 213 00009D27 7410 <1> je .gotsize 214 00009D29 49 <1> dec cx ; shift count = 1 215 00009D2A BA[2568] <1> mov dx, msg.words 216 00009D2D E8BE0F <1> call isstring? 217 00009D30 7407 <1> je .gotsize 218 00009D32 49 <1> dec cx ; shift count = 0 219 00009D33 BA[2B68] <1> mov dx, msg.bytes 220 00009D36 E8B50F <1> call isstring? 221 <1> ; je .gotsize 222 <1> .gotsize: ; si -> terminator after length unit 223 <1> ; (or -> after expression if no unit) 224 00009D39 5A <1> pop dx 225 00009D3A E30B <1> jcxz .noshift ; "BYTES" or no unit given --> 226 <1> .shiftloop: 227 00009D3C D1E2 <1> shl dx, 1 228 00009D3E D1D3 <1> rcl bx, 1 229 00009D40 7303E977FB <1> jc error ; too large --> 230 00009D45 E2F5 <1> loop .shiftloop ; loop shifting (if it was shift count 2 or 4) 231 <1> .noshift: 232 00009D47 AC <1> lodsb ; al = next character, si -> after that 233 <1> _386_PM popf 234 <1> _386_PM jz .not16_64kib ; don't check for <= 64 KiB 235 00009D48 83FB01 <1> cmp bx, byte 1 236 00009D4B 7206 <1> jb .not16_64kib ; < 64 KiB in 16-bit segment --> 237 00009D4D 7511 <1> jne short errorj2 ; 16-bit segment, above 64 KiB --> 238 00009D4F 85D2 <1> test dx, dx 239 00009D51 750D <1> jnz short errorj2 ; 16-bit segment, above 64 KiB --> 240 <1> .not16_64kib: 241 <1> %if _PM 242 <1> _386 push bx ; (only push high word on 386+) 243 <1> push dx 244 <1> _386_o32 ; pop ecx ; mov ecx, bxdx 245 <1> pop cx ; mov cx, dx 246 <1> %else 247 00009D53 89D1 <1> mov cx, dx 248 <1> %endif 249 00009D55 09D3 <1> or bx, dx ; zero ? 250 00009D57 7407 <1> jz short errorj2 ; yes, error --> 251 00009D59 5B <1> pop bx 252 00009D5A 5A <1> pop dx 253 00009D5B B401 <1> mov ah, 1 254 00009D5D E970FF <1> jmp .addcheck 255 <1> 256 <1> %ifn _PM 257 <1> errorj2: 258 00009D60 E959FB <1> jmp error 259 <1> %endif 260 <1> 261 <1> 262 <1> ; GETADDR - Get address from input line. 263 <1> ; Entry AL First character of address 264 <1> ; SI Address of next character 265 <1> ; BX Default segment to use 266 <1> ; Exit AL First character beyond address 267 <1> ; SI Address of the character after that 268 <1> ; BX:(E)DX Address found 269 <1> ; Uses AH,CX 270 <1> 271 <1> getaddr: 272 <1> %if _PM 273 <1> call getaddrX 274 <1> jmp verifysegm ; make BX a writeable segment 275 <1> 276 <1> ; getaddrX differs from getaddr in that BX is not ensured 277 <1> ; to be writeable in PM. 278 <1> ; 279 <1> ; For DEBUG without PM support, getaddr is getaddrX. Both don't return CF. 280 <1> 281 <1> getaddrX: 282 <1> mov byte [bAddr32], 0 283 <1> cmp al, '$' ; a real-mode segment? 284 <1> jne ga1_1 285 <1> lodsb 286 <1> 287 <1> _386 xor edx, edx ; edxh = 0 288 <1> call getexpression 289 <1> test ah, ah ; pointer type ? 290 <1> jns @F 291 <1> 292 <1> call ispm ; need to translate ? 293 <1> jnz .ret ; no --> 294 <1> ; bx = segment 295 <1> ; after falling through we get bx:(e)dx = segmented address 296 <1> 297 <1> seg_bx_to_sel: equ $ ; (no base for local labels) 298 <1> push ax 299 <1> mov ax, 0002h 300 <1> int 31h 301 <1> jc short errorj2 302 <1> mov bx, ax ; bx = segment 303 <1> pop ax 304 <1> .ret: 305 <1> retn 306 <1> 307 <1> @@: 308 <1> call getword.checksignificantbits 309 <1> call ispm ; need to translate ? 310 <1> jnz .checkseg ; no --> 311 <1> mov bx, dx 312 <1> call seg_bx_to_sel 313 <1> mov dx, bx 314 <1> .checkseg: 315 <1> push si 316 <1> call skipwh0 317 <1> cmp al, ':' ; was a segment at all? 318 <1> je ga2_2 ; yes --> 319 <1> errorj2: 320 <1> jmp error 321 <1> %else 322 <1> getaddrX: 323 00009D63 3C24 <1> cmp al, '$' 324 00009D65 7517 <1> jne ga1_1 325 00009D67 AC <1> lodsb 326 00009D68 E8F909 <1> call getexpression 327 00009D6B 84E4 <1> test ah, ah ; pointer type ? 328 00009D6D 780E <1> js .ret ; return bx:dx = segmented address 329 00009D6F 50 <1> push ax ; (unused) 330 00009D70 E8BE0E <1> call getword.checksignificantbits 331 00009D73 E82D10 <1> call skipwh0 332 00009D76 3C3A <1> cmp al, ':' 333 00009D78 7417 <1> je ga2_2 334 00009D7A E93FFB <1> jmp error 335 <1> 336 <1> .ret: 337 00009D7D C3 <1> retn 338 <1> %endif 339 <1> ga1_1: 340 00009D7E B401 <1> mov ah, 1 ; might be a pointer type 341 00009D80 E80BFF <1> call getofsforbx 342 00009D83 720B <1> jc .ret 343 00009D85 56 <1> push si 344 00009D86 E81A10 <1> call skipwh0 345 00009D89 3C3A <1> cmp al, ':' 346 00009D8B 7404 <1> je ga2 ; if this is a segment/selector --> 347 00009D8D 5E <1> pop si 348 00009D8E 4E <1> dec si 349 00009D8F AC <1> lodsb 350 <1> .ret: 351 <1> %if _PM 352 <1> jmp short remember_bitness 353 <1> ; remember 32-bitness (only if no segment) 354 <1> %else 355 00009D90 C3 <1> retn 356 <1> %endif 357 <1> 358 <1> ga2: 359 <1> _386_PM cmp edx, 0001_0000h ; segment/selector fits in word ? 360 <1> _386_PM jae short errorj2 ; no --> 361 <1> ga2_2: 362 00009D91 58 <1> pop ax ; throw away saved si 363 00009D92 89D3 <1> mov bx, dx ; mov segment into BX 364 00009D94 E80B10 <1> call skipwhite ; skip to next word 365 00009D97 B400 <1> mov ah, 0 ; must be an offset 366 <1> %if _PM 367 <1> getofsforbx_remember_bitness: 368 <1> call getofsforbx 369 <1> remember_bitness: 370 <1> or byte [bAddr32], ah ; remember 32-bitness 371 <1> retn 372 <1> %else 373 00009D99 E9F2FE <1> jmp getofsforbx 374 <1> 375 <1> getofsforbx_remember_bitness: equ getofsforbx 376 <1> %endif 377 <1> 378 <1> 379 <1> ; GETSTR - Get string of bytes. Put the answer in line_out. 380 <1> ; Entry AL first character 381 <1> ; SI address of next character 382 <1> ; Exit [line_out] first byte of string 383 <1> ; DI address of last+1 byte of string 384 <1> ; Uses AX,CL,DL,SI 385 <1> 386 <1> getstr: 387 00009D9C BF[AE07] <1> mov di, line_out 388 00009D9F E8AB0F <1> call iseol? 389 00009DA2 74BC <1> je short errorj2 ; we don't allow empty byte strings 390 <1> gs1: 391 00009DA4 3C27 <1> cmp al, "'" 392 00009DA6 740C <1> je gs2 ; if string 393 00009DA8 3C22 <1> cmp al, '"' 394 00009DAA 7408 <1> je gs2 ; ditto 395 00009DAC E88B0E <1> call getbyte ; byte in DL 396 00009DAF 8815 <1> mov byte [di], dl ; store the byte 397 00009DB1 47 <1> inc di 398 00009DB2 EB14 <1> jmp short gs6 399 <1> 400 <1> gs2: 401 00009DB4 88C4 <1> mov ah, al ; save quote character 402 <1> gs3: 403 00009DB6 AC <1> lodsb 404 00009DB7 38E0 <1> cmp al, ah 405 00009DB9 7408 <1> je gs5 ; if possible end of string 406 00009DBB E8930F <1> call iseol?.notsemicolon 407 00009DBE 74A0 <1> je short errorj2 ; if end of line 408 <1> gs4: 409 00009DC0 AA <1> stosb ; save character and continue 410 00009DC1 EBF3 <1> jmp short gs3 411 <1> 412 <1> gs5: 413 00009DC3 AC <1> lodsb 414 00009DC4 38E0 <1> cmp al, ah 415 00009DC6 74F8 <1> je gs4 ; if doubled quote character 416 <1> gs6: 417 00009DC8 E8A90F <1> call skipcomm0 ; go back for more 418 00009DCB E87F0F <1> call iseol? 419 00009DCE 75D4 <1> jne gs1 ; if not done yet 420 <1> .ret: 421 00009DD0 C3 <1> retn 422 <1> 423 <1> isbracketorunaryoperator?: 424 00009DD1 E80900 <1> call isunaryoperator? 425 00009DD4 7406 <1> je .yes 426 <1> %if _INDIRECTION 427 00009DD6 3C5B <1> cmp al, '[' 428 00009DD8 7402 <1> je .yes 429 <1> %endif 430 00009DDA 3C28 <1> cmp al, '(' 431 <1> .yes: 432 00009DDC C3 <1> retn 433 <1> 434 <1> 435 <1> ; Is al one of the simple unary operators? 436 <1> ; OUT: NZ if not 437 <1> ; ZR if so, 438 <1> ; NC 439 <1> ; cx = index into unaryoperators 440 <1> isunaryoperator?: 441 00009DDD 57 <1> push di 442 00009DDE BF[8890] <1> mov di, unaryoperators 443 00009DE1 EB04 <1> jmp short isoperator?.common 444 <1> 445 <1> ; See previous description. 446 <1> isoperator?: 447 00009DE3 57 <1> push di 448 00009DE4 BF[7290] <1> mov di, operators 449 <1> .common: 450 00009DE7 8B0D <1> mov cx, word [di] 451 00009DE9 51 <1> push cx 452 00009DEA AF <1> scasw 453 00009DEB F2AE <1> repne scasb 454 00009DED 5F <1> pop di 455 00009DEE 7507 <1> jne .no 456 00009DF0 F7D9 <1> neg cx 457 00009DF2 01F9 <1> add cx, di 458 00009DF4 49 <1> dec cx 459 00009DF5 38C0 <1> cmp al, al ; NC, ZR 460 <1> .no: 461 00009DF7 5F <1> pop di 462 00009DF8 C3 <1> retn 463 <1> 464 <1> 465 <1> ; INP: al = character 466 <1> ; OUT: al = capitalised character 467 <1> ; ZR, NC if a separator 468 <1> ; NZ if no separator 469 <1> isseparator?: 470 <1> .: 471 00009DF9 E8BEE3 <1> call uppercase 472 00009DFC 51 <1> push cx 473 <1> %if _EXPRESSIONS 474 00009DFD 3C41 <1> cmp al, 'A' 475 00009DFF 7204 <1> jb @F 476 00009E01 3C5A <1> cmp al, 'Z' 477 00009E03 7605 <1> jbe @FF 478 <1> @@: 479 00009E05 E8DBFF <1> call isoperator? ; normal operators are separators (also handles equality sign) 480 00009E08 740A <1> je .yes ; if match --> (ZR, NC) 481 <1> @@: 482 <1> %endif 483 00009E0A 57 <1> push di 484 00009E0B BF[9096] <1> mov di, separators 485 00009E0E 8B0D <1> mov cx, word [di] 486 00009E10 AF <1> scasw 487 00009E11 F2AE <1> repne scasb ; ZR, NC on match, NZ else 488 00009E13 5F <1> pop di 489 <1> .yes: 490 00009E14 59 <1> pop cx 491 00009E15 C3 <1> retn 492 <1> 493 <1> ; INP: al = character 494 <1> ; OUT: al = capitalised character 495 <1> ; ZR, NC if a separator (not L or dot) 496 <1> ; NZ if no separator (including L or dot) 497 <1> .except_L_or_dot: 498 00009E16 E8A1E3 <1> call uppercase 499 00009E19 3C2E <1> cmp al, '.' 500 00009E1B 7404 <1> je .ret_NZ 501 00009E1D 3C4C <1> cmp al, 'L' 502 00009E1F 75D8 <1> jne . 503 <1> .ret_NZ: 504 00009E21 84C0 <1> test al, al 505 00009E23 C3 <1> retn 506 <1> 507 <1> 508 <1> ; Does one of the type operators start in input? 509 <1> ; 510 <1> ; INP: al = first character 511 <1> ; si-> next character 512 <1> ; OUT: Iff NC, 513 <1> ; bx>>1 = offset into typebitmasks and typehandlers tables 514 <1> ; bx&1 = set iff signed type 515 <1> ; di-> behind the type operator 516 <1> ; CHG: bx, cx, di 517 <1> ; 518 <1> ; Note: Signed types are specified by an S prefix to 519 <1> ; the type names. Only non-address types can 520 <1> ; be signed (that is, offset, segment, and 521 <1> ; pointer cannot be signed). 522 <1> ; Types can be specified with abbreviated names, 523 <1> ; except where that would clash with numeric 524 <1> ; input or a register name or ambiguity would 525 <1> ; be caused. These cases are: 526 <1> ; SS, S (short, seg, signed, ss) 527 <1> ; B (byte, numeric 0Bh) 528 <1> ; C (char, numeric 0Ch) 529 <1> ; D (dword, numeric 0Dh) 530 <1> ; 3 (3byte, numeric 3) 531 <1> ; 3B (3byte, numeric 3Bh) 532 <1> ; CH (char, register ch) 533 <1> istype?: 534 <1> %if maxtypesize & 1 535 00009E24 B90800 <1> mov cx, maxtypesize+1 ; = maximum count + 1 536 <1> %else 537 <1> mov cx, maxtypesize ; = maximum count 538 <1> %endif 539 <1> ; cx is even here! 540 00009E27 52 <1> push dx 541 00009E28 50 <1> push ax 542 00009E29 56 <1> push si 543 <1> 544 00009E2A 29CC <1> sub sp, cx ; allocate name buffer 545 00009E2C 89E7 <1> mov di, sp ; -> name buffer 546 00009E2E 57 <1> push di 547 00009E2F 31DB <1> xor bx, bx ; initialise count 548 <1> %ifn maxtypesize & 1 549 <1> inc cx ; = maximum count + 1 550 <1> %endif 551 <1> ; The +1 does not represent an off-by-one 552 <1> ; because the below loop stores to the 553 <1> ; buffer at the beginning of subsequent 554 <1> ; iterations, after checking cx. 555 <1> 556 00009E31 A9 <1> db __TEST_IMM16 ; (skip stosb and lodsb) 557 <1> .storename: 558 00009E32 AA <1> stosb ; store in name buffer 559 00009E33 AC <1> lodsb ; get next character to check 560 00009E34 E883E3 <1> call uppercase 561 00009E37 51 <1> push cx 562 00009E38 E896FF <1> call isbracketorunaryoperator? ; terminator ? 563 00009E3B 59 <1> pop cx 564 00009E3C 7413 <1> je .endname 565 00009E3E E80C0F <1> call iseol? 566 00009E41 740E <1> je .endname 567 00009E43 3C20 <1> cmp al, 32 568 00009E45 740A <1> je .endname 569 00009E47 3C09 <1> cmp al, 9 570 00009E49 7406 <1> je .endname ; yes --> 571 <1> ; We don't check for digits here. 572 <1> ; Immediate values and variables 573 <1> ; must leave a space inbetween. 574 00009E4B 43 <1> inc bx ; count characters 575 00009E4C E2E4 <1> loop .storename ; count remaining buffer space 576 <1> ; Here, the potential name was too 577 <1> ; long for a valid type name. 578 00009E4E F9 <1> stc 579 00009E4F EB1F <1> jmp short .done ; --> 580 <1> 581 <1> .endname: 582 00009E51 E84F0F <1> call skipwh0 ; skip to next field 583 00009E54 4E <1> dec si ; -> behind potential name 584 00009E55 5F <1> pop di ; -> name buffer 585 00009E56 89D9 <1> mov cx, bx ; cx = length 586 00009E58 56 <1> push si ; save position in input line 587 00009E59 89FE <1> mov si, di ; si-> name buffer 588 00009E5B 53 <1> push bx 589 00009E5C 57 <1> push di 590 00009E5D F8 <1> clc ; indicate unsigned check 591 00009E5E E81900 <1> call isunsignedtype? ; matches an unsigned type ? 592 00009E61 5E <1> pop si 593 00009E62 59 <1> pop cx 594 00009E63 730B <1> jnc .done ; yes --> 595 <1> 596 00009E65 AC <1> lodsb ; al = first, si-> second character 597 00009E66 49 <1> dec cx ; cx = length less one 598 00009E67 3C53 <1> cmp al, 'S' ; first character an "S" ? 599 00009E69 F9 <1> stc ; (indicate signed check, or: no type) 600 00009E6A 7504 <1> jne .done ; no, not signed either --> 601 00009E6C E80B00 <1> call isunsignedtype? ; matches an unsigned type now ? 602 00009E6F 43 <1> inc bx ; if NC, set to indicate signed type 603 <1> .done: 604 00009E70 9F <1> lahf 605 00009E71 5F <1> pop di ; if NC, -> behind matched type name 606 00009E72 83C408 <1> add sp, (maxtypesize+1) & ~1 ; discard name buffer 607 00009E75 5E <1> pop si 608 00009E76 9E <1> sahf 609 00009E77 58 <1> pop ax 610 00009E78 5A <1> pop dx 611 00009E79 C3 <1> retn 612 <1> 613 <1> ; Does one of the unsigned type operators start in buffer? 614 <1> ; 615 <1> ; INP: si-> name buffer with capitalised potential name 616 <1> ; cx = length of potential name 617 <1> ; CY iff looking for signed type 618 <1> ; OUT: Iff NC, 619 <1> ; bx>>1 = offset into typebitmasks and typehandlers tables 620 <1> ; bx&1 = 0 621 <1> ; CHG: ax, bx, cx, dx, si, di 622 <1> isunsignedtype?: 623 00009E7A BF[E881] <1> mov di, types 624 00009E7D 19D2 <1> sbb dx, dx ; 0FFFFh if signed check else 0 625 00009E7F E351 <1> jcxz .notype ; if zero characters --> 626 00009E81 83F902 <1> cmp cx, 2 627 00009E84 750C <1> jne @F 628 00009E86 813C4348 <1> cmp word [si], "CH" 629 00009E8A 7446 <1> je .notype 630 00009E8C 813C3342 <1> cmp word [si], "3B" 631 00009E90 7440 <1> je .notype 632 <1> @@: 633 00009E92 E214 <1> loop .single_character_checked ; if not single character --> 634 <1> 635 00009E94 AC <1> lodsb ; get that character 636 00009E95 3C53 <1> cmp al, 'S' ; specified "S" or "SS" ? 637 00009E97 7439 <1> je .notype ; yes, not allowed --> 638 00009E99 08D0 <1> or al, dl ; iff signed check, al |= 0FFh 639 00009E9B 4E <1> dec si ; (restore) 640 00009E9C 3C33 <1> cmp al, '3' 641 00009E9E 7432 <1> je .notype 642 00009EA0 3C41 <1> cmp al, 'A' ; specified only a valid digit ? 643 00009EA2 7204 <1> jb .single_character_checked 644 00009EA4 3C47 <1> cmp al, 'F'+1 645 00009EA6 722A <1> jb .notype ; yes, not allowed --> 646 <1> 647 <1> .single_character_checked: 648 00009EA8 41 <1> inc cx ; (restore) 649 00009EA9 83E2E1 <1> and dx, types.addresses-types.end ; = 0 iff unsigned check 650 00009EAC 31C0 <1> xor ax, ax ; initialise ah, and ax = 0 first 651 00009EAE 31DB <1> xor bx, bx 652 00009EB0 87FE <1> xchg di, si 653 00009EB2 81C2[3382] <1> add dx, types.end ; = .addresses for signed check, 654 <1> ; = .end for unsigned check 655 <1> 656 <1> ; Before each iteration, 657 <1> ; si-> byte-counted next name to check 658 <1> ; di-> potential name (in name buffer) 659 <1> ; cx = cl = length of potential name 660 <1> ; (dx-1) = maximum value for si 661 <1> ; ah = 0 662 <1> ; Before the first iteration additionally, 663 <1> ; bx&~3 = index to return for this name (if match) 664 <1> ; al = 0 665 <1> ; Before subsequent iterations additionally, 666 <1> ; (bx+2)&~3 = index to return for this name (if match) 667 <1> ; al = offset to add to si first 668 00009EB6 A9 <1> db __TEST_IMM16 ; (skip two times inc bx) 669 <1> .loop: 670 00009EB7 43 <1> inc bx 671 00009EB8 43 <1> inc bx ; increase index 672 00009EB9 01C6 <1> add si, ax ; -> next table entry 673 00009EBB AC <1> lodsb ; ax = length of full name 674 00009EBC 39D6 <1> cmp si, dx ; checked all allowed names? 675 00009EBE 7312 <1> jae .notype ; yes, done --> 676 00009EC0 39C8 <1> cmp ax, cx ; full name large enough ? 677 00009EC2 72F3 <1> jb .loop ; no --> 678 00009EC4 57 <1> push di 679 00009EC5 51 <1> push cx 680 00009EC6 56 <1> push si 681 00009EC7 F3A6 <1> repe cmpsb ; potential name matches ? 682 00009EC9 5E <1> pop si 683 00009ECA 59 <1> pop cx 684 00009ECB 5F <1> pop di 685 00009ECC 75E9 <1> jne .loop ; no --> 686 <1> 687 00009ECE 80E3FC <1> and bl, ~3 ; conflate alternative type names 688 00009ED1 A8 <1> db __TEST_IMM8 ; (NC, skip stc) 689 <1> .notype: 690 00009ED2 F9 <1> stc 691 00009ED3 C3 <1> retn 692 <1> 693 <1> 694 <1> usesection lDEBUG_DATA_ENTRY 695 <1> 696 <1> ; Table of bit masks and shift counts to determine 697 <1> ; how a type modifies the bit mask of required bytes. 698 <1> ; 699 <1> ; It would be possible to always retrieve a full dword 700 <1> ; from memory to process indirection in expressions, 701 <1> ; but this could fault if accessing inexistent data. 702 <1> ; Hence the debugger should minimise memory access. 703 <1> ; For this reason, types allow the expression evaluator 704 <1> ; to keep track which of the term's bytes are actually 705 <1> ; going to be used. The bit mask of required bytes 706 <1> ; indicates which bytes are not discarded by any of a 707 <1> ; term's type operators. 708 <1> ; 709 <1> ; The second byte of each entry (applied to ch by the 710 <1> ; reader, ie high byte of cx) indicates a mask to 711 <1> ; apply to the bit mask of required bytes. Note that 712 <1> ; this mask is applied first, before the shift that's 713 <1> ; described next. 714 <1> ; The first byte of each entry (loaded into cl by the 715 <1> ; reader, ie low byte of cx) indicates a shift left 716 <1> ; count to apply to the bit mask of required bytes. 717 <1> ; (Only the segment type doesn't have 0 currently.) 718 <1> ; 719 <1> ; Note that types are parsed forwards through the input 720 <1> ; (ie the specified command) but are actually applied 721 <1> ; to the numeric value they refer to backwards, that 722 <1> ; is, a type that is closer to the term in the input 723 <1> ; is applied to the term's result before a type that's 724 <1> ; farther from the term. 725 <1> ; Misleadingly, this reversal isn't very apparent in 726 <1> ; most processing of the type and unary operators. 727 <1> ; The segment type's shifting and masking reflects the 728 <1> ; reversal: while the actual operation is to shift 729 <1> ; right then restrict to the low word, the entry in 730 <1> ; this table indicates to restrict the bit mask to 731 <1> ; the low word then shift left. 732 <1> align 2, db 0 733 <1> typebitmasks: 734 00009056 0001 <1> db 0, 1b ; byte 735 00009058 0003 <1> db 0, 11b ; word 736 0000905A 0007 <1> db 0, 111b ; 3byte 737 0000905C 000F <1> db 0, 1111b ; dword 738 0000905E 000F <1> db 0, 1111b ; pointer 739 00009060 0003 <1> db 0, 11b ; offset 740 00009062 0203 <1> db 2, 11b ; segment 741 <1> 742 <1> 743 <1> ; Dispatch table for type conversion functions. 744 <1> ; 745 <1> ; INP: bx:dx = dword input 746 <1> ; CF = signedness of type conversion 747 <1> ; ah from lahf with the same CF as current 748 <1> ; al = type (80h = pointer, 40h = signed) 749 <1> ; OUT: bx:dx = new value 750 <1> ; ah = type (80h = pointer, 40h = signed) 751 <1> ; CHG: ax 752 <1> align 2, db 0 753 <1> typehandlers: 754 00009064 [E79E] <1> dw handlebyte 755 00009066 [F29E] <1> dw handleword 756 00009068 [DA9E] <1> dw handle3byte 757 0000906A [FD9E] <1> dw handledword 758 0000906C [059F] <1> dw handlepointer 759 0000906E [F29E] <1> dw handleoffset 760 00009070 [D49E] <1> dw handlesegment 761 <1> 762 <1> 763 <1> usesection lDEBUG_CODE 764 <1> 765 <1> handlesegment: 766 00009ED4 89DA <1> mov dx, bx 767 00009ED6 30E4 <1> xor ah, ah ; NC, ah = 0 768 00009ED8 EB18 <1> jmp short handleword 769 <1> handleoffset equ handleword 770 <1> 771 <1> handle3byte: 772 00009EDA B700 <1> mov bh, 0 773 00009EDC 7307 <1> jnc .zero ; (iff unsigned type -->) 774 00009EDE 84DB <1> test bl, bl ; signed ? 775 00009EE0 7902 <1> jns .zero_f ; no --> 776 00009EE2 FECF <1> dec bh 777 <1> .zero_f: 778 00009EE4 9E <1> sahf ; restore CF 779 <1> .zero: 780 00009EE5 EB16 <1> jmp handledword 781 <1> 782 <1> handlebyte: 783 00009EE7 B600 <1> mov dh, 0 784 00009EE9 7307 <1> jnc .zero ; (iff unsigned type -->) 785 00009EEB 84D2 <1> test dl, dl ; signed ? 786 00009EED 7902 <1> jns .zero_f ; no --> 787 00009EEF FECE <1> dec dh 788 <1> .zero_f: 789 00009EF1 9E <1> sahf ; restore CF 790 <1> .zero: 791 <1> handleword: 792 00009EF2 BB0000 <1> mov bx, 0 793 00009EF5 7306 <1> jnc .zero ; (iff unsigned type -->) 794 00009EF7 85D2 <1> test dx, dx ; signed ? 795 00009EF9 7901 <1> jns .zero_f ; no --> 796 00009EFB 4B <1> dec bx 797 <1> .zero_f: 798 00009EFC 9E <1> sahf ; restore CF 799 <1> .zero: 800 <1> handledword: 801 00009EFD 7203 <1> jc .signed ; if signed --> 802 00009EFF 30E4 <1> xor ah, ah ; return pointer=0 signed=0 803 00009F01 C3 <1> retn 804 <1> 805 <1> .signed: 806 00009F02 B440 <1> mov ah, 40h ; return pointer=0 signed=1 807 00009F04 C3 <1> retn 808 <1> 809 <1> handlepointer: 810 00009F05 B480 <1> mov ah, 80h ; return pointer=1 signed=0 811 00009F07 C3 <1> retn 812 <1> 813 <1> 814 <1> usesection lDEBUG_DATA_ENTRY 815 <1> 816 <1> ; List of binary and unary operators. 817 <1> ; The order has to match that in the respective 818 <1> ; operator handler dispatch table below. 819 <1> align 2, db 0 820 <1> operators: 821 00009072 13002B2D2A2F253C3E- <1> .: countedw "+-*/%<>=!|&^oOaAxX?" 821 0000907B 3D217C265E6F4F6141- <1> 821 00009084 78583F <1> 822 <1> .amount: equ $ - . - 2 823 00009087 00 <1> align 2, db 0 824 <1> unaryoperators: 825 00009088 05002B2D7E213F <1> .: countedw "+-~!?" 826 <1> .amount: equ $ - . - 2 827 <1> 828 <1> 829 <1> ; Dispatch table for unary operators, 830 <1> ; used by getexpression. 831 <1> ; Functions in this table are called with: 832 <1> ; 833 <1> ; INP: bx:dx = number 834 <1> ; ah = type 835 <1> ; OUT: bx:dx = result 836 <1> ; ah = type 837 <1> ; CHG: - 838 0000908F 00 <1> align 2, db 0 839 <1> unaryoperatorhandlers: 840 <1> .: 841 00009090 [1A9F] <1> dw uoh_plus ; + 842 00009092 [109F] <1> dw uoh_minus ; - 843 00009094 [1B9F] <1> dw uoh_not_bitwise ; ~ 844 00009096 [229F] <1> dw uoh_not_boolean ; ! 845 00009098 [089F] <1> dw uoh_abs ; ? 846 <1> .amount: equ ($ - .) / 2 847 <1> %if .amount != unaryoperators.amount 848 <1> %error String and table mismatch 849 <1> %endif 850 <1> 851 <1> 852 <1> usesection lDEBUG_CODE 853 <1> 854 <1> uoh_abs: 855 00009F08 80E4BF <1> and ah, ~ 40h ; make type signed=0 856 00009F0B F6C780 <1> test bh, 80h ; negative ? 857 00009F0E 740A <1> jz uoh_plus ; no --> 858 <1> uoh_minus: 859 00009F10 80CC40 <1> or ah, 40h ; make type signed=1 860 <1> calculate_minus_bxdx: 861 00009F13 F7DB <1> neg bx 862 00009F15 F7DA <1> neg dx 863 00009F17 83DB00 <1> sbb bx, byte 0 ; neg bx:dx 864 <1> uoh_plus: ; (nop) 865 00009F1A C3 <1> retn 866 <1> 867 <1> uoh_not_bitwise: 868 00009F1B B400 <1> mov ah, 0 ; make type pointer=0 signed=0 869 00009F1D F7D3 <1> not bx 870 00009F1F F7D2 <1> not dx 871 00009F21 C3 <1> retn 872 <1> 873 <1> uoh_not_boolean: 874 00009F22 B400 <1> mov ah, 0 ; make type pointer=0 signed=0 875 00009F24 E80202 <1> call toboolean 876 00009F27 80F201 <1> xor dl, 1 ; toggle only bit 0 877 00009F2A C3 <1> retn 878 <1> 879 <1> 880 <1> usesection lDEBUG_DATA_ENTRY 881 <1> 882 <1> ; Word table operatordispatchers: order as in string operators 883 <1> ; Pointed functions dispatch depending on operator characters 884 <1> ; Return: operator index, 0 = invalid 885 <1> 886 <1> ; Operator index (byte): 887 <1> ; 0 = invalid, no operator found 888 <1> ; 1.. = 1-based index in byte table operatorprecedences 889 <1> ; = 1-based index in word table operatorfunctions 890 <1> 891 <1> 892 <1> ; Dispatch table for (binary) expression operators, 893 <1> ; used by getexpression. 894 <1> ; Functions in this table are called with: 895 <1> ; INP: al = operator character (which is also implicit) 896 <1> ; si-> remaining line (directly) behind operator character 897 <1> ; OUT: bl != 0 if a valid operator, 898 <1> ; bl = operator index 899 <1> ; si-> behind the last character belonging to the operator 900 <1> ; bl = 0 if no valid operator 901 <1> ; CHG: al, bh, dx 902 <1> 903 <1> struc opprecs 904 00000000 ?? <1> OPPREC_INVALID: resb 1 905 00000001 ?? <1> OPPREC_COND: resb 1 906 00000002 ?? <1> OPPREC_BOOL_OR: resb 1 907 00000003 ?? <1> OPPREC_BOOL_XOR:resb 1 908 00000004 ?? <1> OPPREC_BOOL_AND:resb 1 909 00000005 ?? <1> OPPREC_COMPARE: resb 1 910 00000006 ?? <1> OPPREC_BIT_OR: resb 1 911 00000007 ?? <1> OPPREC_BIT_XOR: resb 1 912 00000008 ?? <1> OPPREC_BIT_AND: resb 1 913 00000009 ?? <1> OPPREC_SHIFT: resb 1 914 0000000A ?? <1> OPPREC_ADDSUB: resb 1 915 0000000B ?? <1> OPPREC_MULDIV: resb 1 916 0000000C ?? <1> OPPREC_POWER: resb 1 917 <1> OPPREC_RIGHTOP: ; (to process it first in getexpression) 918 <1> endstruc 919 <1> ; The number of precedence levels indicates how many 920 <1> ; intermediate results getexpression might have to save 921 <1> ; on its stack. With eleven levels of precedence, up to 922 <1> ; ten intermediate results are pushed by getexpression. 923 <1> ; (With 6 bytes each, that gives a moderate 60 bytes.) 924 <1> ; Key to this is that, in case of a low enough operator 925 <1> ; behind the one that triggered the pushing, the pushed 926 <1> ; value will be popped before proceeding. This way more 927 <1> ; intermediate results may be pushed later but the stack 928 <1> ; never holds intermediate results that don't need to be 929 <1> ; on the stack. 930 <1> 931 <1> ; This is the definition of operator index values. The tables 932 <1> ; operatorprecedences and operatorfunctions are ordered by this. 933 <1> ; The operator dispatchers return one of these. 934 <1> struc ops 935 00000000 ?? <1> OPERATOR_INVALID: resb 1 ; 0 - invalid 936 00000001 ?? <1> OPERATOR_PLUS: resb 1 ; + 937 00000002 ?? <1> OPERATOR_MINUS: resb 1 ; - 938 00000003 ?? <1> OPERATOR_MULTIPLY: resb 1 ; * 939 00000004 ?? <1> OPERATOR_DIVIDE: resb 1 ; / 940 00000005 ?? <1> OPERATOR_MODULO: resb 1 ; % 941 00000006 ?? <1> OPERATOR_POWER: resb 1 ; ** 942 00000007 ?? <1> OPERATOR_CMP_BELOW: resb 1 ; < 943 00000008 ?? <1> OPERATOR_CMP_BELOW_EQUAL: resb 1 ; <= 944 00000009 ?? <1> OPERATOR_CMP_ABOVE: resb 1 ; > 945 0000000A ?? <1> OPERATOR_CMP_ABOVE_EQUAL: resb 1 ; >= 946 0000000B ?? <1> OPERATOR_CMP_EQUAL: resb 1 ; == 947 0000000C ?? <1> OPERATOR_CMP_NOT_EQUAL: resb 1 ; != 948 0000000D ?? <1> OPERATOR_SHIFT_LEFT: resb 1 ; << 949 0000000E ?? <1> OPERATOR_SHIFT_RIGHT: resb 1 ; >> 950 0000000F ?? <1> OPERATOR_SHIFT_RIGHT_SIGNED: resb 1 ; >>> 951 00000010 ?? <1> OPERATOR_BIT_MIRROR: resb 1 ; >< 952 00000011 ?? <1> OPERATOR_BIT_OR: resb 1 ; | 953 00000012 ?? <1> OPERATOR_BIT_XOR: resb 1 ; ^ 954 00000013 ?? <1> OPERATOR_BIT_AND: resb 1 ; & 955 00000014 ?? <1> OPERATOR_BOOL_OR: resb 1 ; || 956 00000015 ?? <1> OPERATOR_BOOL_XOR: resb 1 ; ^^ 957 00000016 ?? <1> OPERATOR_BOOL_AND: resb 1 ; && 958 00000017 ?? <1> OPERATOR_COND: resb 1 ; ?? :: construct (special) 959 00000018 ?? <1> OPERATOR_RIGHTOP: resb 1 ; (dummy right-operand operator) 960 <1> endstruc 961 <1> ; Order of BIT_* needs to be the same as that of BOOL_*. 962 <1> ; BOOL_* have to follow directly behind BIT_*. 963 <1> ; "r cf op= expr" depends on that. 964 <1> 965 <1> align 2, db 0 966 <1> operatordispatchers: 967 <1> .: 968 0000909A [2E9F] <1> dw od_plus ; + 969 0000909C [2B9F] <1> dw od_minus ; - 970 0000909E [319F] <1> dw od_multiply ; * ** 971 000090A0 [3B9F] <1> dw od_divide ; / 972 000090A2 [3E9F] <1> dw od_modulo ; % 973 000090A4 [669F] <1> dw od_below ; < <> <= << 974 000090A6 [419F] <1> dw od_above ; > >< >= >> >>> 975 000090A8 [839F] <1> dw od_equal ; == =< => 976 000090AA [959F] <1> dw od_not ; != 977 000090AC [9D9F] <1> dw od_or ; | || 978 000090AE [A89F] <1> dw od_and ; & && 979 000090B0 [B39F] <1> dw od_xor ; ^ ^^ 980 000090B2 [C59F] <1> dw od_o ; o 981 000090B4 [C59F] <1> dw od_o ; O 982 000090B6 [CC9F] <1> dw od_a ; a 983 000090B8 [CC9F] <1> dw od_a ; A 984 000090BA [D39F] <1> dw od_x ; x 985 000090BC [D39F] <1> dw od_x ; X 986 000090BE [BE9F] <1> dw od_cond ; ? 987 <1> .end: equ $ - . 988 <1> .amount: equ ($ - .) / 2 989 <1> %if .amount != operators.amount 990 <1> %error String and table mismatch 991 <1> %endif 992 <1> %if .amount > 100h 993 <1> %error Too many operator dispatchers 994 <1> %endif 995 <1> 996 <1> 997 <1> operatorprecedences: 998 <1> .: 999 000090C0 00 <1> db OPPREC_INVALID ; need this for some checks 1000 000090C1 0A <1> db OPPREC_ADDSUB ; + 1001 000090C2 0A <1> db OPPREC_ADDSUB ; - 1002 000090C3 0B <1> db OPPREC_MULDIV ; * 1003 000090C4 0B <1> db OPPREC_MULDIV ; / 1004 000090C5 0B <1> db OPPREC_MULDIV ; % 1005 000090C6 0C <1> db OPPREC_POWER ; ** 1006 000090C7 05 <1> db OPPREC_COMPARE ; < 1007 000090C8 05 <1> db OPPREC_COMPARE ; <= 1008 000090C9 05 <1> db OPPREC_COMPARE ; > 1009 000090CA 05 <1> db OPPREC_COMPARE ; >= 1010 000090CB 05 <1> db OPPREC_COMPARE ; == 1011 000090CC 05 <1> db OPPREC_COMPARE ; != 1012 000090CD 09 <1> db OPPREC_SHIFT ; << 1013 000090CE 09 <1> db OPPREC_SHIFT ; >> 1014 000090CF 09 <1> db OPPREC_SHIFT ; >>> 1015 000090D0 09 <1> db OPPREC_SHIFT ; >< 1016 000090D1 06 <1> db OPPREC_BIT_OR ; | 1017 000090D2 07 <1> db OPPREC_BIT_XOR ; ^ 1018 000090D3 08 <1> db OPPREC_BIT_AND ; & 1019 000090D4 02 <1> db OPPREC_BOOL_OR ; || 1020 000090D5 03 <1> db OPPREC_BOOL_XOR ; ^^ 1021 000090D6 04 <1> db OPPREC_BOOL_AND ; && 1022 000090D7 01 <1> db OPPREC_COND ; ?? :: construct 1023 000090D8 0D <1> db OPPREC_RIGHTOP ; getexpression: no number yet 1024 <1> .amount: equ $ - . 1025 <1> %if .amount != ops_size 1026 <1> %error Operators table size mismatch 1027 <1> %endif 1028 <1> 1029 <1> 1030 000090D9 00 <1> align 2, db 0 1031 <1> operatorfunctions: 1032 <1> .: 1033 000090DA [BC98] <1> dw error ; should not be called 1034 000090DC [03A0] <1> dw of_plus ; + 1035 000090DE [00A0] <1> dw of_minus ; - 1036 000090E0 [10A0] <1> dw of_multiply ; * 1037 000090E2 [3BA0] <1> dw of_divide ; / 1038 000090E4 [E09F] <1> dw of_modulo ; % 1039 000090E6 [B2A0] <1> dw of_power ; ** 1040 000090E8 [0BA1] <1> dw of_compare_below ; < 1041 000090EA [05A1] <1> dw of_compare_below_equal ; <= 1042 000090EC [23A1] <1> dw of_compare_above ; > 1043 000090EE [1DA1] <1> dw of_compare_above_equal ; >= 1044 000090F0 [17A1] <1> dw of_compare_equal ; == 1045 000090F2 [11A1] <1> dw of_compare_not_equal ; != 1046 000090F4 [5EA1] <1> dw of_shift_left ; << 1047 000090F6 [46A1] <1> dw of_shift_right ; >> 1048 000090F8 [52A1] <1> dw of_shift_right_signed ; >>> 1049 000090FA [85A1] <1> dw of_bit_mirror ; >< 1050 000090FC [D0A1] <1> dw of_or_bitwise ; | 1051 000090FE [F3A1] <1> dw of_xor_bitwise ; ^ 1052 00009100 [E2A1] <1> dw of_and_bitwise ; & 1053 00009102 [DBA1] <1> dw of_or_boolean ; || 1054 00009104 [FDA1] <1> dw of_xor_boolean ; ^^ 1055 00009106 [ECA1] <1> dw of_and_boolean ; && 1056 00009108 [BAAB] <1> dw of_cond ; ?? :: construct 1057 0000910A [33A1] <1> dw of_rightop ; set to right operand 1058 <1> .amount: equ ($ - .) / 2 1059 <1> %if .amount != ops_size 1060 <1> %error Operators table size mismatch 1061 <1> %endif 1062 <1> 1063 <1> 1064 <1> usesection lDEBUG_CODE 1065 <1> 1066 <1> od_minus: 1067 00009F2B B302 <1> mov bl, OPERATOR_MINUS 1068 00009F2D C3 <1> retn 1069 <1> 1070 <1> od_plus: 1071 00009F2E B301 <1> mov bl, OPERATOR_PLUS 1072 00009F30 C3 <1> retn 1073 <1> 1074 <1> od_multiply: 1075 00009F31 B303 <1> mov bl, OPERATOR_MULTIPLY 1076 00009F33 3804 <1> cmp byte [si], al 1077 00009F35 7503 <1> jne .ret 1078 00009F37 46 <1> inc si 1079 00009F38 B306 <1> mov bl, OPERATOR_POWER 1080 <1> .ret: 1081 00009F3A C3 <1> retn 1082 <1> 1083 <1> od_divide: 1084 00009F3B B304 <1> mov bl, OPERATOR_DIVIDE 1085 00009F3D C3 <1> retn 1086 <1> 1087 <1> od_modulo: 1088 00009F3E B305 <1> mov bl, OPERATOR_MODULO 1089 00009F40 C3 <1> retn 1090 <1> 1091 <1> od_above: 1092 00009F41 3804 <1> cmp byte [si], al 1093 00009F43 7411 <1> je .shr 1094 00009F45 803C3C <1> cmp byte [si], '<' 1095 00009F48 7418 <1> je .mirror 1096 00009F4A 803C3D <1> cmp byte [si], '=' 1097 00009F4D 7403 <1> je .cmp_ae 1098 00009F4F B309 <1> mov bl, OPERATOR_CMP_ABOVE 1099 00009F51 C3 <1> retn 1100 <1> .cmp_ae: 1101 00009F52 46 <1> inc si 1102 00009F53 B30A <1> mov bl, OPERATOR_CMP_ABOVE_EQUAL 1103 00009F55 C3 <1> retn 1104 <1> .shr: 1105 00009F56 46 <1> inc si 1106 00009F57 3804 <1> cmp byte [si], al 1107 00009F59 7403 <1> je .sar 1108 00009F5B B30E <1> mov bl, OPERATOR_SHIFT_RIGHT 1109 00009F5D C3 <1> retn 1110 <1> .sar: 1111 00009F5E 46 <1> inc si 1112 00009F5F B30F <1> mov bl, OPERATOR_SHIFT_RIGHT_SIGNED 1113 00009F61 C3 <1> retn 1114 <1> .mirror: 1115 00009F62 46 <1> inc si 1116 00009F63 B310 <1> mov bl, OPERATOR_BIT_MIRROR 1117 00009F65 C3 <1> retn 1118 <1> 1119 <1> od_below: 1120 00009F66 3804 <1> cmp byte [si], al 1121 00009F68 7411 <1> je .shl 1122 00009F6A 803C3E <1> cmp byte [si], '>' 1123 00009F6D 7410 <1> je .ncmp 1124 00009F6F 803C3D <1> cmp byte [si], '=' 1125 00009F72 7403 <1> je .cmp_be 1126 00009F74 B307 <1> mov bl, OPERATOR_CMP_BELOW 1127 00009F76 C3 <1> retn 1128 <1> .cmp_be: 1129 00009F77 46 <1> inc si 1130 00009F78 B308 <1> mov bl, OPERATOR_CMP_BELOW_EQUAL 1131 00009F7A C3 <1> retn 1132 <1> .shl: 1133 00009F7B 46 <1> inc si 1134 00009F7C B30D <1> mov bl, OPERATOR_SHIFT_LEFT 1135 00009F7E C3 <1> retn 1136 <1> .ncmp: 1137 <1> od_not.ncmp: 1138 00009F7F 46 <1> inc si 1139 00009F80 B30C <1> mov bl, OPERATOR_CMP_NOT_EQUAL 1140 00009F82 C3 <1> retn 1141 <1> 1142 <1> od_equal: 1143 00009F83 803C3E <1> cmp byte [si], '>' 1144 00009F86 74CA <1> je od_above.cmp_ae 1145 00009F88 803C3C <1> cmp byte [si], '<' 1146 00009F8B 74EA <1> je od_below.cmp_be 1147 00009F8D 3804 <1> cmp byte [si], al 1148 00009F8F 7509 <1> jne .invalid ; no valid operator --> 1149 <1> .cmp: 1150 00009F91 46 <1> inc si 1151 00009F92 B30B <1> mov bl, OPERATOR_CMP_EQUAL 1152 00009F94 C3 <1> retn 1153 <1> 1154 <1> od_not: 1155 00009F95 803C3D <1> cmp byte [si], '=' 1156 00009F98 74E5 <1> je .ncmp 1157 <1> od_equal.invalid: 1158 00009F9A B300 <1> mov bl, OPERATOR_INVALID 1159 00009F9C C3 <1> retn 1160 <1> 1161 <1> od_or: 1162 00009F9D 3804 <1> cmp byte [si], al 1163 00009F9F 7403 <1> je .boolean 1164 00009FA1 B311 <1> mov bl, OPERATOR_BIT_OR 1165 00009FA3 C3 <1> retn 1166 <1> .boolean: 1167 00009FA4 46 <1> inc si 1168 00009FA5 B314 <1> mov bl, OPERATOR_BOOL_OR 1169 00009FA7 C3 <1> retn 1170 <1> od_and: 1171 00009FA8 3804 <1> cmp byte [si], al 1172 00009FAA 7403 <1> je .boolean 1173 00009FAC B313 <1> mov bl, OPERATOR_BIT_AND 1174 00009FAE C3 <1> retn 1175 <1> .boolean: 1176 00009FAF 46 <1> inc si 1177 00009FB0 B316 <1> mov bl, OPERATOR_BOOL_AND 1178 00009FB2 C3 <1> retn 1179 <1> 1180 <1> od_xor: 1181 00009FB3 3804 <1> cmp byte [si], al 1182 00009FB5 7403 <1> je .boolean 1183 00009FB7 B312 <1> mov bl, OPERATOR_BIT_XOR 1184 00009FB9 C3 <1> retn 1185 <1> .boolean: 1186 00009FBA 46 <1> inc si 1187 00009FBB B315 <1> mov bl, OPERATOR_BOOL_XOR 1188 00009FBD C3 <1> retn 1189 <1> 1190 <1> 1191 <1> od_cond: 1192 00009FBE B317 <1> mov bl, OPERATOR_COND 1193 00009FC0 BA[2866] <1> mov dx, msg.questionmark 1194 00009FC3 EB13 <1> jmp od_string_common 1195 <1> 1196 <1> od_o: 1197 00009FC5 B311 <1> mov bl, OPERATOR_BIT_OR 1198 00009FC7 BA[2B66] <1> mov dx, msg.r 1199 00009FCA EB0C <1> jmp od_string_common 1200 <1> 1201 <1> od_a: 1202 00009FCC B313 <1> mov bl, OPERATOR_BIT_AND 1203 00009FCE BA[2D66] <1> mov dx, msg.nd 1204 00009FD1 EB05 <1> jmp od_string_common 1205 <1> 1206 <1> od_x: 1207 00009FD3 B312 <1> mov bl, OPERATOR_BIT_XOR 1208 00009FD5 BA[2A66] <1> mov dx, msg.or 1209 <1> ; jmp od_string_common 1210 <1> 1211 <1> od_string_common: 1212 00009FD8 E8130D <1> call isstring? 1213 00009FDB 7402 <1> je .ret 1214 <1> .none: 1215 00009FDD 31DB <1> xor bx, bx 1216 <1> .ret: 1217 00009FDF C3 <1> retn 1218 <1> 1219 <1> 1220 <1> ; (Binary) Expression operator functions, 1221 <1> ; used by getexpression. 1222 <1> ; These functions are called with: 1223 <1> ; INP: dword [hhvar] = previous number (left-hand operand) 1224 <1> ; byte [hhtype] = previous type 1225 <1> ; bx:dx = following number (right-hand operand) 1226 <1> ; ah = following type 1227 <1> ; OUT: bx:dx = result 1228 <1> ; ah = type 1229 <1> ; CHG: ax, cx 1230 <1> ; Note: Errors (divisor zero) are currently simply handled 1231 <1> ; by jumping to "error". 1232 <1> ; getexpression mustn't be called after until hhvar is 1233 <1> ; no longer used, as the call might overwrite hhvar. 1234 <1> ; 1235 <1> ; Type info (in ah and b[hhtype]) appears to be correctly 1236 <1> ; passed to here already. However, how should that be used? 1237 <1> ; 1238 <1> ; Quite simply, doing any arithmetic on two unsigned numbers 1239 <1> ; could return the smallest possible unsigned type (so that 1240 <1> ; if the result is <= 255 then the type is 1, if <= 65536 1241 <1> ; then the type is 2, else the type is 4). 1242 <1> ; 1243 <1> ; Handling two signed numbers here might be equally simple: 1244 <1> ; if the result is >= -128 && <= 127 then the type is 81h, 1245 <1> ; if the result is >= -32768 && <= 32767 then the type is 1246 <1> ; 82h, otherwise the type is 84h. Have to look into this. 1247 <1> ; (How does this interact with the unsignedness of the 1248 <1> ; actual computations?) 1249 <1> ; 1250 <1> ; It gets hairy when one operand is signed and the other 1251 <1> ; isn't; generally, two sub-cases of this exist: first, the 1252 <1> ; signed operand is positive, second, the signed operand is 1253 <1> ; negative. (Whether this distinction actually makes sense 1254 <1> ; for the implementation is still to be determined.) 1255 <1> ; Possible models: 1256 <1> ; * Result is always signed. 1257 <1> ; * Result is always unsigned(?!). 1258 <1> ; * Result is treated as signed, but if it's positive its 1259 <1> ; type is changed to unsigned. 1260 <1> ; 1261 <1> ; It is also possible that operators could be handled 1262 <1> ; differently, for example, (some) bit and boolean 1263 <1> ; operators could imply unsigned operands in any case. 1264 <1> ; (>>> obviously implies a signed left operand already.) 1265 <1> ; 1266 <1> ; Note that (signed) negative bit shifting counts could 1267 <1> ; imply reversing the operation; << becomes >> and such. 1268 <1> ; 1269 <1> ; Note that for the addition of, for example, bit rotation, 1270 <1> ; it would be useful to retain the originally used type 1271 <1> ; inside getdword. At the end of getdword, the current bit 1272 <1> ; counting could be changed to use the "signed" bit of the 1273 <1> ; types and then determine which signed or unsigned type is 1274 <1> ; large enough to hold the value. (It might already work 1275 <1> ; mostly like that.) (Is this specifically about binary 1276 <1> ; operators? - No. In fact, binary operators are the most 1277 <1> ; likely to be (one of) the syntactic element(s) which 1278 <1> ; should change (and possible 'optimize') types. - Then 1279 <1> ; this might still apply to unary operators, and brackets 1280 <1> ; and parentheses. In particular, the later should call 1281 <1> ; a different entry or instruct getdword not to optimize 1282 <1> ; the type at the end so as to retain it. - Although in 1283 <1> ; cases where that matters, the parentheses are arguably 1284 <1> ; unnecessary, aren't they?) 1285 <1> ; 1286 <1> ; It has to be decided whether there should be implicit 1287 <1> ; dispatching based on the operands' types' signedness. 1288 <1> ; For example, currently (with all operands being implied 1289 <1> ; to be unsigned) there exist >> and >>>, and there could 1290 <1> ; exist > and S>. With implicit signedness dispatching, the 1291 <1> ; behaviour of >> would change: it would expose the current 1292 <1> ; >>'s behaviour with an unsigned (left) operand, and the 1293 <1> ; current >>>'s behaviour with a signed (left) operand. 1294 <1> ; (Either U(nsigned)>> and S(igned)>> operators could then 1295 <1> ; exist, which would imply an unsigned or signed left 1296 <1> ; operand respectively, or the affected operands' signedness 1297 <1> ; could be changed with the currently available prefix or 1298 <1> ; possible new postfix unary operators. 1299 <1> of_modulo: 1300 00009FE0 FF36[A296] <1> push word [hhvar+2] 1301 00009FE4 FF36[A096] <1> push word [hhvar] 1302 00009FE8 53 <1> push bx 1303 00009FE9 52 <1> push dx 1304 00009FEA E84E00 <1> call of_divide ; bx:dx := prev / foll 1305 00009FED 8F06[A096] <1> pop word [hhvar] 1306 00009FF1 8F06[A296] <1> pop word [hhvar+2] 1307 00009FF5 E81800 <1> call of_multiply ; bx:dx := (prev / foll) * foll 1308 00009FF8 8F06[A096] <1> pop word [hhvar] 1309 00009FFC 8F06[A296] <1> pop word [hhvar+2] 1310 <1> ; jmp short of_minus ; bx:dx := prev - ((prev / foll) * foll) 1311 <1> 1312 <1> of_minus: 1313 0000A000 E810FF <1> call calculate_minus_bxdx 1314 <1> of_plus: 1315 0000A003 0316[A096] <1> add dx, word [hhvar] 1316 0000A007 131E[A296] <1> adc bx, word [hhvar+2] 1317 <1> or_hhtype: 1318 0000A00B 0A26[A996] <1> or ah, byte [hhtype] 1319 0000A00F C3 <1> retn 1320 <1> 1321 <1> of_multiply: ; bx:dx := var * bx:dx 1322 0000A010 0826[A996] <1> or byte [hhtype], ah 1323 0000A014 56 <1> push si 1324 0000A015 57 <1> push di ; si:di is used as temporary storage 1325 0000A016 89D0 <1> mov ax, dx 1326 0000A018 50 <1> push ax 1327 0000A019 F726[A096] <1> mul word [hhvar] 1328 0000A01D 89C7 <1> mov di, ax 1329 0000A01F 89D6 <1> mov si, dx 1330 0000A021 58 <1> pop ax 1331 0000A022 F726[A296] <1> mul word [hhvar+2] 1332 0000A026 01C6 <1> add si, ax 1333 0000A028 89D8 <1> mov ax, bx 1334 0000A02A F726[A096] <1> mul word [hhvar] 1335 0000A02E 01C6 <1> add si, ax 1336 <1> ; bx*[hhvar+2] not required, completely overflows 1337 0000A030 89FA <1> mov dx, di 1338 0000A032 89F3 <1> mov bx, si 1339 0000A034 5F <1> pop di 1340 0000A035 5E <1> pop si ; restore those 1341 <1> set_hhtype: 1342 0000A036 8A26[A996] <1> mov ah, byte [hhtype] 1343 0000A03A C3 <1> retn 1344 <1> 1345 <1> of_divide: ; bx:dx := var / bx:dx 1346 0000A03B 0826[A996] <1> or byte [hhtype], ah 1347 0000A03F 53 <1> push bx 1348 0000A040 09D3 <1> or bx, dx ; divisor zero ? 1349 0000A042 5B <1> pop bx 1350 0000A043 7503E974F8 <1> jz error ; divisor zero ! 1351 0000A048 EB48 <1> _386_jmps .32 ; 386, use 32-bit code --> 1352 0000A04A 85DB <1> test bx, bx ; need only 16-bit divisor ? 1353 0000A04C 7514 <1> jnz .difficultdiv16 ; nope --> 1354 0000A04E 89D1 <1> mov cx, dx 1355 0000A050 31D2 <1> xor dx, dx 1356 0000A052 A1[A296] <1> mov ax, word [hhvar+2] ; dx:ax = high word of previous number 1357 0000A055 F7F1 <1> div cx 1358 0000A057 89C3 <1> mov bx, ax 1359 0000A059 A1[A096] <1> mov ax, word [hhvar] ; ax = low word of previous number, dx = remainder 1360 0000A05C F7F1 <1> div cx 1361 0000A05E 89C2 <1> mov dx, ax ; bx:dx = result 1362 0000A060 EBD4 <1> jmp set_hhtype 1363 <1> 1364 <1> .difficultdiv16: ; code adapted from Art of Assembly chapter 9 1365 <1> ; refer to http://www.plantation-productions.com/Webster/www.artofasm.com/DOS/ch09/CH09-4.html#HEADING4-99 1366 0000A062 B92000 <1> mov cx, 32 1367 0000A065 55 <1> push bp 1368 0000A066 56 <1> push si 1369 0000A067 57 <1> push di 1370 0000A068 A1[A096] <1> mov ax, word [hhvar] 1371 0000A06B 8B2E[A296] <1> mov bp, word [hhvar+2] ; bp:ax = previous number 1372 0000A06F 31FF <1> xor di, di 1373 0000A071 31F6 <1> xor si, si ; clear variable si:di 1374 0000A073 92 <1> xchg ax, dx 1375 0000A074 87EB <1> xchg bp, bx ; bx:dx = previous number, bp:ax = divisor 1376 <1> .bitloop: 1377 0000A076 D1E2 <1> shl dx, 1 1378 0000A078 D1D3 <1> rcl bx, 1 1379 0000A07A D1D7 <1> rcl di, 1 1380 0000A07C D1D6 <1> rcl si, 1 ; si:di:bx:dx << 1 1381 0000A07E 39EE <1> cmp si, bp ; does the divisor fit into si:di here ? 1382 0000A080 7502 <1> jne @F 1383 0000A082 39C7 <1> cmp di, ax 1384 <1> @@: 1385 0000A084 7205 <1> jb .trynext ; no --> 1386 <1> .goesinto: 1387 0000A086 29C7 <1> sub di, ax 1388 0000A088 19EE <1> sbb si, bp ; subtract divisor 1389 0000A08A 42 <1> inc dx ; set a bit of the result (bit was zero before, never carries) 1390 <1> .trynext: 1391 0000A08B E2E9 <1> loop .bitloop ; loop for 32 bits 1392 0000A08D 5F <1> pop di 1393 0000A08E 5E <1> pop si 1394 0000A08F 5D <1> pop bp 1395 0000A090 EBA4 <1> jmp set_hhtype 1396 <1> 1397 <1> %ifn _ONLYNON386 1398 <1> .32: 1399 <1> [cpu 386] 1400 0000A092 6650 <1> push eax 1401 0000A094 6653 <1> push ebx 1402 0000A096 6652 <1> push edx ; to preserve the high words 1403 0000A098 53 <1> push bx 1404 0000A099 52 <1> push dx 1405 0000A09A 665B <1> pop ebx ; ebx = following number 1406 0000A09C 6631D2 <1> xor edx, edx 1407 0000A09F 66A1[A096] <1> mov eax, dword [hhvar] ; edx:eax = previous number 1408 0000A0A3 66F7F3 <1> div ebx 1409 0000A0A6 665A <1> pop edx 1410 0000A0A8 665B <1> pop ebx ; restore high words 1411 0000A0AA 6650 <1> push eax 1412 0000A0AC 5A <1> pop dx 1413 0000A0AD 5B <1> pop bx ; bx:dx = result 1414 0000A0AE 6658 <1> pop eax ; restore high word of eax 1415 <1> __CPU__ 1416 0000A0B0 EB84 <1> jmp set_hhtype 1417 <1> %endif 1418 <1> 1419 <1> 1420 <1> of_power: 1421 0000A0B2 0826[A996] <1> or byte [hhtype], ah 1422 0000A0B6 89D9 <1> mov cx, bx 1423 0000A0B8 89D0 <1> mov ax, dx ; get exponent 1424 0000A0BA 09D3 <1> or bx, dx ; exponent zero ? 1425 0000A0BC BB0000 <1> mov bx, 0 1426 0000A0BF BA0100 <1> mov dx, 1 1427 0000A0C2 743E <1> jz .ret ; yes, return with result as 1 --> 1428 0000A0C4 3916[A096] <1> cmp word [hhvar], dx ; optimization: 1429 0000A0C8 7506 <1> jne .notone 1430 0000A0CA 391E[A296] <1> cmp word [hhvar+2], bx 1431 0000A0CE 7432 <1> je .ret ; if base is one (and exponent not zero), result is 1 --> 1432 <1> .notone: 1433 0000A0D0 55 <1> push bp 1434 <1> 1435 <1> .loop: ; cx:ax non-zero here 1436 0000A0D1 D1E9 <1> shr cx, 1 1437 0000A0D3 D1D8 <1> rcr ax, 1 ; exponent /= 2 1438 0000A0D5 50 <1> push ax 1439 0000A0D6 51 <1> push cx 1440 0000A0D7 7303 <1> jnc .even ; if exponent was even --> 1441 0000A0D9 E834FF <1> call of_multiply ; var *= base 1442 <1> .even: 1443 <1> ; In the last iteration, cx:ax might be zero here 1444 <1> ; making the next call unnecessary. Oh well. 1445 0000A0DC 53 <1> push bx 1446 0000A0DD 52 <1> push dx 1447 0000A0DE 8B1E[A296] <1> mov bx, word [hhvar+2] 1448 0000A0E2 8B16[A096] <1> mov dx, word [hhvar] ; base 1449 0000A0E6 E827FF <1> call of_multiply ; * base = base squared 1450 0000A0E9 891E[A296] <1> mov word [hhvar+2], bx 1451 0000A0ED 8916[A096] <1> mov word [hhvar], dx ; store as new base 1452 0000A0F1 5A <1> pop dx 1453 0000A0F2 5B <1> pop bx 1454 0000A0F3 59 <1> pop cx 1455 0000A0F4 58 <1> pop ax 1456 <1> 1457 0000A0F5 89DD <1> mov bp, bx ; optimization: 1458 0000A0F7 09D5 <1> or bp, dx ; register now zero ? 1459 0000A0F9 7406 <1> jz .ret_bp ; if so, return now --> (multiplying zero always results in zero) 1460 0000A0FB 89CD <1> mov bp, cx 1461 0000A0FD 09C5 <1> or bp, ax ; exponent now zero ? 1462 0000A0FF 75D0 <1> jnz .loop ; no, loop --> 1463 <1> 1464 <1> .ret_bp: 1465 0000A101 5D <1> pop bp 1466 <1> .ret: 1467 0000A102 E931FF <1> jmp set_hhtype 1468 <1> 1469 <1> of_compare_below_equal: 1470 0000A105 E82C00 <1> call of_helper_compare 1471 0000A108 7628 <1> jbe of_helper_compare_true 1472 0000A10A C3 <1> retn 1473 <1> 1474 <1> of_compare_below: 1475 0000A10B E82600 <1> call of_helper_compare 1476 0000A10E 7222 <1> jb of_helper_compare_true 1477 0000A110 C3 <1> retn 1478 <1> 1479 <1> of_compare_not_equal: 1480 0000A111 E82000 <1> call of_helper_compare 1481 0000A114 751C <1> jne of_helper_compare_true 1482 0000A116 C3 <1> retn 1483 <1> 1484 <1> of_compare_equal: 1485 0000A117 E81A00 <1> call of_helper_compare 1486 0000A11A 7416 <1> je of_helper_compare_true 1487 0000A11C C3 <1> retn 1488 <1> 1489 <1> of_compare_above_equal: 1490 0000A11D E81400 <1> call of_helper_compare 1491 0000A120 7310 <1> jae of_helper_compare_true 1492 0000A122 C3 <1> retn 1493 <1> 1494 <1> of_compare_above: 1495 0000A123 E80E00 <1> call of_helper_compare 1496 0000A126 770A <1> ja of_helper_compare_true 1497 0000A128 C3 <1> retn 1498 <1> 1499 <1> 1500 <1> ; Called by operator functions to convert a number to boolean 1501 <1> ; 1502 <1> ; INP: bx:dx 1503 <1> ; OUT: dx = 0 or 1 1504 <1> ; bx = 0 1505 <1> ; ZF 1506 <1> toboolean: 1507 0000A129 09D3 <1> or bx, dx ; = 0 iff it was 0000_0000h 1508 0000A12B 83FB01 <1> cmp bx, byte 1 ; CY iff it was 0000_0000h, else NC 1509 0000A12E 19D2 <1> sbb dx, dx ; -1 iff it was 0000_0000h, else 0 1510 0000A130 31DB <1> xor bx, bx 1511 <1> 1512 <1> ; INP: dx 1513 <1> ; OUT: dx += 1 1514 <1> of_helper_compare_true: 1515 0000A132 42 <1> inc dx ; bx:dx = 0 iff it was 0000_0000h, else 1 1516 <1> 1517 <1> ; Dummy operator computation function, 1518 <1> ; used when setting a register without operator (rr) 1519 <1> ; and to initialize the first getexpression loop iteration 1520 <1> ; INP: dword [hhvar] = previous number (left-hand operand) 1521 <1> ; byte [hhtype] = previous type 1522 <1> ; bx:dx = following number (right-hand operand) 1523 <1> ; ah = following type 1524 <1> ; OUT: bx:dx = result (right-hand operand) 1525 <1> ; ah = type 1526 <1> ; CHG: ax, cx 1527 <1> of_rightop: 1528 0000A133 C3 <1> retn 1529 <1> 1530 <1> 1531 <1> ; Called by operator functions to compare operands 1532 <1> ; 1533 <1> ; INP: dword [hhvar], byte [hhtype] 1534 <1> ; bx:dx, ah 1535 <1> ; OUT: Flags as for "cmp d[hhvar], bxdx" 1536 <1> ; bx:dx = 0 1537 <1> ; ah = 0 1538 <1> of_helper_compare: 1539 0000A134 30E4 <1> xor ah, ah ; type signed=0 pointer=0 1540 0000A136 391E[A296] <1> cmp word [hhvar+2], bx 1541 0000A13A 7504 <1> jne .ret 1542 0000A13C 3916[A096] <1> cmp word [hhvar], dx 1543 <1> .ret: 1544 0000A140 BB0000 <1> mov bx, 0 1545 0000A143 89DA <1> mov dx, bx ; set both to zero (without affecting flags) 1546 0000A145 C3 <1> retn 1547 <1> 1548 <1> of_shift_right: 1549 0000A146 30E4 <1> xor ah, ah 1550 0000A148 E81F00 <1> call of_helper_getshiftdata 1551 <1> .loop: 1552 0000A14B D1EB <1> shr bx, 1 1553 0000A14D D1DA <1> rcr dx, 1 1554 0000A14F E2FA <1> loop .loop 1555 0000A151 C3 <1> retn 1556 <1> 1557 <1> of_shift_right_signed: 1558 0000A152 B440 <1> mov ah, 40h 1559 0000A154 E81300 <1> call of_helper_getshiftdata 1560 <1> .loop: 1561 0000A157 D1FB <1> sar bx, 1 1562 0000A159 D1DA <1> rcr dx, 1 1563 0000A15B E2FA <1> loop .loop 1564 0000A15D C3 <1> retn 1565 <1> 1566 <1> of_shift_left: 1567 0000A15E 30E4 <1> xor ah, ah 1568 0000A160 E80700 <1> call of_helper_getshiftdata 1569 <1> .loop: 1570 0000A163 D1E2 <1> shl dx, 1 1571 0000A165 D1D3 <1> rcl bx, 1 1572 0000A167 E2FA <1> loop .loop 1573 0000A169 C3 <1> retn 1574 <1> 1575 <1> ; Called by operator functions to get shift data 1576 <1> ; 1577 <1> ; This returns to the next caller with the unchanged input 1578 <1> ; operand if the shift count is zero. Otherwise, large shift 1579 <1> ; counts are normalized so the returned value in cx is not 1580 <1> ; zero and not higher than 32. This normalization is not just 1581 <1> ; an optimization, it's required for shift counts that don't 1582 <1> ; fit into a 16-bit counter. 1583 <1> ; 1584 <1> ; INP: bx:dx = shift count 1585 <1> ; OUT: bx:dx = input operand 1586 <1> ; If shift count is >= 1 and <= 32, 1587 <1> ; cx = shift count 1588 <1> ; If shift count is > 32, 1589 <1> ; cx = 32 1590 <1> ; If shift count is zero, 1591 <1> ; discards one near return address before returning 1592 <1> ; CHG: cx 1593 <1> of_helper_getshiftdata: 1594 0000A16A 89D1 <1> mov cx, dx 1595 0000A16C 85DB <1> test bx, bx 1596 0000A16E 7505 <1> jnz .largeshift 1597 0000A170 83FA20 <1> cmp dx, byte 32 1598 0000A173 7203 <1> jb .normalshift 1599 <1> .largeshift: 1600 0000A175 B92000 <1> mov cx, 32 ; fix at maximal shift count 1601 <1> .normalshift: 1602 0000A178 8B16[A096] <1> mov dx, word [hhvar] 1603 0000A17C 8B1E[A296] <1> mov bx, word [hhvar+2] 1604 0000A180 E301 <1> jcxz .break ; shift count zero, return input --> 1605 0000A182 C3 <1> retn 1606 <1> 1607 <1> .break: 1608 0000A183 59 <1> pop cx ; discard near return address 1609 0000A184 C3 <1> retn 1610 <1> 1611 <1> of_bit_mirror: 1612 0000A185 30E4 <1> xor ah, ah 1613 0000A187 89D1 <1> mov cx, dx 1614 0000A189 85DB <1> test bx, bx 1615 0000A18B 7505 <1> jnz .large 1616 0000A18D 83FA40 <1> cmp dx, byte 64 1617 0000A190 7205 <1> jb .normal 1618 <1> .large: 1619 0000A192 31DB <1> xor bx, bx ; mirror count 64 or higher: 1620 0000A194 31D2 <1> xor dx, dx ; all 32 bits mirrored with (nonexistent) zero bits 1621 0000A196 C3 <1> retn 1622 <1> .normal: 1623 0000A197 8B16[A096] <1> mov dx, word [hhvar] 1624 0000A19B 8B1E[A296] <1> mov bx, word [hhvar+2] 1625 0000A19F 80F901 <1> cmp cl, 1 1626 0000A1A2 762B <1> jbe .ret ; mirror count one or zero, return input --> 1627 0000A1A4 56 <1> push si 1628 0000A1A5 57 <1> push di 1629 <1> 1630 0000A1A6 51 <1> push cx 1631 0000A1A7 BFFFFF <1> mov di, -1 1632 0000A1AA 89FE <1> mov si, di 1633 <1> .loopmask: 1634 0000A1AC D1E7 <1> shl di, 1 1635 0000A1AE D1D6 <1> rcl si, 1 1636 0000A1B0 E2FA <1> loop .loopmask ; create mask of bits not involved in mirroring 1637 0000A1B2 21DE <1> and si, bx 1638 0000A1B4 21D7 <1> and di, dx ; get the uninvolved bits 1639 0000A1B6 59 <1> pop cx 1640 <1> 1641 0000A1B7 56 <1> push si 1642 0000A1B8 57 <1> push di ; save them 1643 0000A1B9 31F6 <1> xor si, si 1644 0000A1BB 31FF <1> xor di, di ; initialize mirrored register 1645 <1> .loop: 1646 0000A1BD D1EB <1> shr bx, 1 1647 0000A1BF D1DA <1> rcr dx, 1 ; shift out of original register's current LSB 1648 0000A1C1 D1D7 <1> rcl di, 1 1649 0000A1C3 D1D6 <1> rcl si, 1 ; into other register's current LSB 1650 0000A1C5 E2F6 <1> loop .loop 1651 0000A1C7 5A <1> pop dx 1652 0000A1C8 5B <1> pop bx ; restore uninvolved bits 1653 0000A1C9 09F3 <1> or bx, si 1654 0000A1CB 09FA <1> or dx, di ; combine with mirrored bits 1655 <1> 1656 0000A1CD 5F <1> pop di 1657 0000A1CE 5E <1> pop si 1658 <1> .ret: 1659 0000A1CF C3 <1> retn 1660 <1> 1661 <1> of_or_bitwise: 1662 0000A1D0 0B16[A096] <1> or dx, word [hhvar] 1663 0000A1D4 0B1E[A296] <1> or bx, word [hhvar+2] ; bitwise or 1664 <1> or_hhtype_1: 1665 0000A1D8 E930FE <1> jmp or_hhtype 1666 <1> 1667 <1> of_or_boolean: 1668 0000A1DB E82700 <1> call of_helper_getbool 1669 0000A1DE 09DA <1> or dx, bx ; boolean or 1670 0000A1E0 EB20 <1> jmp short of_helper_retbool 1671 <1> 1672 <1> of_and_bitwise: 1673 0000A1E2 2316[A096] <1> and dx, word [hhvar] 1674 0000A1E6 231E[A296] <1> and bx, word [hhvar+2] ; bitwise and 1675 0000A1EA EBEC <1> jmp or_hhtype_1 1676 <1> 1677 <1> of_and_boolean: 1678 0000A1EC E81600 <1> call of_helper_getbool 1679 0000A1EF 21DA <1> and dx, bx ; boolean and 1680 0000A1F1 EB0F <1> jmp short of_helper_retbool 1681 <1> 1682 <1> of_xor_bitwise: 1683 0000A1F3 3316[A096] <1> xor dx, word [hhvar] 1684 0000A1F7 331E[A296] <1> xor bx, word [hhvar+2] ; bitwise xor 1685 0000A1FB EBDB <1> jmp or_hhtype_1 1686 <1> 1687 <1> of_xor_boolean: 1688 0000A1FD E80500 <1> call of_helper_getbool 1689 0000A200 31DA <1> xor dx, bx ; boolean xor 1690 <1> of_helper_retbool: 1691 0000A202 31DB <1> xor bx, bx ; high word always zero 1692 0000A204 C3 <1> retn 1693 <1> 1694 <1> ; Called by operator functions to convert operands to boolean 1695 <1> ; 1696 <1> ; INP: bx:dx = next number, ah = type 1697 <1> ; [hhvar] = previous number, [hhtype] = type 1698 <1> ; OUT: bx = next number's boolean value 1699 <1> ; dx = previous number's boolean value 1700 <1> ; ah = 0 1701 <1> of_helper_getbool: 1702 0000A205 30E4 <1> xor ah, ah 1703 0000A207 E81FFF <1> call toboolean 1704 0000A20A 52 <1> push dx 1705 0000A20B 8B16[A096] <1> mov dx, word [hhvar] 1706 0000A20F 8B1E[A296] <1> mov bx, word [hhvar+2] 1707 0000A213 E813FF <1> call toboolean 1708 0000A216 5B <1> pop bx 1709 0000A217 C3 <1> retn 1710 <1> 1711 <1> 1712 <1> usesection lDEBUG_DATA_ENTRY 1713 <1> 1714 <1> isvariable_data: 1715 0000910C 1F <1> reverselfsrtop: db 1Fh 1716 <1> 1717 <1> %if _DEBUG3 1718 <1> align 8, db 0 1719 <1> kregs: dd 0 1720 <1> dd 1 1721 <1> dd 0aa55aa55h 1722 <1> dd -1 1723 <1> times 12 dd 0 1724 <1> %endif 1725 <1> 1726 0000910D 00 <1> align 4, db 0 1727 00009110 02000000 <1> lfsr: dd 2 1728 00009114 01000000 <1> reverselfsr: dd 1 1729 00009118 03002080 <1> lfsrtap: dd 8020_0003h 1730 <1> 1731 0000911C 00 <1> align 8, db 0 1732 <1> isvariable_struc_list: 1733 <1> 1734 <1> %assign IVS_ONEBYTE 1 1735 <1> isvariable_struc_onebyte_list: 1736 <1> ; name, size, flags, address, array last index, array skip 1737 00009120 00003000[1C0D]FF00 <1> isvariablestruc "V", 4, 0, vregs, 255 1738 <1> %if _DEBUG3 1739 <1> isvariablestruc "K", 4, 0, kregs, 15 1740 <1> %endif 1741 <1> isvariable_struc_onebyte_list_end: 1742 <1> 1743 <1> %assign IVS_ONEBYTE 0 1744 <1> isvariable_struc_morebyte_list: 1745 00009128 [4695]1600[DE0B]00- <1> isvariablestruc "INT8CTRL", 2, 0, intr8_limit 1745 0000912F 00 <1> 1746 00009130 [4C95]7200[18A2]00- <1> isvariablestruc "LFSR", 4, ivfSpecialSetUp, var_lfsr_setup 1746 00009137 00 <1> 1747 00009138 [4E95]7300[2EA2]00- <1> isvariablestruc "RLFSR", 4, ivfSpecialSetUp, var_reverselfsr_setup 1747 0000913F 00 <1> 1748 00009140 [5195]3500[1891]00- <1> isvariablestruc "LFSRTAP", 4, 0, lfsrtap 1748 00009147 00 <1> 1749 00009148 [5695]0600[0C91]00- <1> isvariablestruc "RLFSRTOP", 1, 0, reverselfsrtop 1749 0000914F 00 <1> 1750 00009150 [5C95]9800[0C0C]00- <1> isvariablestruc "DEVICESIZE", 2, ivfReadOnly, device_mcb_paragraphs 1750 00009157 00 <1> 1751 00009158 [6495]BA00[0E0C]00- <1> isvariablestruc "DEVICEHEADER", 4, ivfReadOnly, device_header_address 1751 0000915F 00 <1> 1752 00009160 [6E95]8500[0E0B]00- <1> isvariablestruc "MACHX86", 1, ivfReadOnly, machine 1752 00009167 00 <1> 1753 00009168 [7395]8500[110B]00- <1> isvariablestruc "MACHX87", 1, ivfReadOnly, encodedmach87 1753 0000916F 00 <1> 1754 00009170 [7895]0100[E00B]00- <1> isvariablestruc "MMT", 1, 0, maxmachinetype 1754 00009177 00 <1> 1755 00009178 [7995]3103[9400]06- <1> isvariablestruc "DCO", 4, ivfArrayOneBased | ivfArrayOptional, options, 6 1755 0000917F 00 <1> 1757 00009180 [7A95]B103[AC00]06- <1> isvariablestruc "DCS", 4, ivfReadOnly | ivfArrayOneBased | ivfArrayOptional, startoptions, 6 1757 00009187 00 <1> 1759 00009188 [7B95]B103[C400]06- <1> isvariablestruc "DIF", 4, ivfReadOnly | ivfArrayOneBased | ivfArrayOptional, internalflags, 6 1759 0000918F 00 <1> 1761 00009190 [7C95]3100[DC00]00- <1> isvariablestruc "DAO", 4, 0, asm_options 1761 00009197 00 <1> 1763 00009198 [7D95]B100[E000]00- <1> isvariablestruc "DAS", 4, ivfReadOnly, asm_startoptions 1763 0000919F 00 <1> 1765 000091A0 [7E95]B100[FC0A]00- <1> isvariablestruc "DPI", 4, ivfReadOnly, psp22 1765 000091A7 00 <1> 1767 000091A8 [7F95]9100[E00A]00- <1> isvariablestruc "DPR", 2, ivfReadOnly, pspdbg 1767 000091AF 00 <1> 1769 000091B0 [8095]9100[000B]00- <1> isvariablestruc "DPP", 2, ivfReadOnly, parent 1769 000091B7 00 <1> 1771 000091B8 [8195]B200[FC0A]00- <1> isvariablestruc "DPRA", 4, ivfReadOnly, psp22 1771 000091BF 00 <1> 1773 000091C0 [8395]9200[E00A]00- <1> isvariablestruc "DPSP", 2, ivfReadOnly, pspdbg 1773 000091C7 00 <1> 1775 000091C8 [8595]9500[000B]00- <1> isvariablestruc "DPARENT", 2, ivfReadOnly, parent 1775 000091CF 00 <1> 1777 <1> %if _PM 1778 <1> isvariablestruc "DPS", 2, ivfReadOnly | ivfSpecialSetUp, var_seldbg_setup 1780 <1> isvariablestruc "DPSPSEL", 2, ivfReadOnly | ivfSpecialSetUp, var_dpspsel_setup 1782 <1> %else 1783 000091D0 [8A95]9500[E00A]00- <1> isvariablestruc "DPSPSEL", 2, ivfReadOnly, pspdbg 1783 000091D7 00 <1> 1785 <1> %endif 1786 <1> 1787 000091D8 [8F95]3100[4C88]00- <1> isvariablestruc "PPC", 4, 0, default_pp_count 1787 000091DF 00 <1> 1788 000091E0 [9095]3100[5088]00- <1> isvariablestruc "TPC", 4, 0, default_tp_count 1788 000091E7 00 <1> 1789 000091E8 [9195]3100[5488]00- <1> isvariablestruc "TTC", 4, 0, default_tt_count 1789 000091EF 00 <1> 1790 <1> 1791 000091F0 [9295]3500[1C0A]00- <1> isvariablestruc "RELIMIT", 4, 0, re_limit 1791 000091F7 00 <1> 1792 000091F8 [9795]3500[180A]00- <1> isvariablestruc "RECOUNT", 4, 0, re_count 1792 000091FF 00 <1> 1793 00009200 [9C95]3500[240A]00- <1> isvariablestruc "RCLIMIT", 4, 0, rc_limit 1793 00009207 00 <1> 1794 00009208 [A195]3500[200A]00- <1> isvariablestruc "RCCOUNT", 4, 0, rc_count 1794 0000920F 00 <1> 1795 <1> 1796 00009210 [A695]1000[380B]00- <1> isvariablestruc "RC", 2, 0, priorrc 1796 00009217 00 <1> 1797 00009218 [A695]1100[3A0B]00- <1> isvariablestruc "ERC", 2, 0, erc 1797 0000921F 00 <1> 1798 00009220 [A795]0400[0B0C]00- <1> isvariablestruc "QQCODE", 1, 0, qqtermcode 1798 00009227 00 <1> 1799 00009228 [AB95]1600[B286]00- <1> isvariablestruc "TERMCODE", 2, 0, usertermcode 1799 0000922F 00 <1> 1800 <1> 1801 <1> %if _PM 1802 <1> %assign var_addr_offset 4 1803 <1> %else 1804 <1> %assign var_addr_offset 2 1805 <1> %endif 1806 <1> 1807 00009230 [B195]1100[420B]00- <1> isvariablestruc "AAO", var_addr_offset, 0, a_addr 1807 00009237 00 <1> 1808 00009238 [B295]1100[460B]00- <1> isvariablestruc "AAS", 2, 0, a_addr + saSegSel 1808 0000923F 00 <1> 1809 00009240 [B395]1100[480B]00- <1> isvariablestruc "ADO", var_addr_offset, 0, d_addr 1809 00009247 00 <1> 1810 00009248 [B495]1100[4C0B]00- <1> isvariablestruc "ADS", 2, 0, d_addr + saSegSel 1810 0000924F 00 <1> 1811 00009250 [B595]1100[4E0B]00- <1> isvariablestruc "ABO", var_addr_offset, 0, behind_r_u_addr 1811 00009257 00 <1> 1812 00009258 [B695]1100[520B]00- <1> isvariablestruc "ABS", 2, 0, behind_r_u_addr + saSegSel 1812 0000925F 00 <1> 1813 00009260 [B795]1100[540B]00- <1> isvariablestruc "AUO", var_addr_offset, 0, u_addr 1813 00009267 00 <1> 1814 00009268 [B895]1100[580B]00- <1> isvariablestruc "AUS", 2, 0, u_addr + saSegSel 1814 0000926F 00 <1> 1815 00009270 [B995]1100[5A0B]00- <1> isvariablestruc "AEO", var_addr_offset, 0, e_addr 1815 00009277 00 <1> 1816 00009278 [BA95]1100[5E0B]00- <1> isvariablestruc "AES", 2, 0, e_addr + saSegSel 1816 0000927F 00 <1> 1817 <1> %if _DSTRINGS 1818 00009280 [BB95]1100[600B]00- <1> isvariablestruc "AZO", var_addr_offset, 0, dz_addr 1818 00009287 00 <1> 1819 00009288 [BC95]1100[640B]00- <1> isvariablestruc "AZS", 2, 0, dz_addr + saSegSel 1819 0000928F 00 <1> 1820 00009290 [BD95]1100[660B]00- <1> isvariablestruc "ACO", var_addr_offset, 0, dcpm_addr 1820 00009297 00 <1> 1821 00009298 [BE95]1100[6A0B]00- <1> isvariablestruc "ACS", 2, 0, dcpm_addr + saSegSel 1821 0000929F 00 <1> 1822 000092A0 [BF95]1100[6C0B]00- <1> isvariablestruc "APO", var_addr_offset, 0, dcount_addr 1822 000092A7 00 <1> 1823 000092A8 [C095]1100[700B]00- <1> isvariablestruc "APS", 2, 0, dcount_addr + saSegSel 1823 000092AF 00 <1> 1824 000092B0 [C195]1100[720B]00- <1> isvariablestruc "AWO", var_addr_offset, 0, dwcount_addr 1824 000092B7 00 <1> 1825 000092B8 [C295]1100[760B]00- <1> isvariablestruc "AWS", 2, 0, dwcount_addr + saSegSel 1825 000092BF 00 <1> 1826 <1> %endif 1827 <1> %if _PM 1828 <1> isvariablestruc "AXO", 4, 0, a_addr 1829 <1> %endif 1830 <1> 1831 000092C0 [C395]0100[E10B]00- <1> isvariablestruc "DSR", 1, 0, serial_rows 1831 000092C7 00 <1> 1832 000092C8 [C495]0100[E20B]00- <1> isvariablestruc "DSC", 1, 0, serial_columns 1832 000092CF 00 <1> 1833 000092D0 [C595]0100[E30B]00- <1> isvariablestruc "DST", 1, 0, serial_keep_timeout 1833 000092D7 00 <1> 1834 <1> %if _USE_TX_FIFO 1835 000092D8 [C695]0100[E40B]00- <1> isvariablestruc "DSF", 1, 0, serial_fifo_size 1835 000092DF 00 <1> 1836 <1> %endif 1837 000092E0 [C795]0300[E60B]00- <1> isvariablestruc "DSPVI", 1, 0, serial_var_intnum 1837 000092E7 00 <1> 1838 000092E8 [CA95]8300[C208]00- <1> isvariablestruc "DSPUI", 1, ivfReadOnly, serial_use_intnum 1838 000092EF 00 <1> 1839 000092F0 [CD95]0300[E70B]00- <1> isvariablestruc "DSPVS", 1, 0, serial_var_params 1839 000092F7 00 <1> 1840 000092F8 [D095]8300[C308]00- <1> isvariablestruc "DSPUS", 1, ivfReadOnly, serial_use_params 1840 000092FF 00 <1> 1841 00009300 [D395]0300[E80B]00- <1> isvariablestruc "DSPVF", 1, 0, serial_var_fifo 1841 00009307 00 <1> 1842 00009308 [D695]8300[C408]00- <1> isvariablestruc "DSPUF", 1, ivfReadOnly, serial_use_fifo 1842 0000930F 00 <1> 1843 00009310 [D995]1300[EA0B]00- <1> isvariablestruc "DSPVP", 2, 0, serial_var_baseport 1843 00009317 00 <1> 1844 00009318 [DC95]9300[C608]00- <1> isvariablestruc "DSPUP", 2, ivfReadOnly, serial_use_baseport 1844 0000931F 00 <1> 1845 00009320 [DF95]0300[EC0B]00- <1> isvariablestruc "DSPVD", 1, 0, serial_var_dl 1845 00009327 00 <1> 1846 00009328 [E295]8300[C808]00- <1> isvariablestruc "DSPUD", 1, ivfReadOnly, serial_use_dl 1846 0000932F 00 <1> 1847 00009330 [E595]0300[EE0B]00- <1> isvariablestruc "DSPVM", 1, 0, serial_var_irqmask 1847 00009337 00 <1> 1848 00009338 [E895]8300[CA08]00- <1> isvariablestruc "DSPUM", 1, ivfReadOnly, serial_use_irqmask 1848 0000933F 00 <1> 1849 <1> 1850 00009340 [EB95]0100[F00B]00- <1> isvariablestruc "IOR", 1, 0, io_rows 1850 00009347 00 <1> 1851 00009348 [EC95]0100[F10B]00- <1> isvariablestruc "IOC", 1, 0, io_columns 1851 0000934F 00 <1> 1852 00009350 [ED95]1100[F20B]00- <1> isvariablestruc "IOS", 2, 0, io_start_buffer 1852 00009357 00 <1> 1853 00009358 [EE95]1100[F40B]00- <1> isvariablestruc "IOE", 2, 0, io_end_buffer 1853 0000935F 00 <1> 1854 00009360 [EF95]1100[F60B]00- <1> isvariablestruc "IOL", 2, 0, io_levels 1854 00009367 00 <1> 1855 00009368 [F095]1100[F80B]00- <1> isvariablestruc "IOF", 2, 0, io_flags 1855 0000936F 00 <1> 1856 00009370 [F195]D100[8AA2]00- <1> isvariablestruc "IOI", 2, ivfReadOnly | ivfSpecialSetUp, var_ioi_setup 1856 00009377 00 <1> 1857 <1> 1858 <1> %if _CATCHINT2D 1859 00009378 [F295]8500[CA82]00- <1> isvariablestruc "AMISNUM", 1, ivfReadOnly, amis_multiplex_number 1859 0000937F 00 <1> 1860 00009380 [F795]0800[B382]00- <1> isvariablestruc "TRYAMISNUM", 1, 0, try_amis_multiplex_number 1860 00009387 00 <1> 1861 <1> %endif 1862 <1> 1863 00009388 [FF95]3600[C48F]00- <1> isvariablestruc "HHRESULT", 4, 0, hhresult 1863 0000938F 00 <1> 1864 <1> 1865 <1> %if _DEBUG1 1866 <1> isvariablestruc "TRC", 2, ivfArrayOptional, test_records_Readmem + 4, 15, 4 1868 <1> isvariablestruc "TRA", 4, ivfArrayOptional, test_records_Readmem, 15, 2 1870 <1> isvariablestruc "TWC", 2, ivfArrayOptional, test_records_Writemem + 4, 15, 4 1872 <1> isvariablestruc "TWA", 4, ivfArrayOptional, test_records_Writemem, 15, 2 1874 <1> isvariablestruc "TLC", 2, ivfArrayOptional, test_records_getLinear + 4, 15, 4 1876 <1> isvariablestruc "TLA", 4, ivfArrayOptional, test_records_getLinear, 15, 2 1878 <1> isvariablestruc "TSC", 2, ivfArrayOptional, test_records_getSegmented + 4, 15, 4 1880 <1> isvariablestruc "TSA", 4, ivfArrayOptional, test_records_getSegmented, 15, 2 1882 <1> isvariablestruc "TRV", 1, 0, test_readmem_value 1884 <1> %endif 1885 <1> 1886 <1> 1887 <1> %if _PM 1888 <1> isvariablestruc "SRO", 4, ivfArrayOptional | ivfReadOnly, search_results, 15, 2 1890 <1> isvariablestruc "SRS", 2, ivfArrayOptional | ivfReadOnly, search_results + 4, 15, 4 1892 <1> %else 1893 00009390 [0596]9102[840B]0F- <1> isvariablestruc "SRO", 2, ivfArrayOptional | ivfReadOnly, search_results, 15, 2 1893 00009397 02 <1> 1895 00009398 [0696]9102[860B]0F- <1> isvariablestruc "SRS", 2, ivfArrayOptional | ivfReadOnly, search_results + 2, 15, 2 1895 0000939F 02 <1> 1897 <1> %endif 1898 000093A0 [0796]B100[C40B]00- <1> isvariablestruc "SRC", 4, ivfReadOnly, sscounter 1898 000093A7 00 <1> 1900 <1> 1901 000093A8 [0896]D004[4DA6]FF- <1> isvariablestruc "RI", 2, ivfSpecialSetUp | ivfSeparatorSpecial | ivfReadOnly, var_ri_setup, 255 1901 000093AF 00 <1> 1903 <1> 1904 <1> %if _DEBUG3 1905 <1> isvariablestruc "MT", 4, ivfSpecialSetUp, var_mt_setup, 1 1906 <1> %endif 1907 <1> 1908 <1> %if _INPUT_FILE_BOOT || _INPUT_FILE_HANDLES 1909 000093B0 [0896]5102[D8A6]0F- <1> isvariablestruc "YSF", 2, ivfSpecialSetUp | ivfArrayOptional, var_ysf_setup, 15 1909 000093B7 00 <1> 1911 <1> %if _INPUT_FILE_HANDLES 1912 000093B8 [0996]5102[D8A6]0F- <1> isvariablestruc "YHF", 2, ivfSpecialSetUp | ivfArrayOptional, var_ysf_setup, 15 1912 000093BF 00 <1> 1914 <1> %endif 1915 <1> %if _INPUT_FILE_BOOT 1916 000093C0 [0A96]5102[D8A6]0F- <1> isvariablestruc "YBF", 2, ivfSpecialSetUp | ivfArrayOptional, var_ysf_setup, 15 1916 000093C7 00 <1> 1918 <1> %endif 1919 <1> %endif 1920 <1> 1921 <1> %if _ACCESS_VARIABLES_AMOUNT 1922 000093C8 [0B96]B502[6884]03- <1> isvariablestruc "READADR", 4, ivfReadOnly | ivfArrayOptional, reading_access_variables, _ACCESS_VARIABLES_AMOUNT - 1, 4 1922 000093CF 04 <1> 1924 000093D0 [1096]B502[6C84]03- <1> isvariablestruc "READLEN", 4, ivfReadOnly | ivfArrayOptional, reading_access_variables + 4, _ACCESS_VARIABLES_AMOUNT - 1, 4 1924 000093D7 04 <1> 1926 000093D8 [1596]B502[8884]03- <1> isvariablestruc "WRITADR", 4, ivfReadOnly | ivfArrayOptional, writing_access_variables, _ACCESS_VARIABLES_AMOUNT - 1, 4 1926 000093DF 04 <1> 1928 000093E0 [1A96]B502[8C84]03- <1> isvariablestruc "WRITLEN", 4, ivfReadOnly | ivfArrayOptional, writing_access_variables + 4, _ACCESS_VARIABLES_AMOUNT - 1, 4 1928 000093E7 04 <1> 1930 <1> %endif 1931 <1> 1932 <1> %if _PSPVARIABLES 1933 000093E8 [1F96]9200[DE0A]00- <1> isvariablestruc "PSPS", 2, ivfReadOnly, pspdbe 1933 000093EF 00 <1> 1934 000093F0 [2196]D100[94A2]00- <1> isvariablestruc "PSP", 2, ivfReadOnly | ivfSpecialSetUp, var_psp_setup 1934 000093F7 00 <1> 1935 000093F8 [2296]D100[9EA2]00- <1> isvariablestruc "PPR", 2, ivfReadOnly | ivfSpecialSetUp, var_ppr_setup 1935 000093FF 00 <1> 1936 00009400 [2396]F100[B4A2]00- <1> isvariablestruc "PPI", 4, ivfReadOnly | ivfSpecialSetUp, var_ppi_setup 1936 00009407 00 <1> 1937 00009408 [2496]9400[DE0A]00- <1> isvariablestruc "PSPSEL", 2, ivfReadOnly, pspdbe 1937 0000940F 00 <1> 1938 00009410 [2896]D400[9EA2]00- <1> isvariablestruc "PARENT", 2, ivfReadOnly | ivfSpecialSetUp, var_ppr_setup 1938 00009417 00 <1> 1939 00009418 [2C96]F100[B4A2]00- <1> isvariablestruc "PRA", 4, ivfReadOnly | ivfSpecialSetUp, var_ppi_setup 1939 0000941F 00 <1> 1940 <1> %endif 1941 <1> 1942 <1> %if _BOOTLDR 1943 00009420 [2D96]4800[3CA3]FF- <1> isvariablestruc "BOOTUNITFL", 1, ivfSpecialSetUp, var_bootunitflags_setup, 255 1943 00009427 00 <1> 1944 00009428 [3596]C900[FAA2]00- <1> isvariablestruc "BOOTLDPUNIT", 1, ivfReadOnly | ivfSpecialSetUp, var_bootldpunit_setup 1944 0000942F 00 <1> 1945 00009430 [3E96]C900[FFA2]00- <1> isvariablestruc "BOOTSDPUNIT", 1, ivfReadOnly | ivfSpecialSetUp, var_bootsdpunit_setup 1945 00009437 00 <1> 1946 <1> %if _INPUT_FILE_BOOT 1947 00009438 [4796]C900[04A3]00- <1> isvariablestruc "BOOTYDPUNIT", 1, ivfReadOnly | ivfSpecialSetUp, var_bootydpunit_setup 1947 0000943F 00 <1> 1948 <1> %endif 1949 00009440 [5096]F900[1BA3]00- <1> isvariablestruc "BOOTLDPPART", 4, ivfReadOnly | ivfSpecialSetUp, var_bootldppart_setup 1949 00009447 00 <1> 1950 00009448 [5996]F900[20A3]00- <1> isvariablestruc "BOOTSDPPART", 4, ivfReadOnly | ivfSpecialSetUp, var_bootsdppart_setup 1950 0000944F 00 <1> 1951 <1> %if _INPUT_FILE_BOOT 1952 00009450 [6296]F900[25A3]00- <1> isvariablestruc "BOOTYDPPART", 4, ivfReadOnly | ivfSpecialSetUp, var_bootydppart_setup 1952 00009457 00 <1> 1953 <1> %endif 1954 <1> %endif 1955 <1> 1956 00009458 [6B96]0900[B482]00- <1> isvariablestruc "TRYDEBUGNUM", 1, 0, try_debugger_amis_multiplex_number 1956 0000945F 00 <1> 1957 00009460 [7496]9700[6E82]00- <1> isvariablestruc "DEBUGFUNC", 2, ivfReadOnly, debuggerfunction 1957 00009467 00 <1> 1958 <1> 1959 <1> isvariable_struc_morebyte_list_end: 1960 <1> isvariable_struc_list_end: 1961 <1> 1962 <1> align 2, db 0 1963 00009468 00000000 <1> interrupt_var: dd 0 1964 <1> align 2, db 0 1965 0000946C 0000 <1> ioi_var: dw 0 1966 <1> %if _PM 1967 <1> align 2, db 0 1968 <1> seldbg: dw 0 1969 <1> align 2, db 0 1970 <1> dpspsel: dw 0 1971 <1> %endif 1972 <1> %if _PSPVARIABLES 1973 <1> align 2, db 0 1974 0000946E 0000 <1> psp_segment: dw 0 1975 00009470 0000 <1> psp_parent: dw 0 1976 00009472 00000000 <1> psp_pra: dd 0 1977 <1> %endif 1978 <1> 1979 <1> align 2, db 0 1980 <1> isvariable_morebyte_nameheaders: 1981 00009476 494E4C46524C4C4652- <1> dw IVS_MOREBYTE_NAMEHEADERS 1981 0000947F 4C444544454D414D41- <1> 1981 00009488 4D4D44434443444944- <1> 1981 00009491 414441445044504450- <1> 1981 0000949A 445044504450445050- <1> 1981 000094A3 505450545452455245- <1> 1981 000094AC 524352435243455251- <1> 1981 000094B5 515445414141414144- <1> 1981 000094BE 414441424142415541- <1> 1981 000094C7 5541454145415A415A- <1> 1981 000094D0 414341434150415041- <1> 1981 000094D9 574157445344534453- <1> 1981 000094E2 445344534453445344- <1> 1981 000094EB 534453445344534453- <1> 1981 000094F4 445344534453445349- <1> 1981 000094FD 4F494F494F494F494F- <1> 1981 00009506 494F494F414D545248- <1> 1981 0000950F 485352535253525249- <1> 1981 00009518 595359485942524552- <1> 1981 00009521 455752575250535053- <1> 1981 0000952A 505050505053504150- <1> 1981 00009533 52424F424F424F424F- <1> 1981 0000953C 424F424F424F545244- <1> 1981 00009545 45 <1> 1982 <1> .end: 1983 <1> %if IVS_HAVE_ONEBYTE && ! IVS_SINGLE_ONEBYTE 1984 <1> isvariable_onebyte_names: 1985 <1> db IVS_ONEBYTE_NAMES 1986 <1> .end: 1987 <1> %endif 1988 <1> 1989 00009546 54384354524C535246- <1> isvariablestrings ISVARIABLESTRINGS 1989 0000954F 535253525441504653- <1> 1989 00009558 52544F505649434553- <1> 1989 00009561 495A45564943454845- <1> 1989 0000956A 414445524348583836- <1> 1989 00009573 4348583837544F5346- <1> 1989 0000957C 4F5349525052415350- <1> 1989 00009585 4152454E5453505345- <1> 1989 0000958E 4C4343434C494D4954- <1> 1989 00009597 434F554E544C494D49- <1> 1989 000095A0 54434F554E5443434F- <1> 1989 000095A9 4445524D434F44454F- <1> 1989 000095B2 534F534F534F534F53- <1> 1989 000095BB 4F534F534F534F5352- <1> 1989 000095C4 435446505649505549- <1> 1989 000095CD 505653505553505646- <1> 1989 000095D6 505546505650505550- <1> 1989 000095DF 50564450554450564D- <1> 1989 000095E8 50554D524353454C46- <1> 1989 000095F1 4949534E554D59414D- <1> 1989 000095FA 49534E554D52455355- <1> 1989 00009603 4C544F534346464641- <1> 1989 0000960C 4441445241444C454E- <1> 1989 00009615 495441445249544C45- <1> 1989 0000961E 4E5053505249505345- <1> 1989 00009627 4C52454E54414F5455- <1> 1989 00009630 4E4954464C4F544C44- <1> 1989 00009639 50554E49544F545344- <1> 1989 00009642 50554E49544F545944- <1> 1989 0000964B 50554E49544F544C44- <1> 1989 00009654 50504152544F545344- <1> 1989 0000965D 50504152544F545944- <1> 1989 00009666 505041525459444542- <1> 1989 0000966F 55474E554D42554746- <1> 1989 00009678 554E43 <1> 1990 <1> 1991 <1> 1992 <1> usesection lDEBUG_CODE 1993 <1> isvariable_code: 1994 <1> ; INP: ax = array index (0-based), di = 0 1995 <1> ; CHG: si, ax 1996 <1> ; OUT: NC if valid, 1997 <1> ; bx -> var, di = 0 or di -> mask 1998 <1> 1999 <1> var_lfsr_setup: 2000 0000A218 BB[1091] <1> mov bx, lfsr 2001 0000A21B D16F02 <1> shr word [bx + 2], 1 2002 0000A21E D11F <1> rcr word [bx], 1 2003 0000A220 730B <1> jnc .ret ; if not to tap --> (NC) 2004 0000A222 A1[1891] <1> mov ax, word [lfsrtap] 2005 0000A225 3107 <1> xor word [bx], ax 2006 0000A227 A1[1A91] <1> mov ax, word [lfsrtap + 2] 2007 0000A22A 314702 <1> xor word [bx + 2], ax ; (NC) 2008 <1> .ret: 2009 0000A22D C3 <1> retn 2010 <1> 2011 <1> 2012 <1> var_reverselfsr_setup: 2013 0000A22E BB[1491] <1> mov bx, reverselfsr 2014 0000A231 91 <1> xchg ax, cx ; preserve original cx 2015 0000A232 8A0E[0C91] <1> mov cl, byte [reverselfsrtop] 2016 0000A236 BE0100 <1> mov si, 1 ; register for shift mask 2017 0000A239 80F910 <1> cmp cl, 16 ; fits in low 16 bits ? 2018 0000A23C 721B <1> jb .below_16 ; yes --> 2019 0000A23E 80E910 <1> sub cl, 16 ; get bit within high word 2020 0000A241 80F910 <1> cmp cl, 16 ; beyond maximum ? 2021 0000A244 7202 <1> jb @F 2022 0000A246 B10F <1> mov cl, 15 ; yes, clamp to bit 31 (for now) 2023 <1> @@: 2024 0000A248 D3E6 <1> shl si, cl ; shift to get a bitmask 2025 0000A24A 91 <1> xchg cx, ax ; restore the original cx 2026 0000A24B 857702 <1> test word [bx + 2], si ; is top bit set ? 2027 0000A24E 9F <1> lahf ; preserve ZF 2028 0000A24F F7D6 <1> not si ; invert mask to allow clearing 2029 0000A251 217702 <1> and word [bx + 2], si ; clear the bit if it was set 2030 0000A254 BFFFFF <1> mov di, -1 ; si:di = mask what to clear in taps 2031 0000A257 EB0F <1> jmp @F 2032 <1> 2033 <1> .below_16: 2034 0000A259 D3E6 <1> shl si, cl ; shift to get a bitmask 2035 0000A25B 91 <1> xchg cx, ax ; restore the original cx 2036 0000A25C 8537 <1> test word [bx], si ; is top bit set ? 2037 0000A25E 9F <1> lahf ; preserve ZF 2038 0000A25F F7D6 <1> not si ; invert mask to allow clearing 2039 0000A261 2137 <1> and word [bx], si ; clear the bit if it was set 2040 0000A263 89F7 <1> mov di, si 2041 0000A265 BEFFFF <1> mov si, -1 ; si:di = mask what to clear in taps 2042 <1> @@: 2043 0000A268 9E <1> sahf ; restore ZF 2044 0000A269 97 <1> xchg ax, di ; si:ax = mask what to clear in taps 2045 0000A26A 7416 <1> jz .justshift ; if not to tap, just shift --> (NC) 2046 0000A26C E81300 <1> call .justshift ; also shift, but return to us afterwards 2047 0000A26F 2306[1891] <1> and ax, word [lfsrtap] 2048 0000A273 2336[1A91] <1> and si, word [lfsrtap + 2] 2049 <1> ; get the taps (highest bit cleared) 2050 0000A277 F9 <1> stc ; lowest bit will get set to 1 2051 0000A278 D1D0 <1> rcl ax, 1 2052 0000A27A D1D6 <1> rcl si, 1 ; shift the taps to create reverse taps 2053 0000A27C 3107 <1> xor word [bx], ax 2054 0000A27E 317702 <1> xor word [bx + 2], si ; tap (NC) 2055 0000A281 C3 <1> retn 2056 <1> 2057 <1> .justshift: 2058 0000A282 D127 <1> shl word [bx], 1 2059 0000A284 D15702 <1> rcl word [bx + 2], 1 2060 0000A287 31FF <1> xor di, di ; restore di = 0 2061 <1> ; also: set NC if return from setup function 2062 0000A289 C3 <1> retn 2063 <1> 2064 <1> 2065 <1> %if _PM 2066 <1> var_dpspsel_setup: 2067 <1> mov bx, dpspsel 2068 <1> mov word [bx], ss 2069 <1> clc 2070 <1> retn 2071 <1> 2072 <1> var_seldbg_setup: 2073 <1> mov bx, seldbg 2074 <1> and word [bx], byte 0 2075 <1> call ispm 2076 <1> jnz @F 2077 <1> mov word [bx], ds 2078 <1> @@: 2079 <1> clc 2080 <1> retn 2081 <1> %endif 2082 <1> 2083 <1> %if _DEBUG3 2084 <1> var_mt_setup: 2085 <1> mov bx, ax 2086 <1> add bx, bx 2087 <1> add bx, bx 2088 <1> mov di, bx 2089 <1> add bx, mtest_regs 2090 <1> add di, masks_test 2091 <1> clc 2092 <1> retn 2093 <1> %endif 2094 <1> 2095 <1> var_ioi_setup: 2096 0000A28A E8AE0F <1> call peekc 2097 0000A28D BB[6C94] <1> mov bx, ioi_var 2098 0000A290 8907 <1> mov word [bx], ax 2099 0000A292 F8 <1> clc 2100 0000A293 C3 <1> retn 2101 <1> 2102 <1> %if _PSPVARIABLES 2103 <1> var_psp_setup: 2104 0000A294 BB[6E94] <1> mov bx, psp_segment 2105 0000A297 E83800 <1> call var_get_psp_segment 2106 0000A29A 8907 <1> mov word [bx], ax 2107 0000A29C F8 <1> clc 2108 0000A29D C3 <1> retn 2109 <1> 2110 <1> 2111 <1> var_ppr_setup: 2112 0000A29E BB[7094] <1> mov bx, psp_parent 2113 0000A2A1 31C0 <1> xor ax, ax 2114 0000A2A3 8907 <1> mov word [bx], ax 2115 0000A2A5 E83900 <1> call var_get_psp_selector 2116 0000A2A8 7206 <1> jc @F 2117 0000A2AA 26A11600 <1> mov ax, word [es:16h] 2118 0000A2AE 8907 <1> mov word [bx], ax ; retrieve parent process 2119 <1> @@: 2120 0000A2B0 16 <1> push ss 2121 0000A2B1 07 <1> pop es 2122 <1> %if _PM ; This is not really needed but does not hurt either. 2123 <1> ; getsegmented is used above, but only from PM. 2124 <1> ; This is assumed not to switch modes. 2125 <1> call resetmode ; reset mode if we switched 2126 <1> %endif 2127 0000A2B2 F8 <1> clc 2128 0000A2B3 C3 <1> retn 2129 <1> 2130 <1> 2131 <1> var_ppi_setup: 2132 0000A2B4 BB[7294] <1> mov bx, psp_pra 2133 0000A2B7 31C0 <1> xor ax, ax 2134 0000A2B9 8907 <1> mov word [bx], ax 2135 0000A2BB 894702 <1> mov word [bx + 2], ax 2136 0000A2BE E82000 <1> call var_get_psp_selector 2137 0000A2C1 72ED <1> jc @B 2138 0000A2C3 26A10A00 <1> mov ax, word [es:TPIV] 2139 0000A2C7 8907 <1> mov word [bx], ax 2140 0000A2C9 26A10C00 <1> mov ax, word [es:TPIV + 2] 2141 0000A2CD 894702 <1> mov word [bx + 2], ax ; retrieve Int22 address 2142 0000A2D0 EBDE <1> jmp @B 2143 <1> 2144 <1> 2145 <1> var_get_psp_segment: 2146 0000A2D2 A1[DE0A] <1> mov ax, word [pspdbe] 2147 0000A2D5 40 <1> inc ax ; FFFFh ? 2148 0000A2D6 7405 <1> jz short .pspvar_psp_invalid ; yes, invalid --> 2149 0000A2D8 48 <1> dec ax ; 0 ? 2150 0000A2D9 7402 <1> jz short .pspvar_psp_invalid ; yes, invalid --> 2151 <1> %if _PM 2152 <1> push ax 2153 <1> call selector_to_segment 2154 <1> pop ax 2155 <1> inc ax ; FFFFh ? 2156 <1> jz short .pspvar_psp_invalid ; yes, invalid --> 2157 <1> dec ax ; 0 ? 2158 <1> jz short .pspvar_psp_invalid ; yes, invalid --> 2159 <1> %endif 2160 0000A2DB F8 <1> clc 2161 0000A2DC C3 <1> retn 2162 <1> 2163 <1> .pspvar_psp_invalid: 2164 0000A2DD 31C0 <1> xor ax, ax 2165 0000A2DF F9 <1> stc 2166 0000A2E0 C3 <1> retn 2167 <1> 2168 <1> 2169 <1> var_get_psp_selector: 2170 0000A2E1 E8EEFF <1> call var_get_psp_segment 2171 0000A2E4 720D <1> jc .pspvar_psp_invalid 2172 <1> %if _PM 2173 <1> call ispm 2174 <1> jnz short .pspvar_rm 2175 <1> push bx 2176 <1> _386_o32 ; push edx 2177 <1> push dx 2178 <1> push cx 2179 <1> xor dx, dx 2180 <1> mov cx, 4 2181 <1> .pspvar_shift: 2182 <1> shl ax, 1 2183 <1> rcl dx, 1 2184 <1> loop .pspvar_shift ; dx:ax = PSP segment << 4 2185 <1> call getsegmented 2186 <1> ; getsegmented is assumed not to switch modes (see below). 2187 <1> jc short .pspvar_error ; (shouldn't happen) 2188 <1> _386_o32 2189 <1> test dx, dx ; test edx, edx 2190 <1> jnz short .pspvar_error ; (assumed not to happen) 2191 <1> pop cx 2192 <1> _386_o32 2193 <1> pop dx ; pop edx 2194 <1> xchg ax, bx ; ax = selector 2195 <1> pop bx 2196 <1> .pspvar_rm: 2197 <1> %endif 2198 0000A2E6 8EC0 <1> mov es, ax ; es = segment/selector 2199 0000A2E8 26813E0000CD20 <1> cmp word [es:0], 20CDh ; int 20h opcode ? 2200 0000A2EF 7502 <1> jne short .pspvar_psp_invalid ; no, invalid --> 2201 0000A2F1 F8 <1> clc 2202 0000A2F2 C3 <1> retn 2203 <1> 2204 <1> .pspvar_psp_invalid: 2205 0000A2F3 F9 <1> stc 2206 0000A2F4 C3 <1> retn 2207 <1> 2208 <1> .pspvar_error: 2209 0000A2F5 31F6 <1> xor si, si 2210 0000A2F7 E9C2F5 <1> jmp error 2211 <1> %endif 2212 <1> 2213 <1> 2214 <1> %if _BOOTLDR 2215 <1> var_bootldpunit_setup: 2216 0000A2FA BB[B08B] <1> mov bx, loaddata_loadedfrom - LOADDATA + bsBPB + ebpbNew + bpbnBootUnit 2218 0000A2FD EB45 <1> jmp @F 2219 <1> 2220 <1> var_bootsdpunit_setup: 2221 0000A2FF BB[508C] <1> mov bx, load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit 2223 0000A302 EB40 <1> jmp @F 2224 <1> 2225 <1> %if _INPUT_FILE_BOOT 2226 <1> var_bootydpunit_setup: 2227 0000A304 F606[CB00]02 <1> testopt [internalflags2], dif2_input_file_boot 2228 0000A309 7440 <1> jz .retc 2229 <1> 2230 0000A30B 52 <1> push dx 2231 0000A30C B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 2232 0000A30F F726[308F] <1> mul word [load_input_file.active] 2233 0000A313 5A <1> pop dx 2234 <1> 2235 0000A314 93 <1> xchg ax, bx 2236 0000A315 8D9F[308D] <1> lea bx, [load_input_file + bx - LOADDATA3 + bsBPB + ebpbNew + bpbnBootUnit] 2238 0000A319 EB29 <1> jmp @F 2239 <1> %endif 2240 <1> 2241 <1> var_bootldppart_setup: 2242 0000A31B BB[8C8B] <1> mov bx, loaddata_loadedfrom - LOADDATA + bsBPB + bpbHiddenSectors 2244 0000A31E EB24 <1> jmp @F 2245 <1> 2246 <1> var_bootsdppart_setup: 2247 0000A320 BB[2C8C] <1> mov bx, load_data - LOADDATA2 + bsBPB + bpbHiddenSectors 2249 0000A323 EB1F <1> jmp @F 2250 <1> 2251 <1> %if _INPUT_FILE_BOOT 2252 <1> var_bootydppart_setup: 2253 0000A325 F606[CB00]02 <1> testopt [internalflags2], dif2_input_file_boot 2254 0000A32A 741F <1> jz .retc 2255 <1> 2256 0000A32C 52 <1> push dx 2257 0000A32D B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 2258 0000A330 F726[308F] <1> mul word [load_input_file.active] 2259 0000A334 5A <1> pop dx 2260 <1> 2261 0000A335 93 <1> xchg ax, bx 2262 0000A336 8D9F[0C8D] <1> lea bx, [load_input_file + bx - LOADDATA3 + bsBPB + bpbHiddenSectors] 2264 0000A33A EB08 <1> jmp @F 2265 <1> %endif 2266 <1> 2267 <1> var_bootunitflags_setup: 2268 0000A33C 05[108A] <1> add ax, load_unit_flags 2269 0000A33F 89C3 <1> mov bx, ax 2270 0000A341 BF[8C96] <1> mov di, mask_bootunitflags 2271 <1> @@: 2272 0000A344 F606[C500]40 <1> testopt [internalflags], nodosloaded 2273 0000A349 7501 <1> jnz @F ; (NC) 2274 <1> var_bootydpunit_setup.retc: 2275 <1> var_bootydppart_setup.retc: 2276 0000A34B F9 <1> stc 2277 <1> @@: 2278 0000A34C C3 <1> retn 2279 <1> %endif 2280 <1> 2281 <1> 2282 <1> usesection lDEBUG_DATA_ENTRY 2283 <1> 2284 0000967B 00 <1> align 4, db 0 2285 <1> masks: 2286 <1> ; size 4 want masks + 0 2287 <1> ; size 3 want masks + 1 2288 <1> ; size 2 want masks + 2 2289 <1> ; size 1 want masks + 3 2290 <1> ; size 0 want masks + 4 2291 <1> ; 4 - size = offset into masks 2292 0000967C 00 <1> mask_4byte: db 0 2293 0000967D 00 <1> mask_3byte: db 0 2294 0000967E 00 <1> mask_2byte: db 0 2295 0000967F 00 <1> mask_1byte: db 0 2296 00009680 FFFFFFFF <1> mask_0byte: dd -1 2297 00009684 FFFF0000 <1> mask_compoundwithzero: db -1, -1, 0, 0 2298 00009688 FF0FFFFF <1> mask_ysf: dd ~ (ifhfTestReserved1 | ifhfTestReserved2 | ifhfQuietInput | ifhfQuietOutput) 2300 <1> %if _BOOTLDR 2301 0000968C FEFFFFFF <1> mask_bootunitflags: dd ~ luf_mask_writable 2302 <1> %endif 2303 <1> 2304 <1> %if _DEBUG3 2305 <1> masks_test: 2306 <1> mask_test_0: dd 0AA55AA55h 2307 <1> mask_test_1: dd 00FF00FFh 2308 <1> mtest_regs: 2309 <1> mtest_reg_0: dd 0 2310 <1> mtest_reg_1: dd 00110022h 2311 <1> %endif 2312 <1> 2313 <1> 2314 <1> usesection lDEBUG_CODE 2315 <1> 2316 <1> %if _SYMBOLIC 2317 <1> ; INP: al = first character 2318 <1> ; si -> next character 2319 <1> ; OUT: CY if no symbol 2320 <1> ; NC if symbol, 2321 <1> ; bx:dx = symbol (offset) value 2322 <1> ; al = next character behind symbol 2323 <1> ; si -> behind next character 2324 <1> ; CHG: ah, bx, cx, dx 2325 <1> ; STT: ss = ds = es, UP 2326 <1> ; 2327 <1> ; Note: This invalidates the symbol table access slice. 2328 <1> issymbol?: 2329 <1> call zz_detect_xms ; re-detect XMS if used after run (eg WHILE) 2330 <1> 2331 <1> lframe near 2332 <1> lvar word, new_si 2333 <1> lenter 2334 <1> lvar word, orig_si 2335 <1> push si 2336 <1> lvar word, orig_ax 2337 <1> push ax 2338 <1> xor bx, bx 2339 <1> lequ 1, flag_has_nondigit 2340 <1> lequ 2, flag_has_symbol_prefix 2341 <1> lequ 4, flag_has_linear 2342 <1> lequ 8, flag_has_offset 2343 <1> lequ 16, flag_has_base 2344 <1> lequ 32, flag_is_86m_segment 2345 <1> lvar word, flags 2346 <1> push bx 2347 <1> lvar word, main_index ; used as parameter to zz_match_symbol 2348 <1> push ax 2349 <1> 2350 <1> dec si 2351 <1> %if 0 2352 <1> cmp al, '.' 2353 <1> jne @F 2354 <1> inc si ; allow dot prefix to symbol name 2355 <1> mov al, byte [si] 2356 <1> @@: 2357 <1> %endif 2358 <1> cmp al, '0' 2359 <1> jb @F 2360 <1> cmp al, '9' 2361 <1> jbe .not 2362 <1> @@: 2363 <1> 2364 <1> mov dx, msg.sl 2365 <1> call isstring? 2366 <1> jne @F 2367 <1> lodsb 2368 <1> cmp al, '.' 2369 <1> jne error 2370 <1> or byte [bp + ?flags], ?flag_has_symbol_prefix | ?flag_has_linear 2371 <1> jmp .not_symbol_prefix 2372 <1> @@: 2373 <1> 2374 <1> mov dx, msg.symbol 2375 <1> call isstring? 2376 <1> jne .not_symbol_prefix 2377 <1> lodsb 2378 <1> cmp al, '.' 2379 <1> jne error 2380 <1> or byte [bp + ?flags], ?flag_has_symbol_prefix 2381 <1> 2382 <1> mov dx, msg.linear 2383 <1> call isstring? 2384 <1> jne @F 2385 <1> lodsb 2386 <1> cmp al, '.' 2387 <1> jne error 2388 <1> or byte [bp + ?flags], ?flag_has_linear 2389 <1> @@: 2390 <1> 2391 <1> mov dx, msg.offset 2392 <1> call isstring? 2393 <1> jne @F 2394 <1> lodsb 2395 <1> cmp al, '.' 2396 <1> jne error 2397 <1> test byte [bp + ?flags], ?flag_has_linear 2398 <1> jnz error 2399 <1> or byte [bp + ?flags], ?flag_has_offset 2400 <1> @@: 2401 <1> 2402 <1> mov dx, msg.base 2403 <1> call isstring? 2404 <1> jne @F 2405 <1> lodsb 2406 <1> cmp al, '.' 2407 <1> jne error 2408 <1> test byte [bp + ?flags], ?flag_has_linear | ?flag_has_offset 2409 <1> jnz error 2410 <1> or byte [bp + ?flags], ?flag_has_base 2411 <1> @@: 2412 <1> 2413 <1> .not_symbol_prefix: 2414 <1> 2415 <1> xor bx, bx 2416 <1> mov dx, si 2417 <1> .loopname: 2418 <1> lodsb 2419 <1> call isseparator?.except_L_or_dot 2420 <1> je .endname 2421 <1> call getexpression.lit_ishexdigit? 2422 <1> jnc @F 2423 <1> or byte [bp + ?flags], ?flag_has_nondigit 2424 <1> @@: 2425 <1> inc bx 2426 <1> jmp .loopname 2427 <1> 2428 <1> .endname: 2429 <1> mov word [bp + ?new_si], si 2430 <1> mov cx, bx 2431 <1> test cx, cx 2432 <1> jz .not 2433 <1> 2434 <1> test byte [bp + ?flags], ?flag_has_nondigit | ?flag_has_symbol_prefix 2435 <1> jz .not 2436 <1> 2437 <1> mov si, dx 2438 <1> push cx 2439 <1> call zz_hash 2440 <1> pop cx 2441 <1> 2442 <1> .loop: 2443 <1> ; ?main_index used as parameter 2444 <1> push ss 2445 <1> push dx 2446 <1> push cx 2447 <1> 2448 <1> call zz_match_symbol ; ! note that possibly es != ss 2449 <1> jc .not 2450 <1> 2451 <1> testopt [es:di + smFlags], smfPoison 2452 <1> jz @F 2453 <1> setopt [internalflags2], dif2_poison 2454 <1> @@: 2455 <1> 2456 <1> mov dx, word [es:di + smLinear] 2457 <1> mov bx, word [es:di + smLinear + 2] 2458 <1> test byte [bp + ?flags], ?flag_has_linear 2459 <1> jnz .got 2460 <1> test byte [bp + ?flags], ?flag_has_base 2461 <1> jz .offset 2462 <1> .base: 2463 <1> ; offset=100 linear=10100 base=10000 2464 <1> sub dx, word [es:di + smOffset] 2465 <1> sbb bx, word [es:di + smOffset + 2] 2466 <1> jmp .got 2467 <1> 2468 <1> .offset: 2469 <1> mov si, word [bp + ?new_si] 2470 <1> dec si 2471 <1> call skipcomma ; does not use es 2472 <1> dec si 2473 <1> mov dx, msg.wrt 2474 <1> push es 2475 <1> push ss 2476 <1> pop es 2477 <1> call isstring? ; uses es 2478 <1> pop es 2479 <1> jne .offset_no_wrt 2480 <1> 2481 <1> call skipcomma ; does not use es 2482 <1> 2483 <1> cmp al, '$' 2484 <1> jne @F 2485 <1> 2486 <1> or byte [bp + ?flags], ?flag_is_86m_segment 2487 <1> call skipcomma ; does not use es 2488 <1> @@: 2489 <1> 2490 <1> push word [hh_depth_of_single_term] 2491 <1> mov dx, word [hh_depth] 2492 <1> inc dx 2493 <1> mov word [hh_depth_of_single_term], dx 2494 <1> push ss 2495 <1> pop es 2496 <1> call getexpression ; (recursive) uses es 2497 <1> pop word [hh_depth_of_single_term] 2498 <1> 2499 <1> ; The getexpression call may recurse into calling 2500 <1> ; this function itself again. Therefore, it can 2501 <1> ; invalidate the access slice. To make sure we 2502 <1> ; can access the SYMMAIN entry again, reload it. 2503 <1> push word [bp + ?main_index] 2504 <1> push ax ; (reserve space, uninitialised) 2505 <1> call getfarpointer.main 2506 <1> pop di 2507 <1> pop es 2508 <1> 2509 <1> call skipcomm0 ; does not use es 2510 <1> mov word [bp + ?new_si], si 2511 <1> 2512 <1> test bx, bx 2513 <1> jnz .error 2514 <1> 2515 <1> mov bx, dx 2516 <1> %if _PM 2517 <1> test byte [bp + ?flags], ?flag_is_86m_segment 2518 <1> jnz .wrt_rm 2519 <1> call ispm ; does not use es 2520 <1> jnz .wrt_rm 2521 <1> 2522 <1> mov ax, 0006h 2523 <1> int 31h ; cx:dx = base 2524 <1> jc .error 2525 <1> xchg ax, cx ; ax:dx = base 2526 <1> xchg dx, ax ; dx:ax = base 2527 <1> jmp .offset_wrt 2528 <1> 2529 <1> .wrt_rm: 2530 <1> %endif 2531 <1> xor dx, dx 2532 <1> mov ax, bx 2533 <1> mov cx, 4 2534 <1> @@: 2535 <1> shl ax, 1 2536 <1> rcl dx, 1 2537 <1> loop @B 2538 <1> 2539 <1> .offset_wrt: 2540 <1> ; dx:ax = seg base 2541 <1> 2542 <1> ; offset=100 2543 <1> ; linear=10100 2544 <1> ; seg base=8000 2545 <1> ; offset wrt seg=8100 2546 <1> neg dx 2547 <1> neg ax 2548 <1> sbb dx, byte 0 ; neg dx:ax 2549 <1> add ax, word [es:di + smLinear] 2550 <1> adc dx, word [es:di + smLinear + 2] ; linear - seg base 2551 <1> xchg ax, dx ; ax:dx = value 2552 <1> xchg ax, bx ; bx:dx = value 2553 <1> jmp .got 2554 <1> 2555 <1> .error: 2556 <1> jmp error ; does not use es 2557 <1> 2558 <1> 2559 <1> .offset_no_wrt: 2560 <1> mov dx, word [es:di + smOffset] 2561 <1> mov bx, word [es:di + smOffset + 2] 2562 <1> 2563 <1> .got: 2564 <1> testopt [es:di + smFlags], smfBase 2565 <1> jz @F 2566 <1> push word [bp + ?main_index] 2567 <1> pop word [sym_storage.main.based.base] 2568 <1> ; if called from zz_add set up base 2569 <1> @@: 2570 <1> 2571 <1> mov si, word [bp + ?new_si] 2572 <1> dec si 2573 <1> lodsb 2574 <1> clc 2575 <1> jmp .ret 2576 <1> .not: 2577 <1> stc 2578 <1> 2579 <1> mov si, word [bp + ?orig_si] 2580 <1> mov ax, word [bp + ?orig_ax] 2581 <1> .ret: 2582 <1> push ss 2583 <1> pop es ; reset es 2584 <1> lleave 2585 <1> retn 2586 <1> %endif 2587 <1> 2588 <1> 2589 <1> ; INP: al = first character 2590 <1> ; si-> next character 2591 <1> ; OUT: CY if no variable, 2592 <1> ; al, si = unchanged 2593 <1> ; NC if variable, 2594 <1> ; bx-> low word 2595 <1> ; dx-> high word 2596 <1> ; (if cl <= 2 then dx-> some word in our memory) 2597 <1> ; (dx != bx+2 if compound register) 2598 <1> ; cl = size of variable (1, 2, 3, 4 bytes) 2599 <1> ; ch = size of variable's name (2..13 bytes) 2600 <1> ; INP:si - 1 -> variable's name 2601 <1> ; (can be modified from original content) 2602 <1> ; ah = 0 if a writeable variable (ie simply memory) 2603 <1> ; 1 if a read-only variable (ie simply memory) 2604 <1> ; 2..33 if an MMX register, see note below 2605 <1> ; al = next character behind variable 2606 <1> ; si-> behind next character 2607 <1> ; dword [di] = mask of bits that are read-only 2608 <1> ; CHG: ah, bx, dx, cx, di 2609 <1> ; STT: ss = ds = es, UP 2610 <1> ; 2611 <1> ; Note: For read access to (half of) an MMX register, no 2612 <1> ; special handling is necessary at all, because cl, 2613 <1> ; bx, and dx are set up to access a buffer that 2614 <1> ; contains the current value. (The value should be 2615 <1> ; read at once though, as the buffer may be shared 2616 <1> ; or become outdated otherwise.) 2617 <1> ; Write access to an MMX register must be handled 2618 <1> ; specifically, however. The returned field type 2619 <1> ; in ah indicates the register number (0..7) in the 2620 <1> ; lowest three bits. The two bits above those specify 2621 <1> ; the access type, which also specifies what was read 2622 <1> ; but need not be examined by readers. The access 2623 <1> ; type must be adhered to by writers. These are the 2624 <1> ; access types: 2625 <1> ; 0 zero extension from 32 bits to write all 64 bits 2626 <1> ; 1 sign extension from 32 bits to write all 64 bits 2627 <1> ; 2 writes only low 32 bits 2628 <1> ; 3 writes only high 32 bits 2629 <1> ; (Access type 3 is the only one for which the read 2630 <1> ; buffer is initialised with the high 32 bits.) 2631 <1> ; 2632 <1> ; As dx points to 'some word in our memory' if it 2633 <1> ; doesn't serve any purpose, it is still valid to 2634 <1> ; read the word that it points to. Particularly dx 2635 <1> ; mustn't contain 0FFFFh then, but with the current 2636 <1> ; implementation, it can also be assumed that we do 2637 <1> ; actually 'own' the word (even with a PM segment 2638 <1> ; shorter than 64 KiB the read would be allowed). 2639 <1> isvariable?: 2640 0000A34D A8 <1> db __TEST_IMM8 ; (skip stc, NC) 2641 <1> 2642 <1> ; As above but additionally: 2643 <1> ; 2644 <1> ; INP: di -> buffer to receive variable name, 14 bytes 2645 <1> ; OUT: if NC, buffer filled with all-caps ASCIZ name 2646 <1> .return_name: 2647 0000A34E F9 <1> stc 2648 <1> 2649 0000A34F 4E <1> dec si 2650 <1> lframe 2651 0000A350 5589E5 <1> lenter 2652 <1> lvar word, bit0_is_return_name 2653 0000A353 9C <1> pushf 2654 <1> lvar word, return_name_pointer 2655 0000A354 57 <1> push di 2656 0000A355 31C0 <1> xor ax, ax 2657 <1> lvar 16, namebuffer 2658 0000A357 50 <1> push ax ; ax = 0 so that accidentally reading past 2659 <1> ; the actual buffer wouldn't match 2660 0000A358 FF740C <1> push word [si+12] 2661 0000A35B FF740A <1> push word [si+10] 2662 0000A35E FF7408 <1> push word [si+8] 2663 0000A361 FF7406 <1> push word [si+6] 2664 0000A364 FF7404 <1> push word [si+4] 2665 0000A367 FF7402 <1> push word [si+2] 2666 0000A36A FF34 <1> push word [si] 2667 0000A36C 89E7 <1> mov di, sp ; -> name buffer 2668 <1> 2669 <1> lvar word, fieldtype_high_flags_low 2670 <1> lequ ?fieldtype_high_flags_low + 1, fieldtype 2671 <1> lequ ?fieldtype_high_flags_low, flags 2672 0000A36E 50 <1> push ax ; field type initialised to 0 (RW), flags too 2673 0000A36F 31DB <1> _386 xor bx, bx ; (a flag for the 32-bit register name check) 2674 <1> lvar word, length_to_add 2675 0000A371 50 <1> push ax ; = 0 2676 <1> lvar word, startpointer 2677 0000A372 56 <1> push si ; -> name start 2678 0000A373 89FE <1> mov si, di 2679 0000A375 57 <1> push di 2680 <1> 2681 0000A376 B91000 <1> mov cx, 16 2682 <1> .store: 2683 0000A379 AC <1> lodsb 2684 <1> ; call uppercase ; (isseparator? calls uppercase) 2685 0000A37A E87CFA <1> call isseparator? 2686 0000A37D F8 <1> clc 2687 0000A37E 7501 <1> jne short .not_separator 2688 0000A380 F9 <1> stc 2689 <1> .not_separator: 2690 0000A381 D1DA <1> rcr dx, 1 ; dl = flags indicating separators 2691 0000A383 AA <1> stosb 2692 0000A384 E2F3 <1> loop .store 2693 <1> 2694 0000A386 5E <1> pop si 2695 <1> 2696 0000A387 F646FE01 <1> test byte [bp + ?bit0_is_return_name], 1 2697 0000A38B 7409 <1> jz @F 2698 <1> 2699 0000A38D 56 <1> push si 2700 0000A38E B107 <1> mov cl, 14 >> 1 2701 0000A390 8B7EFC <1> mov di, word [bp + ?return_name_pointer] 2702 0000A393 F3A5 <1> rep movsw 2703 0000A395 5E <1> pop si 2704 <1> 2705 <1> @@: 2706 0000A396 F6C214 <1> test dl, 1<<2|1<<4 2707 0000A399 AD <1> lodsw 2708 0000A39A 7472 <1> jz short .notreg16 2709 <1> 2710 0000A39C E85900 <1> call .reg16names_match ; (iff no match, --> .notreg16) 2711 <1> ; bx-> regs entry of (first) match 2712 0000A39F F6C204 <1> test dl, 1<<2 2713 0000A3A2 AD <1> lodsw 2714 0000A3A3 7403E9A200 <1> jnz .reg16 ; iff single match --> 2715 <1> 2716 0000A3A8 3D3030 <1> cmp ax, "00" 2717 0000A3AB 743E <1> je .compoundwithzero 2718 <1> 2719 <1> ; Check for a second 16-bit register name 2720 <1> ; (ie check for a compound register name) 2721 0000A3AD E84800 <1> call .reg16names_match ; (iff no match, --> .notreg16) 2722 <1> ; bx-> regs entry of second match 2723 0000A3B0 92 <1> xchg dx, ax ; dx-> regs entry of first match 2724 0000A3B1 B90404 <1> mov cx, 4<<8|4 2725 <1> .return_success: ; cx, bx, dx, ?fieldtype set 2726 0000A3B4 31C0 <1> xor ax, ax 2727 0000A3B6 88C8 <1> mov al, cl 2728 0000A3B8 F7D8 <1> neg ax 2729 0000A3BA 05[8096] <1> add ax, masks + 4 ; 4 - size = offset into masks 2730 0000A3BD 97 <1> xchg di, ax ; di -> mask 2731 0000A3BE 807EEB01 <1> cmp byte [bp + ?fieldtype], 1 2732 0000A3C2 7503 <1> jne @F 2733 0000A3C4 BF[8096] <1> mov di, mask_0byte ; di -> mask 2734 <1> @@: 2735 <1> .return_success_di: 2736 0000A3C7 31C0 <1> xor ax, ax 2737 0000A3C9 88E8 <1> mov al, ch ; ax = length 2738 <1> 2739 0000A3CB F646FE01 <1> test byte [bp + ?bit0_is_return_name], 1 2740 0000A3CF 7407 <1> jz @F 2741 <1> 2742 0000A3D1 8B76FC <1> mov si, word [bp + ?return_name_pointer] 2743 0000A3D4 01C6 <1> add si, ax 2744 0000A3D6 8824 <1> mov byte [si], ah ; zero-terminate 2745 <1> @@: 2746 <1> 2747 0000A3D8 5E <1> pop si ; ?startpointer 2748 0000A3D9 F646EA01 <1> testopt [bp + ?flags], 1 2749 0000A3DD 7402 <1> jz @F 2750 0000A3DF 58 <1> pop ax ; get length to add to start 2751 0000A3E0 50 <1> push ax ; fill stack slot again 2752 <1> @@: 2753 0000A3E1 01C6 <1> add si, ax ; -> behind name (should NC) 2754 0000A3E3 58 <1> pop ax ; discard ?length_to_add 2755 0000A3E4 F8 <1> clc ; (NC) 2756 <1> .return_ax_frame_lodsb: 2757 0000A3E5 58 <1> pop ax ; ah = ?type 2758 0000A3E6 89EC5D <1> lleave code 2759 0000A3E9 AC <1> lodsb 2760 <1> .retn: 2761 0000A3EA C3 <1> retn 2762 <1> 2763 <1> 2764 <1> .compoundwithzero: 2765 0000A3EB 89DA <1> mov dx, bx ; -> word to use as upper word 2766 0000A3ED BF[8496] <1> mov di, mask_compoundwithzero 2767 <1> ; only allow writing upper word 2768 0000A3F0 B90404 <1> mov cx, 4 << 8 | 4 ; 4-byte name, 4-byte variable 2769 0000A3F3 8D5D02 <1> lea bx, [di + 2] ; -> (constant) word that is zero, as lower word 2770 <1> ; This depends on the contents of mask_compoundwithzero. 2771 0000A3F6 EBCF <1> jmp .return_success_di 2772 <1> 2773 <1> 2774 <1> ; INP: ax = capitalised candidate register name 2775 <1> ; ch = 0 2776 <1> ; dx, si, bx, etc set up for later checks 2777 <1> ; OUT: Iff match, 2778 <1> ; bx-> associated regs entry (dword-aligned) 2779 <1> ; ax = INP:bx 2780 <1> ; Else, 2781 <1> ; returns to .notreg16 2782 <1> ; bx left unchanged on 386 systems 2783 <1> ; CHG: cl, di, bx, ax 2784 <1> ; 2785 <1> ; Note: The 32-bit register name check depends on the 2786 <1> ; fact that the low two bits of bx are set to 2787 <1> ; zero on a match, which is true because regs 2788 <1> ; is dword-aligned. 2789 <1> ; It also depends on bx being left unchanged on 2790 <1> ; a mismatch, which is the case unless the 2791 <1> ; non-386 additional FS,GS filtering occurs. 2792 <1> .reg16names_match: 2793 0000A3F8 BF[C881] <1> mov di, reg16names 2794 0000A3FB B110 <1> mov cl, 16 2795 0000A3FD F2AF <1> repne scasw 2796 0000A3FF 750C <1> jne short .notreg16_pop ; no match --> 2797 0000A401 01FF <1> add di, di 2798 0000A403 93 <1> xchg ax, bx ; (returned for compound register name match) 2799 0000A404 8D9D[C806] <1> lea bx, [di -2*(reg16names+DATASECTIONFIXUP+2) +regs] 2800 <1> ; -> regs entry 2801 0000A408 C3 <1> _386 retn 2802 <1> ; cx = number of remaining reg16names 2803 0000A409 D1E9 <1> _no386 shr cx, 1 ; cx = number of remaining reg16names pairs 2804 <1> ; = 1 iff exactly the IP,FL pair remaining 2805 <1> ; (ie matched one of FS,GS) 2806 0000A40B E2DD <1> _no386 loop .retn ; iff cx != 1, return the match --> 2807 <1> ; on non-386 systems, FS,GS matches fall through here 2808 <1> .notreg16_pop: 2809 0000A40D 58 <1> pop ax ; (discard near return address) 2810 <1> .notreg16: 2811 <1> ; Check for a 32-bit register name 2812 0000A40E F6C208 <1> _386 test dl, 1<<3 2813 0000A411 7419 <1> _386 jz short .notreg32 2814 <1> 2815 0000A413 8D76EC <1> _386 lea si, [bp+?namebuffer] 2816 0000A416 AC <1> _386 lodsb 2817 0000A417 D0EB <1> _386 shr bl, 1 ; CY iff second entry during same call 2818 <1> ; (in that case, al contains 'E') 2819 0000A419 1C45 <1> _386 sbb al, 'E' ; possibly an 'E' register ? (on first entry) 2820 0000A41B AD <1> _386 lodsw 2821 0000A41C 750E <1> _386 jne short .notreg32 ; no --> (or after second entry) 2822 0000A41E 43 <1> _386 inc bx ; prepare flag for second entry 2823 <1> ; (this requires regs to be dword-aligned!) 2824 0000A41F 80FC53 <1> _386 cmp ah, 'S' ; candidate segment register ? 2825 0000A422 7408 <1> _386 je short .notreg32 ; yes, skip check (disallow match) --> 2826 <1> 2827 0000A424 E8D1FF <1> _386 call .reg16names_match ; (iff no match, --> .notreg16 (second entry)) 2828 <1> ; bx-> regs entry of match 2829 0000A427 B90403 <1> _386 mov cx, 3<<8|4 2830 0000A42A EB22 <1> _386 jmp short .return_success_var32_set_dx 2831 <1> 2832 <1> .notreg32: 2833 <1> ; Check for an 8-bit register name 2834 0000A42C F6C204 <1> test dl, 1<<2 2835 0000A42F 7423 <1> jz short .notreg8 2836 <1> 2837 0000A431 8D76EC <1> lea si, [bp+?namebuffer] 2838 0000A434 AD <1> lodsw 2839 0000A435 BF[B881] <1> mov di, reg8names 2840 0000A438 B108 <1> mov cl, 8 2841 0000A43A F2AF <1> repne scasw 2842 0000A43C 7516 <1> jne short .notreg8 2843 <1> ; cx = cl = number of remaining reg8names 2844 0000A43E 80E101 <1> and cl, 1 ; cx = cl = 1 iff an xL register, else 0 2845 0000A441 8D9DA18A <1> lea bx, [di-reg8names-2+regs-1] 2846 <1> ; bx-> reg_eax-1 if AL, reg_eax+1 if AH, etc 2847 0000A445 01CB <1> add bx, cx ; bx-> reg_eax if AL, reg_eax+1 if AH, etc 2848 0000A447 B101 <1> mov cl, 1 2849 <1> 2850 0000A449 A9 <1> db __TEST_IMM16 ; (NC, skip mov) 2851 <1> .reg16: 2852 0000A44A B102 <1> mov cl, 2 2853 <1> .got2bytename: 2854 <1> .got2bytename_var32_set_dx: 2855 0000A44C B502 <1> mov ch, 2 2856 <1> .return_success_var32_set_dx: 2857 0000A44E 8D5702 <1> lea dx, [bx+2] ; (irrelevant to 8-/16-bit register return) 2858 <1> %define .return_success_j .return_success_j1 2859 <1> %[.return_success_j]: 2860 0000A451 E960FF <1> jmp .return_success 2861 <1> 2862 <1> .notreg8: 2863 <1> 2864 0000A454 BF[7694] <1> mov di, isvariable_morebyte_nameheaders 2865 <1> 2866 <1> .loop: 2867 0000A457 8B46EC <1> mov ax, word [bp + ?namebuffer] 2868 0000A45A B9[4695] <1> mov cx, isvariable_morebyte_nameheaders.end 2869 0000A45D 39CF <1> cmp di, cx 2870 0000A45F 730A <1> jae @F 2871 0000A461 29F9 <1> sub cx, di 2872 0000A463 D1E9 <1> shr cx, 1 ; = how many headers remaining 2873 0000A465 F2AF <1> repne scasw 2874 0000A467 741E <1> je .check_morebyte 2875 <1> %if IVS_HAVE_ONEBYTE 2876 0000A469 EB0C <1> jmp .next_no_pop 2877 <1> 2878 <1> @@: 2879 <1> %if IVS_SINGLE_ONEBYTE 2880 0000A46B 41 <1> inc cx 2881 0000A46C 39CF <1> cmp di, cx ; iteration after one byte var check ? 2882 0000A46E 7309 <1> jae @F ; yes, end --> 2883 0000A470 47 <1> inc di ; remember we did the one byte check 2884 0000A471 3C56 <1> cmp al, IVS_SINGLE_ONEBYTE_NAME 2885 0000A473 7407 <1> je .check_onebyte 2886 <1> %else 2887 <1> mov cx, isvariable_onebyte_names.end 2888 <1> sub cx, di ; = how many names remaining 2889 <1> jbe @F ; if none --> 2890 <1> repne scasb 2891 <1> je .check_onebyte 2892 <1> %endif 2893 <1> %endif 2894 0000A475 A8 <1> db __TEST_IMM8 ; (skip pop) 2895 <1> .next: 2896 0000A476 5F <1> pop di 2897 <1> .next_no_pop: 2898 0000A477 EBDE <1> jmp .loop 2899 <1> 2900 <1> @@: 2901 0000A479 E94801 <1> jmp .end 2902 <1> 2903 <1> 2904 <1> %if IVS_HAVE_ONEBYTE 2905 <1> .check_onebyte: 2906 0000A47C 57 <1> push di 2907 <1> %if IVS_SINGLE_ONEBYTE 2908 0000A47D BB[2091] <1> mov bx, isvariable_struc_onebyte_list 2909 <1> %else 2910 <1> sub di, isvariable_onebyte_names + 1 2911 <1> ; = index 2912 <1> %if ISVARIABLESTRUC_size == 8 2913 <1> add di, di ; = index * 2 2914 <1> add di, di ; = index * 4 2915 <1> add di, di ; = index * 8 2916 <1> %else 2917 <1> %error Unexpected structure size 2918 <1> %endif 2919 <1> lea bx, [di + isvariable_struc_onebyte_list] 2920 <1> %endif 2921 0000A480 8D76ED <1> lea si, [bp + ?namebuffer + 1] ; -> buffered string (allcaps) 2922 0000A483 31C9 <1> xor cx, cx ; = 0, gets incremented next 2923 0000A485 EB21 <1> jmp @F 2924 <1> %endif 2925 <1> 2926 <1> .check_morebyte: 2927 0000A487 57 <1> push di 2928 0000A488 81EF[7894] <1> sub di, isvariable_morebyte_nameheaders + 2 2929 <1> ; = index * 2 2930 <1> %if ISVARIABLESTRUC_size == 8 2931 0000A48C 01FF <1> add di, di ; = index * 4 2932 0000A48E 01FF <1> add di, di ; = index * 8 2933 <1> %else 2934 <1> %error Unexpected structure size 2935 <1> %endif 2936 0000A490 8D9D[2891] <1> lea bx, [di + isvariable_struc_morebyte_list] 2937 0000A494 8B4F02 <1> mov cx, word [bx + ivFlags] 2938 0000A497 83E10F <1> and cx, ivfNameLengthMask ; cx = length 2939 0000A49A 8B3F <1> mov di, word [bx + ivName] ; -> name 2940 0000A49C 8D76EE <1> lea si, [bp + ?namebuffer + 2] ; -> buffered string (allcaps) 2941 0000A49F 38C0 <1> cmp al, al ; ZR (in case remaining length is zero) 2942 0000A4A1 51 <1> push cx 2943 0000A4A2 F3A6 <1> repe cmpsb ; compare 2944 0000A4A4 59 <1> pop cx 2945 0000A4A5 75CF <1> jne .next ; if not same --> 2946 0000A4A7 41 <1> inc cx ; increment twice 2947 <1> @@: 2948 0000A4A8 41 <1> inc cx ; increment once 2949 0000A4A9 AC <1> lodsb ; get next byte in buffer 2950 0000A4AA 807F0600 <1> cmp byte [bx + ivArrayLast], 0 2951 0000A4AE 7503E9BC00 <1> je .notarray 2952 <1> 2953 <1> .array: 2954 0000A4B3 3C28 <1> cmp al, '(' 2955 0000A4B5 754B <1> jne .array_not_index_expression ; not index expression --> 2956 <1> 2957 <1> .array_index_expression: 2958 0000A4B7 8B76E6 <1> mov si, word [bp + ?startpointer] 2959 0000A4BA 01CE <1> add si, cx ; -> at opening parens 2960 0000A4BC 46 <1> inc si ; -> behind opening parens 2961 0000A4BD AC <1> lodsb 2962 0000A4BE 52 <1> push dx 2963 0000A4BF E87807 <1> call getbyte 2964 0000A4C2 B600 <1> mov dh, 0 2965 0000A4C4 89D7 <1> mov di, dx ; di = index 2966 0000A4C6 5A <1> pop dx 2967 0000A4C7 E8D908 <1> call skipwh0 2968 0000A4CA 3C29 <1> cmp al, ')' ; insure closing parens 2969 0000A4CC 7403E99B00 <1> jne .error_j1 2970 <1> 2971 0000A4D1 56 <1> push si 2972 0000A4D2 2B76E6 <1> sub si, word [bp + ?startpointer] 2973 <1> ; = how much to skip 2974 0000A4D5 8976E8 <1> mov word [bp + ?length_to_add], si 2975 0000A4D8 5E <1> pop si 2976 0000A4D9 804EEA01 <1> setopt [bp + ?flags], 1 2977 <1> 2978 0000A4DD F646FE01 <1> test byte [bp + ?bit0_is_return_name], 1 2979 0000A4E1 7415 <1> jz .array_no_return_name 2980 <1> 2981 0000A4E3 97 <1> xchg ax, di 2982 0000A4E4 8B7EFC <1> mov di, word [bp + ?return_name_pointer] 2983 0000A4E7 01CF <1> add di, cx ; -> behind name 2984 0000A4E9 807F060F <1> cmp byte [bx + ivArrayLast], 0Fh 2985 0000A4ED 7705 <1> ja @F ; if >= 10h is a valid index --> 2986 0000A4EF E86D09 <1> call hexnyb ; expand to single digit 2987 0000A4F2 EB03 <1> jmp @FF 2988 <1> @@: 2989 0000A4F4 E85D09 <1> call hexbyte ; expand to two digits 2990 <1> @@: 2991 0000A4F7 97 <1> xchg ax, di ; restore di = index 2992 <1> 2993 <1> .array_no_return_name: 2994 0000A4F8 41 <1> inc cx ; make space for one digit 2995 0000A4F9 807F060F <1> cmp byte [bx + ivArrayLast], 0Fh 2996 0000A4FD 7601 <1> jna @F ; if maximum index <= 0Fh --> 2997 0000A4FF 41 <1> inc cx ; make space for another digit 2998 <1> @@: 2999 0000A500 EB57 <1> jmp .array_index_expression_common 3000 <1> 3001 <1> .array_not_index_expression: 3002 0000A502 E8F4F8 <1> call isseparator? ; name ends ? 3003 0000A505 7509 <1> jne @F ; no --> 3004 0000A507 F6470302 <1> testopt [bx + ivFlags], ivfArrayOptional 3005 <1> ; is the index optional ? 3006 0000A50B 7567 <1> jnz .arrayfirst ; yes, handle as if first --> 3007 <1> .next_j1: 3008 0000A50D E966FF <1> jmp .next ; no, mismatch --> 3009 <1> 3010 <1> @@: 3011 0000A510 E83E07 <1> call getnyb 3012 0000A513 72F8 <1> jc .next_j1 3013 0000A515 98 <1> cbw ; ax = first nybble of index 3014 0000A516 97 <1> xchg di, ax ; di = first nybble of index 3015 0000A517 AC <1> lodsb 3016 0000A518 F6470304 <1> testopt [bx + ivFlags], ivfSeparatorSpecial 3017 0000A51C 7408 <1> jz @F 3018 0000A51E 807F060F <1> cmp byte [bx + ivArrayLast], 0Fh 3019 <1> ; highest > 0Fh ? 3020 0000A522 7629 <1> jna .gotseparatorspecial; no --> 3021 0000A524 EB0B <1> jmp .get_second_digit 3022 <1> 3023 <1> @@: 3024 0000A526 E8D0F8 <1> call isseparator? ; single digit ? 3025 0000A529 7422 <1> je @F ; yes --> 3026 0000A52B 807F060F <1> cmp byte [bx + ivArrayLast], 0Fh 3027 <1> ; highest > 0Fh ? 3028 0000A52F 76DC <1> jna .next_j1 ; no --> 3029 <1> .get_second_digit: 3030 0000A531 E81D07 <1> call getnyb 3031 0000A534 72D7 <1> jc .next_j1 3032 0000A536 98 <1> cbw ; ax = second nybble of index 3033 0000A537 01FF <1> add di, di 3034 0000A539 01FF <1> add di, di 3035 0000A53B 01FF <1> add di, di 3036 0000A53D 01FF <1> add di, di ; di = first digit times 16 3037 0000A53F 01C7 <1> add di, ax ; di = full index 3038 0000A541 AC <1> lodsb 3039 0000A542 F6470304 <1> testopt [bx + ivFlags], ivfSeparatorSpecial 3040 0000A546 7505 <1> jnz @F 3041 0000A548 E8AEF8 <1> call isseparator? 3042 0000A54B 75C0 <1> jne .next_j1 3043 <1> @@: 3044 <1> .gotseparatorspecial: 3045 <1> 3046 0000A54D F7DE <1> neg si ; minus -> after separator 3047 0000A54F 8D4AED <1> lea cx, [bp + ?namebuffer + 1 + si] 3048 <1> ; -> buffered string plus 1 minus -> after separator 3049 <1> ; -> buffered string plus 1 minus (-> at separator plus 1) 3050 <1> ; -> buffered string minus -> at separator 3051 0000A552 F7D9 <1> neg cx ; -> at separator minus -> buffered string 3052 0000A554 8B76E6 <1> mov si, word [bp + ?startpointer] 3053 0000A557 01CE <1> add si, cx 3054 <1> 3055 <1> .array_index_expression_common: 3056 <1> ; si -> behind index 3057 0000A559 89F8 <1> mov ax, di 3058 <1> ; test ah, ah 3059 <1> ; jnz .error_j1 ; (not possible) 3060 0000A55B 3A4706 <1> cmp al, byte [bx + ivArrayLast] 3061 <1> ; index > last ? 3062 0000A55E 770C <1> ja .error_j1 ; then error --> 3063 <1> 3064 0000A560 F6470301 <1> testopt [bx + ivFlags], ivfArrayOneBased 3065 0000A564 7403 <1> jz @F ; got index 3066 0000A566 48 <1> dec ax ; decrement index to get 0-based 3067 0000A567 7803 <1> js .error_j1 ; if it was 0, invalid --> 3068 <1> @@: 3069 0000A569 96 <1> xchg ax, si ; si = index 3070 0000A56A EB0A <1> jmp .arraycommon ; continue 3071 <1> 3072 <1> .error_j1: 3073 0000A56C E94DF3 <1> jmp error 3074 <1> 3075 <1> 3076 <1> .notarray: 3077 0000A56F E887F8 <1> call isseparator? ; name ends ? 3078 0000A572 7599 <1> jne .next_j1 ; no, mismatch --> 3079 <1> 3080 <1> .arrayfirst: 3081 0000A574 31F6 <1> xor si, si ; si = array index (0 here) 3082 <1> 3083 <1> .arraycommon: 3084 0000A576 88CD <1> mov ch, cl ; ch = name length 3085 0000A578 8B4702 <1> mov ax, word [bx + ivFlags] 3086 0000A57B 83E030 <1> and ax, ivfVarLengthMask; ax = shifted encoded var length 3087 0000A57E B104 <1> mov cl, ivfVarLengthShift 3088 0000A580 D3E8 <1> shr ax, cl ; ax = encoded var length 3089 0000A582 40 <1> inc ax ; decode var length 3090 0000A583 88C1 <1> mov cl, al ; cl = var length 3091 <1> 3092 0000A585 96 <1> xchg ax, si ; ax = array index 3093 <1> 3094 0000A586 F6470280 <1> testopt [bx + ivFlags], ivfReadOnly 3095 0000A58A 7403 <1> jz @F 3096 0000A58C FE46EB <1> inc byte [bp + ?fieldtype] 3097 <1> ; = 1 (RO) 3098 <1> @@: 3099 0000A58F 31FF <1> xor di, di 3100 0000A591 8B7704 <1> mov si, word [bx + ivAddress] 3101 0000A594 F6470240 <1> testopt [bx + ivFlags], ivfSpecialSetUp 3102 0000A598 7407 <1> jz .notspecial 3103 <1> ; (NC) 3104 0000A59A FFD6 <1> call si ; INP: ax = array index (0-based), di = 0 3105 <1> ; CHG: si, ax 3106 <1> ; OUT: NC if valid, 3107 <1> ; bx -> var, di = 0 or di -> mask 3108 0000A59C 7318 <1> jnc @F 3109 0000A59E E9D5FE <1> jmp .next 3110 <1> 3111 <1> .notspecial: 3112 0000A5A1 8A5F07 <1> mov bl, byte [bx + ivArrayBetween] 3113 0000A5A4 B700 <1> mov bh, 0 ; bx = array between offset 3114 0000A5A6 00CB <1> add bl, cl 3115 0000A5A8 80D700 <1> adc bh, 0 ; bx = array item size 3116 0000A5AB F7E3 <1> mul bx ; dx:ax = ax times bx 3117 0000A5AD 85D2 <1> test dx, dx 3118 0000A5AF 75BB <1> jnz .error_j1 3119 0000A5B1 01F0 <1> add ax, si ; ax -> variable 3120 0000A5B3 72B7 <1> jc .error_j1 3121 0000A5B5 93 <1> xchg ax, bx ; bx -> variable 3122 <1> @@: 3123 0000A5B6 5A <1> pop dx ; (discard pointer into names/headers) 3124 0000A5B7 8D5702 <1> lea dx, [bx+2] ; (irrelevant to 8-/16-bit register return) 3125 0000A5BA 85FF <1> test di, di 3126 0000A5BC 7503E9F3FD <1> jz .return_success 3127 0000A5C1 E903FE <1> jmp .return_success_di 3128 <1> 3129 <1> 3130 <1> .end: 3131 <1> %if _MMXSUPP 3132 <1> ;MMx MMxf MM(x) MM(x)f 3133 0000A5C4 F6C278 <1> test dl, 1<<3|1<<4| 1<<5| 1<<6 3134 0000A5C7 746A <1> jz short .notmmx 3135 <1> 3136 0000A5C9 8D76EC <1> lea si, [bp+?namebuffer] 3137 0000A5CC 803E[120B]00 <1> cmp byte [has_mmx], 0 ; MMX supported ? 3138 0000A5D1 7460 <1> je short .notmmx ; no --> 3139 <1> [cpu 586] 3140 0000A5D3 AD <1> lodsw 3141 0000A5D4 3D4D4D <1> cmp ax, "MM" ; possibly an MMX register ? 3142 0000A5D7 755A <1> jne short .notmmx ; no --> 3143 0000A5D9 AC <1> lodsb 3144 0000A5DA E85C01 <1> call getstmmxdigit 3145 0000A5DD 7254 <1> jc short .notmmx 3146 0000A5DF 88DC <1> mov ah, bl 3147 0000A5E1 C0E303 <1> shl bl, 3 ; shift into reg field 3148 0000A5E4 8D4C14 <1> lea cx, [si-?namebuffer] 3149 0000A5E7 80CB06 <1> or bl, 06h ; code to get our ModR/M byte (r/m = [ofs]) 3150 0000A5EA 29E9 <1> sub cx, bp ; length of name (if with suffix) 3151 0000A5EC 881E[1EA6] <1> mov byte [.getmmxlow_modrm], bl 3152 0000A5F0 43 <1> inc bx ; adjust the ModR/M byte (r/m = [bx]) 3153 0000A5F1 AC <1> lodsb 3154 0000A5F2 881E[43A6] <1> mov byte [.getmmxhigh_modrm], bl 3155 0000A5F6 4E <1> dec si 3156 0000A5F7 4E <1> dec si 3157 <1> 3158 0000A5F8 E8FEF7 <1> call isseparator? ; a separator after potential suffix ? 3159 0000A5FB AC <1> lodsb 3160 0000A5FC B700 <1> mov bh, 0 3161 0000A5FE 7516 <1> jne short .check_mmx_no_suffix ; no --> 3162 <1> 3163 0000A600 3C5A <1> cmp al, 'Z' 3164 0000A602 7418 <1> je short .getmmxlow ; 0 = ZX --> 3165 0000A604 B710 <1> mov bh, 2<<3 ; = 10h = low 3166 0000A606 3C4C <1> cmp al, 'L' 3167 0000A608 7412 <1> je short .getmmxlow 3168 0000A60A B708 <1> mov bh, 1<<3 ; = 8h = SX 3169 0000A60C 3C53 <1> cmp al, 'S' 3170 0000A60E 740C <1> je short .getmmxlow 3171 0000A610 3C48 <1> cmp al, 'H' 3172 0000A612 7425 <1> je short .getmmxhigh 3173 0000A614 B700 <1> mov bh, 0 ; 0 = ZX 3174 <1> .check_mmx_no_suffix: 3175 0000A616 49 <1> dec cx ; length of name (if no suffix follows) 3176 0000A617 E8DFF7 <1> call isseparator? ; immediately a separator (but no suffix) ? 3177 0000A61A 7517 <1> jne short .notmmx ; no --> 3178 <1> ; yes, (default to) zero-extending full reg 3179 <1> .getmmxlow: 3180 <1> .getmmxlow_modrm: equ $+2 ; (opcode adjusted for the right MMX reg) 3181 0000A61C 0F7E06[D80B] <1> movd dword [mmxbuff], mm0 3182 0000A621 08FC <1> or ah, bh 3183 <1> 3184 <1> .mmxcommon: 3185 0000A623 80C402 <1> add ah, 2 3186 0000A626 B504 <1> mov ch, 4 3187 0000A628 86CD <1> xchg cl, ch 3188 0000A62A BB[D80B] <1> mov bx, mmxbuff 3189 0000A62D 8866EB <1> mov byte [bp+?fieldtype], ah 3190 <1> .return_success_var32_set_dx_j: 3191 0000A630 E91BFE <1> jmp .return_success_var32_set_dx 3192 <1> __CPU__ 3193 <1> 3194 <1> .notmmx: 3195 <1> %endif 3196 <1> 3197 <1> .return_failure: 3198 0000A633 5E <1> pop si ; ?startpointer 3199 0000A634 58 <1> pop ax ; ?length_to_add 3200 0000A635 F9 <1> stc 3201 0000A636 E9ACFD <1> jmp .return_ax_frame_lodsb 3202 <1> 3203 <1> 3204 <1> %if _MMXSUPP 3205 <1> [cpu 586] 3206 <1> .getmmxhigh: 3207 0000A639 83EC08 <1> sub sp, byte 8 3208 0000A63C 80CC18 <1> or ah, 3<<3 ; = 18h = high 3209 0000A63F 89E3 <1> mov bx, sp ; (ss = ds) 3210 <1> .getmmxhigh_modrm: equ $+2 ; (opcode adjusted for the right MMX reg) 3211 0000A641 0F7F07 <1> movq qword [bx], mm0 3212 0000A644 5B <1> pop bx 3213 0000A645 5B <1> pop bx ; discard low dword 3214 0000A646 668F06[D80B] <1> pop dword [mmxbuff] ; save high dword here 3215 0000A64B EBD6 <1> jmp short .mmxcommon 3216 <1> __CPU__ 3217 <1> %endif 3218 <1> 3219 <1> 3220 <1> var_ri_setup: 3221 0000A64D 8D76F0 <1> lea si, [bp + ?namebuffer + 4] 3222 0000A650 F646EA01 <1> testopt [bp + ?flags], 1 3223 0000A654 7409 <1> jz @F 3224 0000A656 8B76E6 <1> mov si, word [bp + ?startpointer] 3225 0000A659 0376E8 <1> add si, word [bp + ?length_to_add] 3226 0000A65C FF46E8 <1> inc word [bp + ?length_to_add] 3227 <1> @@: 3228 0000A65F 50 <1> push ax 3229 0000A660 AC <1> lodsb ; al = last letter 3230 0000A661 E856DB <1> call uppercase 3231 0000A664 88C7 <1> mov bh, al ; bh = letter 3232 0000A666 3C4C <1> cmp al, 'L' ; valid one ? 3233 0000A668 740C <1> je @F 3234 0000A66A 3C4F <1> cmp al, 'O' 3235 0000A66C 7408 <1> je @F 3236 0000A66E 3C53 <1> cmp al, 'S' 3237 0000A670 7404 <1> je @F 3238 0000A672 3C50 <1> cmp al, 'P' 3239 0000A674 755F <1> jne .ret_CY_pop ; no --> 3240 <1> @@: ; is valid letter 3241 0000A676 AC <1> lodsb ; = candidate separator 3242 0000A677 E87FF7 <1> call isseparator? ; is it ? 3243 0000A67A 7559 <1> jne .ret_CY_pop ; no --> 3244 0000A67C 58 <1> pop ax 3245 <1> 3246 0000A67D F646FE01 <1> test byte [bp + ?bit0_is_return_name], 1 3247 0000A681 7408 <1> jz .interrupt_no_return_name 3248 <1> 3249 0000A683 8B7EFC <1> mov di, word [bp + ?return_name_pointer] 3250 0000A686 83C704 <1> add di, 4 3251 0000A689 883D <1> mov byte [di], bh ; store the additional letter 3252 <1> 3253 <1> .interrupt_no_return_name: 3254 0000A68B FEC5 <1> inc ch ; increment name length 3255 0000A68D 93 <1> xchg ax, bx 3256 <1> 3257 <1> ; INP: bx = interrupt number 0..255 3258 <1> ; ah = 'S' for segment, 'O' for offset, 'L' for linear 3259 0000A68E 31F6 <1> xor si, si 3260 <1> %if _PM 3261 <1> push bx 3262 <1> call setds2si ; ds => IVT 3263 <1> pop bx 3264 <1> %else 3265 0000A690 8EDE <1> mov ds, si ; ds => IVT 3266 <1> %endif 3267 0000A692 80FC53 <1> cmp ah, 'S' 3268 0000A695 7502 <1> jne @F 3269 0000A697 46 <1> inc si 3270 0000A698 46 <1> inc si ; si = 2 (displacement to get segment) 3271 <1> @@: 3272 0000A699 01DB <1> add bx, bx 3273 0000A69B 01DB <1> add bx, bx ; ds:bx -> IVT entry 3274 0000A69D FF7002 <1> push word [bx + si + 2] 3275 0000A6A0 FF30 <1> push word [bx + si] ; get segment:offset or trash:segment 3276 0000A6A2 16 <1> push ss 3277 0000A6A3 1F <1> pop ds 3278 0000A6A4 BB[6894] <1> mov bx, interrupt_var 3279 0000A6A7 8F07 <1> pop word [bx] 3280 0000A6A9 8F4702 <1> pop word [bx + 2] 3281 <1> ; store in variable 3282 0000A6AC 80FC50 <1> cmp ah, 'P' ; for pointer type ? 3283 0000A6AF 741F <1> je .var_size_4 ; yes --> 3284 0000A6B1 80FC4C <1> cmp ah, 'L' 3285 0000A6B4 751C <1> jne @FF 3286 0000A6B6 51 <1> push cx 3287 0000A6B7 31C0 <1> xor ax, ax 3288 0000A6B9 874702 <1> xchg ax, word [bx + 2] ; clear high word, get segment 3289 0000A6BC 31D2 <1> xor dx, dx ; dx:ax = segment 3290 0000A6BE B90400 <1> mov cx, 4 3291 <1> @@: 3292 0000A6C1 D1E0 <1> shl ax, 1 3293 0000A6C3 D1D2 <1> rcl dx, 1 3294 0000A6C5 E2FA <1> loop @B ; shift up 4 bits 3295 0000A6C7 0107 <1> add word [bx], ax 3296 0000A6C9 115702 <1> adc word [bx + 2], dx ; add to dword 3297 0000A6CC 59 <1> pop cx 3298 0000A6CD B103 <1> mov cl, 3 ; 3byte variable (21 bits needed) 3299 0000A6CF A9 <1> db __TEST_IMM16 ; (skip mov) 3300 <1> .var_size_4: 3301 0000A6D0 B104 <1> mov cl, 4 ; dword variable 3302 <1> @@: 3303 0000A6D2 31FF <1> xor di, di ; (NC) 3304 0000A6D4 C3 <1> retn 3305 <1> 3306 <1> .ret_CY_pop: 3307 0000A6D5 58 <1> pop ax 3308 <1> .ret_CY: 3309 0000A6D6 F9 <1> stc 3310 0000A6D7 C3 <1> retn 3311 <1> 3312 <1> 3313 <1> 3314 <1> %if _INPUT_FILE_BOOT || _INPUT_FILE_HANDLES 3315 <1> var_ysf_setup: 3316 0000A6D8 93 <1> xchg ax, bx ; bx = index 3317 0000A6D9 8A46ED <1> mov al, byte [bp + ?namebuffer + 1] 3318 0000A6DC 3C53 <1> cmp al, 'S' 3319 0000A6DE 750B <1> jne @F 3320 <1> %if _INPUT_FILE_BOOT 3321 0000A6E0 F606[CB00]02 <1> testopt [internalflags2], dif2_input_file_boot 3322 0000A6E5 B042 <1> mov al, 'B' 3323 0000A6E7 7502 <1> jnz @F 3324 <1> %endif 3325 0000A6E9 B048 <1> mov al, 'H' 3326 <1> @@: 3327 0000A6EB 3C42 <1> cmp al, 'B' 3328 0000A6ED 7509 <1> jne @F 3329 <1> %if _INPUT_FILE_BOOT 3330 0000A6EF F606[CB00]02 <1> testopt [internalflags2], dif2_input_file_boot 3331 0000A6F4 750D <1> jnz @FF 3332 <1> %endif 3333 <1> .notysf: 3334 0000A6F6 F9 <1> stc 3335 0000A6F7 C3 <1> retn 3336 <1> @@: 3337 <1> %if _INPUT_FILE_HANDLES 3338 0000A6F8 3C48 <1> cmp al, 'H' 3339 0000A6FA 75FA <1> jne short .notysf 3340 0000A6FC F606[CA00]10 <1> testopt [internalflags2], dif2_input_file 3341 0000A701 74F3 <1> jz .notysf 3342 <1> %else 3343 <1> jmp .notysf 3344 <1> %endif 3345 <1> @@: 3346 <1> ; bx = index 3347 <1> %if _INPUT_FILE_HANDLES 3348 0000A703 BF[B80A] <1> mov di, input_file_handles.active 3349 <1> ; -> active index for YHF 3350 <1> %endif 3351 <1> %if _INPUT_FILE_BOOT 3352 <1> %if _INPUT_FILE_HANDLES 3353 0000A706 3C42 <1> cmp al, 'B' 3354 0000A708 7503 <1> jne @F 3355 <1> %endif 3356 0000A70A BF[308F] <1> mov di, load_input_file.active 3357 <1> ; -> active index for YBF 3358 <1> @@: 3359 <1> %endif 3360 0000A70D F7DB <1> neg bx ; -1 .. 0 3361 0000A70F 7406 <1> jz @F ; if 0, always valid --> 3362 <1> ; index was nonzero, meaning bx now holds a 3363 <1> ; negative number. if [.active] is large enough, 3364 <1> ; adding it to bx yields a positive number, which 3365 <1> ; carries in the addition. check for that. 3366 0000A711 031D <1> add bx, word [di] 3367 0000A713 73E1 <1> jnc .notysf ; not valid index --> 3368 0000A715 EB02 <1> jmp @FF ; valid, use it 3369 <1> @@: 3370 0000A717 031D <1> add bx, word [di] 3371 <1> ; 0 means the topmost level 3372 <1> @@: 3373 <1> %if _INPUT_FILE_BOOT 3374 <1> %if _INPUT_FILE_HANDLES 3375 0000A719 3C42 <1> cmp al, 'B' 3376 0000A71B 750D <1> jne @F 3377 <1> %endif 3378 <1> 3379 0000A71D B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 3380 0000A720 93 <1> xchg ax, bx 3381 0000A721 F7E3 <1> mul bx ; dx ignored, should be zero 3382 0000A723 93 <1> xchg ax, bx ; bx = offset into array 3383 0000A724 81C3[D68C] <1> add bx, load_input_file - LOADDATA3 + ldFATType 3384 <1> ; -> flag word 3385 0000A728 EB0A <1> jmp @FF 3386 <1> 3387 <1> @@: 3388 <1> %endif 3389 <1> %if _INPUT_FILE_HANDLES 3390 0000A72A D1E3 <1> shl bx, 1 3391 0000A72C D1E3 <1> shl bx, 1 3392 0000A72E D1E3 <1> shl bx, 1 ; to qword array index 3393 <1> %if INPUTFILEHANDLE_size != 8 3394 <1> %error Unexpected structure size 3395 <1> %endif 3396 0000A730 81C3[3A0A] <1> add bx, input_file_handles + ifhFlags 3397 <1> ; -> flags word 3398 <1> %endif 3399 <1> @@: 3400 0000A734 BF[8896] <1> mov di, mask_ysf ; give the mask of read-only bits 3401 0000A737 F8 <1> clc 3402 0000A738 C3 <1> retn 3403 <1> %endif 3404 <1> 3405 <1> 3406 <1> lleave ctx 3407 <1> 3408 <1> 3409 <1> ; INP: al, si-> string 3410 <1> ; OUT: CY if no valid digit 0..7 3411 <1> ; NC if valid digit, 3412 <1> ; bl = 0..7 3413 <1> ; al, si-> behind digit specification 3414 <1> ; CHG: bl 3415 <1> getstmmxdigit: 3416 0000A739 3C28 <1> cmp al, '(' 3417 0000A73B 7407 <1> je .paropen 3418 0000A73D E81A00 <1> call .isdigit? 3419 0000A740 7201 <1> jc .ret 3420 <1> .retlodsb: 3421 0000A742 AC <1> lodsb 3422 <1> .ret: 3423 0000A743 C3 <1> retn 3424 <1> 3425 <1> .paropen: 3426 0000A744 50 <1> push ax 3427 0000A745 56 <1> push si 3428 0000A746 AC <1> lodsb 3429 0000A747 E81000 <1> call .isdigit? 3430 0000A74A 720B <1> jc .retpop 3431 0000A74C AC <1> lodsb 3432 0000A74D 3C29 <1> cmp al, ')' ; closing parenthesis ? 3433 0000A74F F9 <1> stc 3434 0000A750 7505 <1> jne .retpop ; no --> (CY) 3435 0000A752 83C404 <1> add sp, byte 4 ; discard saved registers (NC) 3436 0000A755 EBEB <1> jmp short .retlodsb 3437 <1> 3438 <1> .retpop: 3439 0000A757 5E <1> pop si 3440 0000A758 58 <1> pop ax 3441 0000A759 C3 <1> retn 3442 <1> 3443 <1> .isdigit?: 3444 0000A75A 88C3 <1> mov bl, al 3445 0000A75C 80EB30 <1> sub bl, '0' 3446 0000A75F 80FB08 <1> cmp bl, 8 ; valid digit 0..7 ? (CY if so) 3447 0000A762 F5 <1> cmc ; NC if so 3448 0000A763 C3 <1> retn 3449 <1> 3450 <1> 3451 <1> usesection lDEBUG_CODE 3452 <1> isvariable_code_size equ $ - isvariable_code 3453 <1> 3454 <1> 3455 <1> usesection lDEBUG_DATA_ENTRY 3456 <1> isvariable_data_size equ $ - isvariable_data 3457 <1> 3458 <1> numdef SHOW_ISVARIABLE_SIZE, 0 3459 <1> %if _SHOW_ISVARIABLE_SIZE 3460 <1> %assign CODESIZE isvariable_code_size 3461 <1> %assign DATASIZE isvariable_data_size 3462 <1> %warning isvariable size: CODESIZE code, DATASIZE data 3463 <1> %endif 3464 <1> 3465 <1> 3466 <1> align 2, db 0 3467 00009690 0D0020090D2C4C3B5D- <1> separators: countedw 32,9,13,",L;]:)(=.",0 3467 00009699 3A29283D2E00 <1> 3468 <1> 3469 <1> %ifn _EXPRESSIONS 3470 <1> %error Building without the expression evaluator is not possible right now 3471 <1> %endif 3472 <1> 3473 <1> %if _EXPRESSIONS 3474 <1> 3475 0000969F 00 <1> align 4, db 0 3476 000096A0 00000000 <1> hhvar: dd 0 ; left-hand operand for operator functions 3477 <1> align 2, db 0 3478 <1> hh_depth: 3479 000096A4 0000 <1> dw 0 3480 <1> hh_depth_of_single_term: 3481 000096A6 0000 <1> dw 0 3482 000096A8 00 <1> hhflag: db 0 ; &2: getdword called from hh, default to sub (precedence over 1) 3483 <1> ; &1: getdword called from hh, default to add 3484 <1> ; &4: getdword defaulted to add/sub for hh 3485 <1> ; (Note that during recursive getexpression calls (ie, 3486 <1> ; bracket handling), hh_depth is incremented to 2 and 3487 <1> ; higher. As these flags are only used with hh_depth == 1, 3488 <1> ; this means inside brackets the hh defaulting is 3489 <1> ; not in effect.) 3490 000096A9 00 <1> hhtype: db 0 ; type info on left-hand operand for operator functions 3491 <1> %endif 3492 <1> 3493 <1> 3494 <1> usesection lDEBUG_CODE 3495 <1> 3496 <1> ; Get a numerical value from input line 3497 <1> ; INP: al = first character 3498 <1> ; si-> next character 3499 <1> ; OUT: bx:dx = numerical value 3500 <1> ; ah&80h = whether a pointer 3501 <1> ; ah&40h = whether a signed type 3502 <1> ; ah&3Fh = number of significant bits 3503 <1> ; one-based position of highest one bit if unsigned or signed but positive 3504 <1> ; one-based position of lowest one bit from the top if negative signed 3505 <1> ; 3506 <1> ; Note: This invalidates the symbol table access slice. 3507 <1> getdword: 3508 <1> getexpression: 3509 0000A764 FF06[A496] <1> inc word [hh_depth] 3510 0000A768 E80906 <1> call skipcomm0 3511 0000A76B 51 <1> push cx 3512 0000A76C 57 <1> push di 3513 <1> lframe 3514 0000A76D 5589E5 <1> lenter 3515 <1> 3516 0000A770 31C9 <1> xor cx, cx 3517 0000A772 51 <1> push cx 3518 <1> lvar word, ??Count 3519 <1> %define lCount ???Count 3520 <1> 3521 <1> ; The first number field's operator is initialized to 3522 <1> ; the dummy right-operand operator, which is set up with 3523 <1> ; the highest precedence. This means it'll be processed 3524 <1> ; immediately in the first iteration below. 3525 0000A773 B118 <1> mov cl, OPERATOR_RIGHTOP 3526 0000A775 51 <1> push cx ; initialize dummy first number operator 3527 0000A776 83EC0A <1> sub sp, byte 6+4 3528 <1> lvar 6, ??A 3529 <1> %define lA ???A 3530 <1> lvar 6, ??B 3531 <1> %define lB ???B 3532 <1> 3533 <1> .loop: 3534 <1> ; Get next term of an expression. A term is one variable, 3535 <1> ; one immediate number, one expression contained within 3536 <1> ; round brackets or one expression used to access memory. 3537 <1> ; This code also parses any number of unary operators 3538 <1> ; (including type conversions) in front of the term. 3539 <1> ; 3540 <1> ; INP: (si-1)-> first character 3541 <1> ; OUT: (see label .operator) 3542 <1> ; bx:dx = numerical value of term 3543 <1> ; ah&80h = whether a pointer 3544 <1> ; ah&40h = whether a signed type 3545 <1> ; ah&20h = whether a positive value but signed type 3546 <1> ; al = first character behind term 3547 <1> ; si-> line 3548 <1> ; CHG: di, cx 3549 <1> ; 3550 <1> ; This part might be simplified by directly modifying 6byte[bp+lB] 3551 <1> ; instead of setting bx:dx and ah. (The current interface is one of 3552 <1> ; the holdovers of getexpressionterm as a separate function.) In 3553 <1> ; that case, bx:dx and ah presumably will then be simply added to 3554 <1> ; the CHG specification. 3555 <1> .term: 3556 0000A779 4E <1> dec si 3557 0000A77A 56 <1> push si ; -> term 3558 <1> 3559 <1> ; count unary operators and type specifiers, 3560 <1> ; get the bit mask of required bytes 3561 <1> ; and skip past the operators and specifiers 3562 0000A77B E87704 <1> call count_unary_operators 3563 <1> 3564 <1> %if _INDIRECTION 3565 0000A77E 3C5B <1> cmp al, '[' 3566 0000A780 7503E90302 <1> je .indirection ; handle indirected value --> 3567 <1> %endif 3568 0000A785 3C28 <1> cmp al, '(' 3569 0000A787 7503E94002 <1> je .parens ; handle term with precedence --> 3570 <1> 3571 0000A78C 52 <1> push dx ; remember the count+1 3572 <1> ; (only if no indirection or bracket) 3573 <1> 3574 0000A78D 4E <1> dec si 3575 0000A78E BA[A868] <1> mov dx, msg.value ; does a VALUE keyword for VALUE x IN y go here ? 3576 0000A791 E85A05 <1> call isstring? 3577 0000A794 7503E94801 <1> je .value_in ; yes --> 3578 <1> 3579 0000A799 BA[E768] <1> mov dx, msg.linear ; does a LINEAR keyword go here ? 3580 0000A79C E84F05 <1> call isstring? 3581 0000A79F 7503E91D01 <1> je .linear ; yes --> 3582 <1> 3583 0000A7A4 AC <1> lodsb 3584 <1> 3585 0000A7A5 E8A5FB <1> call isvariable? ; is it a variable ? 3586 0000A7A8 7226 <1> jc .check_literal_or_symbol 3587 <1> ; no, may be an immediate value or symbol --> 3588 <1> 3589 <1> .variable: 3590 0000A7AA 87DA <1> xchg bx, dx ; bx-> high word 3591 0000A7AC 88CC <1> mov ah, cl 3592 0000A7AE 31C9 <1> xor cx, cx 3593 0000A7B0 80FC02 <1> cmp ah, 2 3594 0000A7B3 7609 <1> jbe .variable_nohigh 3595 0000A7B5 8B0F <1> mov cx, word [bx] ; get high word 3596 0000A7B7 80FC03 <1> cmp ah, 3 3597 0000A7BA 7702 <1> ja @F 3598 0000A7BC B500 <1> mov ch, 0 3599 <1> @@: 3600 <1> .variable_nohigh: 3601 0000A7BE 87DA <1> xchg bx, dx ; bx-> low word 3602 0000A7C0 8B17 <1> mov dx, word [bx] ; get low word 3603 0000A7C2 89CB <1> mov bx, cx ; high word/zero 3604 0000A7C4 80FC01 <1> cmp ah, 1 3605 0000A7C7 7702 <1> ja .variable_notbyte 3606 0000A7C9 B600 <1> mov dh, 0 ; limit to byte 3607 <1> .variable_notbyte: 3608 <1> .symbol: 3609 0000A7CB B400 <1> mov ah, 0 ; type pointer=0 signed=0 3610 0000A7CD E90C02 <1> jmp .term_end 3611 <1> 3612 <1> 3613 <1> .check_literal_or_symbol: 3614 <1> %if _SYMBOLIC 3615 <1> call issymbol? ; is it a symbol ? 3616 <1> jnc .symbol ; yes --> 3617 <1> ; no, must be an immediate value 3618 <1> %endif 3619 <1> 3620 <1> .literal: 3621 0000A7D0 31DB <1> xor bx, bx ; (in case of decimal base shortcut: 3622 0000A7D2 BA0A00 <1> mov dx, 10 ; set base: decimal) 3623 0000A7D5 3C23 <1> cmp al, '#' ; shortcut change to decimal base, or string literal? 3624 0000A7D7 753C <1> jne .lithex_common 3625 0000A7D9 803C22 <1> cmp byte [si], '"' 3626 0000A7DC 7407 <1> je .lit_string 3627 0000A7DE 803C27 <1> cmp byte [si], "'" 3628 0000A7E1 7402 <1> je .lit_string 3629 0000A7E3 EB72 <1> jmp .lit_base ; decimal base --> 3630 <1> 3631 <1> .lit_string: 3632 0000A7E5 31D2 <1> xor dx, dx 3633 0000A7E7 AC <1> lodsb 3634 0000A7E8 86C4 <1> xchg al, ah 3635 <1> 3636 0000A7EA E81900 <1> call @F 3637 0000A7ED 88C2 <1> mov dl, al 3638 0000A7EF E81400 <1> call @F 3639 0000A7F2 88C6 <1> mov dh, al 3640 0000A7F4 E80F00 <1> call @F 3641 0000A7F7 88C3 <1> mov bl, al 3642 0000A7F9 E80A00 <1> call @F 3643 0000A7FC 88C7 <1> mov bh, al 3644 0000A7FE AC <1> lodsb 3645 0000A7FF 38E0 <1> cmp al, ah 3646 0000A801 740F <1> je @FFF 3647 <1> .err3: 3648 0000A803 E9B800 <1> jmp .err2 3649 <1> 3650 <1> @@: 3651 0000A806 AC <1> lodsb 3652 0000A807 38E0 <1> cmp al, ah 3653 0000A809 7406 <1> je @F 3654 0000A80B E84305 <1> call iseol?.notsemicolon 3655 0000A80E 74F3 <1> je .err3 3656 0000A810 C3 <1> retn 3657 <1> 3658 <1> @@: 3659 0000A811 59 <1> pop cx ; (discard near return address) 3660 <1> @@: 3661 0000A812 AC <1> lodsb 3662 0000A813 EB38 <1> jmp .lit_end_string 3663 <1> 3664 <1> 3665 <1> .lithex_common: 3666 0000A815 E88503 <1> call .lit_ishexdigit? ; the first character must be a digit then 3667 0000A818 7303E9A100 <1> jc .err2 3668 0000A81D 30D2 <1> xor dl, dl ; initialize value 3669 <1> .lithex_loopdigit: 3670 0000A81F 3C5F <1> cmp al, '_' 3671 0000A821 7423 <1> je .lithex_skip 3672 0000A823 E87703 <1> call .lit_ishexdigit? ; was last character ? 3673 0000A826 7221 <1> jc .lit_end ; yes --> 3674 0000A828 F6C7F0 <1> test bh, 0F0h ; would shift bits out ? 3675 0000A82B 7403E98E00 <1> jnz .err2 3676 0000A830 E887D9 <1> call uppercase 3677 0000A833 2C30 <1> sub al, '0' 3678 0000A835 3C09 <1> cmp al, 9 ; was decimal digit ? 3679 0000A837 7602 <1> jbe .lithex_decimaldigit; yes --> 3680 0000A839 2C07 <1> sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 3681 <1> .lithex_decimaldigit: 3682 0000A83B B90400 <1> mov cx, 4 3683 <1> .lithex_loopshift: 3684 0000A83E D1E2 <1> shl dx, 1 3685 0000A840 D1D3 <1> rcl bx, 1 3686 0000A842 E2FA <1> loop .lithex_loopshift ; *16 3687 0000A844 08C2 <1> or dl, al ; add in the new digit 3688 <1> .lithex_skip: 3689 0000A846 AC <1> lodsb 3690 0000A847 EBD6 <1> jmp short .lithex_loopdigit 3691 <1> 3692 <1> .lit_end: 3693 0000A849 3C23 <1> cmp al, '#' ; base change specification? 3694 0000A84B 740A <1> je .lit_base ; yes --> 3695 <1> .lit_end_string: 3696 0000A84D E8A9F5 <1> call isseparator? ; after the number, there must be a separator 3697 0000A850 756C <1> jne .err2 ; none here --> 3698 0000A852 B400 <1> mov ah, 0 ; type pointer=0 signed=0 3699 0000A854 E98501 <1> jmp .term_end ; okay --> 3700 <1> .lit_base: 3701 0000A857 85DB <1> test bx, bx ; insure base <= 36 3702 0000A859 7563 <1> jnz .err2 3703 0000A85B 83FA24 <1> cmp dx, byte 36 3704 0000A85E 775E <1> ja .err2 3705 0000A860 83FA02 <1> cmp dx, byte 2 ; and >= 2 3706 0000A863 7259 <1> jb .err2 ; otherwise error --> 3707 <1> 3708 0000A865 AC <1> lodsb 3709 0000A866 80FA10 <1> cmp dl, 16 ; hexadecimal ? 3710 0000A869 74AA <1> je .lithex_common ; yes, use specific handling --> 3711 <1> 3712 0000A86B 89D7 <1> mov di, dx ; di = base 3713 0000A86D 88D1 <1> mov cl, dl 3714 0000A86F 80C12F <1> add cl, '0'-1 3715 0000A872 80F939 <1> cmp cl, '9' 3716 0000A875 7602 <1> jbe .lit_basebelow11 3717 0000A877 B139 <1> mov cl, '9' 3718 <1> .lit_basebelow11: ; cl = highest decimal digit for base ('1'..'9') 3719 0000A879 88D5 <1> mov ch, dl 3720 0000A87B 80C536 <1> add ch, 'A'-10-1 ; ch = highest letter for base ('A'-x..'Z') 3721 <1> 3722 0000A87E E81F03 <1> call .lit_isdigit? ; first character must be a digit 3723 0000A881 723B <1> jc .err2 3724 0000A883 31D2 <1> xor dx, dx ; initialize value 3725 <1> .lit_loopdigit: 3726 0000A885 3C5F <1> cmp al, '_' 3727 0000A887 7432 <1> je .lit_skip 3728 0000A889 E81403 <1> call .lit_isdigit? ; was last character ? 3729 0000A88C 72BB <1> jc .lit_end ; yes --> 3730 0000A88E E829D9 <1> call uppercase 3731 0000A891 2C30 <1> sub al, '0' 3732 0000A893 3C09 <1> cmp al, 9 ; was decimal digit ? 3733 0000A895 7602 <1> jbe .lit_decimaldigit ; yes --> 3734 0000A897 2C07 <1> sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 3735 <1> .lit_decimaldigit: 3736 0000A899 50 <1> push ax 3737 0000A89A 89D0 <1> mov ax, dx 3738 0000A89C 53 <1> push bx 3739 0000A89D F7E7 <1> mul di ; multiply low word with base 3740 0000A89F 89D3 <1> mov bx, dx 3741 0000A8A1 89C2 <1> mov dx, ax 3742 0000A8A3 58 <1> pop ax 3743 0000A8A4 52 <1> push dx 3744 0000A8A5 F7E7 <1> mul di ; multiply high word with base 3745 0000A8A7 85D2 <1> test dx, dx 3746 0000A8A9 5A <1> pop dx 3747 0000A8AA 7512 <1> jnz .err2 ; overflow --> 3748 0000A8AC 01C3 <1> add bx, ax ; add them 3749 0000A8AE 58 <1> pop ax 3750 0000A8AF 720D <1> jc .err2 ; overflow --> 3751 0000A8B1 00C2 <1> add dl, al ; add in the new digit 3752 0000A8B3 80D600 <1> adc dh, 0 3753 0000A8B6 83D300 <1> adc bx, byte 0 3754 0000A8B9 7203 <1> jc .err2 ; overflow --> 3755 <1> ; The value 3#102002022201221111210 is exactly equal to ffffFFFFh 3756 <1> ; so 3#102002022201221111211 (or ...2) overflows 32 bits and 3757 <1> ; needs to be detected here when adding in the as yet least 3758 <1> ; significant digit. This is why this jump is needed. 3759 <1> ; This also applies to decimal #4294967296. 3760 <1> 3761 <1> .lit_skip: 3762 0000A8BB AC <1> lodsb 3763 0000A8BC EBC7 <1> jmp short .lit_loopdigit 3764 <1> 3765 <1> .err2: 3766 0000A8BE E9FBEF <1> jmp error 3767 <1> 3768 <1> 3769 <1> .linear: 3770 0000A8C1 58 <1> pop ax ; discard unary operators counter 3771 <1> 3772 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_LINEAR_STACK_CHECK 3773 0000A8C2 E8FF03 <1> call stack_check_indirection 3774 <1> %else 3775 <1> mov ax, _EXPRESSION_LINEAR_STACK_CHECK 3776 <1> call stack_check ; abort if deep recursion 3777 <1> %endif 3778 0000A8C5 A9[4274] <1> test ax, msg.stack_overflow.linear 3779 <1> 3780 0000A8C8 E8D704 <1> call skipwhite 3781 <1> _386_PM push word [bAddr32] 3782 <1> _386_PM push edx 3783 <1> _386_PM pop dx 3784 0000A8CB 8B1E[7C0C] <1> mov bx, word [reg_ds] 3785 0000A8CF E8408C <1> call getlinearaddr 3786 <1> _386_PM push dx 3787 <1> _386_PM pop edx 3788 <1> _386_PM pop word [bAddr32] 3789 0000A8D2 72EA <1> jc .err2 3790 <1> 3791 <1> _386_PM_o32 ; or dword 3792 0000A8D4 830E[B086]FF <1> or word [bp_offset], strict byte -1 3793 <1> ; do not use a preferred offset 3794 <1> 3795 0000A8D9 E89804 <1> call skipcomm0 3796 0000A8DC B400 <1> mov ah, 0 ; type pointer=0 signed=0 3797 0000A8DE E9FA00 <1> jmp .term_end_recount 3798 <1> 3799 <1> 3800 <1> .value_in: 3801 0000A8E1 58 <1> pop ax ; discard unary operators counter 3802 <1> 3803 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_VALUE_IN_STACK_CHECK 3804 0000A8E2 E8DF03 <1> call stack_check_indirection 3805 <1> %else 3806 <1> mov ax, _EXPRESSION_VALUE_IN_STACK_CHECK 3807 <1> call stack_check ; abort if deep recursion 3808 <1> %endif 3809 0000A8E5 A9[2774] <1> test ax, msg.stack_overflow.value_in 3810 <1> 3811 0000A8E8 E8B704 <1> call skipwhite 3812 0000A8EB 4E <1> dec si 3813 0000A8EC BA[B968] <1> mov dx, msg.executing 3814 0000A8EF E8FC03 <1> call isstring? 3815 0000A8F2 7514 <1> jne @F 3816 0000A8F4 E8AB04 <1> call skipwhite 3817 0000A8F7 56 <1> push si 3818 0000A8F8 BE[C368] <1> mov si, msg.executing_value_range 3819 0000A8FB E86E03 <1> call get_value_range 3820 0000A8FE 9C <1> pushf ; ! preserve CF 3821 0000A8FF E86004 <1> call chkeol 3822 0000A902 9D <1> popf 3823 0000A903 5E <1> pop si 3824 0000A904 4E <1> dec si ; preserves CF 3825 0000A905 AC <1> lodsb 3826 0000A906 EB03 <1> jmp @FF 3827 <1> 3828 <1> @@: 3829 0000A908 E86103 <1> call get_value_range ; OUT: cx:di = from, bx:dx = to 3830 <1> @@: 3831 <1> 3832 <1> ; If the VALUE is a not normal range (zero length 3833 <1> ; or from > to) then we still have to parse the 3834 <1> ; remaining input line to find the end of the 3835 <1> ; VALUE x IN y construct. So we do this with a 3836 <1> ; sort of hack: we take the invalid / unset 3837 <1> ; range values, do all the (invalid) comparisons, 3838 <1> ; but do not count any of the possible matches. 3839 <1> ; Look at .value_in.found for this hack. 3840 <1> lframe none, nested 3841 0000A90B 5589E5 <1> lenter 3842 <1> lvar word, bit0_do_not_match 3843 0000A90E 9C <1> pushf 3844 <1> lvar dword, value_from 3845 0000A90F 51 <1> push cx 3846 0000A910 57 <1> push di 3847 <1> lvar dword, value_to 3848 0000A911 53 <1> push bx 3849 0000A912 52 <1> push dx 3850 0000A913 31C9 <1> xor cx, cx 3851 <1> lvar dword, found 3852 0000A915 51 <1> push cx 3853 0000A916 51 <1> push cx 3854 <1> 3855 0000A917 51 <1> push cx ; zero terminator of keyword remembered offsets 3856 0000A918 4E <1> dec si 3857 0000A919 BA[AE68] <1> mov dx, msg.in 3858 0000A91C E8CF03 <1> call isstring? 3859 <1> .err3_NZ: 3860 <1> .err4_NZ: 3861 0000A91F 759D <1> jne .err2 3862 <1> 3863 <1> .value_in.loop: 3864 0000A921 E87E04 <1> call skipwhite 3865 0000A924 4E <1> dec si 3866 0000A925 BB[0877] <1> mov bx, msgtable_value_range 3867 <1> ; -> table 3868 <1> 3869 <1> @@: 3870 0000A928 8B17 <1> mov dx, word [bx] 3871 0000A92A 85D2 <1> test dx, dx 3872 0000A92C 7419 <1> jz @F ; last checked, go get range --> 3873 0000A92E E8BD03 <1> call isstring? 3874 0000A931 7405 <1> je .value_in.keyword ; found a keyword --> 3875 0000A933 83C304 <1> add bx, 4 ; go to next table entry 3876 0000A936 EBF0 <1> jmp @B 3877 <1> 3878 <1> .value_in.keyword: 3879 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_VALUE_IN_STACK_CHECK 3880 0000A938 E88903 <1> call stack_check_indirection 3881 <1> %else 3882 <1> mov ax, _EXPRESSION_VALUE_IN_STACK_CHECK 3883 <1> call stack_check ; abort if deep recursion 3884 <1> %endif 3885 0000A93B A9[2774] <1> test ax, msg.stack_overflow.value_in 3886 <1> 3887 0000A93E E86104 <1> call skipwhite ; skip past blanks 3888 0000A941 56 <1> push si ; remember offset after keyword 3889 0000A942 8B7702 <1> mov si, word [bx + 2] ; -> keyword replacement text 3890 0000A945 EBDA <1> jmp .value_in.loop ; handle replacement --> 3891 <1> 3892 <1> @@: 3893 0000A947 E82203 <1> call get_value_range ; OUT: cx:di = from, bx:dx = to 3894 0000A94A 7223 <1> jc .value_in.next 3895 <1> 3896 <1> ; ! (StartVal > EndMatch) 3897 0000A94C 395EFC <1> cmp word [bp + ?value_from + 2], bx 3898 0000A94F 7503 <1> jne @F 3899 0000A951 3956FA <1> cmp word [bp + ?value_from], dx 3900 <1> @@: 3901 0000A954 7719 <1> ja .value_in.next 3902 <1> 3903 <1> ; ! (EndVal < StartMatch) 3904 0000A956 394EF8 <1> cmp word [bp + ?value_to + 2], cx 3905 0000A959 7503 <1> jne @F 3906 0000A95B 397EF6 <1> cmp word [bp + ?value_to], di 3907 <1> @@: 3908 0000A95E 720F <1> jb .value_in.next 3909 <1> 3910 <1> .value_in.found: 3911 0000A960 8B4EFE <1> mov cx, word [bp + ?bit0_do_not_match] 3912 0000A963 F7D1 <1> not cx 3913 0000A965 83E101 <1> and cx, 1 3914 0000A968 014EF2 <1> add word [bp + ?found], cx 3915 0000A96B 8356F200 <1> adc word [bp + ?found], 0 3916 <1> 3917 <1> .value_in.next: 3918 <1> @@: 3919 0000A96F E83104 <1> call skipwh0 3920 0000A972 3C2C <1> cmp al, ',' 3921 0000A974 74AB <1> je .value_in.loop 3922 <1> 3923 0000A976 59 <1> pop cx ; get next remembered offset 3924 0000A977 E306 <1> jcxz @F ; if none --> 3925 0000A979 89CE <1> mov si, cx ; -> behind keyword 3926 0000A97B 4E <1> dec si 3927 0000A97C AC <1> lodsb ; reload al 3928 0000A97D EBF0 <1> jmp @B ; continue after the keyword --> 3929 <1> 3930 <1> @@: 3931 0000A97F 5A <1> pop dx 3932 0000A980 5B <1> pop bx ; pop ?found counter variable 3933 0000A981 89EC5D <1> lleave 3934 <1> 3935 0000A984 B400 <1> mov ah, 0 ; type pointer=0 signed=0 3936 0000A986 EB53 <1> jmp .term_end_recount 3937 <1> 3938 <1> 3939 <1> %if _INDIRECTION 3940 <1> .indirection: 3941 0000A988 E83903 <1> call stack_check_indirection 3942 <1> ; abort if deep recursion 3943 0000A98B A9[DA73] <1> test ax, msg.stack_overflow.indirection 3944 <1> 3945 <1> _386_PM push word [bAddr32] 3946 <1> _386_PM push edx 3947 <1> _386_PM pop dx 3948 <1> 3949 0000A98E E8E203 <1> call skipcomma ; also skips the '[' in al 3950 0000A991 8B1E[7C0C] <1> mov bx, word [reg_ds] ; default segment/selector 3951 0000A995 51 <1> push cx ; save previous bit mask (ch) 3952 0000A996 E8CAF3 <1> call getaddrX ; (recursively calls getexpression:) 3953 0000A999 59 <1> pop cx 3954 0000A99A B100 <1> mov cl, 0 3955 0000A99C 3C5D <1> cmp al, ']' ; verify this is the closing bracket 3956 <1> .err5_NZ: 3957 0000A99E 7403E97CFF <1> jne .err4_NZ ; if not --> 3958 0000A9A3 AC <1> lodsb ; get next character 3959 <1> ; bx:(e)dx-> data 3960 <1> ; ch = bit mask of required bytes 3961 <1> ; cl = 0 3962 <1> 3963 0000A9A4 50 <1> push ax 3964 0000A9A5 55 <1> push bp 3965 0000A9A6 31ED <1> xor bp, bp 3966 0000A9A8 55 <1> push bp 3967 0000A9A9 55 <1> push bp 3968 0000A9AA 89E5 <1> mov bp, sp ; -> buffer 3969 <1> 3970 0000A9AC E88EF1 <1> call prephack 3971 0000A9AF E8B4F1 <1> call dohack 3972 <1> ; Regarding how this loop handles cx, 3973 <1> ; remember that ch holds the flags for 3974 <1> ; the required bytes. 3975 <1> ; And cl is initialised to 0. In 3976 <1> ; each iteration, cl is incremented. 3977 <1> ; The loop instruction then decrements 3978 <1> ; cl again, but the entire cx is only 3979 <1> ; zero if no more bytes are required. 3980 <1> ; (This hack saves a single byte over 3981 <1> ; the "test ch, ch \ jnz" alternative 3982 <1> ; but it isn't very pretty. It 3983 <1> ; also probably slows down a bit.) 3984 <1> .indirection_loop: 3985 0000A9B2 D0ED <1> shr ch, 1 ; need to read this byte ? 3986 0000A9B4 7306 <1> jnc .indirection_skip ; no --> 3987 0000A9B6 E8A7E2 <1> call readmem ; else read byte 3988 0000A9B9 884600 <1> mov byte [bp+0], al ; store byte 3989 <1> .indirection_skip: 3990 0000A9BC 41 <1> inc cx ; = 1 if no more to read 3991 0000A9BD 45 <1> inc bp ; increase buffer pointer 3992 <1> _386_PM_o32 ; inc edx 3993 0000A9BE 42 <1> inc dx ; increase offset 3994 0000A9BF E2F1 <1> loop .indirection_loop ; read next byte if any --> 3995 0000A9C1 E8B6F1 <1> call unhack 3996 <1> 3997 0000A9C4 5A <1> pop dx 3998 0000A9C5 5B <1> pop bx 3999 0000A9C6 5D <1> pop bp 4000 0000A9C7 58 <1> pop ax 4001 <1> 4002 <1> _386_PM push dx 4003 <1> _386_PM pop edx 4004 <1> _386_PM pop word [bAddr32] 4005 0000A9C8 B400 <1> mov ah, 0 ; type pointer=0 signed=0 4006 0000A9CA EB0F <1> jmp short .term_end_recount 4007 <1> %endif 4008 <1> 4009 <1> 4010 <1> .parens: 4011 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_PARENS_STACK_CHECK 4012 0000A9CC E8F502 <1> call stack_check_indirection 4013 <1> %else 4014 <1> mov ax, _EXPRESSION_PARENS_STACK_CHECK 4015 <1> call stack_check ; abort if deep recursion 4016 <1> %endif 4017 0000A9CF A9[F473] <1> test ax, msg.stack_overflow.parens 4018 <1> 4019 0000A9D2 AC <1> lodsb 4020 0000A9D3 E88EFD <1> call getexpression ; (recursive) bx:dx = number, ah = type 4021 0000A9D6 3C29 <1> cmp al, ')' ; closing parens ? 4022 0000A9D8 75C4 <1> jne .err5_NZ ; no --> 4023 0000A9DA AC <1> lodsb 4024 <1> 4025 <1> .term_end_recount: 4026 0000A9DB A9 <1> db __TEST_IMM16 ; skip pop, stc; NC 4027 <1> .term_end: 4028 0000A9DC 59 <1> pop cx ; get count+1 of unary operators and type specifiers 4029 0000A9DD F9 <1> stc 4030 0000A9DE 5F <1> pop di ; -> term 4031 0000A9DF 87F7 <1> xchg si, di 4032 0000A9E1 57 <1> push di ; save -> behind 4033 <1> ; si-> unary operators and types 4034 0000A9E2 720B <1> jc .unary_processnext ; if we preserved the count --> 4035 <1> 4036 0000A9E4 53 <1> push bx 4037 0000A9E5 52 <1> push dx 4038 0000A9E6 56 <1> push si 4039 0000A9E7 E80B02 <1> call count_unary_operators 4040 0000A9EA 89D1 <1> mov cx, dx ; get count+1 again 4041 0000A9EC 5E <1> pop si 4042 0000A9ED 5A <1> pop dx 4043 0000A9EE 5B <1> pop bx 4044 <1> 4045 <1> .unary_processnext: 4046 0000A9EF E204 <1> loop .unary_doprocess 4047 0000A9F1 5E <1> pop si ; -> behind term 4048 0000A9F2 4E <1> dec si ; -> character to reload in skipwhite 4049 0000A9F3 EB33 <1> jmp short .term_done 4050 <1> 4051 <1> .unary_doprocess: 4052 0000A9F5 56 <1> push si 4053 0000A9F6 51 <1> push cx 4054 0000A9F7 53 <1> push bx 4055 0000A9F8 52 <1> push dx 4056 <1> 4057 0000A9F9 89CF <1> mov di, cx ; count+1 of operators to skip 4058 0000A9FB E8F901 <1> call count_unary_operators_restrict ; skip them 4059 0000A9FE 7525 <1> jnz .err ; if not enough --> (?!) 4060 <1> 4061 0000AA00 E821F4 <1> call istype? ; get type info if it's a type 4062 0000AA03 7211 <1> jc .unary_processnotype ; isn't a type --> 4063 0000AA05 86C4 <1> xchg al, ah ; al = type input 4064 0000AA07 D1EB <1> shr bx, 1 ; CF = signedness 4065 0000AA09 9F <1> lahf ; with CF = signedness 4066 0000AA0A 8B8F[6490] <1> mov cx, word [ typehandlers + bx ] ; function 4067 <1> .unary_processcall: 4068 0000AA0E 5A <1> pop dx 4069 0000AA0F 5B <1> pop bx 4070 0000AA10 FFD1 <1> call cx ; call type or unary operator handler 4071 <1> ; bx:dx = output number, ah = type 4072 0000AA12 59 <1> pop cx ; restore processing counter 4073 0000AA13 5E <1> pop si ; restore ->term 4074 0000AA14 EBD9 <1> jmp short .unary_processnext 4075 <1> 4076 <1> .unary_processnotype: 4077 0000AA16 E8C4F3 <1> call isunaryoperator? ; get unary operator index 4078 0000AA19 750A <1> jne .err ; if no unary operator --> (?!) 4079 0000AA1B 89CB <1> mov bx, cx 4080 0000AA1D D1E3 <1> shl bx, 1 4081 0000AA1F 8B8F[9090] <1> mov cx, word [ unaryoperatorhandlers + bx ] 4082 0000AA23 EBE9 <1> jmp short .unary_processcall 4083 <1> 4084 <1> .err: 4085 0000AA25 E994EE <1> jmp error 4086 <1> 4087 <1> .term_done: ; bx:dx = number, ah = type 4088 <1> ; get the operator following this number 4089 0000AA28 E87703 <1> call skipwhite 4090 0000AA2B 8956F2 <1> mov word [bp+lB+0], dx 4091 0000AA2E 895EF4 <1> mov word [bp+lB+2], bx ; store numeric value 4092 0000AA31 8B1E[A696] <1> mov bx, word [hh_depth_of_single_term] 4093 0000AA35 3B1E[A496] <1> cmp bx, word [hh_depth] 4094 0000AA39 7455 <1> je .operator_invalid 4095 0000AA3B E8A5F3 <1> call isoperator? ; cl = operator index (if any) 4096 0000AA3E 7440 <1> je .operator_apparently_valid 4097 0000AA40 E80A03 <1> call iseol? ; end of line follows ? 4098 0000AA43 744B <1> je .operator_invalid 4099 <1> .hh_twofold_check: 4100 0000AA45 807EFC17 <1> cmp byte [bp + lA + 4], OPERATOR_COND 4101 0000AA49 7445 <1> je .operator_invalid ; special check for conditional operator 4102 0000AA4B 807EFC18 <1> cmp byte [bp + lA + 4], OPERATOR_RIGHTOP 4103 0000AA4F 750D <1> jne @F 4104 0000AA51 837EFE00 <1> cmp word [bp + lCount], 0 4105 0000AA55 7407 <1> je @F 4106 0000AA57 59 <1> pop cx 4107 0000AA58 51 <1> push cx 4108 0000AA59 80F917 <1> cmp cl, OPERATOR_COND 4109 0000AA5C 7432 <1> je .operator_invalid ; special check for conditional operator 4110 <1> @@: 4111 0000AA5E 833E[A496]01 <1> cmp word [hh_depth], 1 ; are we in first level expression ? 4112 0000AA63 752B <1> jne .operator_invalid ; no, do not do special H operation --> 4113 0000AA65 F606[A896]03 <1> test byte [hhflag], 1|2 ; special H operation requested ? 4114 0000AA6A 7424 <1> jz .operator_invalid ; no --> 4115 0000AA6C B302 <1> mov bl, OPERATOR_MINUS ; assume it's sub 4116 0000AA6E F606[A896]02 <1> test byte [hhflag], 2 ; sub requested by H ? 4117 0000AA73 7501 <1> jnz .hh_twofold_found ; yes --> 4118 0000AA75 4B <1> dec bx ; else it must be add 4119 <1> %if (OPERATOR_MINUS - 1) != OPERATOR_PLUS 4120 <1> %error Remove optimisation 4121 <1> %endif 4122 <1> .hh_twofold_found: 4123 0000AA76 800E[A896]04 <1> or byte [hhflag], 4 ; set flag for H twofold operation 4124 0000AA7B E8F602 <1> call skipcomm0 4125 0000AA7E EB12 <1> jmp short .operator_done ; return this --> 4126 <1> 4127 <1> .operator_apparently_valid: 4128 0000AA80 89CB <1> mov bx, cx 4129 0000AA82 01DB <1> add bx, bx 4130 0000AA84 FF97[9A90] <1> call [operatordispatchers + bx] 4131 0000AA88 84DB <1> test bl, bl ; valid ? 4132 0000AA8A 74B9 <1> jz .hh_twofold_check ; no, check for H twofold operation --> 4133 0000AA8C E81303 <1> call skipwhite 4134 0000AA8F A9 <1> db __TEST_IMM16 4135 <1> .operator_invalid: 4136 0000AA90 31DB <1> xor bx, bx ; bl = 0 (no operator) 4137 <1> .operator_done: 4138 0000AA92 88E7 <1> mov bh, ah ; bh = type info 4139 0000AA94 895EF6 <1> mov word [bp+lB+4], bx ; store type and following operator 4140 <1> 4141 0000AA97 8A4EFC <1> mov cl, byte [bp+lA+4] 4142 0000AA9A E8EE00 <1> call .compare_operators ; (cmp bl, cl = cmp Boprtr, Aoprtr) 4143 0000AA9D 7249 <1> jb .high_precedence_A ; compute the first operand first --> 4144 <1> ; (jump taken for invalid Boprtr too) 4145 0000AA9F 7505 <1> jne @F 4146 0000AAA1 83FB01 <1> cmp bx, OPPREC_COND 4147 0000AAA4 7542 <1> jne .high_precedence_A 4148 <1> 4149 <1> @@: 4150 0000AAA6 FF46FE <1> inc word [bp+lCount] ; increase loop count 4151 0000AAA9 FF76F8 <1> push word [bp+lA+0] 4152 0000AAAC FF76FA <1> push word [bp+lA+2] 4153 0000AAAF FF76FC <1> push word [bp+lA+4] ; push A and its operator 4154 <1> 4155 0000AAB2 FF76F6 <1> push word [bp+lB+4] 4156 0000AAB5 FF76F4 <1> push word [bp+lB+2] 4157 0000AAB8 FF76F2 <1> push word [bp+lB+0] 4158 0000AABB 8F46F8 <1> pop word [bp+lA+0] 4159 0000AABE 8F46FA <1> pop word [bp+lA+2] 4160 0000AAC1 8F46FC <1> pop word [bp+lA+4] ; set A to B, including operator 4161 <1> 4162 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_PRECEDENCE_STACK_CHECK 4163 0000AAC4 E8FD01 <1> call stack_check_indirection 4164 <1> %else 4165 <1> mov ax, _EXPRESSION_PRECEDENCE_STACK_CHECK 4166 <1> call stack_check ; abort if deep recursion 4167 <1> %endif 4168 0000AAC7 A9[0E74] <1> test ax, msg.stack_overflow.precedence 4169 <1> 4170 <1> d4 call d4message 4171 <1> d4 asciz "getexpression: Entering loop/recursion",13,10 4172 <1> 4173 <1> .loop_j: 4174 0000AACA E9ACFC <1> jmp .loop ; start again (former B as first term) --> 4175 <1> 4176 <1> .cont: 4177 <1> 4178 <1> d4 call d4message 4179 <1> d4 asciz "getexpression: End of loop/recursion",13,10 4180 <1> 4181 0000AACD FF76FC <1> push word [bp+lA+4] 4182 0000AAD0 FF76FA <1> push word [bp+lA+2] 4183 0000AAD3 FF76F8 <1> push word [bp+lA+0] 4184 0000AAD6 8F46F2 <1> pop word [bp+lB+0] 4185 0000AAD9 8F46F4 <1> pop word [bp+lB+2] 4186 0000AADC 8F46F6 <1> pop word [bp+lB+4] ; set B to A, including operator 4187 <1> 4188 0000AADF 8F46FC <1> pop word [bp+lA+4] 4189 0000AAE2 8F46FA <1> pop word [bp+lA+2] 4190 0000AAE5 8F46F8 <1> pop word [bp+lA+0] ; pop A and its operator 4191 <1> 4192 <1> .high_precedence_A: 4193 0000AAE8 8B4EFC <1> mov cx, word [bp+lA+4] ; retrieve A's type info and operator 4194 0000AAEB FF76FA <1> push word [bp+lA+2] 4195 0000AAEE FF76F8 <1> push word [bp+lA+0] 4196 0000AAF1 8B46F6 <1> mov ax, word [bp+lB+4] ; retrieve B's type info and operator 4197 0000AAF4 882E[A996] <1> mov byte [hhtype], ch ; set type info 4198 0000AAF8 8F06[A096] <1> pop word [hhvar] 4199 0000AAFC B500 <1> mov ch, 0 ; cx = A's 1-based operator index 4200 0000AAFE 8F06[A296] <1> pop word [hhvar+2] ; retrieve A's number 4201 0000AB02 8B56F2 <1> mov dx, word [bp+lB+0] 4202 0000AB05 89CF <1> mov di, cx 4203 0000AB07 8B5EF4 <1> mov bx, word [bp+lB+2] ; retrieve B's number 4204 0000AB0A 01FF <1> add di, di ; = offset into dispatch table 4205 0000AB0C 50 <1> push ax ; preserve B's operator 4206 0000AB0D FF95[DA90] <1> call near [operatorfunctions+di]; compute: (A) operatorA (B) 4207 0000AB11 59 <1> pop cx ; cl = B's operator 4208 <1> 4209 0000AB12 8956F8 <1> mov word [bp+lA+0], dx 4210 0000AB15 88C8 <1> mov al, cl ; B's operator 4211 0000AB17 895EFA <1> mov word [bp+lA+2], bx 4212 0000AB1A 8946FC <1> mov word [bp+lA+4], ax ; store result in A, with B's operator 4213 <1> 4214 <1> %if OPERATOR_INVALID != 0 4215 <1> %error Remove optimisation 4216 <1> %endif 4217 0000AB1D 84C0 <1> test al, al ; (previous B's) operator valid ? 4218 0000AB1F 7412 <1> jz .end ; no, end of sequence --> 4219 <1> 4220 0000AB21 837EFE00 <1> cmp word [bp+lCount], byte 0 ; in recursion ? 4221 0000AB25 74A3 <1> je .loop_j ; no, loop --> 4222 <1> 4223 0000AB27 5B <1> pop bx 4224 0000AB28 53 <1> push bx ; retrieve saved ('@') operator 4225 <1> 4226 0000AB29 E85F00 <1> call .compare_operators ; (cmp bl, cl = cmp @oprtr, Aoprtr) 4227 0000AB2C 729C <1> jb .loop_j ; A's operator's precedence higher --> 4228 <1> 4229 0000AB2E 83FB01 <1> cmp bx, OPPREC_COND 4230 0000AB31 7497 <1> je .loop_j 4231 <1> 4232 <1> d4 call d4message 4233 <1> d4 asciz "getexpression: Loop/recursion found to be not necessary anymore",13,10 4234 <1> 4235 <1> ; dec word [bp+lCount] 4236 <1> ; jmp .cont ; return to previous level --> 4237 <1> 4238 <1> .end: 4239 0000AB33 FF4EFE <1> dec word [bp+lCount] ; decrease loop count 4240 0000AB36 7995 <1> jns .cont ; process next operand from stack --> 4241 <1> 4242 0000AB38 8B56F8 <1> mov dx, word [bp+lA+0] 4243 0000AB3B 8B5EFA <1> mov bx, word [bp+lA+2] ; retrieve A 4244 0000AB3E 8B46FC <1> mov ax, word [bp+lA+4] ; (discard (invalid) operator) 4245 <1> 4246 0000AB41 89EC5D <1> lleave code ; remove the stack frame 4247 <1> 4248 0000AB44 5F <1> pop di 4249 0000AB45 59 <1> pop cx ; restore registers 4250 <1> 4251 0000AB46 FF0E[A496] <1> dec word [hh_depth] 4252 0000AB4A 4E <1> dec si 4253 0000AB4B AC <1> lodsb ; (restore al) 4254 <1> 4255 <1> .countsignificantbits: 4256 0000AB4C 51 <1> push cx 4257 0000AB4D 52 <1> push dx 4258 0000AB4E 53 <1> push bx 4259 0000AB4F B90100 <1> mov cx, 1 4260 0000AB52 53 <1> push bx 4261 0000AB53 F6C440 <1> test ah, 40h ; signed type ? 4262 0000AB56 7416 <1> jz .unsigned ; no --> 4263 0000AB58 F6C780 <1> test bh, 80h ; negative value ? 4264 0000AB5B 7411 <1> jz .unsigned ; no --> 4265 <1> .signed: 4266 0000AB5D 21D3 <1> and bx, dx 4267 0000AB5F 43 <1> inc bx ; = 0 if -1 (all bits set) 4268 0000AB60 5B <1> pop bx 4269 0000AB61 741F <1> jz .done ; is -1, 1 significant bit --> 4270 0000AB63 B122 <1> mov cl, 32+1+1 ; number of significant bits is 1 + 1-based index of highest clear bit 4271 <1> .signedloop: 4272 0000AB65 D1E2 <1> shl dx, 1 4273 0000AB67 D1D3 <1> rcl bx, 1 ; shift up the number 4274 0000AB69 49 <1> dec cx ; maintain index 4275 0000AB6A 72F9 <1> jc .signedloop ; still a set bit --> 4276 0000AB6C EB14 <1> jmp short .done 4277 <1> .unsigned: 4278 0000AB6E 09D3 <1> or bx, dx ; = 0 if 0 (all bits cleared) 4279 0000AB70 5B <1> pop bx 4280 0000AB71 740F <1> jz .done ; is 0, 1 significant bit --> 4281 0000AB73 B121 <1> mov cl, 32+1 ; number of significant bits is 1-based index of highest set bit 4282 <1> .unsignedloop: 4283 0000AB75 D1E2 <1> shl dx, 1 4284 0000AB77 D1D3 <1> rcl bx, 1 4285 0000AB79 49 <1> dec cx 4286 0000AB7A 73F9 <1> jnc .unsignedloop 4287 0000AB7C F6C440 <1> test ah, 40h ; positive signed value ? 4288 0000AB7F 7401 <1> jz .done ; no --> 4289 0000AB81 41 <1> inc cx ; then the following zero bit is required too 4290 <1> .done: 4291 0000AB82 80E4C0 <1> and ah, 1100_0000b 4292 <1> ; insure we only pass the top two type bits 4293 0000AB85 08CC <1> or ah, cl 4294 <1> ; low 6 bits = number of significant bits 4295 0000AB87 5B <1> pop bx 4296 0000AB88 5A <1> pop dx 4297 0000AB89 59 <1> pop cx 4298 0000AB8A C3 <1> retn 4299 <1> 4300 <1> 4301 <1> ; INP: bl = operator index 1 4302 <1> ; cl = operator index 2 4303 <1> ; OUT: flags as for "cmp precedence1, precedence2" 4304 <1> ; CHG: bx, cx 4305 <1> .compare_operators: 4306 0000AB8B E80600 <1> call .getprecedence 4307 0000AB8E E80300 <1> call .getprecedence 4308 0000AB91 39CB <1> cmp bx, cx 4309 0000AB93 C3 <1> retn 4310 <1> 4311 <1> .getprecedence: 4312 0000AB94 30FF <1> xor bh, bh 4313 0000AB96 8A9F[C090] <1> mov bl, byte [operatorprecedences+bx] 4314 0000AB9A 87D9 <1> xchg bx, cx 4315 0000AB9C C3 <1> retn 4316 <1> 4317 <1> getexpression.lit_ishexdigit?: 4318 0000AB9D B93946 <1> mov cx, "9F" 4319 <1> getexpression.lit_isdigit?: 4320 0000ABA0 3C30 <1> cmp al, '0' 4321 0000ABA2 7214 <1> jb .no 4322 0000ABA4 38C8 <1> cmp al, cl 4323 0000ABA6 760D <1> jbe .yes 4324 0000ABA8 50 <1> push ax 4325 0000ABA9 E80ED6 <1> call uppercase 4326 0000ABAC 38E8 <1> cmp al, ch 4327 0000ABAE 7707 <1> ja .no_p 4328 0000ABB0 3C41 <1> cmp al, 'A' 4329 0000ABB2 7203 <1> jb .no_p 4330 0000ABB4 58 <1> pop ax 4331 <1> .yes: 4332 0000ABB5 F8 <1> clc 4333 0000ABB6 C3 <1> retn 4334 <1> 4335 <1> .no_p: 4336 0000ABB7 58 <1> pop ax 4337 <1> .no: 4338 0000ABB8 F9 <1> stc 4339 0000ABB9 C3 <1> retn 4340 <1> 4341 <1> 4342 <1> of_cond: 4343 0000ABBA 50 <1> push ax ; second operand type 4344 0000ABBB 4E <1> dec si 4345 0000ABBC AD <1> lodsw 4346 0000ABBD 3D3A3A <1> cmp ax, "::" 4347 0000ABC0 7403E9F7EC <1> jne error 4348 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_COND_STACK_CHECK 4349 0000ABC5 E8FC00 <1> call stack_check_indirection 4350 <1> %else 4351 <1> mov ax, _EXPRESSION_COND_STACK_CHECK 4352 <1> call stack_check ; abort if deep recursion 4353 <1> %endif 4354 0000ABC8 A9[5774] <1> test ax, msg.stack_overflow.cond 4355 <1> 4356 0000ABCB A1[A096] <1> mov ax, word [hhvar] 4357 0000ABCE 0B06[A296] <1> or ax, word [hhvar + 2] ; ax = flag (zero if to take third operand) 4358 0000ABD2 53 <1> push bx 4359 0000ABD3 52 <1> push dx 4360 0000ABD4 50 <1> push ax ; preserve stack 4361 0000ABD5 AC <1> lodsb 4362 0000ABD6 E88BFB <1> call getexpression ; parse third operand 4363 0000ABD9 E89801 <1> call skipcomm0 ; allow comma afterwards 4364 0000ABDC 59 <1> pop cx 4365 0000ABDD E309 <1> jcxz @F ; if to take third operand --> 4366 0000ABDF 5A <1> pop dx 4367 0000ABE0 5B <1> pop bx ; take second operand 4368 0000ABE1 88C1 <1> mov cl, al 4369 0000ABE3 58 <1> pop ax ; ah = second operand type 4370 0000ABE4 88C8 <1> mov al, cl ; preserve al 4371 0000ABE6 EB03 <1> jmp @FF 4372 <1> 4373 <1> @@: 4374 0000ABE8 59 <1> pop cx 4375 0000ABE9 59 <1> pop cx ; discard second operand value 4376 0000ABEA 59 <1> pop cx ; discard second operand type 4377 <1> @@: 4378 0000ABEB 59 <1> pop cx ; discard near return address 4379 0000ABEC 59 <1> pop cx ; discard cx on stack 4380 <1> 4381 0000ABED C646FC18 <1> mov byte [bp+lA+4], OPERATOR_RIGHTOP 4382 0000ABF1 4E <1> dec si 4383 0000ABF2 E933FE <1> jmp getexpression.term_done 4384 <1> 4385 <1> 4386 <1> lleave ctx 4387 <1> 4388 <1> 4389 <1> ; INP: si-> possible unary operators 4390 <1> ; OUT: dx = 1 + count of unary operators 4391 <1> ; al, si-> behind identified unary operators 4392 <1> ; ch = bit mask of required bytes, 4393 <1> ; bits 0..3 represent one byte of a dword each 4394 <1> ; bits 4..7 are clear 4395 <1> ; CHG: bx, ch, di 4396 <1> ; 4397 <1> ; Type specifications are parsed as unary operators 4398 <1> ; here. (Elsewhere, "unary operators" refers only to 4399 <1> ; the unary operators specified as one of "+-~!?".) 4400 <1> count_unary_operators: 4401 0000ABF5 31FF <1> xor di, di 4402 <1> ; INP: si-> possible unary operators 4403 <1> ; di = maximum count+1 of unary operators to process, 4404 <1> ; zero means unlimited 4405 <1> ; OUT: dx = 1 + count of unary operators, 4406 <1> ; at most di 4407 <1> ; al, si-> behind identified unary operators 4408 <1> ; ch = bit mask of required bytes, 4409 <1> ; bits 0..3 represent one byte of a dword each 4410 <1> ; bits 4..7 are clear 4411 <1> ; ZR if maximum reached 4412 <1> ; NZ if maximum not reached 4413 <1> ; CHG: bx, ch 4414 <1> count_unary_operators_restrict: 4415 0000ABF7 B50F <1> mov ch, 1111b ; default to access a full dword 4416 0000ABF9 31D2 <1> xor dx, dx ; initialize counter to zero 4417 0000ABFB A8 <1> db __TEST_IMM8 ; skip pop 4418 <1> .loop: 4419 0000ABFC 5F <1> pop di ; get maximum count 4420 0000ABFD 42 <1> inc dx ; count unary operators and type specifiers 4421 0000ABFE 57 <1> push di ; save maximum count again 4422 0000ABFF E8A001 <1> call skipwhite ; load next character and skip blanks 4423 0000AC02 39FA <1> cmp dx, di ; reached maximum ? 4424 0000AC04 741B <1> je .end ; yes --> (ZR) 4425 0000AC06 51 <1> push cx 4426 0000AC07 E81AF2 <1> call istype? ; check for type and if so retrieve info 4427 0000AC0A 720F <1> jc .notype ; not a type --> 4428 0000AC0C 59 <1> pop cx 4429 <1> 4430 0000AC0D D1EB <1> shr bx, 1 ; discard signedness bit 4431 0000AC0F 89FE <1> mov si, di ; -> behind the type specifier 4432 0000AC11 B11F <1> mov cl, 01Fh ; prepare shift count register 4433 0000AC13 238F[5690] <1> and cx,[typebitmasks+bx]; apply mask and get shift count register 4434 0000AC17 D2E5 <1> shl ch, cl ; apply shift 4435 0000AC19 EBE1 <1> jmp short .loop ; check for more --> 4436 <1> 4437 <1> .notype: 4438 0000AC1B E8BFF1 <1> call isunaryoperator? ; is it a unary operator? 4439 0000AC1E 59 <1> pop cx 4440 0000AC1F 74DB <1> je .loop ; yes, check for more --> 4441 <1> ; (NZ) 4442 <1> .end: 4443 0000AC21 5F <1> pop di ; discard 4444 0000AC22 C3 <1> retn 4445 <1> 4446 <1> 4447 <1> get3byte.checksignificantbits: 4448 0000AC23 50 <1> push ax 4449 0000AC24 80E43F <1> and ah, 3Fh 4450 0000AC27 80FC18 <1> cmp ah, 24 4451 0000AC2A EB1E <1> jmp checksignificantbitscommon 4452 <1> 4453 <1> getword: 4454 0000AC2C 53 <1> push bx 4455 0000AC2D E834FB <1> call getexpression 4456 0000AC30 5B <1> pop bx 4457 <1> .checksignificantbits: 4458 0000AC31 50 <1> push ax 4459 0000AC32 80E43F <1> and ah, 3Fh 4460 0000AC35 80FC10 <1> cmp ah, 16 4461 0000AC38 EB10 <1> jmp checksignificantbitscommon 4462 <1> 4463 <1> getbyte: 4464 0000AC3A 53 <1> push bx 4465 0000AC3B 52 <1> push dx 4466 0000AC3C E825FB <1> call getexpression 4467 0000AC3F 5B <1> pop bx 4468 0000AC40 88FE <1> mov dh, bh 4469 0000AC42 5B <1> pop bx 4470 <1> .checksignificantbits: 4471 0000AC43 50 <1> push ax 4472 0000AC44 80E43F <1> and ah, 3Fh 4473 0000AC47 80FC08 <1> cmp ah, 8 4474 <1> checksignificantbitscommon: 4475 0000AC4A 58 <1> pop ax 4476 0000AC4B 7701 <1> ja short errorj6 ; if error 4477 0000AC4D C3 <1> retn 4478 <1> 4479 <1> errorj6: 4480 0000AC4E E96BEC <1> jmp error 4481 <1> 4482 <1> 4483 <1> ; GETNYB - Convert the hex character in AL into a nybble. Return 4484 <1> ; carry set in case of error. 4485 <1> 4486 <1> getnyb: 4487 0000AC51 50 <1> push ax 4488 0000AC52 2C30 <1> sub al, '0' 4489 0000AC54 3C09 <1> cmp al, 9 4490 0000AC56 760D <1> jbe .return ; if normal digit 4491 0000AC58 58 <1> pop ax 4492 0000AC59 50 <1> push ax 4493 0000AC5A E85DD5 <1> call uppercase 4494 0000AC5D 2C41 <1> sub al, 'A' 4495 0000AC5F 3C05 <1> cmp al, 'F'-'A' 4496 0000AC61 7706 <1> ja .error ; if not A..F 4497 0000AC63 040A <1> add al, 10 4498 <1> .return: 4499 0000AC65 44 <1> inc sp ; normal return (first pop old AX) 4500 0000AC66 44 <1> inc sp 4501 0000AC67 F8 <1> clc 4502 0000AC68 C3 <1> retn 4503 <1> .error: 4504 0000AC69 58 <1> pop ax ; error return 4505 0000AC6A F9 <1> stc 4506 0000AC6B C3 <1> retn 4507 <1> 4508 <1> 4509 <1> ; INP: si -> input line 4510 <1> ; OUT: NC if normal range (nonzero, upper >= lower), 4511 <1> ; bx:dx = TO value (upper bound) 4512 <1> ; cx:di = FROM value (lower bound) 4513 <1> ; CY if not normal, 4514 <1> ; bx:dx and cx:di may be invalid 4515 <1> ; ZR if FROM LENGTH with zero length, cx:di valid 4516 <1> ; al = first character 4517 <1> ; si -> next character 4518 <1> ; jumps to error if invalid input 4519 <1> get_value_range: 4520 0000AC6C E83301 <1> call skipwhite 4521 0000AC6F 4E <1> dec si 4522 0000AC70 BA[B168] <1> mov dx, msg.from 4523 0000AC73 E87800 <1> call isstring? 4524 0000AC76 AC <1> lodsb 4525 0000AC77 753B <1> jne .not_from 4526 <1> 4527 <1> .from: 4528 0000AC79 E8E8FA <1> call getexpression ; (recursive) 4529 0000AC7C 89D7 <1> mov di, dx 4530 0000AC7E 89D9 <1> mov cx, bx ; cx:di = from 4531 <1> 4532 0000AC80 4E <1> dec si 4533 0000AC81 BA[B668] <1> mov dx, msg.to 4534 0000AC84 E86700 <1> call isstring? 4535 0000AC87 7425 <1> je .from_to 4536 0000AC89 BA[3168] <1> mov dx, msg.length 4537 0000AC8C E85F00 <1> call isstring? 4538 0000AC8F 7403E928EC <1> jne error 4539 <1> 4540 <1> .from_length: 4541 0000AC94 AC <1> lodsb 4542 0000AC95 E8CCFA <1> call getexpression ; (recursive) 4543 0000AC98 85DB <1> test bx, bx 4544 0000AC9A 7506 <1> jnz @F 4545 0000AC9C 85D2 <1> test dx, dx 4546 0000AC9E 7502 <1> jnz @F 4547 <1> ; ZR = length is zero, cx:di = from 4548 <1> .notnormal: 4549 0000ACA0 F9 <1> stc 4550 0000ACA1 C3 <1> retn 4551 <1> 4552 <1> @@: 4553 <1> ; bx:dx = length 4554 0000ACA2 01FA <1> add dx, di 4555 0000ACA4 11CB <1> adc bx, cx ; bx:dx = from + length 4556 0000ACA6 83EA01 <1> sub dx, 1 4557 0000ACA9 83DB00 <1> sbb bx, 0 ; bx:dx = from + length - 1 4558 0000ACAC EB0D <1> jmp @F 4559 <1> 4560 <1> .from_to: 4561 0000ACAE AC <1> lodsb 4562 <1> 4563 0000ACAF E8B2FA <1> call getexpression ; (recursive) 4564 <1> ; bx:dx = to 4565 <1> ; cx:di = from 4566 0000ACB2 EB07 <1> jmp @F 4567 <1> 4568 <1> .not_from: 4569 0000ACB4 E8ADFA <1> call getexpression ; (recursive) 4570 0000ACB7 89D7 <1> mov di, dx 4571 0000ACB9 89D9 <1> mov cx, bx ; bx:dx = cx:ax = value 4572 <1> 4573 <1> @@: 4574 0000ACBB 39CB <1> cmp bx, cx 4575 0000ACBD 7502 <1> jne @F 4576 0000ACBF 39FA <1> cmp dx, di 4577 <1> @@: 4578 0000ACC1 72DD <1> jb .notnormal ; NZ = length overflow or not normal FROM TO 4579 0000ACC3 C3 <1> retn ; (NC) 4580 <1> 4581 <1> 4582 <1> stack_check_indirection: 4583 0000ACC4 B88000 <1> mov ax, _EXPRESSION_INDIRECTION_STACK_CHECK 4584 <1> 4585 <1> ; INP: ax = how much stack should be left 4586 <1> ; word [cs:ip + 1] = message for location 4587 <1> ; OUT: doesn't return if stack overflow 4588 <1> ; CHG: ax 4589 <1> ; STT: ds = ss 4590 <1> stack_check: 4591 <1> %if _SYMBOLIC 4592 <1> call .internal 4593 <1> %else 4594 0000ACC7 05[E009] <1> add ax, stack 4595 0000ACCA 39C4 <1> cmp sp, ax 4596 <1> %endif 4597 0000ACCC 7201 <1> jb @F 4598 0000ACCE C3 <1> retn 4599 <1> 4600 <1> @@: 4601 0000ACCF 58 <1> pop ax 4602 <1> 4603 0000ACD0 16 <1> push ss 4604 0000ACD1 07 <1> pop es 4605 0000ACD2 8B26[D60A] <1> mov sp, [throwsp] 4606 <1> 4607 0000ACD6 BF[CB73] <1> mov di, msg.stack_overflow.caller 4608 0000ACD9 E87101 <1> call hexword 4609 0000ACDC BA[AF73] <1> mov dx, msg.stack_overflow 4610 0000ACDF E81E05 <1> call putsz 4611 0000ACE2 93 <1> xchg ax, bx 4612 0000ACE3 2E8B5701 <1> mov dx, [cs:bx + 1] 4613 0000ACE7 E81605 <1> call putsz 4614 <1> 4615 0000ACEA FF26[D20A] <1> jmp near [errret] 4616 <1> 4617 <1> 4618 <1> %if _SYMBOLIC 4619 <1> ; INP: ax = how much stack should be left 4620 <1> ; OUT: CY if stack overflow 4621 <1> ; CHG: ax 4622 <1> ; STT: ds = ss 4623 <1> .internal: 4624 <1> add ax, word [stack_low_address] 4625 <1> cmp sp, ax 4626 <1> retn 4627 <1> %endif 5788 5789 5790 %include "lineio.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug line input and output 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2012 C. Masloch 8 <1> 9 <1> Usage of the works is permitted provided that this 10 <1> instrument is retained with the works, so that any entity 11 <1> that uses the works is notified of this instrument. 12 <1> 13 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 14 <1> 15 <1> %endif 16 <1> 17 <1> 18 <1> usesection lDEBUG_CODE 19 <1> 20 <1> ; Check for given string (cap-insensitive) 21 <1> ; 22 <1> ; INP: si-> input string to check (either cap), 23 <1> ; terminated by CR (13), semicolon, space, tab, 24 <1> ; comma, colon, [, ], (, or ) 25 <1> ; dx-> ASCIZ string to check (all-caps) 26 <1> ; OUT: Iff string matches, 27 <1> ; ZR 28 <1> ; si-> at separator that terminates the keyword 29 <1> ; else, 30 <1> ; NZ 31 <1> ; si = input si 32 <1> ; STT: ds = es = ss 33 <1> ; CHG: dx, al 34 <1> isstring?: 35 0000ACEE 56 <1> push si 36 0000ACEF 87D7 <1> xchg dx, di 37 <1> .loop: 38 0000ACF1 AC <1> lodsb 39 0000ACF2 E8C5D4 <1> call uppercase 40 0000ACF5 AE <1> scasb 41 0000ACF6 7506 <1> jne .mismatch 42 0000ACF8 84C0 <1> test al, al 43 0000ACFA 75F5 <1> jne .loop 44 0000ACFC EB38 <1> jmp .matched_zr 45 <1> 46 <1> .mismatch: 47 0000ACFE E84C00 <1> call iseol? 48 0000AD01 742C <1> je .checkend 49 0000AD03 3C20 <1> cmp al, 32 50 0000AD05 7428 <1> je .checkend 51 0000AD07 3C09 <1> cmp al, 9 52 0000AD09 7424 <1> je .checkend 53 0000AD0B 3C2E <1> cmp al, '.' 54 0000AD0D 7420 <1> je .checkend 55 0000AD0F 3C2C <1> cmp al, ',' 56 0000AD11 741C <1> je .checkend 57 0000AD13 3C3D <1> cmp al, '=' 58 0000AD15 7418 <1> je .checkend 59 0000AD17 3C3A <1> cmp al, ':' 60 0000AD19 7414 <1> je .checkend 61 0000AD1B 3C5B <1> cmp al, '[' 62 0000AD1D 7410 <1> je .checkend 63 0000AD1F 3C5D <1> cmp al, ']' 64 0000AD21 740C <1> je .checkend 65 0000AD23 3C28 <1> cmp al, '(' 66 0000AD25 7408 <1> je .checkend 67 0000AD27 3C29 <1> cmp al, ')' 68 0000AD29 7404 <1> je .checkend 69 <1> .ret_nz: 70 <1> ; NZ 71 0000AD2B 5E <1> pop si 72 <1> .ret: 73 0000AD2C 87D7 <1> xchg dx, di 74 0000AD2E C3 <1> retn 75 <1> 76 <1> .checkend: 77 0000AD2F 26807DFF00 <1> cmp byte [es:di - 1], 0 78 0000AD34 75F5 <1> jne .ret_nz 79 <1> .matched_zr: ; ZR 80 0000AD36 5F <1> pop di ; (discard) 81 0000AD37 8D74FF <1> lea si, [si - 1] ; -> separator 82 0000AD3A EBF0 <1> jmp .ret 83 <1> 84 <1> 85 <1> iseol?_or_then: 86 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 87 0000AD3C F606[CF00]08 <1> testopt [internalflags3], dif3_in_if 88 0000AD41 740A <1> jz iseol? 89 0000AD43 BA[8164] <1> mov dx, msg.then 90 0000AD46 4E <1> dec si 91 0000AD47 E8A4FF <1> call isstring? 92 0000AD4A 740B <1> je iseol?.ret 93 0000AD4C AC <1> lodsb 94 <1> %endif 95 <1> 96 <1> iseol?: 97 0000AD4D 3C3B <1> cmp al, ';' 98 0000AD4F 7406 <1> je .ret 99 <1> .notsemicolon: 100 0000AD51 3C0D <1> cmp al, 13 ; this *IS* iseol? 101 0000AD53 7402 <1> je .ret 102 0000AD55 3C00 <1> cmp al, 0 103 <1> .ret: 104 0000AD57 C3 <1> retn 105 <1> 106 <1> 107 <1> chkeol_or_then: 108 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 109 0000AD58 E84800 <1> call skipwh0 110 0000AD5B E8DEFF <1> call iseol?_or_then 111 0000AD5E 74F7 <1> je iseol?.ret ; if EOL --> 112 0000AD60 EB08 <1> jmp @F 113 <1> %endif 114 <1> 115 <1> ; Check for end of line 116 <1> ; 117 <1> ; INP: al = first character 118 <1> ; ds:si-> next character 119 <1> ; OUT: ZR 120 <1> ; al = 13 or al = ';' or al = 0 121 <1> ; (does not return if anything on line beside blanks) 122 <1> chkeol: 123 0000AD62 E83E00 <1> call skipwh0 124 0000AD65 E8E5FF <1> call iseol? 125 0000AD68 74ED <1> je iseol?.ret ; if EOL --> 126 <1> 127 <1> @@: 128 0000AD6A B80001 <1> mov ax, 0100h 129 0000AD6D E893EB <1> call setrc 130 <1> errorj8: 131 0000AD70 E949EB <1> jmp error 132 <1> 133 <1> 134 <1> ; Skip blanks, then an optional comma, and then more blanks 135 <1> ; 136 <1> ; INP: ds:si -> first character 137 <1> ; OUT: al = first non-blank character behind 138 <1> ; ds:si -> character behind the first non-blank behind 139 <1> ; NC 140 <1> ; STK: 3 word 141 <1> skipcomma: 142 0000AD73 AC <1> lodsb 143 <1> 144 <1> ; Same as above but we already have the first character in al 145 <1> skipcomm0: 146 0000AD74 E82C00 <1> call skipwh0 147 0000AD77 3C2C <1> cmp al, ',' 148 0000AD79 7510 <1> jne .return ; if no comma 149 0000AD7B 56 <1> push si 150 0000AD7C E82300 <1> call skipwhite 151 0000AD7F E8CBFF <1> call iseol? 152 0000AD82 7504 <1> jne .noteol ; if not end of line 153 0000AD84 5E <1> pop si 154 0000AD85 B02C <1> mov al, ',' 155 0000AD87 C3 <1> retn 156 <1> .noteol: 157 0000AD88 83C402 <1> add sp, byte 2 ; pop si into nowhere 158 <1> .return: 159 0000AD8B C3 <1> retn 160 <1> 161 <1> 162 <1> ; Skip blanks, then an optional equals sign, then more blanks 163 <1> skipequals: 164 0000AD8C AC <1> lodsb 165 <1> skipequ0: 166 0000AD8D E81300 <1> call skipwh0 167 0000AD90 3C3D <1> cmp al, '=' 168 0000AD92 7503 <1> jne .return 169 0000AD94 E80B00 <1> call skipwhite 170 <1> .return: 171 0000AD97 C3 <1> retn 172 <1> 173 <1> 174 <1> ; Skip alphabetic characters, and then white space 175 <1> ; 176 <1> ; INP: ds:si-> first character 177 <1> ; OUT: al = first non-blank character behind alphabetic characters 178 <1> ; ds:si-> character behind the first non-blank behind alpha. 179 <1> ; NC 180 <1> skipalpha: 181 <1> .: 182 0000AD98 AC <1> lodsb 183 0000AD99 24DF <1> and al, TOUPPER 184 0000AD9B 2C41 <1> sub al, 'A' 185 0000AD9D 3C19 <1> cmp al, 'Z'-'A' 186 0000AD9F 76F7 <1> jbe . 187 0000ADA1 4E <1> dec si 188 <1> 189 <1> ; Skip blanks and tabs 190 <1> ; 191 <1> ; INP: ds:si-> first character 192 <1> ; OUT: al = first non-blank character 193 <1> ; ds:si-> character behind the first non-blank 194 <1> ; NC 195 <1> ; CHG: - 196 <1> ; STK: 1 word 197 <1> skipwhite: 198 0000ADA2 AC <1> lodsb 199 <1> 200 <1> ; Same as above, but first character in al 201 <1> ; 202 <1> ; INP: al = first character 203 <1> ; ds:si-> next character 204 <1> ; OUT: al = first non-blank character 205 <1> ; ds:si-> character behind the first non-blank 206 <1> ; NC 207 <1> ; CHG: - 208 <1> ; STK: 1 word 209 <1> skipwh0: 210 0000ADA3 3C20 <1> cmp al, 32 211 0000ADA5 74FB <1> je skipwhite 212 0000ADA7 3C09 <1> cmp al, 9 213 0000ADA9 74F7 <1> je skipwhite 214 0000ADAB F8 <1> clc 215 0000ADAC C3 <1> retn 216 <1> 217 <1> 218 <1> ; SHOWSTRING - Print ASCIZ string. 219 <1> showstring.next: 220 0000ADAD AA <1> stosb 221 <1> showstring: 222 0000ADAE AC <1> lodsb 223 0000ADAF 84C0 <1> test al, al 224 0000ADB1 75FA <1> jnz .next 225 0000ADB3 C3 <1> retn 226 <1> 227 <1> 228 <1> ; Dump byte as decimal number string 229 <1> ; 230 <1> ; INP: al = byte 231 <1> ; di-> where to store 232 <1> ; OUT: - 233 <1> ; CHG: di-> behind variable-length string 234 <1> decbyte: 235 0000ADB4 50 <1> push ax 236 0000ADB5 51 <1> push cx 237 0000ADB6 B96400 <1> mov cx, 100 238 0000ADB9 E80B00 <1> call .div 239 0000ADBC B10A <1> mov cl, 10 240 0000ADBE E80600 <1> call .div 241 0000ADC1 0430 <1> add al, '0' 242 0000ADC3 AA <1> stosb 243 0000ADC4 59 <1> pop cx 244 0000ADC5 58 <1> pop ax 245 0000ADC6 C3 <1> retn 246 <1> 247 <1> .div: 248 0000ADC7 30E4 <1> xor ah, ah 249 0000ADC9 F6F1 <1> div cl 250 0000ADCB 08C5 <1> or ch, al 251 0000ADCD 7403 <1> jz .leadingzero 252 0000ADCF 0430 <1> add al, '0' 253 0000ADD1 AA <1> stosb 254 <1> .leadingzero: 255 0000ADD2 86C4 <1> xchg al, ah 256 0000ADD4 C3 <1> retn 257 <1> 258 <1> 259 <1> decword: 260 0000ADD5 52 <1> push dx 261 0000ADD6 31D2 <1> xor dx, dx 262 0000ADD8 E80200 <1> call decdword 263 0000ADDB 5A <1> pop dx 264 0000ADDC C3 <1> retn 265 <1> 266 <1> 267 <1> decdword: 268 0000ADDD 51 <1> push cx 269 0000ADDE 31C9 <1> xor cx, cx 270 0000ADE0 E80200 <1> call dec_dword_minwidth 271 0000ADE3 59 <1> pop cx 272 0000ADE4 C3 <1> retn 273 <1> 274 <1> 275 <1> ; Dump dword as decimal number string 276 <1> ; 277 <1> ; INP: dx:ax = dword 278 <1> ; cx = minimum width (<= 1 for none, must be < 128) 279 <1> ; di -> where to store 280 <1> ; OUT: - 281 <1> ; CHG: di -> behind variable-length string 282 <1> ; STT: UP 283 <1> dec_dword_minwidth: 284 <1> lframe near 285 <1> lequ 10, bufferlen 286 <1> lvar ?bufferlen,buffer 287 0000ADE5 5589E58D66F6 <1> lenter 288 <1> lvar dword, dividend 289 0000ADEB 52 <1> push dx 290 0000ADEC 50 <1> push ax 291 0000ADED 49 <1> dec cx 292 <1> lvar word, minwidth 293 0000ADEE 51 <1> push cx 294 0000ADEF 41 <1> inc cx 295 <1> 296 0000ADF0 50 <1> push ax 297 0000ADF1 53 <1> push bx 298 0000ADF2 51 <1> push cx 299 0000ADF3 52 <1> push dx 300 0000ADF4 56 <1> push si 301 0000ADF5 57 <1> push di 302 0000ADF6 06 <1> push es 303 <1> 304 0000ADF7 16 <1> push ss 305 0000ADF8 07 <1> pop es 306 <1> 307 0000ADF9 8D7EFF <1> lea di, [bp + ?buffer + ?bufferlen - 1] 308 0000ADFC 89FB <1> mov bx, di 309 0000ADFE FD <1> std ; _AMD_ERRATUM_109_WORKAROUND does not apply 310 <1> 311 <1> ; dword [bp + ?dividend] = number to display 312 0000ADFF B90A00 <1> mov cx, 10 ; divisor 313 <1> .loop_write: 314 <1> 315 0000AE02 31D2 <1> xor dx, dx 316 0000AE04 57 <1> push di 317 0000AE05 BF0400 <1> mov di, 4 318 <1> .loop_divide: 319 0000AE08 8B43F0 <1> mov ax, [bp + ?dividend - 2 + di] 320 0000AE0B F7F1 <1> div cx 321 0000AE0D 8943F0 <1> mov word [bp + ?dividend - 2 + di], ax 322 0000AE10 4F <1> dec di 323 0000AE11 4F <1> dec di 324 0000AE12 75F4 <1> jnz .loop_divide 325 <1> ; dx = last remainder 326 0000AE14 5F <1> pop di 327 0000AE15 92 <1> xchg ax, dx ; ax = remainder (next digit) 328 <1> ; dword [bp + ?dividend] = result of div 329 0000AE16 0430 <1> add al, '0' 330 0000AE18 AA <1> stosb 331 0000AE19 FF4EF0 <1> dec word [bp + ?minwidth] 332 0000AE1C 79E4 <1> jns .loop_write 333 <1> 334 0000AE1E 837EF400 <1> cmp word [bp + ?dividend + 2], 0 335 0000AE22 75DE <1> jnz .loop_write 336 0000AE24 837EF200 <1> cmp word [bp + ?dividend], 0 337 <1> ; any more ? 338 0000AE28 75D8 <1> jnz .loop_write ; loop --> 339 <1> 340 0000AE2A FC <1> cld 341 <1> 342 0000AE2B 29FB <1> sub bx, di 343 0000AE2D 89D9 <1> mov cx, bx 344 0000AE2F 89FE <1> mov si, di 345 0000AE31 46 <1> inc si 346 <1> 347 0000AE32 07 <1> pop es 348 0000AE33 5F <1> pop di 349 <1> 350 <1> @@: 351 0000AE34 36A4 <1> ss movsb ; do not replace by rep ss movsb, because 352 <1> ; some 8086 don't like two-prefix opcodes 353 0000AE36 E2FC <1> loop @B 354 <1> 355 0000AE38 5E <1> pop si 356 0000AE39 5A <1> pop dx 357 0000AE3A 59 <1> pop cx 358 0000AE3B 5B <1> pop bx 359 0000AE3C 58 <1> pop ax 360 <1> 361 0000AE3D 89EC5D <1> lleave 362 0000AE40 C3 <1> retn 363 <1> 364 <1> 365 <1> ; dump high word of eax - assumes 386 366 <1> hexword_high: 367 <1> [cpu 386] 368 0000AE41 66C1C010 <1> rol eax, 16 369 0000AE45 E80500 <1> call hexword 370 0000AE48 66C1C010 <1> rol eax, 16 371 <1> __CPU__ 372 0000AE4C C3 <1> retn 373 <1> 374 <1> 375 <1> ; hexdword - dump dword (in eax) to hex ASCII - assumes 386 376 <1> ; HEXWORD - Print hex word (in AX). 377 <1> ; HEXBYTE - Print hex byte (in AL). 378 <1> ; HEXNYB - Print hex digit. 379 <1> ; Uses none. 380 <1> %if 0 ; currently disabled because only one call made to here (ID command) 381 <1> hexdword: 382 <1> call hexword_high 383 <1> %endif 384 <1> hexword: 385 0000AE4D 86C4 <1> xchg al, ah 386 0000AE4F E80200 <1> call hexbyte 387 0000AE52 86C4 <1> xchg al, ah 388 <1> 389 <1> hexbyte: 390 0000AE54 51 <1> push cx 391 0000AE55 B104 <1> mov cl, 4 392 0000AE57 D2C0 <1> rol al, cl 393 0000AE59 E80300 <1> call hexnyb 394 0000AE5C D2C0 <1> rol al, cl 395 0000AE5E 59 <1> pop cx 396 <1> 397 <1> hexnyb: 398 0000AE5F 50 <1> push ax 399 0000AE60 240F <1> and al, 0Fh 400 <1> .common: 401 <1> ; These three instructions change to ASCII hex. 402 <1> ; Refer to https://codegolf.stackexchange.com/questions/193793/little-endian-number-to-string-conversion/193842#193842 403 0000AE62 3C0A <1> cmp al, 10 ; set CF according to digit <= 9 404 0000AE64 1C69 <1> sbb al, 69h ; read CF, set CF and conditionally set AF 405 0000AE66 2F <1> das ; magic, which happens to work 406 0000AE67 AA <1> stosb 407 0000AE68 58 <1> pop ax 408 0000AE69 C3 <1> retn 409 <1> 410 <1> ; TAB_TO - Space fill until reaching the column indicated by AX. 411 <1> ; (Print a new line if necessary.) 412 <1> 413 <1> tab_to: 414 0000AE6A 50 <1> push ax 415 0000AE6B 29F8 <1> sub ax, di 416 0000AE6D 7706 <1> ja tabto1 ; if there's room on this line 417 0000AE6F E80B00 <1> call trimputs 418 0000AE72 BF[AE07] <1> mov di, line_out 419 <1> tabto1: 420 0000AE75 59 <1> pop cx 421 0000AE76 29F9 <1> sub cx, di 422 0000AE78 B020 <1> mov al, 32 423 0000AE7A F3AA <1> rep stosb ; space fill to the right end 424 <1> puts.retn: 425 0000AE7C C3 <1> retn 426 <1> 427 <1> ; Trim excess blanks, append linebreak and display line_out. 428 <1> ; 429 <1> ; INP: es:di -> behind last character to display, or blank 430 <1> ; 431 <1> ; Note: May overflow if line_out only contains blanks. The byte at 432 <1> ; trim_overflow is used to avoid overflows. 433 <1> trimputs: 434 0000AE7D 4F <1> dec di 435 0000AE7E 26803D20 <1> cmp byte [es:di], 32 436 0000AE82 74F9 <1> je trimputs 437 0000AE84 47 <1> inc di 438 <1> 439 <1> ; Append linebreak and display line_out 440 <1> ; 441 <1> ; INP: es:di -> behind last character to display 442 <1> ; STT: all segment registers same 443 <1> ; CHG: ax, bx, cx, dx 444 <1> putsline_crlf: 445 0000AE85 B80D0A <1> mov ax, 10<<8| 13 446 0000AE88 AB <1> stosw 447 <1> 448 <1> ; Display line_out 449 <1> ; 450 <1> ; INP: es:di -> behind last character to display 451 <1> ; es:line_out -> first character to display 452 <1> ; STT: all segment registers same 453 <1> ; CHG: ax, bx, cx, dx 454 <1> putsline: 455 0000AE89 89F9 <1> mov cx, di 456 0000AE8B BA[AE07] <1> mov dx, line_out 457 0000AE8E 29D1 <1> sub cx, dx 458 <1> 459 <1> ; Display message 460 <1> ; 461 <1> ; INP: es:dx -> message to display 462 <1> ; cx = length of message 463 <1> ; STT: ds = ss = debugger data selector 464 <1> ; CHG: ax, bx, cx, dx 465 <1> puts: 466 <1> ;d4 call d4message 467 <1> ;d4 asciz "In puts first",13,10 468 <1> 469 0000AE90 F606[C700]20 <1> testopt [internalflags], tt_silence 470 0000AE95 7403E93102 <1> jnz puts_silence 471 <1> 472 0000AE9A F606[CD00]60 <1> testopt [internalflags3], dif3_unquiet 473 0000AE9F 7507 <1> jnz @F 474 0000AEA1 F606[CD00]10 <1> testopt [internalflags3], dif3_quiet_output 475 0000AEA6 75D4 <1> jnz .retn 476 <1> @@: 477 <1> 478 <1> ; The following code contains most of the paging support. 479 <1> ; Based on the number of LF characters in the string it 480 <1> ; displays only parts of the string, then interrupts it by 481 <1> ; the "[more]" prompt which waits for any key before 482 <1> ; proceeding. This is ensured to work proper in InDOS mode. 483 <1> ; 484 <1> ; Paging is deactivated if the command's output mustn't be 485 <1> ; paged (clears pagedcommand, which is set by cmd3). It is 486 <1> ; also not used when we output to a file. 487 0000AEA8 F606[9400]10 <1> testopt [options], nonpagingdevice 488 0000AEAD 7403E9FE00 <1> jnz .display ; deactivated by user --> 489 0000AEB2 F606[CF00]01 <1> testopt [internalflags3], dif3_input_re 490 0000AEB7 7403E9F400 <1> jnz .display 491 0000AEBC F606[CD00]01 <1> testopt [internalflags3], dif3_input_cmdline 492 0000AEC1 7403E9EA00 <1> jnz .display 493 <1> %if _INPUT_FILE_BOOT 494 0000AEC6 F606[CB00]02 <1> testopt [internalflags2], dif2_input_file_boot 495 0000AECB 7403E9E000 <1> jnz .display 496 <1> %endif 497 0000AED0 E8CAEC <1> call InDos ; InDOS mode ? 498 0000AED3 752C <1> jnz .dontcheckredirection ; yes, then we display with Int10 anyway --> 499 <1> %if _INPUT_FILE_HANDLES 500 0000AED5 F606[CA00]10 <1> testopt [internalflags2], dif2_input_file 501 0000AEDA 7403E9D100 <1> jnz .display 502 <1> %endif 503 0000AEDF F606[9500]40 <1> testopt [options], enable_serial ; I/O done using serial port ? 504 0000AEE4 751B <1> jnz .dontcheckredirection ; yes, is paged --> 505 0000AEE6 F606[C400]80 <1> testopt [internalflags], outputfile 506 0000AEEB 7403E9C000 <1> jnz .display ; output redirected to file. never page --> 507 0000AEF0 F606[9500]01 <1> testopt [options], nondospaging 508 0000AEF5 750A <1> jnz .dontcheckredirection 509 0000AEF7 F606[C400]20 <1> testopt [internalflags], inputfile 510 0000AEFC 7403E9AF00 <1> jnz .display ; input redirected from a file. never page --> 511 <1> .dontcheckredirection: 512 0000AF01 57 <1> push di 513 0000AF02 51 <1> push cx ; used as variable: remaining (not yet displayed) line length 514 0000AF03 89D7 <1> mov di, dx ; es:di-> string, cx = length 515 <1> .looplf: 516 0000AF05 85C9 <1> test cx, cx 517 0000AF07 7503E9A200 <1> jz .display_pop ; end of string (or ended in LF) --> 518 <1> ; Important: We only ever jump back to .looplf when cx 519 <1> ; zero means it's okay to ignore the waiting prompt as 520 <1> ; flagged below. This is (A) at the start of a string, 521 <1> ; where cx is the whole string's length, (B) after 522 <1> ; determining that prompting is not yet necessary, in 523 <1> ; which case the flag was checked earlier already, (C) 524 <1> ; after the flag has been set and a substring was already 525 <1> ; displayed (so cx is again the whole substring's length) 526 <1> ; or (D) just after the prompt was displayed, in which 527 <1> ; case the flag cannot be set. 528 <1> ; In case A and C, when the (sub)string is empty (ie. cx 529 <1> ; is zero) it's crucial to ignore the waiting prompt as 530 <1> ; this is the exact behaviour we want: If nothing is 531 <1> ; displayed anymore before the getline code prompts 532 <1> ; anyway, do not display our prompt. 533 0000AF0C F606[C600]10 <1> testopt [internalflags], promptwaiting ; do we have a prompt to display ? 534 0000AF11 7550 <1> jnz .promptnow ; yes, display it before the string --> 535 <1> 536 0000AF13 31C0 <1> xor ax, ax 537 0000AF15 F606[9500]40 <1> testopt [options], enable_serial ; serial ? 538 0000AF1A 7409 <1> jz @F ; no --> 539 0000AF1C 0A06[E10B] <1> or al, byte [serial_rows] ; ax = number of rows if serial 540 0000AF20 7419 <1> jz .display_pop_ZR ; if zero, do not page --> 541 0000AF22 48 <1> dec ax ; was 1 ? (adjust to rows minus one) 542 0000AF23 7516 <1> jnz @FF ; no, use as rows minus one --> (NZ) 543 <1> ; ax = 0 if it was 1 544 <1> @@: 545 0000AF25 0A06[F00B] <1> or al, [io_rows] 546 0000AF29 7410 <1> jz .display_pop_ZR 547 0000AF2B 48 <1> dec ax ; was 1 ? (adjust to rows minus one) 548 0000AF2C 750D <1> jnz @F ; no, use as rows minus one --> (NZ) 549 <1> ; yes, automatic (use BDA) 550 0000AF2E 06 <1> push es 551 0000AF2F B84000 <1> mov ax, 40h ; 0040h is a bimodal segment/selector 552 0000AF32 8EC0 <1> mov es, ax 553 0000AF34 26A08400 <1> mov al, byte [ es:84h ] ; rows on screen 554 0000AF38 07 <1> pop es 555 0000AF39 85C0 <1> test ax, ax 556 <1> @@: 557 <1> .display_pop_ZR: 558 0000AF3B 7471 <1> jz .display_pop 559 <1> 560 0000AF3D 3806[CB0A] <1> cmp byte [ linecounter ], al 561 0000AF41 725E <1> jb .notyet ; not yet reached --> 562 0000AF43 F606[C400]08 <1> testopt [internalflags], pagedcommand ; active ? 563 0000AF48 7506 <1> jnz .prompt ; yes, prompt --> 564 0000AF4A FE0E[CB0A] <1> dec byte [ linecounter ] ; keep count, but don't prompt til next LF 565 0000AF4E EB51 <1> jmp short .notyet 566 <1> 567 <1> .prompt: 568 0000AF50 58 <1> pop ax ; ax = length of string, cx = length of string remaining 569 0000AF51 29C8 <1> sub ax, cx ; ax = length of string til LF 570 0000AF53 91 <1> xchg ax, cx ; cx = til LF incl., ax = behind LF 571 0000AF54 50 <1> push ax ; new count 572 <1> ; cx = length til LF 573 <1> ; es:dx-> start of part til LF 574 0000AF55 E85800 <1> call .display ; display part of message which fits on screen 575 0000AF58 59 <1> pop cx 576 0000AF59 51 <1> push cx ; update cx from variable 577 0000AF5A 89FA <1> mov dx, di ; dx-> start of next part 578 0000AF5C 800E[C600]10 <1> setopt [internalflags], promptwaiting ; mark as prompting necessary 579 0000AF61 EBA2 <1> jmp short .looplf ; now check whether anything follows at all 580 <1> ; This is the magic to suppress unnecessary prompts as 581 <1> ; were displayed previously. Now, we'll set this flag 582 <1> ; which effectively displays the prompt before (!) any 583 <1> ; other output is done. Previously, the prompt would be 584 <1> ; displayed right here. The only case where behaviour 585 <1> ; changed is when no more output occurs until the flag 586 <1> ; is reset elsewhere - ie. if getline prompts anyway. 587 <1> 588 <1> .promptnow: 589 0000AF63 52 <1> push dx 590 0000AF64 51 <1> push cx 591 0000AF65 C606[CB0A]00 <1> mov byte [ linecounter ], 0 ; prompting, so reset the line counter 592 0000AF6A 8026[C600]EF <1> clropt [internalflags], promptwaiting 593 0000AF6F 06 <1> push es 594 0000AF70 16 <1> push ss 595 0000AF71 07 <1> pop es 596 0000AF72 BA[285D] <1> mov dx, msg.more ; es:dx -> message 597 0000AF75 B90600 <1> mov cx, msg.more_size 598 0000AF78 E83500 <1> call .display ; print string (avoiding a recursion) 599 0000AF7B 07 <1> pop es 600 <1> 601 <1> ; This option is a hack for the sole use of 602 <1> ; demo scripts that only want the user to press 603 <1> ; a key for paging. 604 0000AF7C F606[9500]01 <1> testopt [options], nondospaging 605 0000AF81 7405 <1> jz .getc 606 0000AF83 E8F002 <1> call getc.rawnext ; get a character from BIOS 607 0000AF86 EB03 <1> jmp short .dispover 608 <1> .getc: 609 0000AF88 E8D802 <1> call getc ; get a character 610 <1> .dispover: 611 0000AF8B 3C03 <1> cmp al, 3 ; is it Ctrl+C ? 612 0000AF8D 743B <1> je .ctrlc ; yes, handle that --> 613 0000AF8F E82D8C <1> call handle_serial_flags_ctrl_c 614 0000AF92 06 <1> push es 615 0000AF93 16 <1> push ss 616 0000AF94 07 <1> pop es 617 0000AF95 BA[2E5D] <1> mov dx, msg.more_over ; es:dx -> message 618 0000AF98 B90800 <1> mov cx, msg.more_over_size 619 0000AF9B E81200 <1> call .display ; overwrite the prompt (avoiding a recursion) 620 0000AF9E 07 <1> pop es 621 0000AF9F 59 <1> pop cx 622 0000AFA0 5A <1> pop dx 623 <1> 624 <1> .notyet: 625 0000AFA1 B00A <1> mov al, 10 626 0000AFA3 F2AE <1> repne scasb ; search LF 627 0000AFA5 7507 <1> jne .display_pop ; none --> 628 <1> 629 0000AFA7 FE06[CB0A] <1> inc byte [ linecounter ] ; record how many LFs will be displayed 630 0000AFAB E957FF <1> jmp .looplf ; search for next LF --> 631 <1> 632 <1> .display_pop: 633 0000AFAE 59 <1> pop cx 634 0000AFAF 5F <1> pop di 635 <1> .display: 636 <1> ; Non-paged output code follows. 637 <1> ;d4 call d4message 638 <1> ;d4 asciz "In puts.display first",13,10 639 <1> 640 0000AFB0 F606[9500]40 <1> testopt [options], enable_serial 641 0000AFB5 7520 <1> jnz .notdos 642 0000AFB7 E8E3EB <1> call InDos 643 0000AFBA 751B <1> jnz .notdos 644 <1> ; es:dx -> message 645 0000AFBC BB0100 <1> mov bx, 1 ; standard output 646 0000AFBF B440 <1> mov ah, 40h ; write to file 647 0000AFC1 E306 <1> jcxz @F 648 <1> %if _PM 649 <1> d5 push di 650 <1> push es ; point ds of _doscall* to msg segment 651 <1> d5 call d4message 652 <1> d5 asciz 13,10,"In puts.display, es=" 653 <1> d5 push es 654 <1> d5 call d4disp_stack_hex 655 <1> d5 call d4message 656 <1> d5 asciz "h",13,10 657 <1> call selector_to_segment ; make sure we give it as a segment 658 <1> ; This assumes that non-access-slice pointers into the 659 <1> ; symbol tables (SYMSTR particularly) can be converted 660 <1> ; into 86M segmented addresses, ie that the selector 661 <1> ; points into 86M-accessible memory. 662 <1> d5 call d4message 663 <1> d5 asciz "In puts.display, on stack =" 664 <1> d5 pop di 665 <1> d5 push di 666 <1> d5 push di 667 <1> d5 call d4disp_stack_hex 668 <1> d5 call d4message 669 <1> d5 asciz "h",13,10 670 <1> call _doscall_return_es_parameter_es_ds 671 <1> add sp, 2 ; discard es returned from call 672 <1> d5 pop di 673 <1> %else 674 0000AFC3 1E <1> push ds 675 0000AFC4 06 <1> push es 676 0000AFC5 1F <1> pop ds ; ds:dx -> message 677 0000AFC6 CD21 <1> int 21h ; simply call into DOS 678 0000AFC8 1F <1> pop ds 679 <1> %endif 680 <1> @@: 681 0000AFC9 C3 <1> retn 682 <1> 683 <1> .ctrlc: 684 0000AFCA F606[CB00]10 <1> testopt [internalflags2], dif2_in_silence_dump 685 0000AFCF 7403 <1> jz @F 686 0000AFD1 E81B02 <1> call reset_silent_mode 687 <1> @@: 688 0000AFD4 E95E8C <1> jmp handle_ctrl_c ; abort currently running command --> 689 <1> ; If handled by DOS, Ctrl+C causes our process to be terminated. 690 <1> ; Because we are self-owned, we re-enter our code at debug22 then. 691 <1> ; debug22 only does some re-initialization of registers before 692 <1> ; entering cmd3. Therefore, instead of aborting we can directly jump 693 <1> ; to cmd3 here. This has the additional benefit of not requiring DOS 694 <1> ; at all, so that no workarounds for InDOS mode and boot loader 695 <1> ; operation are necessary. 696 <1> 697 <1> ; No command should fail spectacularly when being aborted this way, 698 <1> ; because in fact every command calling puts can already be aborted by 699 <1> ; DOS's Ctrl+C checking if DOS is used. This check is really only an 700 <1> ; _additional_ way the commands can be aborted. 701 <1> 702 <1> ; Note that a more complete way to support command abortion would be 703 <1> ; to hook Int1B, and to keep a flag of whether Ctrl+C or Ctrl+Break 704 <1> ; were requested, and to additionally check before or after every I/O 705 <1> ; operation whether Ctrl+C was pressed using non-destructive reads. 706 <1> ; In short, exactly what DOS does. 707 <1> 708 <1> .notdos: 709 0000AFD7 56 <1> push si 710 0000AFD8 F606[C600]01 <1> testopt [internalflags], usecharcounter 711 0000AFDD 7505 <1> jnz .dontresetcharcounter 712 0000AFDF C606[CA0A]01 <1> mov byte [ charcounter ], 1 713 <1> ; This assumes we always start at the beginning of a line. 714 <1> ; Therefore any call to puts must display at the beginning 715 <1> ; of a line or tab parsing will not work. Only calls to puts 716 <1> ; not containing tab characters may display partial lines. 717 <1> ; (Calls to puts with partial lines and tab characters have 718 <1> ; to set the flag usecharcounter in internalflags.) 719 <1> .dontresetcharcounter: 720 0000AFE4 E358 <1> jcxz .return 721 0000AFE6 89D6 <1> mov si, dx 722 <1> .loop: 723 0000AFE8 26AC <1> es lodsb 724 0000AFEA 3C09 <1> cmp al, 9 725 0000AFEC 750B <1> jne .nottab ; is no tab --> 726 0000AFEE A0[CA0A] <1> mov al, byte [ charcounter ] 727 0000AFF1 2407 <1> and al, 7 ; at 8 character boundary ? 728 0000AFF3 B020 <1> mov al, 32 ; (always replaced by blank) 729 0000AFF5 7402 <1> jz .nottab ; yes, don't use hack --> 730 0000AFF7 41 <1> inc cx 731 0000AFF8 4E <1> dec si ; find tab again next lodsb 732 <1> .nottab: 733 0000AFF9 3C0D <1> cmp al, 13 ; (exact match for CR) 734 0000AFFB 750A <1> jne .notcr 735 0000AFFD 8026[CE00]FD <1> clropt [internalflags3], dif3_int10_highlight 736 0000B002 C606[CA0A]00 <1> mov byte [ charcounter ], 0 ; increased to one before displaying 737 <1> .notcr: 738 <1> %if 0 ; currently we never receive BS here 739 <1> cmp al, 8 740 <1> jne .notbs 741 <1> mov ah, 0Fh 742 <1> int 10h ; get page 743 <1> mov bl, al ; save number of characters per column 744 <1> push cx 745 <1> mov ah, 03h 746 <1> int 10h ; get cursor position dx 747 <1> pop cx 748 <1> dec byte [ charcounter ] ; assume not at start of line 749 <1> mov al, 8 ; changed by Int10 750 <1> or dl, dl 751 <1> jnz .dontcount ; not first column, so display normal --> 752 <1> mov byte [ charcounter ], 1 ; assume at start of screen 753 <1> or dh, dh 754 <1> jz .next ; at start of screen, don't display --> 755 <1> dec dh ; previous line 756 <1> mov dl, bl 757 <1> mov byte [ charcounter ], dl ; really at end of line (one-based counter) 758 <1> dec dl ; last column 759 <1> mov ah, 02h 760 <1> int 10h ; set new cursor position 761 <1> jmp short .next 762 <1> .notbs: 763 <1> %endif 764 0000B007 3C0A <1> cmp al, 10 765 0000B009 7404 <1> je .dontcount ; must not count line feeds! 766 0000B00B FE06[CA0A] <1> inc byte [ charcounter ] 767 <1> .dontcount: 768 0000B00F F606[9500]40 <1> testopt [options], enable_serial 769 0000B014 7405 <1> jz @F 770 <1> 771 0000B016 E8B813 <1> call serial_send_char 772 <1> 773 0000B019 EB21 <1> jmp .next 774 <1> @@: 775 <1> 776 0000B01B 3C1B <1> cmp al, 27 777 0000B01D 7421 <1> je .try_highlight 778 <1> 779 <1> .nohighlight: 780 0000B01F F606[CE00]02 <1> testopt [internalflags3], dif3_int10_highlight 781 0000B024 740F <1> jz @F 782 0000B026 B409 <1> mov ah, 09h 783 0000B028 B700 <1> mov bh, 0 784 0000B02A 8A1E[AA96] <1> mov bl, byte [.attribute] 785 0000B02E 51 <1> push cx 786 0000B02F B90100 <1> mov cx, 1 787 0000B032 CD10 <1> int 10h 788 0000B034 59 <1> pop cx 789 <1> 790 <1> @@: 791 0000B035 BB0700 <1> mov bx, 0007 792 0000B038 B40E <1> mov ah, 0Eh 793 0000B03A CD10 <1> int 10h 794 <1> .next: 795 0000B03C E2AA <1> loop .loop 796 <1> .return: 797 0000B03E 5E <1> pop si 798 0000B03F C3 <1> retn 799 <1> 800 <1> .try_highlight: 801 0000B040 F606[9E00]02 <1> testopt [options3], opt3_r_highlight_dumb 802 0000B045 75D8 <1> jnz .nohighlight 803 0000B047 83F902 <1> cmp cx, 2 804 0000B04A 76D3 <1> jbe .nohighlight 805 0000B04C 26803C5B <1> cmp byte [es:si], '[' 806 0000B050 75CD <1> jne .nohighlight 807 0000B052 26807C016D <1> cmp byte [es:si + 1], 'm' 808 0000B057 742C <1> je .highlight_reset 809 0000B059 83F903 <1> cmp cx, 3 810 0000B05C 74C1 <1> je .nohighlight 811 0000B05E 26807C0137 <1> cmp byte [es:si + 1], '7' 812 0000B063 75BA <1> jne .nohighlight 813 0000B065 26807C026D <1> cmp byte [es:si + 2], 'm' 814 0000B06A 75B3 <1> jne .nohighlight 815 <1> .highlight_set: 816 0000B06C 50 <1> push ax 817 0000B06D 51 <1> push cx 818 0000B06E B403 <1> mov ah, 3 819 0000B070 B700 <1> mov bh, 0 820 0000B072 31D2 <1> xor dx, dx ; pre-initialise to zero 821 0000B074 CD10 <1> int 10h ; dl = column, dh = row 822 0000B076 84D2 <1> test dl, dl 823 0000B078 59 <1> pop cx 824 0000B079 58 <1> pop ax 825 0000B07A 74A3 <1> jz .nohighlight 826 <1> ; This test fails if we are at the very left of 827 <1> ; the screen or in dosemu -dumb mode. So don't 828 <1> ; use highlighting at the beginning of a line! 829 0000B07C 800E[CE00]02 <1> setopt [internalflags3], dif3_int10_highlight 830 0000B081 49 <1> dec cx 831 0000B082 46 <1> inc si 832 0000B083 EB10 <1> jmp @F 833 <1> 834 <1> .highlight_reset: 835 0000B085 50 <1> push ax 836 0000B086 51 <1> push cx 837 0000B087 B403 <1> mov ah, 3 838 0000B089 B700 <1> mov bh, 0 839 0000B08B 31D2 <1> xor dx, dx ; pre-initialise to zero 840 0000B08D CD10 <1> int 10h ; dl = column, dh = row 841 0000B08F 84D2 <1> test dl, dl 842 0000B091 59 <1> pop cx 843 0000B092 58 <1> pop ax 844 0000B093 748A <1> jz .nohighlight 845 <1> ; Refer to above comment. 846 <1> @@: 847 0000B095 800E[CE00]02 <1> setopt [internalflags3], dif3_int10_highlight 848 0000B09A FECA <1> dec dl 849 0000B09C B402 <1> mov ah, 02h 850 0000B09E B700 <1> mov bh, 0 851 0000B0A0 CD10 <1> int 10h ; set cursor position 852 0000B0A2 B408 <1> mov ah, 08h 853 0000B0A4 B700 <1> mov bh, 0 854 0000B0A6 CD10 <1> int 10h ; read attribute to ah 855 0000B0A8 50 <1> push ax 856 0000B0A9 FEC2 <1> inc dl 857 0000B0AB B402 <1> mov ah, 02h 858 0000B0AD B700 <1> mov bh, 0 859 0000B0AF CD10 <1> int 10h ; set cursor position 860 0000B0B1 58 <1> pop ax 861 0000B0B2 88E0 <1> mov al, ah 862 0000B0B4 257788 <1> and ax, 8877h 863 0000B0B7 D0C0 <1> rol al, 1 864 0000B0B9 D0C0 <1> rol al, 1 865 0000B0BB D0C0 <1> rol al, 1 866 0000B0BD D0C0 <1> rol al, 1 867 0000B0BF 08E0 <1> or al, ah 868 0000B0C1 A2[AA96] <1> mov byte [.attribute], al 869 <1> 870 0000B0C4 49 <1> dec cx 871 0000B0C5 49 <1> dec cx 872 0000B0C6 46 <1> inc si 873 0000B0C7 46 <1> inc si 874 0000B0C8 E971FF <1> jmp .next 875 <1> 876 <1> 877 <1> usesection lDEBUG_DATA_ENTRY 878 000096AA 00 <1> .attribute: db 0 879 <1> usesection lDEBUG_CODE 880 <1> 881 <1> 882 <1> ; INP: es:dx -> message to display 883 <1> ; cx = length of message 884 <1> ; STT: ds = ss = debugger data selector 885 <1> ; CHG: ax, bx, cx, dx 886 <1> puts_silence: 887 0000B0CB 56 <1> push si 888 0000B0CC 57 <1> push di 889 <1> 890 <1> .try_again: 891 0000B0CD 89D6 <1> mov si, dx ; es:si -> message 892 0000B0CF 8B3E[2E0A] <1> mov di, word [auxbuff_behind_last_silent] 893 <1> ; (auxbuff):di -> next buffer (if it fits) 894 0000B0D3 B80F20 <1> mov ax, _AUXBUFFSIZE - 1 895 0000B0D6 29F8 <1> sub ax, di ; number of bytes left free 896 <1> ; (+ 1 byte terminator) 897 0000B0D8 7204 <1> jc .delete 898 0000B0DA 39C8 <1> cmp ax, cx ; fits ? 899 0000B0DC 730B <1> jae .simple ; yes --> 900 <1> 901 <1> .delete: 902 0000B0DE 06 <1> push es 903 0000B0DF 8E06[2A0A] <1> mov es, word [auxbuff_segorsel] 904 0000B0E3 E81600 <1> call silence_delete_one_string 905 0000B0E6 07 <1> pop es 906 0000B0E7 EBE4 <1> jmp .try_again 907 <1> 908 <1> .simple: 909 0000B0E9 1E <1> push ds 910 0000B0EA 06 <1> push es 911 0000B0EB 06 <1> push es 912 0000B0EC 8E06[2A0A] <1> mov es, word [auxbuff_segorsel] 913 <1> ; es:di -> next buffer 914 0000B0F0 1F <1> pop ds ; ds:si -> message 915 0000B0F1 F3A4 <1> rep movsb ; copy over 916 0000B0F3 07 <1> pop es 917 0000B0F4 1F <1> pop ds 918 0000B0F5 893E[2E0A] <1> mov word [auxbuff_behind_last_silent], di 919 <1> ; update pointer 920 0000B0F9 5F <1> pop di 921 0000B0FA 5E <1> pop si 922 0000B0FB C3 <1> retn 923 <1> 924 <1> 925 <1> ; INP: es => auxbuff 926 <1> ; ds = ss 927 <1> ; [auxbuff_behind_last_silent] -> behind last silent 928 <1> ; [auxbuff_behind_while_condition] 929 <1> ; OUT: [auxbuff_behind_last_silent] updated 930 <1> ; auxbuff updated (deleted one of the dump strings, 931 <1> ; moved forwards in the buffer the remainder) 932 <1> ; if error, aborts command by jumping to cmd3 933 <1> ; CHG: ax, di, si 934 <1> silence_delete_one_string: 935 0000B0FC E81400 <1> call .internal ; call internal implementation 936 0000B0FF 733E <1> jnc .retn ; no error ? --> 937 <1> .error: ; else: error, abort command 938 0000B101 16 <1> push ss 939 0000B102 1F <1> pop ds 940 0000B103 16 <1> push ss 941 0000B104 07 <1> pop es 942 0000B105 8026[C700]DF <1> clropt [internalflags], tt_silence 943 0000B10A BA[AE6A] <1> mov dx, msg.silent_error 944 0000B10D E8F000 <1> call putsz 945 0000B110 E9ED4E <1> jmp cmd3 946 <1> 947 <1> 948 <1> ; INP: as for silence_delete_one_string 949 <1> ; OUT: as for silence_delete_one_string, but: 950 <1> ; CY if error (no more space) 951 <1> ; NC if success 952 <1> ; CHG: ax, di, si 953 <1> ; STT: ds = ss 954 <1> .internal: 955 0000B113 51 <1> push cx 956 0000B114 8B0E[2E0A] <1> mov cx, [auxbuff_behind_last_silent] 957 <1> ; -> next buffer position 958 0000B118 8B3E[2C0A] <1> mov di, word [auxbuff_behind_while_condition] 959 0000B11C 29F9 <1> sub cx, di 960 0000B11E B000 <1> mov al, 0 961 0000B120 3C01 <1> cmp al, 1 ; initialise to NZ (if cx is zero) 962 0000B122 F2AE <1> repne scasb 963 0000B124 F9 <1> stc 964 0000B125 7518 <1> jne .retn ; error, no NUL found in data (CY) 965 <1> ; es:di -> behind first NUL 966 <1> 967 0000B127 89FE <1> mov si, di ; es:si -> next message 968 0000B129 8B3E[2C0A] <1> mov di, word [auxbuff_behind_while_condition] 969 0000B12D 8B0E[2E0A] <1> mov cx, word [auxbuff_behind_last_silent] 970 0000B131 06 <1> push es 971 0000B132 1F <1> pop ds ; ds:si -> next message 972 0000B133 29F1 <1> sub cx, si ; remaining buffer 973 0000B135 F3A4 <1> rep movsb ; move to start of silent buffer 974 0000B137 16 <1> push ss 975 0000B138 1F <1> pop ds 976 0000B139 893E[2E0A] <1> mov word [auxbuff_behind_last_silent], di 977 0000B13D 59 <1> pop cx 978 0000B13E F8 <1> clc ; (NC) 979 <1> .retn: 980 0000B13F C3 <1> retn 981 <1> 982 <1> 983 <1> ; After having used puts_silence, this dumps all data 984 <1> ; remaining in the silent buffer in auxbuff. 985 <1> ; If word [tt_silent_mode_number] is set, only that many 986 <1> ; data strings (zero-terminated) are dumped, from the end 987 <1> ; of the buffer. 988 <1> ; 989 <1> ; CHG: ax, bx, cx, dx, si, di, es 990 <1> ; STT: ds = ss = debugger data selector 991 <1> ; sets es to ss 992 <1> silence_dump: 993 0000B140 F606[C700]10 <1> testopt [internalflags], tt_silent_mode ; is in use ? 994 0000B145 7501 <1> jnz @F ; yes --> 995 0000B147 C3 <1> retn ; no. simple 996 <1> 997 <1> @@: 998 0000B148 8026[C700]DF <1> clropt [internalflags], tt_silence 999 0000B14D 800E[CB00]10 <1> setopt [internalflags2], dif2_in_silence_dump 1000 <1> 1001 0000B152 F606[9D00]01 <1> testopt [options3], opt3_silence_paging_set 1002 0000B157 7413 <1> jz @F 1003 0000B159 F606[9D00]02 <1> testopt [options3], opt3_silence_paging_on 1004 0000B15E 7407 <1> jz .turn_paging_off 1005 <1> 1006 <1> .turn_paging_on: 1007 0000B160 800E[C400]08 <1> setopt [internalflags], pagedcommand 1008 0000B165 EB05 <1> jmp @F 1009 <1> 1010 <1> .turn_paging_off: 1011 0000B167 8026[C400]F7 <1> clropt [internalflags], pagedcommand 1012 <1> @@: 1013 <1> 1014 0000B16C 8B16[300A] <1> mov dx, word [tt_silent_mode_number] 1015 0000B170 85D2 <1> test dx, dx 1016 0000B172 7428 <1> jz .no_number_given 1017 <1> 1018 0000B174 8E06[2A0A] <1> mov es, word [auxbuff_segorsel] 1019 0000B178 8B3E[2C0A] <1> mov di, word [auxbuff_behind_while_condition] 1020 0000B17C 8B0E[2E0A] <1> mov cx, word [auxbuff_behind_last_silent] 1021 0000B180 29F9 <1> sub cx, di 1022 0000B182 7418 <1> jz .no_number_given 1023 <1> 1024 0000B184 31DB <1> xor bx, bx ; counter of zeros 1025 <1> @@: 1026 0000B186 B000 <1> mov al, 0 1027 0000B188 E307 <1> jcxz @F ; no more data --> 1028 0000B18A F2AE <1> repne scasb ; another zero ? 1029 0000B18C 7503 <1> jne @F ; no, done --> 1030 0000B18E 43 <1> inc bx ; count zeros 1031 0000B18F EBF5 <1> jmp @B ; search for next --> 1032 <1> 1033 <1> @@: 1034 0000B191 29D3 <1> sub bx, dx ; number of dumps - requested number 1035 <1> ; = excess number of dumps 1036 0000B193 7607 <1> jbe .no_number_given 1037 <1> 1038 0000B195 89D9 <1> mov cx, bx ; use excess number as loop counter 1039 <1> @@: 1040 0000B197 E862FF <1> call silence_delete_one_string 1041 <1> ; delete one string 1042 0000B19A E2FB <1> loop @B ; loop for however many to delete --> 1043 <1> 1044 <1> .no_number_given: 1045 0000B19C 8B3E[2C0A] <1> mov di, word [auxbuff_behind_while_condition] 1046 <1> ; es:di -> silent buffer 1047 <1> .loop_line: 1048 0000B1A0 8E06[2A0A] <1> mov es, word [auxbuff_segorsel] 1049 0000B1A4 8B0E[2E0A] <1> mov cx, word [auxbuff_behind_last_silent] 1050 0000B1A8 29F9 <1> sub cx, di ; any more data ? 1051 0000B1AA 7439 <1> jz .return ; no, return --> 1052 0000B1AC B000 <1> mov al, 0 1053 0000B1AE 49 <1> dec cx ; (in case of branching for next conditional) 1054 0000B1AF AE <1> scasb ; starts with a NUL byte ? 1055 0000B1B0 7402 <1> je @F ; yes, skipped --> 1056 0000B1B2 41 <1> inc cx ; (restore cx to original value) 1057 0000B1B3 4F <1> dec di ; no, decrement 1058 <1> @@: 1059 0000B1B4 89FE <1> mov si, di ; es:si -> start of string 1060 <1> 1061 0000B1B6 81F90001 <1> cmp cx, 256 ; cx > 256 ? 1062 0000B1BA 7603 <1> jbe @F ; no --> 1063 0000B1BC B90001 <1> mov cx, 256 ; limit to 256 bytes per string 1064 <1> ; (line_out is 264 bytes) 1065 <1> @@: 1066 0000B1BF E324 <1> jcxz .return ; (if single byte that was NUL remaining -->) 1067 0000B1C1 89CB <1> mov bx, cx ; search string length 1068 0000B1C3 B000 <1> mov al, 0 1069 0000B1C5 F2AE <1> repne scasb ; scan for NUL bytes 1070 0000B1C7 7501 <1> jne @F ; (if none found: cx = 0) 1071 <1> ; (if any found: cx = remaining length) 1072 0000B1C9 41 <1> inc cx ; cx = remaining length + 1 (do not output NUL) 1073 <1> @@: 1074 0000B1CA 29CB <1> sub bx, cx ; search length - remaining = found length 1075 0000B1CC 89D9 <1> mov cx, bx ; how much to show 1076 0000B1CE 06 <1> push es 1077 0000B1CF 1F <1> pop ds ; ds => auxbuff (ds:si -> start of string) 1078 0000B1D0 16 <1> push ss 1079 0000B1D1 07 <1> pop es ; es => line_out 1080 0000B1D2 BF[AE07] <1> mov di, line_out ; es:di -> line_out 1081 0000B1D5 51 <1> push cx 1082 0000B1D6 F3A4 <1> rep movsb ; copy over to line_out 1083 0000B1D8 59 <1> pop cx ; cx = message length 1084 <1> 1085 0000B1D9 16 <1> push ss 1086 0000B1DA 1F <1> pop ds ; reset seg regs to ss 1087 0000B1DB BA[AE07] <1> mov dx, line_out ; dx -> message, cx = length 1088 0000B1DE 56 <1> push si 1089 0000B1DF E8AEFC <1> call puts ; print out 1090 0000B1E2 5F <1> pop di ; -> next silent message 1091 0000B1E3 EBBB <1> jmp .loop_line 1092 <1> 1093 <1> .return: 1094 0000B1E5 16 <1> push ss 1095 0000B1E6 07 <1> pop es 1096 0000B1E7 FF36[2C0A] <1> push word [auxbuff_behind_while_condition] 1097 0000B1EB 8F06[2E0A] <1> pop word [auxbuff_behind_last_silent] 1098 <1> reset_silent_mode: 1099 0000B1EF 8026[C700]CF <1> clropt [internalflags], tt_silent_mode | tt_silence 1100 0000B1F4 8026[CB00]EF <1> clropt [internalflags2], dif2_in_silence_dump 1101 0000B1F9 C3 <1> retn 1102 <1> 1103 <1> 1104 <1> putsz_error: 1105 0000B1FA 36800E[CD00]20 <1> setopt [ss:internalflags3], dif3_unquiet_error 1106 <1> 1107 <1> ; Display ASCIZ message 1108 <1> ; 1109 <1> ; INP: ds:dx -> ASCIZ message to display 1110 <1> ; CHG: - 1111 <1> ; STT: ds, es don't care 1112 <1> putsz: 1113 0000B200 50 <1> push ax 1114 0000B201 53 <1> push bx 1115 0000B202 51 <1> push cx 1116 0000B203 52 <1> push dx 1117 0000B204 06 <1> push es 1118 0000B205 1E <1> push ds 1119 0000B206 1E <1> push ds 1120 0000B207 07 <1> pop es 1121 0000B208 57 <1> push di 1122 0000B209 89D7 <1> mov di, dx ; es:di-> string 1123 0000B20B 30C0 <1> xor al, al 1124 0000B20D B9FFFF <1> mov cx, -1 1125 0000B210 F2AE <1> repne scasb ; search zero 1126 0000B212 F7D1 <1> not cx 1127 0000B214 49 <1> dec cx ; cx = length of message 1128 0000B215 5F <1> pop di 1129 0000B216 16 <1> push ss 1130 0000B217 1F <1> pop ds ; ds = ss 1131 0000B218 E875FC <1> call puts 1132 0000B21B 1F <1> pop ds 1133 0000B21C 07 <1> pop es 1134 0000B21D 5A <1> pop dx 1135 0000B21E 59 <1> pop cx 1136 0000B21F 5B <1> pop bx 1137 0000B220 58 <1> pop ax 1138 0000B221 C3 <1> retn 1139 <1> 1140 <1> ; Display character 1141 <1> ; 1142 <1> ; INP: al = character to display 1143 <1> ; CHG: - 1144 <1> ; STT: ds, es don't care 1145 <1> putc: 1146 0000B222 53 <1> push bx 1147 0000B223 51 <1> push cx 1148 0000B224 52 <1> push dx 1149 0000B225 06 <1> push es 1150 0000B226 1E <1> push ds 1151 0000B227 16 <1> push ss 1152 0000B228 07 <1> pop es ; es:dx -> message 1153 0000B229 16 <1> push ss 1154 0000B22A 1F <1> pop ds ; ds = ss 1155 0000B22B 50 <1> push ax 1156 0000B22C B90100 <1> mov cx, 1 ; one character 1157 0000B22F 89E2 <1> mov dx, sp ; ds:dx-> ax on stack 1158 0000B231 E85CFC <1> call puts 1159 0000B234 58 <1> pop ax 1160 0000B235 1F <1> pop ds 1161 0000B236 07 <1> pop es 1162 0000B237 5A <1> pop dx 1163 0000B238 59 <1> pop cx 1164 0000B239 5B <1> pop bx 1165 0000B23A C3 <1> retn 1166 <1> 1167 <1> 1168 <1> ; OUT: ax = 0 if no input available 1169 <1> ; ax = 0FFFFh if DOS stdin input available 1170 <1> ; ah = scancode, al = ASCII if int 16h input available 1171 <1> ; ax = al = ASCII if serial input available 1172 <1> ; REM: This is always a nondestructive read. 1173 <1> peekc: 1174 0000B23B F606[9500]40 <1> testopt [options], enable_serial 1175 0000B240 750C <1> jnz .serial 1176 0000B242 E858E9 <1> call InDos 1177 0000B245 740E <1> jz .dos 1178 <1> .bios: 1179 0000B247 B401 <1> mov ah, 01h 1180 0000B249 CD16 <1> int 16h ; key available ? 1181 <1> @@: 1182 0000B24B 7412 <1> jz .return_ax_0 1183 0000B24D C3 <1> retn 1184 <1> 1185 <1> .serial: 1186 0000B24E E8EB0F <1> call serial_check_receive_char 1187 <1> ; do serial getc (check rx buffer) 1188 0000B251 B400 <1> mov ah, 0 1189 0000B253 EBF6 <1> jmp @B 1190 <1> 1191 <1> .dos: 1192 0000B255 B40B <1> mov ah, 0Bh 1193 <1> doscall 2334 0000B257 CD21 <2> int 21h 1194 0000B259 B4FF <1> mov ah, -1 1195 0000B25B 84C0 <1> test al, al 1196 0000B25D EBEC <1> jmp @B 1197 <1> 1198 <1> .return_ax_0: 1199 0000B25F B80000 <1> mov ax, 0 1200 <1> .return: 1201 0000B262 C3 <1> retn 1202 <1> 1203 <1> 1204 <1> ; Get character/key 1205 <1> ; 1206 <1> ; OUT: al = character (if zero, look for ah) 1207 <1> ; ah = scan code or zero 1208 <1> ; CHG: ax 1209 <1> ; STT: ds = ss = debugger segment/selector 1210 <1> ; 1211 <1> ; Idles system when in InDOS mode. When not in InDOS mode, Int21.08 1212 <1> ; is used which is assumed to idle the system itself. 1213 <1> getc: 1214 0000B263 F606[CC00]20 <1> testopt [internalflags3], dif3_input_serial_override 1215 0000B268 750C <1> jnz @F 1216 0000B26A F606[9500]40 <1> testopt [options], enable_serial 1217 0000B26F 7505 <1> jnz @F 1218 0000B271 E829E9 <1> call InDos 1219 0000B274 7440 <1> jz getc_dos 1220 <1> @@: 1221 <1> .rawnext: 1222 0000B276 FF16[FE0B] <1> call near word [getline_timer_func] 1223 <1> 1224 0000B27A F606[CC00]20 <1> testopt [internalflags3], dif3_input_serial_override 1225 0000B27F 7523 <1> jnz @F 1226 0000B281 F606[CF00]01 <1> testopt [internalflags3], dif3_input_re 1227 0000B286 751C <1> jnz @F 1228 <1> %if _INPUT_FILE_BOOT 1229 0000B288 F606[CB00]02 <1> testopt [internalflags2], dif2_input_file_boot 1230 0000B28D 7515 <1> jnz @F 1231 <1> %endif 1232 0000B28F F606[CD00]01 <1> testopt [internalflags3], dif3_input_cmdline 1233 0000B294 750E <1> jnz @F 1234 0000B296 F606[9500]40 <1> testopt [options], enable_serial 1235 0000B29B 7507 <1> jnz @F 1236 0000B29D F606[9500]04 <1> testopt [options], biosidles 1237 <1> ; idling disabled? 1238 0000B2A2 750D <1> jnz .rawkey ; yes, just request a key --> 1239 <1> 1240 <1> @@: 1241 0000B2A4 E89801 <1> call getc_if_any ; got a key ? 1242 0000B2A7 750C <1> jnz .return ; yes --> 1243 <1> .idle: ; common idling for BIOS keyboard and serial 1244 0000B2A9 E81389 <1> call handle_serial_flags_ctrl_c 1245 0000B2AC E86802 <1> call idle 1246 0000B2AF EBC5 <1> jmp .rawnext ; check again --> 1247 <1> 1248 <1> .rawkey: 1249 0000B2B1 31C0 <1> xor ax, ax 1250 0000B2B3 CD16 <1> int 16h ; get the key and scancode 1251 <1> .return: 1252 0000B2B5 C3 <1> retn 1253 <1> 1254 <1> 1255 <1> getc_dos: 1256 <1> %if _PM 1257 <1> call ispm 1258 <1> jnz @F ; if 86 Mode --> 1259 <1> testopt [options2], opt2_getc_idle_dpmi 1260 <1> jnz @FF 1261 <1> @@: 1262 <1> %endif 1263 0000B2B6 F606[9900]20 <1> testopt [options2], opt2_getc_idle 1264 0000B2BB 7410 <1> jz getc_dos_internal 1265 <1> @@: 1266 <1> .with_idle: 1267 0000B2BD E87F01 <1> call getc_if_any 1268 0000B2C0 7403E9B200 <1> jnz .return 1269 0000B2C5 E8F788 <1> call handle_serial_flags_ctrl_c 1270 0000B2C8 E84C02 <1> call idle 1271 0000B2CB EBF0 <1> jmp .with_idle 1272 <1> 1273 <1> .return equ getc_dos_internal_get_extended.return 1274 <1> 1275 <1> 1276 <1> getc_dos_internal: ; DOS character devices handle one-byte characters. Therefore 1277 <1> ; non-ASCII keys cannot be returned with scancode in the high 1278 <1> ; byte of the same call. A non-ASCII key will be split into 1279 <1> ; two characters by CON: one NUL byte followed by the scancode. 1280 0000B2CD F606[CF00]01 <1> testopt [internalflags3], dif3_input_re 1281 0000B2D2 741B <1> jz @F 1282 0000B2D4 56 <1> push si 1283 0000B2D5 8B36[140A] <1> mov si, word [re_buffer.position] 1284 0000B2D9 31C0 <1> xor ax, ax 1285 0000B2DB AC <1> lodsb 1286 0000B2DC 84C0 <1> test al, al 1287 0000B2DE 8936[140A] <1> mov word [re_buffer.position], si 1288 0000B2E2 5E <1> pop si 1289 0000B2E3 7403E98F00 <1> jnz .return 1290 0000B2E8 FF0E[140A] <1> dec word [re_buffer.position] 1291 0000B2EC E98800 <1> jmp .return 1292 <1> 1293 <1> .return equ getc_dos_internal_get_extended.return 1294 <1> 1295 <1> 1296 <1> @@: 1297 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 1298 <1> %if _INPUT_FILE_BOOT 1299 0000B2EF F606[CB00]02 <1> testopt [internalflags2], dif2_input_file_boot 1300 0000B2F4 750E <1> jnz .file 1301 <1> %endif 1302 <1> %if _INPUT_FILE_HANDLES 1303 0000B2F6 E8A4E8 <1> call InDos 1304 0000B2F9 7545 <1> jnz .file_not 1305 0000B2FB F606[CA00]10 <1> testopt [internalflags2], dif2_input_file 1306 0000B300 7502 <1> jnz .file 1307 <1> %endif 1308 0000B302 EB3C <1> jmp .file_not 1309 <1> 1310 <1> .file: 1311 0000B304 52 <1> push dx 1312 0000B305 51 <1> push cx 1313 0000B306 53 <1> push bx 1314 0000B307 57 <1> push di 1315 0000B308 31C0 <1> xor ax, ax ; initialise ah to zero 1316 0000B30A 50 <1> push ax 1317 0000B30B 89E2 <1> mov dx, sp ; ds:dx -> al byte on stack 1318 0000B30D B90100 <1> mov cx, 1 1319 <1> %if _INPUT_FILE_BOOT 1320 <1> %if _INPUT_FILE_HANDLES 1321 0000B310 F606[CB00]02 <1> testopt [internalflags2], dif2_input_file_boot 1322 0000B315 7408 <1> jz @F 1323 <1> %endif 1324 0000B317 E8CD0D <1> call yy_boot_remember_seek 1325 0000B31A E865C1 <1> call yy_boot_read 1326 <1> %if _INPUT_FILE_HANDLES 1327 0000B31D EB0A <1> jmp @FF 1328 <1> @@: 1329 <1> %endif 1330 <1> %endif 1331 <1> %if _INPUT_FILE_HANDLES 1332 0000B31F B43F <1> mov ah, 3Fh 1333 0000B321 E80C01 <1> call yy_get_handle 1334 0000B324 E88A0D <1> call yy_remember_seek 1335 <1> doscall ; (depends on ds = ss) 2334 0000B327 CD21 <2> int 21h 1336 <1> %endif 1337 <1> @@: 1338 0000B329 7204 <1> jc @F 1339 0000B32B 85C0 <1> test ax, ax 1340 0000B32D 750B <1> jnz .file_got 1341 <1> 1342 <1> @@: 1343 0000B32F E84F00 <1> call yy_close_file 1344 0000B332 58 <1> pop ax 1345 0000B333 5F <1> pop di 1346 0000B334 5B <1> pop bx 1347 0000B335 59 <1> pop cx 1348 0000B336 5A <1> pop dx 1349 0000B337 E929FF <1> jmp getc 1350 <1> 1351 <1> 1352 <1> .file_got: 1353 0000B33A 58 <1> pop ax ; ah = 0, al = character read 1354 0000B33B 5F <1> pop di 1355 0000B33C 5B <1> pop bx 1356 0000B33D 59 <1> pop cx 1357 0000B33E 5A <1> pop dx 1358 0000B33F C3 <1> retn 1359 <1> 1360 <1> .file_not: 1361 <1> %endif 1362 0000B340 F606[CD00]01 <1> testopt [internalflags3], dif3_input_cmdline 1363 0000B345 7419 <1> jz @F 1364 0000B347 56 <1> push si 1365 0000B348 8B36[1002] <1> mov si, word [cmdline_buffer.position] 1366 0000B34C 31C0 <1> xor ax, ax 1367 0000B34E AC <1> lodsb 1368 0000B34F 84C0 <1> test al, al 1369 0000B351 8936[1002] <1> mov word [cmdline_buffer.position], si 1370 0000B355 5E <1> pop si 1371 0000B356 751F <1> jnz .return 1372 0000B358 8026[CD00]FE <1> clropt [internalflags3], dif3_input_cmdline 1373 0000B35D E903FF <1> jmp getc 1374 <1> 1375 <1> @@: 1376 0000B360 B408 <1> mov ah, 8 1377 <1> doscall ; wait for a key 2334 0000B362 CD21 <2> int 21h 1378 <1> 1379 <1> getc_dos_internal_get_extended: 1380 <1> ; FreeDOS kernel 2036 returns with ax=4C00h upon Control C. 1381 <1> ; This is due to setting ax internally to terminate the 1382 <1> ; process, paired with the termination service just 1383 <1> ; returning for self-owned processes. This was eventually 1384 <1> ; fixed in https://sourceforge.net/p/freedos/svn/1469/ 1385 <1> ; This is a work around to restart our command line then. 1386 <1> ; Usually ah stays 08h when this call returns. 1387 <1> ; (06h if calling from getc_if_any to here.) 1388 0000B364 80FC4C <1> cmp ah, 4Ch 1389 0000B367 740F <1> je .freedos_ctrlc_workaround 1390 0000B369 B400 <1> mov ah, 0 ; assume it is ASCII 1391 0000B36B 84C0 <1> test al, al 1392 0000B36D 7508 <1> jne .return ; ASCII, return with ah zero --> 1393 0000B36F B408 <1> mov ah, 8 1394 <1> doscall ; scancode of non-ASCII key to al 2334 0000B371 CD21 <2> int 21h 1395 0000B373 86C4 <1> xchg al, ah ; to ah 1396 0000B375 B000 <1> mov al, 0 ; return zero for non-ASCII key 1397 <1> .return: 1398 0000B377 C3 <1> retn 1399 <1> 1400 <1> .freedos_ctrlc_workaround: 1401 0000B378 BA[3B5D] <1> mov dx, msg.freedos_ctrlc_workaround 1402 0000B37B E882FE <1> call putsz 1403 0000B37E E949FC <1> jmp puts.ctrlc ; use common handler 1404 <1> 1405 <1> 1406 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT || 1 1407 <1> ; INP: [input_file_handles], dif2_input_file 1408 <1> ; OUT: most recent file closed, flag cleared if no longer file 1409 <1> ; CHG: di, bx, ax 1410 <1> yy_close_file: 1411 0000B381 F606[CF00]01 <1> testopt [internalflags3], dif3_input_re 1412 0000B386 740B <1> jz @F 1413 0000B388 8026[CF00]FE <1> clropt [internalflags3], dif3_input_re 1414 0000B38D 800E[CF00]02 <1> setopt [internalflags3], dif3_input_re_closed 1415 0000B392 C3 <1> retn 1416 <1> 1417 <1> @@: 1418 <1> %if _INPUT_FILE_BOOT 1419 0000B393 F606[CB00]02 <1> testopt [internalflags2], dif2_input_file_boot 1420 0000B398 7406 <1> jz @F 1421 0000B39A E82F0D <1> call yy_boot_clear_remember_seek 1422 0000B39D E999C0 <1> jmp yy_boot_close_file 1423 <1> 1424 <1> @@: 1425 <1> %endif 1426 <1> %if _INPUT_FILE_HANDLES 1427 0000B3A0 F606[CA00]10 <1> testopt [internalflags2], dif2_input_file 1428 0000B3A5 7455 <1> jz .notfile 1429 0000B3A7 8B3E[B80A] <1> mov di, word [input_file_handles.active] 1430 0000B3AB 57 <1> push di 1431 0000B3AC D1E7 <1> shl di, 1 1432 0000B3AE D1E7 <1> shl di, 1 1433 0000B3B0 D1E7 <1> shl di, 1 1434 <1> %if INPUTFILEHANDLE_size != 8 1435 <1> %error Unexpected structure size 1436 <1> %endif 1437 0000B3B2 8B9D[380A] <1> mov bx, word [input_file_handles + di + ifhHandle] 1438 0000B3B6 E8DC0C <1> call yy_clear_remember_seek 1439 <1> 1440 0000B3B9 F685[3B0A]01 <1> testopt [input_file_handles + di + ifhFlags], ifhfIsDup 1441 0000B3BE 7416 <1> jz @F 1442 <1> 1443 0000B3C0 51 <1> push cx 1444 0000B3C1 52 <1> push dx 1445 <1> 1446 0000B3C2 8B9D[300A] <1> mov bx, word [input_file_handles + di - INPUTFILEHANDLE_size + ifhHandle] 1447 0000B3C6 8B95[3C0A] <1> mov dx, word [input_file_handles + di + ifhParentSeek] 1448 0000B3CA 8B8D[3E0A] <1> mov cx, word [input_file_handles + di + ifhParentSeek + 2] 1449 0000B3CE B80042 <1> mov ax, 4200h ; seek from start 1450 0000B3D1 E84C0C <1> call handle_seek_or_remember 1451 <1> 1452 0000B3D4 5A <1> pop dx 1453 0000B3D5 59 <1> pop cx 1454 <1> 1455 <1> @@: 1456 <1> 1457 0000B3D6 E8C4E7 <1> call InDos 1458 0000B3D9 7406 <1> jz .closefile 1459 <1> 1460 0000B3DB FF06[BA0A] <1> inc word [input_file_handles.to_close] 1461 0000B3DF EB06 <1> jmp @F 1462 <1> 1463 <1> .closefile: 1464 0000B3E1 B80100 <1> mov ax, 1 1465 0000B3E4 E82C00 <1> call yy_close_file_handles 1466 <1> 1467 <1> @@: 1468 0000B3E7 5F <1> pop di 1469 0000B3E8 4F <1> dec di 1470 0000B3E9 790C <1> jns .next 1471 0000B3EB 8026[CA00]EF <1> clropt [internalflags2], dif2_input_file 1472 0000B3F0 800E[CA00]20 <1> setopt [internalflags2], dif2_closed_input_file 1473 0000B3F5 EB04 <1> jmp .done 1474 <1> .next: 1475 0000B3F7 893E[B80A] <1> mov word [input_file_handles.active], di 1476 <1> .done: 1477 0000B3FB C3 <1> retn 1478 <1> 1479 <1> .notfile: 1480 0000B3FC F606[CD00]01 <1> testopt [internalflags3], dif3_input_cmdline 1481 0000B401 740B <1> jz @F 1482 0000B403 8026[CD00]FE <1> clropt [internalflags3], dif3_input_cmdline 1483 0000B408 800E[CD00]02 <1> setopt [internalflags3], dif3_input_cmdline_closed 1484 0000B40D C3 <1> retn 1485 <1> 1486 <1> @@: 1487 0000B40E 31F6 <1> xor si, si 1488 0000B410 E9A9E4 <1> jmp error 1489 <1> 1490 <1> 1491 <1> ; INP: word [input_file_handles.to_close] = how many 1492 <1> ; ax = additionally how many (0 or 1) 1493 <1> ; input_file_handles + di -> first to close 1494 <1> ; OUT: word [input_file_handles.to_close] = 0 1495 <1> ; closed handle fields = -1 1496 <1> ; CHG: ax, bx, di 1497 <1> ; STT: DOS must be accessible 1498 <1> yy_close_file_handles: 1499 0000B413 51 <1> push cx 1500 0000B414 31C9 <1> xor cx, cx 1501 0000B416 870E[BA0A] <1> xchg cx, word [input_file_handles.to_close] 1502 0000B41A 01C1 <1> add cx, ax 1503 0000B41C 7410 <1> jz @FF 1504 <1> @@: 1505 0000B41E BBFFFF <1> mov bx, -1 1506 0000B421 879D[380A] <1> xchg bx, word [input_file_handles + di + ifhHandle] 1507 0000B425 B43E <1> mov ah, 3Eh 1508 <1> doscall 2334 0000B427 CD21 <2> int 21h 1509 0000B429 83C708 <1> add di, INPUTFILEHANDLE_size 1510 0000B42C E2F0 <1> loop @B 1511 <1> @@: 1512 0000B42E 59 <1> pop cx 1513 0000B42F C3 <1> retn 1514 <1> 1515 <1> 1516 <1> ; INP: - 1517 <1> ; OUT: di = active handle offset 1518 <1> ; bx = active handle 1519 <1> ; CHG: - 1520 <1> yy_get_handle: 1521 0000B430 8B3E[B80A] <1> mov di, word [input_file_handles.active] 1522 0000B434 D1E7 <1> shl di, 1 1523 0000B436 D1E7 <1> shl di, 1 1524 0000B438 D1E7 <1> shl di, 1 1525 <1> %if INPUTFILEHANDLE_size != 8 1526 <1> %error Unexpected structure size 1527 <1> %endif 1528 0000B43A 8B9D[380A] <1> mov bx, word [input_file_handles + di + ifhHandle] 1529 <1> %endif 1530 0000B43E C3 <1> retn 1531 <1> %endif 1532 <1> 1533 <1> 1534 <1> ; INP: - 1535 <1> ; OUT: NZ if received any, 1536 <1> ; al = character 1537 <1> ; ah = scan code or zero 1538 <1> ; ZR if none received 1539 <1> ; CHG: ax 1540 <1> ; STT: ds = ss = debugger segment/selector 1541 <1> getc_if_any: 1542 0000B43F F606[CC00]20 <1> testopt [internalflags3], dif3_input_serial_override 1543 0000B444 755B <1> jnz .serial 1544 0000B446 F606[CC00]10 <1> testopt [internalflags3], dif3_input_terminal_override 1545 0000B44B 754D <1> jnz .terminal 1546 <1> 1547 0000B44D F606[CF00]01 <1> testopt [internalflags3], dif3_input_re 1548 0000B452 741D <1> jz @F 1549 0000B454 56 <1> push si 1550 0000B455 8B36[140A] <1> mov si, word [re_buffer.position] 1551 0000B459 31C0 <1> xor ax, ax 1552 0000B45B AC <1> lodsb 1553 0000B45C 84C0 <1> test al, al 1554 0000B45E 8936[140A] <1> mov word [re_buffer.position], si 1555 0000B462 5E <1> pop si 1556 0000B463 7403E9AE00 <1> jnz .return 1557 0000B468 FF0E[140A] <1> dec word [re_buffer.position] 1558 0000B46C 38C0 <1> cmp al, al ; ZR 1559 0000B46E E9A500 <1> jmp .return 1560 <1> 1561 <1> @@: 1562 <1> %if _INPUT_FILE_BOOT 1563 0000B471 F606[CB00]02 <1> testopt [internalflags2], dif2_input_file_boot 1564 0000B476 7552 <1> jnz .file 1565 <1> %endif 1566 <1> 1567 0000B478 F606[CD00]01 <1> testopt [internalflags3], dif3_input_cmdline 1568 0000B47D 741B <1> jz @F 1569 0000B47F 56 <1> push si 1570 0000B480 8B36[1002] <1> mov si, word [cmdline_buffer.position] 1571 0000B484 31C0 <1> xor ax, ax 1572 0000B486 AC <1> lodsb 1573 0000B487 84C0 <1> test al, al 1574 0000B489 8936[1002] <1> mov word [cmdline_buffer.position], si 1575 0000B48D 5E <1> pop si 1576 0000B48E 7403E98300 <1> jnz .return 1577 0000B493 8026[CD00]FE <1> clropt [internalflags3], dif3_input_cmdline 1578 0000B498 EBA5 <1> jmp getc_if_any 1579 <1> 1580 <1> @@: 1581 <1> .terminal: 1582 0000B49A F606[9500]40 <1> testopt [options], enable_serial 1583 0000B49F 7408 <1> jz @F ; do BIOS keyboard or DOS getc --> 1584 <1> 1585 <1> .serial: 1586 0000B4A1 E8770D <1> call serial_receive_char ; do serial getc (check rx buffer) 1587 0000B4A4 7470 <1> jz .return ; no data, go and idle --> 1588 0000B4A6 B400 <1> mov ah, 0 1589 0000B4A8 C3 <1> retn 1590 <1> 1591 <1> @@: 1592 0000B4A9 E8F1E6 <1> call InDos 1593 0000B4AC 755A <1> jnz .bios 1594 <1> 1595 0000B4AE F606[CC00]10 <1> testopt [internalflags3], dif3_input_terminal_override 1596 0000B4B3 7546 <1> jnz .dos_terminal 1597 <1> 1598 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 1599 <1> %if _INPUT_FILE_BOOT 1600 0000B4B5 F606[CB00]02 <1> testopt [internalflags2], dif2_input_file_boot 1601 0000B4BA 750E <1> jnz .file 1602 <1> %endif 1603 <1> %if _INPUT_FILE_HANDLES 1604 0000B4BC E8DEE6 <1> call InDos 1605 0000B4BF 753A <1> jnz .file_not 1606 0000B4C1 F606[CA00]10 <1> testopt [internalflags2], dif2_input_file 1607 0000B4C6 7502 <1> jnz .file 1608 <1> %endif 1609 0000B4C8 EB31 <1> jmp .file_not 1610 <1> 1611 <1> .file: 1612 0000B4CA 57 <1> push di 1613 0000B4CB 53 <1> push bx 1614 0000B4CC 51 <1> push cx 1615 0000B4CD 52 <1> push dx 1616 0000B4CE 31C0 <1> xor ax, ax 1617 0000B4D0 50 <1> push ax 1618 <1> 1619 0000B4D1 89E2 <1> mov dx, sp ; ds:dx -> al byte on stack 1620 0000B4D3 B90100 <1> mov cx, 1 ; buffer length = 1 1621 <1> %if _INPUT_FILE_BOOT 1622 <1> %if _INPUT_FILE_HANDLES 1623 0000B4D6 F606[CB00]02 <1> testopt [internalflags2], dif2_input_file_boot 1624 0000B4DB 7408 <1> jz @F 1625 <1> %endif 1626 0000B4DD E8070C <1> call yy_boot_remember_seek 1627 0000B4E0 E89FBF <1> call yy_boot_read 1628 0000B4E3 EB0A <1> jmp @FF 1629 <1> @@: 1630 <1> %endif 1631 <1> %if _INPUT_FILE_HANDLES 1632 0000B4E5 B43F <1> mov ah, 3Fh 1633 0000B4E7 E846FF <1> call yy_get_handle 1634 0000B4EA E8C40B <1> call yy_remember_seek 1635 <1> doscall ; DOS read file (depends on ds = ss) 2334 0000B4ED CD21 <2> int 21h 1636 <1> %endif 1637 <1> @@: 1638 0000B4EF 7302 <1> jnc @F 1639 0000B4F1 31C0 <1> xor ax, ax 1640 <1> @@: 1641 0000B4F3 85C0 <1> test ax, ax 1642 0000B4F5 58 <1> pop ax 1643 0000B4F6 5A <1> pop dx 1644 0000B4F7 59 <1> pop cx 1645 0000B4F8 5B <1> pop bx 1646 0000B4F9 5F <1> pop di 1647 0000B4FA C3 <1> retn ; ZR if no character read 1648 <1> 1649 <1> .file_not: 1650 <1> %endif 1651 <1> .dos_terminal: 1652 <1> %if 0 1653 <1> push dx 1654 <1> mov ah, 06h 1655 <1> mov dl, -1 1656 <1> doscall 1657 <1> jz .return_dx ; none available 1658 <1> ; bugfix: the 06h call is a *destructive* read. 1659 <1> ; so do not call getc again, just handle the 1660 <1> ; possible second byte returned. 1661 <1> call getc_dos_internal_get_extended 1662 <1> pop dx 1663 <1> jmp .return_NZ 1664 <1> .return_dx: 1665 <1> pop dx 1666 <1> retn 1667 <1> %else 1668 0000B4FB B40B <1> mov ah, 0Bh 1669 <1> doscall 2334 0000B4FD CD21 <2> int 21h 1670 0000B4FF 84C0 <1> test al, al 1671 0000B501 7413 <1> jz .return 1672 0000B503 E8C7FD <1> call getc_dos_internal 1673 0000B506 EB0A <1> jmp .return_NZ 1674 <1> %endif 1675 <1> 1676 <1> .bios: 1677 0000B508 B401 <1> mov ah, 01h 1678 0000B50A CD16 <1> int 16h ; key available ? 1679 0000B50C 7408 <1> jz .return 1680 0000B50E 31C0 <1> xor ax, ax 1681 0000B510 CD16 <1> int 16h 1682 <1> .return_NZ: 1683 0000B512 50 <1> push ax 1684 0000B513 0C01 <1> or al, 1 ; (NZ) 1685 0000B515 58 <1> pop ax 1686 <1> .return: 1687 0000B516 C3 <1> retn 1688 <1> 1689 <1> 1690 <1> ; INP: - 1691 <1> ; OUT: - 1692 <1> ; CHG: ax 1693 <1> ; STT: ds = ss = debugger segment/selector 1694 <1> ; 1695 <1> ; Idle system, using 2F.1680 (in given mode), or 2F.1680 1696 <1> ; (calling down to 86 Mode), or sti \ hlt. 1697 <1> idle: 1698 <1> %if _BOOTLDR 1699 0000B517 F606[C500]40 <1> testopt [internalflags], nodosloaded 1700 0000B51C 7526 <1> jnz .hlt ; can't call 2F --> 1701 <1> %endif 1702 0000B51E F606[9F00]02 <1> testopt [options3], opt3_no_idle_2F 1703 0000B523 751F <1> jnz .hlt 1704 <1> %if _GUARD_86M_INT2F 1705 <1> %if _PM 1706 <1> call ispm 1707 <1> jz @FF ; --> (NZ) 1708 <1> %endif 1709 0000B525 06 <1> push es 1710 0000B526 31C0 <1> xor ax, ax 1711 0000B528 8EC0 <1> mov es, ax ; (only used in 86 Mode) 1712 0000B52A 26A1BC00 <1> mov ax, [es:2Fh * 4] 1713 0000B52E 83F8FF <1> cmp ax, -1 1714 0000B531 7405 <1> je @F ; --> (ZR) 1715 0000B533 260B06BE00 <1> or ax, [es:2Fh * 4 + 2] 1716 <1> @@: 1717 0000B538 07 <1> pop es 1718 0000B539 7409 <1> jz @FF 1719 <1> @@: 1720 <1> %endif 1721 0000B53B B88016 <1> mov ax, 1680h 1722 0000B53E CD2F <1> int 2Fh ; release timeslice in multitasker 1723 0000B540 84C0 <1> test al, al 1724 0000B542 740A <1> jz .return ; done idling --> 1725 <1> @@: 1726 <1> %if _PM 1727 <1> call ispm 1728 <1> jnz .hlt 1729 <1> 1730 <1> push bx 1731 <1> push cx 1732 <1> push es 1733 <1> _386_PM_o32 ; push edi 1734 <1> push di 1735 <1> _386 xor edi, edi ; clear EDIH 1736 <1> xor cx, cx ; (copy no words from stack) 1737 <1> 1738 <1> [cpu 286] 1739 <1> push cx ; ss 1740 <1> push cx ; sp (0:0 = host should allocate a stack) 1741 <1> sub sp, byte 12 ; cs:ip (ignored), segments (uninitialized) 1742 <1> pushf 1743 <1> push cx ; EAXH (uninitialized) 1744 <1> push 1680h ; AX 1745 <1> sub sp, byte 12 ; ecx, edx, ebx (uninitialized) 1746 <1> push cx 1747 <1> push cx ; reserved (zero) 1748 <1> sub sp, byte 12 ; ebp, esi, edi (uninitialized) 1749 <1> push ss 1750 <1> pop es 1751 <1> mov di, sp ; es:(e)di -> 86 Mode call structure 1752 <1> mov ax, 0300h 1753 <1> mov bx, 2Fh ; bl = interrupt, bh = reserved (zero) 1754 <1> int 31h ; call real mode 2F.1680 1755 <1> __CPU__ 1756 <1> 1757 <1> add sp, byte 28 ; discard RM call structure 1758 <1> pop ax ; get AX 1759 <1> add sp, byte 20 ; discard RM call structure 1760 <1> 1761 <1> _386_PM_o32 ; pop edi 1762 <1> pop di 1763 <1> pop es 1764 <1> pop cx 1765 <1> pop bx 1766 <1> 1767 <1> test al, al 1768 <1> jz .return ; done idling --> 1769 <1> %endif 1770 <1> .hlt: 1771 0000B544 F606[9500]02 <1> testopt [options], nohlt 1772 0000B549 7503 <1> jnz .return 1773 <1> %if _PM 1774 <1> %if (protectedmode|dpminohlt)&~0FF00h 1775 <1> %error Option bits re-ordered, adjust code here 1776 <1> %endif 1777 <1> mov al, byte [internalflags+1] 1778 <1> and al, (protectedmode|dpminohlt)>>8 1779 <1> xor al, (protectedmode|dpminohlt)>>8 1780 <1> jz .return ; DPMI host throws GPF when we execute hlt --> 1781 <1> %endif 1782 0000B54B FB <1> sti 1783 0000B54C F4 <1> hlt ; else idle by hlt 1784 0000B54D 90 <1> nop 1785 <1> .return: 1786 0000B54E C3 <1> retn 1787 <1> 1788 <1> 1789 <1> ; GETLINE - Print a prompt (address in DX, length in CX) and read a line 1790 <1> ; of input. 1791 <1> ; GETLINE0 - Same as above, but use the output line (so far), plus two 1792 <1> ; spaces and a colon, as a prompt. 1793 <1> ; GETLINE00 - Same as above, but use the output line (so far) as a prompt. 1794 <1> ; Entry CX Length of prompt (getline only) 1795 <1> ; DX Address of prompt string (getline only) 1796 <1> ; 1797 <1> ; DI Address + 1 of last character in prompt (getline0 and 1798 <1> ; getline00 only) 1799 <1> ; 1800 <1> ; Exit AL First nonwhite character in input line 1801 <1> ; SI Address of the next character after that 1802 <1> ; Uses AH,BX,CX,DX,DI 1803 <1> 1804 <1> getline0: 1805 0000B54F B82020 <1> mov ax, 32<<8|32 ; add two spaces and a colon 1806 0000B552 AB <1> stosw 1807 0000B553 B03A <1> mov al, ':' 1808 0000B555 AA <1> stosb 1809 <1> getline00: 1810 0000B556 BA[AE07] <1> mov dx, line_out 1811 0000B559 89F9 <1> mov cx, di 1812 0000B55B 29D1 <1> sub cx, dx 1813 <1> 1814 <1> getline: ; note: this entry is no longer used 1815 0000B55D 8026[CD00]77 <1> clropt [internalflags3], dif3_quiet_input_single | dif3_return_eof 1816 <1> .use_dif3_flags: 1817 <1> %if _DEBUG && ! _DEBUG_COND 1818 <1> d0bp 1819 <1> %endif 1820 0000B562 890E[300B] <1> mov word [promptlen], cx ; save length of prompt 1821 0000B566 C606[CB0A]00 <1> mov byte [linecounter], 0 ; reset counter 1822 0000B56B 8326[080C]00 <1> and word [terminator_in_line_in.offset], 0 1823 <1> ; reset this when reading new line 1824 0000B570 8026[C600]EF <1> clropt [internalflags], promptwaiting 1825 <1> 1826 0000B575 E8F301 <1> call getline_is_input_file? 1827 0000B578 7303E9FE00 <1> jc getline_nofile 1828 <1> 1829 <1> getline_file: 1830 0000B57D F606[CF00]01 <1> testopt [internalflags3], dif3_input_re 1831 0000B582 7549 <1> jnz .notquiet 1832 <1> 1833 <1> %if _INPUT_FILE_BOOT 1834 0000B584 F606[CB00]02 <1> testopt [internalflags2], dif2_input_file_boot 1835 0000B589 7412 <1> jz @F 1836 0000B58B B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 1837 0000B58E 52 <1> push dx 1838 0000B58F F726[308F] <1> mul word [load_input_file.active] 1839 0000B593 5A <1> pop dx 1840 0000B594 89C7 <1> mov di, ax 1841 0000B596 F685[D78C]40 <1> testopt [load_input_file + di - LOADDATA3 + ldFATType], ifhfQuietInput 1842 0000B59B EB29 <1> jmp .quiet_if_nz 1843 <1> 1844 <1> @@: 1845 <1> %endif 1846 <1> %if _INPUT_FILE_HANDLES 1847 0000B59D E8FDE5 <1> call InDos 1848 0000B5A0 7518 <1> jnz @F 1849 0000B5A2 F606[CA00]10 <1> testopt [internalflags2], dif2_input_file 1850 0000B5A7 7411 <1> jz @F 1851 0000B5A9 8B3E[B80A] <1> mov di, word [input_file_handles.active] 1852 0000B5AD D1E7 <1> shl di, 1 1853 0000B5AF D1E7 <1> shl di, 1 1854 0000B5B1 D1E7 <1> shl di, 1 ; to qword array index 1855 <1> %if INPUTFILEHANDLE_size != 8 1856 <1> %error Unexpected structure size 1857 <1> %endif 1858 0000B5B3 F685[3B0A]40 <1> testopt [input_file_handles + di + ifhFlags], ifhfQuietInput 1859 0000B5B8 EB0C <1> jmp .quiet_if_nz 1860 <1> 1861 <1> @@: 1862 <1> %endif 1863 0000B5BA F606[CD00]01 <1> testopt [internalflags3], dif3_input_cmdline 1864 0000B5BF 740C <1> jz @F 1865 0000B5C1 F606[9700]40 <1> testopt [options], opt_cmdline_quiet_input 1866 <1> ; jmp .quiet_if_nz 1867 <1> 1868 <1> .quiet_if_nz: 1869 0000B5C6 7405 <1> jz @F 1870 <1> .quiet: 1871 0000B5C8 800E[CD00]08 <1> setopt [internalflags3], dif3_quiet_input_single 1872 <1> .notquiet: 1873 <1> @@: 1874 <1> 1875 0000B5CD 800E[CA00]40 <1> setopt [internalflags2], dif2_did_getline_file 1876 <1> 1877 <1> 1878 <1> ; This part reads the input line from a file (in the case of 1879 <1> ; `debug < file'). It is necessary to do this by hand because DOS 1880 <1> ; function 0Ah does not handle EOF correctly otherwise. This is 1881 <1> ; especially important for DEBUG because it traps Control-C. 1882 0000B5D2 C706[D20B][4A04] <1> mov word [lastcmd], dmycmd ; disable auto-repeat while reading from a file 1883 <1> 1884 <1> %if _NEWFULLHANDLING 1885 0000B5D8 BF[0300] <1> mov di, line_in+3 ; read max 1886 <1> %else 1887 <1> mov di, line_in+2 1888 <1> %endif 1889 0000B5DB 8B36[320B] <1> mov si, word [bufnext] 1890 0000B5DF 3B36[340B] <1> cmp si, word [bufend] 1891 0000B5E3 7216 <1> jb .char_buffered ; if there's a character already 1892 0000B5E5 E8B606 <1> call fillbuf 1893 0000B5E8 7311 <1> jnc .fillbuf_had_data 1894 0000B5EA F606[CD00]80 <1> testopt [internalflags3], dif3_return_eof 1895 0000B5EF 7402 <1> jz @F 1896 0000B5F1 F9 <1> stc 1897 0000B5F2 C3 <1> retn 1898 <1> @@: 1899 0000B5F3 E8AE01 <1> call getline_close_file 1900 0000B5F6 7403E962FF <1> jnz getline 1901 <1> 1902 <1> .fillbuf_had_data: 1903 <1> .char_buffered: 1904 <1> %if _NEWFULLHANDLING 1905 0000B5FB 4F <1> dec di 1906 <1> %endif 1907 <1> 1908 <1> ; Discard an LF if the last character read was CR. 1909 0000B5FC 803E[2C0B]0D <1> cmp byte [notatty], 13 ; last parsed character was CR ? 1910 0000B601 750A <1> jne .no_lf_skip ; no, nothing more to do --> 1911 0000B603 803C0A <1> cmp byte [si], 10 ; first read character is LF ? 1912 0000B606 7505 <1> jne .no_lf_skip ; no --> 1913 0000B608 46 <1> inc si ; skip the LF 1914 0000B609 FE06[2C0B] <1> inc byte [notatty] ; avoid repeating this 1915 <1> .no_lf_skip: 1916 <1> 1917 0000B60D 3B36[340B] <1> cmp si, word [bufend] 1918 0000B611 740B <1> je @F 1919 0000B613 803C40 <1> cmp byte [si], '@' ; no display ? 1920 0000B616 7506 <1> jne @F 1921 <1> 1922 0000B618 46 <1> inc si ; increment past @ 1923 0000B619 800E[CD00]08 <1> setopt [internalflags3], dif3_quiet_input_single 1924 <1> @@: 1925 0000B61E F606[CD00]08 <1> testopt [internalflags3], dif3_quiet_input_single 1926 0000B623 7503 <1> jnz gl1 1927 <1> 1928 0000B625 E868F8 <1> call puts ; display prompt (having checked it wasn't EOF) 1929 <1> 1930 <1> ; si-> next character in buffer 1931 <1> ; w[bufend]-> behind last valid character of buffer 1932 <1> gl1: 1933 0000B628 8B0E[340B] <1> mov cx, word [bufend] 1934 0000B62C 29F1 <1> sub cx, si ; cx = number of valid characters in buffer 1935 0000B62E 740C <1> jz gl3 ; if none --> 1936 <1> gl2: 1937 0000B630 AC <1> lodsb 1938 0000B631 3C0D <1> cmp al, 13 ; (exact match for CR) 1939 0000B633 7410 <1> je gl4 1940 0000B635 3C0A <1> cmp al, 10 1941 0000B637 740C <1> je gl4 ; if EOL --> 1942 0000B639 AA <1> stosb 1943 0000B63A E2F4 <1> loop gl2 ; if more valid characters --> 1944 <1> 1945 <1> ; The buffer is empty. Fill it again. 1946 <1> gl3: 1947 <1> %if _NEWFULLHANDLING 1948 0000B63C 47 <1> inc di 1949 <1> %endif 1950 0000B63D E85E06 <1> call fillbuf 1951 <1> %if _NEWFULLHANDLING 1952 0000B640 4F <1> dec di 1953 <1> %endif 1954 0000B641 73E5 <1> jnc gl1 ; if we have more characters --> 1955 0000B643 B00A <1> mov al, 10 ; make jump after gl4 always branch 1956 <1> %ifn _NEWFULLHANDLING ; should now always have at least one byte free 1957 <1> cmp di, line_in+LINE_IN_LEN 1958 <1> jb @F 1959 <1> dec si 1960 <1> dec di 1961 <1> @@: 1962 <1> %endif 1963 <1> 1964 <1> gl4: 1965 0000B645 3C0D <1> cmp al, 13 ; terminator was CR ? 1966 0000B647 7508 <1> jne @F ; no --> 1967 0000B649 E306 <1> jcxz @F ; if no other byte buffered --> 1968 0000B64B 803C0A <1> cmp byte [si], 10 ; next byte is an LF ? 1969 0000B64E 7501 <1> jne @F ; no --> 1970 0000B650 AC <1> lodsb ; increment si past the LF and set al = 10 1971 <1> ; dec cx ; (not used in subsequent code) 1972 <1> @@: 1973 0000B651 8936[320B] <1> mov word [bufnext], si 1974 0000B655 A2[2C0B] <1> mov byte [notatty], al ; store 10 or 13 (depending on the kind of EOL) 1975 <1> 1976 0000B658 800E[CD00]04 <1> setopt [internalflags3], dif3_at_line_end 1977 0000B65D E8C205 <1> call getline_reset_notatty 1978 <1> 1979 0000B660 89F9 <1> mov cx, di ; (counter is for input without CR) 1980 0000B662 B00D <1> mov al, 13 1981 0000B664 AA <1> stosb ; terminate line for our usage 1982 0000B665 BA[0200] <1> mov dx, line_in + 2 1983 0000B668 29D1 <1> sub cx, dx ; = length of input (no CR) 1984 0000B66A F606[CD00]08 <1> testopt [internalflags3], dif3_quiet_input_single 1985 0000B66F 7503 <1> jnz @F 1986 0000B671 E81CF8 <1> call puts ; print out the received line 1987 <1> @@: 1988 0000B674 880E[0100] <1> mov byte [line_in+1], cl 1989 0000B678 E9D900 <1> jmp getline_eol ; done 1990 <1> 1991 <1> getline_nofile: 1992 0000B67B E81C09 <1> call yy_reset_buf 1993 0000B67E 51 <1> push cx 1994 0000B67F 52 <1> push dx 1995 0000B680 E80DF8 <1> call puts ; display prompt 1996 0000B683 5A <1> pop dx 1997 0000B684 59 <1> pop cx 1998 0000B685 F606[9500]40 <1> testopt [options], enable_serial 1999 0000B68A 750A <1> jnz .rawinput_NZ 2000 0000B68C E80EE5 <1> call InDos 2001 0000B68F 7505 <1> jnz .rawinput_NZ 2002 <1> %if _PM 2003 <1> call ispm 2004 <1> jnz @F ; if 86 Mode --> 2005 <1> testopt [options2], opt2_rawinput_dpmi 2006 <1> jnz .rawinput_NZ 2007 <1> @@: 2008 <1> %endif 2009 0000B691 F606[9500]08 <1> testopt [options], opt_userawinput 2010 <1> .rawinput_NZ: 2011 0000B696 7403E99601 <1> jnz rawinput 2012 <1> 2013 <1> %if _PM 2014 <1> call ispm 2015 <1> jnz @F ; if 86 Mode --> 2016 <1> testopt [internalflags], canswitchmode 2017 <1> jz @F ; can't switch to 86M --> 2018 <1> setopt [internalflags], modeswitched 2019 <1> ; set flag for resetmode 2020 <1> mov al, 0 2021 <1> call sr_state ; save state 2022 <1> call switchmode ; switch to 86M 2023 <1> call handle_mode_changed ; ! called with flag set 2024 <1> 2025 <1> mov si, getline_extra_int23 2026 <1> mov al, 23h 2027 <1> call install_86m_interrupt_handler 2028 <1> ; override DPMI host's int 23h vector 2029 <1> mov dx, getline_extra_int22 2030 <1> mov ax, 2522h 2031 <1> int 21h 2032 <1> mov word [TPIV], dx ; override our PRI 2033 <1> 2034 <1> mov dx, line_in 2035 <1> mov ah, 0Ah 2036 <1> int 21h ; call DOS 2037 <1> 2038 <1> call getline_extra_uninstall 2039 <1> ; undo patches 2040 <1> jmp getline_eol_enter_history 2041 <1> ; go to common trail 2042 <1> 2043 <1> @@: 2044 <1> %endif 2045 0000B69B BA[0000] <1> mov dx, line_in 2046 0000B69E B40A <1> mov ah, 0Ah ; buffered keyboard input 2047 <1> doscall 2334 0000B6A0 CD21 <2> int 21h 2048 <1> 2049 <1> getline_eol_enter_history: 2050 <1> %if _HISTORY 2051 <1> .loop: 2052 0000B6A2 BE[0200] <1> mov si, line_in + 2 2053 0000B6A5 31C9 <1> xor cx, cx 2054 0000B6A7 0A4CFF <1> or cl, byte [si - 1] 2055 0000B6AA 7503E9A300 <1> jz .dontenter 2056 <1> gethistorysegment es 225 0000B6AF 368E06[3C0B] <2> mov %1, word [ss:history.segorsel] 2057 <1> gethistoryoffset bx 228 0000B6B4 BB0000 <2> mov %1, 0 2058 0000B6B7 A1[400B] <1> mov ax, word [history.last] 2059 0000B6BA 3B06[3E0B] <1> cmp ax, word [history.first] 2060 0000B6BE 7419 <1> je @F 2061 0000B6C0 89C7 <1> mov di, ax 2062 0000B6C2 268B15 <1> mov dx, [es:di] 2063 0000B6C5 268B7D02 <1> mov di, [es:di + 2] 2064 0000B6C9 29FA <1> sub dx, di 2065 0000B6CB 39D1 <1> cmp cx, dx 2066 0000B6CD 750A <1> jne @F 2067 0000B6CF 8D39 <1> lea di, [di + bx] 2068 0000B6D1 51 <1> push cx 2069 0000B6D2 56 <1> push si 2070 0000B6D3 F3A6 <1> repe cmpsb 2071 0000B6D5 5E <1> pop si 2072 0000B6D6 59 <1> pop cx 2073 0000B6D7 7479 <1> je .dontenter 2074 <1> @@: 2075 0000B6D9 89C7 <1> mov di, ax 2076 0000B6DB 268B15 <1> mov dx, [es:di] 2077 0000B6DE 01DA <1> add dx, bx ; -> free space 2078 0000B6E0 F7DA <1> neg dx ; - free space start 2079 0000B6E2 7502 <1> jnz @F 2080 0000B6E4 4A <1> dec dx 2081 0000B6E5 47 <1> inc di 2082 <1> @@: 2083 0000B6E6 01FA <1> add dx, di ; free space end - free space start 2084 0000B6E8 730C <1> jnc .delete 2085 0000B6EA 740A <1> je .delete 2086 0000B6EC 4A <1> dec dx 2087 0000B6ED 7407 <1> jz .delete 2088 0000B6EF 4A <1> dec dx 2089 0000B6F0 7404 <1> jz .delete 2090 0000B6F2 39D1 <1> cmp cx, dx 2091 0000B6F4 7646 <1> jbe .insert 2092 <1> .delete: 2093 0000B6F6 3B06[3E0B] <1> cmp ax, word [history.first] 2094 0000B6FA 7508 <1> jne @F 2095 <1> 2096 <1> .error: 2097 0000B6FC BA[FF68] <1> mov dx, msg.history_internal_error 2098 0000B6FF E8FEFA <1> call putsz 2099 0000B702 EB4E <1> jmp .dontenter 2100 <1> 2101 <1> @@: 2102 0000B704 89C7 <1> mov di, ax 2103 0000B706 268B3D <1> mov di, [es:di] ; + bx -> after last 2104 0000B709 8B36[3E0B] <1> mov si, word [history.first] 2105 0000B70D 268B74FE <1> mov si, [es:si - 2] ; + bx -> at second 2106 0000B711 29F7 <1> sub di, si ; = after last - after first 2107 <1> ; = length excluding first 2108 0000B713 89F9 <1> mov cx, di ; length to move 2109 0000B715 56 <1> push si 2110 0000B716 01DE <1> add si, bx ; -> after first 2111 0000B718 89DF <1> mov di, bx ; -> start of buffer 2112 0000B71A 06 <1> push es 2113 0000B71B 1F <1> pop ds 2114 0000B71C F3A4 <1> rep movsb ; move stuff 2115 0000B71E 59 <1> pop cx ; = how far we moved 2116 0000B71F 89C7 <1> mov di, ax 2117 0000B721 8B15 <1> mov dx, word [di] 2118 <1> @@: 2119 0000B723 47 <1> inc di 2120 0000B724 47 <1> inc di 2121 0000B725 363B3E[3E0B] <1> cmp di, word [ss:history.first] 2122 0000B72A 7406 <1> je @F 2123 0000B72C 29CA <1> sub dx, cx 2124 0000B72E 8715 <1> xchg word [di], dx 2125 0000B730 EBF1 <1> jmp @B 2126 <1> 2127 <1> @@: 2128 0000B732 16 <1> push ss 2129 0000B733 1F <1> pop ds 2130 0000B734 8306[400B]02 <1> add word [history.last], 2 2131 0000B739 E966FF <1> jmp .loop 2132 <1> 2133 <1> .insert: 2134 0000B73C 48 <1> dec ax 2135 0000B73D 48 <1> dec ax 2136 0000B73E A3[400B] <1> mov word [history.last], ax 2137 0000B741 89C7 <1> mov di, ax 2138 0000B743 57 <1> push di 2139 0000B744 268B7D02 <1> mov di, word [es:di + 2] 2140 0000B748 01DF <1> add di, bx 2141 0000B74A F3A4 <1> rep movsb 2142 0000B74C 5E <1> pop si 2143 0000B74D 29DF <1> sub di, bx 2144 0000B74F 26893C <1> mov word [es:si], di 2145 <1> 2146 <1> .dontenter: 2147 0000B752 16 <1> push ss 2148 0000B753 07 <1> pop es 2149 <1> %endif 2150 <1> 2151 <1> getline_eol: 2152 0000B754 F606[CD00]08 <1> testopt [internalflags3], dif3_quiet_input_single 2153 0000B759 750A <1> jnz @F 2154 0000B75B B00D <1> mov al, 13 2155 0000B75D E8C2FA <1> call putc ; fix ZDOS Int21.0A display bug 2156 0000B760 B00A <1> mov al, 10 2157 0000B762 E8BDFA <1> call putc 2158 <1> @@: 2159 <1> set_si_line_in_and_skipwhite: 2160 0000B765 BE[0200] <1> mov si, line_in+2 2161 0000B768 E937F6 <1> jmp skipwhite ; NC 2162 <1> 2163 <1> 2164 <1> %if _PM 2165 <1> getline_extra_uninstall: 2166 <1> mov dx, debug22 2167 <1> mov ax, 2522h 2168 <1> int 21h 2169 <1> mov word [TPIV], dx ; restore default int 22h (PRI) 2170 <1> mov si, getline_extra_int23 2171 <1> mov al, 23h 2172 <1> mov dx, -1 2173 <1> call UnhookInterruptForce 2174 <1> ; restore DPMI host's int 23h handler 2175 <1> jmp resetmode ; return to PM 2176 <1> 2177 <1> usesection lDEBUG_DATA_ENTRY 2178 <1> 2179 <1> iispentry getline_extra_int23 2180 <1> stc 2181 <1> retf ; indicate to abort syscall and process 2182 <1> 2183 <1> align 2 2184 <1> getline_extra_int22: 2185 <1> cli 2186 <1> .cleartraceflag: 2187 <1> cld ; reestablish things 2188 <1> mov ax, cs 2189 <1> mov ds, ax 2190 <1> mov ss, ax 2191 <1> mov sp, word [ savesp ] ; restore stack 2192 <1> times 1 - (($ - $$) & 1) nop ; align in-code parameter 2193 <1> call entry_to_code_seg 2194 <1> dw .code 2195 <1> 2196 <1> usesection lDEBUG_CODE 2197 <1> 2198 <1> .code: 2199 <1> 2200 <1> _386_o32 ; mov esp 2201 <1> mov sp, word [ savesp ] ; restore stack 2202 <1> _386 and sp, ~3 ; align stack 2203 <1> _386_o32 2204 <1> xor ax, ax 2205 <1> _386_o32 2206 <1> push ax 2207 <1> _386_o32 2208 <1> popf 2209 <1> _386 mov sp, word [ savesp ] ; restore stack 2210 <1> cld 2211 <1> sti 2212 <1> 2213 <1> call getline_extra_uninstall 2214 <1> ; undo patches and return to PM 2215 <1> jmp handle_ctrl_c ; go to common handler --> 2216 <1> %endif 2217 <1> 2218 <1> 2219 <1> getline_is_input_file?: 2220 0000B76B F606[CC00]20 <1> testopt [internalflags3], dif3_input_serial_override 2221 0000B770 7530 <1> jnz .nofile 2222 0000B772 F606[CF00]01 <1> testopt [internalflags3], dif3_input_re 2223 0000B777 7528 <1> jnz .file 2224 0000B779 F606[CD00]01 <1> testopt [internalflags3], dif3_input_cmdline 2225 0000B77E 7521 <1> jnz .file 2226 <1> %if _INPUT_FILE_BOOT 2227 0000B780 F606[CB00]02 <1> testopt [internalflags2], dif2_input_file_boot 2228 0000B785 751A <1> jnz .file 2229 <1> %endif 2230 0000B787 E813E4 <1> call InDos 2231 0000B78A 7516 <1> jnz .nofile ; InDOS, not reading from a file --> 2232 <1> %if _INPUT_FILE_HANDLES 2233 0000B78C F606[CA00]10 <1> testopt [internalflags2], dif2_input_file 2234 0000B791 750E <1> jnz .file 2235 <1> %endif 2236 0000B793 F606[9500]40 <1> testopt [options], enable_serial 2237 0000B798 7508 <1> jnz .nofile 2238 0000B79A 803E[2C0B]00 <1> cmp byte [notatty], 0 ; check this weird flag 2239 0000B79F 7401 <1> je .nofile ; not reading from a file --> 2240 <1> 2241 <1> .file: 2242 0000B7A1 A8 <1> db __TEST_IMM8 ; (skip stc, NC) 2243 <1> .nofile: 2244 0000B7A2 F9 <1> stc 2245 0000B7A3 C3 <1> retn 2246 <1> 2247 <1> 2248 <1> getline_close_file: 2249 0000B7A4 51 <1> push cx 2250 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT || 1 2251 <1> ; EOF reached. if not input file, quit. else, close input file. 2252 0000B7A5 F606[CF00]01 <1> testopt [internalflags3], dif3_input_re 2253 0000B7AA 7515 <1> jnz .re 2254 <1> %if _INPUT_FILE_HANDLES && _INPUT_FILE_BOOT 2255 0000B7AC F706[CA00]1002 <1> testopt [internalflags2], dif2_input_file | dif2_input_file_boot, 1 2256 0000B7B2 750A <1> jnz @F 2257 <1> %elif _INPUT_FILE_HANDLES 2258 <1> testopt [internalflags2], dif2_input_file 2259 <1> jnz @F 2260 <1> %elif _INPUT_FILE_BOOT 2261 <1> testopt [internalflags2], dif2_input_file_boot 2262 <1> jnz @F 2263 <1> %endif 2264 0000B7B4 F606[CD00]01 <1> testopt [internalflags3], dif3_input_cmdline 2265 0000B7B9 744C <1> jz .qq ; if EOF, quit --> 2266 <1> 2267 0000B7BB B1FE <1> mov cl, -2 2268 0000B7BD A9 <1> db __TEST_IMM16 2269 <1> @@: 2270 0000B7BE 31C9 <1> xor cx, cx 2271 0000B7C0 A9 <1> db __TEST_IMM16 2272 <1> .re: 2273 0000B7C1 B1FF <1> mov cl, -1 2274 <1> 2275 0000B7C3 51 <1> push cx 2276 0000B7C4 E85300 <1> call .resetstuff 2277 0000B7C7 59 <1> pop cx 2278 <1> 2279 0000B7C8 E302 <1> jcxz .notre 2280 0000B7CA EB15 <1> jmp @F 2281 <1> 2282 <1> .notre: 2283 0000B7CC 59 <1> pop cx 2284 0000B7CD F606[CD00]04 <1> testopt [internalflags3], dif3_at_line_end 2285 0000B7D2 750C <1> jnz .return ; (NZ) 2286 <1> 2287 0000B7D4 B80D0A <1> mov ax, 13 | 10 << 8 ; pretend we read a CR LF sequence 2288 0000B7D7 AB <1> stosw 2289 0000B7D8 893E[340B] <1> mov word [bufend], di 2290 0000B7DC 4F <1> dec di 2291 0000B7DD 4F <1> dec di 2292 0000B7DE 38C0 <1> cmp al, al ; ZR 2293 <1> .return: 2294 0000B7E0 C3 <1> retn 2295 <1> 2296 <1> @@: 2297 0000B7E1 80F9FE <1> cmp cl, -2 2298 0000B7E4 59 <1> pop cx 2299 0000B7E5 7410 <1> je .finish_cmdline 2300 <1> 2301 <1> .finish_re: 2302 0000B7E7 F606[CD00]04 <1> testopt [internalflags3], dif3_at_line_end 2303 0000B7EC 7506 <1> jnz @F 2304 0000B7EE BA[9C67] <1> mov dx, msg.unexpected_noneol_re 2305 0000B7F1 E806FA <1> call putsz_error 2306 <1> @@: 2307 0000B7F4 E9CB6C <1> jmp dumpregs_extended.exit 2308 <1> 2309 <1> .finish_cmdline: 2310 0000B7F7 F606[CD00]04 <1> testopt [internalflags3], dif3_at_line_end 2311 0000B7FC 7506 <1> jnz @F 2312 0000B7FE BA[CA67] <1> mov dx, msg.unexpected_noneol_rc 2313 0000B801 E8F6F9 <1> call putsz_error 2314 <1> @@: 2315 0000B804 E9F947 <1> jmp cmd3 2316 <1> %endif 2317 <1> 2318 <1> .qq: 2319 0000B807 C606[0200]0D <1> mov byte [line_in + 2], 13 2320 0000B80C E856FF <1> call set_si_line_in_and_skipwhite 2321 0000B80F 830E[280A]08 <1> or word [cmd3_set_options], fakeindos 2322 0000B814 E854D4 <1> call qq ; if EOF, quit --> 2323 0000B817 E9E647 <1> jmp cmd3 2324 <1> 2325 <1> .resetstuff: 2326 0000B81A 57 <1> push di 2327 0000B81B E863FB <1> call yy_close_file ; close file 2328 0000B81E 5F <1> pop di 2329 <1> 2330 <1> %if _NEWFULLHANDLING 2331 0000B81F C706[320B][0300] <1> mov word [bufnext], line_in + 3 2332 0000B825 C706[340B][0300] <1> mov word [bufend], line_in + 3 2333 <1> %else 2334 <1> mov word [bufnext], line_in + 2 2335 <1> mov word [bufend], line_in + 2 2336 <1> %endif 2337 <1> 2338 0000B82B E8F403 <1> call getline_reset_notatty 2339 <1> 2340 0000B82E E9294D <1> jmp determine_quiet_output 2341 <1> 2342 <1> 2343 <1> rawinput: 2344 <1> lframe 2345 <1> lequ 254, limit 2346 <1> lvar word, columns 2347 <1> lvar word, maxpercol 2348 <1> lvar word, maxpercolhalf 2349 0000B831 5589E58D66FA <1> lenter 2350 0000B837 06 <1> push es 2351 0000B838 52 <1> push dx 2352 <1> lvar dword, prompt ; (in line_out buffer) 2353 0000B839 31C0 <1> xor ax, ax 2354 <1> %if _HISTORY 2355 0000B83B 50 <1> push ax 2356 <1> lvar word, historyentry 2357 <1> %endif 2358 0000B83C 50 <1> push ax 2359 <1> lvar word, length_displayed 2360 0000B83D 50 <1> push ax 2361 <1> lvar word, length_input 2362 0000B83E 50 <1> push ax 2363 <1> lvar word, offset 2364 0000B83F 50 <1> push ax 2365 <1> lvar word, lastskip 2366 0000B840 50 <1> push ax 2367 <1> lvar word, low_redraw_and_high_beep 2368 <1> lequ ?low_redraw_and_high_beep, redraw 2369 <1> lequ ?low_redraw_and_high_beep + 1, beep 2370 0000B841 50 <1> push ax 2371 <1> lvar word, edited 2372 0000B842 51 <1> push cx 2373 <1> lvar word, column 2374 0000B843 51 <1> push cx 2375 <1> lvar word, promptlength 2376 <1> 2377 0000B844 57 <1> push di 2378 0000B845 1E <1> push ds 2379 0000B846 07 <1> pop es 2380 <1> 2381 0000B847 BF[0200] <1> mov di, line_in+2 2382 <1> .next: 2383 0000B84A E87283 <1> call handle_serial_flags_ctrl_c 2384 <1> 2385 0000B84D 807EEA00 <1> cmp byte [bp + ?redraw], 0 2386 0000B851 7503E9AF00 <1> je .no_do_redraw 2387 <1> .do_redraw: 2388 <1> 2389 0000B856 E89903 <1> call get_columns 2390 <1> 2391 0000B859 8946FE <1> mov word [bp + ?columns], ax 2392 0000B85C 48 <1> dec ax ; $COLS - 1 2393 0000B85D 2B46E4 <1> sub ax, word [bp + ?promptlength]; - $promptlength 2394 0000B860 8946FC <1> mov word [bp + ?maxpercol], ax 2395 0000B863 D1E8 <1> shr ax, 1 ; int($maxpercol / 2) 2396 0000B865 8946FA <1> mov word [bp + ?maxpercolhalf], ax 2397 <1> 2398 0000B868 B00D <1> mov al, 13 2399 0000B86A E8B5F9 <1> call putc 2400 <1> 2401 0000B86D C456F6 <1> les dx, [bp + ?prompt] 2402 0000B870 8B4EE4 <1> mov cx, [bp + ?promptlength] 2403 0000B873 E81AF6 <1> call puts 2404 0000B876 8B46F0 <1> mov ax, [bp + ?length_input] 2405 0000B879 89C1 <1> mov cx, ax 2406 0000B87B 31FF <1> xor di, di ; skip 2407 <1> ; + line_in + 2 -> to display 2408 0000B87D 3B46FC <1> cmp ax, word [bp + ?maxpercol] 2409 0000B880 8B46E6 <1> mov ax, word [bp + ?column] ; col 2410 0000B883 7626 <1> jna .not_show_a_maxpercol 2411 <1> .show_a_maxpercol: 2412 0000B885 8B5EEC <1> mov bx, word [bp + ?lastskip] 2413 0000B888 395EEE <1> cmp word [bp + ?offset], bx 2414 0000B88B 7206 <1> jnae .not_offset_ae_lastskip 2415 <1> .offset_ae_lastskip: 2416 0000B88D 29D8 <1> sub ax, bx ; col -= lastskip 2417 0000B88F 01DF <1> add di, bx ; skip += lastskip 2418 0000B891 29D9 <1> sub cx, bx ; lessen length of part to display 2419 <1> .not_offset_ae_lastskip: 2420 <1> 2421 <1> @@: 2422 0000B893 3B46FC <1> cmp ax, word [bp + ?maxpercol] 2423 0000B896 760B <1> jna .not_col_a_maxpercol 2424 <1> .col_a_maxpercol: 2425 0000B898 2B46FA <1> sub ax, word [bp + ?maxpercolhalf] 2426 <1> ; lessen col 2427 0000B89B 037EFA <1> add di, word [bp + ?maxpercolhalf] 2428 <1> ; heighten offset of part to display 2429 0000B89E 2B4EFA <1> sub cx, word [bp + ?maxpercolhalf] 2430 <1> ; lessen length of part to display 2431 0000B8A1 EBF0 <1> jmp @B 2432 <1> 2433 <1> .not_col_a_maxpercol: 2434 0000B8A3 3B4EFC <1> cmp cx, word [bp + ?maxpercol] 2435 0000B8A6 7603 <1> jbe @F 2436 0000B8A8 8B4EFC <1> mov cx, word [bp + ?maxpercol] 2437 <1> @@: 2438 <1> .not_show_a_maxpercol: 2439 0000B8AB 897EEC <1> mov word [bp + ?lastskip], di 2440 0000B8AE 8D95[0200] <1> lea dx, [di + line_in + 2] 2441 0000B8B2 16 <1> push ss 2442 0000B8B3 07 <1> pop es 2443 <1> 2444 0000B8B4 FF76F2 <1> push word [bp + ?length_displayed] 2445 0000B8B7 894EF2 <1> mov word [bp + ?length_displayed], cx 2446 0000B8BA 50 <1> push ax 2447 0000B8BB 51 <1> push cx 2448 0000B8BC 52 <1> push dx 2449 0000B8BD E8D0F5 <1> call puts ; redraw 2450 0000B8C0 5A <1> pop dx 2451 0000B8C1 59 <1> pop cx 2452 0000B8C2 58 <1> pop ax 2453 0000B8C3 5B <1> pop bx 2454 <1> 2455 0000B8C4 87D9 <1> xchg bx, cx ; cx = prior length displayed, 2456 <1> ; bx = new length displayed 2457 0000B8C6 29D9 <1> sub cx, bx ; = how many blanks needed to overwrite 2458 0000B8C8 760B <1> jbe @FF 2459 0000B8CA 01CB <1> add bx, cx ; = length displayed 2460 0000B8CC 50 <1> push ax 2461 0000B8CD B020 <1> mov al, 32 2462 <1> @@: 2463 0000B8CF E850F9 <1> call putc 2464 0000B8D2 E2FB <1> loop @B 2465 0000B8D4 58 <1> pop ax 2466 <1> @@: 2467 <1> 2468 0000B8D5 52 <1> push dx 2469 0000B8D6 01DA <1> add dx, bx 2470 0000B8D8 81EA[0200] <1> sub dx, line_in + 2 ; offset into line (with length displayed) 2471 0000B8DC 0356E4 <1> add dx, word [bp + ?promptlength]; offset into display 2472 0000B8DF 3B56E6 <1> cmp dx, word [bp + ?column] ; same as column ? 2473 0000B8E2 5A <1> pop dx 2474 0000B8E3 741C <1> je .do_redraw_done ; yes, skip cursor movement stuff --> 2475 <1> 2476 0000B8E5 50 <1> push ax 2477 0000B8E6 52 <1> push dx 2478 0000B8E7 B00D <1> mov al, 13 2479 0000B8E9 E836F9 <1> call putc ; reset cursor 2480 0000B8EC C456F6 <1> les dx, [bp + ?prompt] 2481 0000B8EF 8B4EE4 <1> mov cx, [bp + ?promptlength] 2482 0000B8F2 E89BF5 <1> call puts ; redraw prompt 2483 0000B8F5 16 <1> push ss 2484 0000B8F6 07 <1> pop es 2485 0000B8F7 5A <1> pop dx ; -> current input text 2486 0000B8F8 58 <1> pop ax ; = col 2487 0000B8F9 2B46E4 <1> sub ax, word [bp + ?promptlength] 2488 <1> ; = offset into input text 2489 0000B8FC 89C1 <1> mov cx, ax ; draw that much 2490 0000B8FE E88FF5 <1> call puts ; draw (to move cursor) 2491 <1> 2492 <1> .do_redraw_done: 2493 0000B901 C646EA00 <1> mov byte [bp + ?redraw], 0 2494 <1> 2495 <1> .no_do_redraw: 2496 <1> 2497 0000B905 807EEB00 <1> cmp byte [bp + ?beep], 0 2498 0000B909 7409 <1> je .no_do_beep 2499 <1> .do_beep: 2500 0000B90B B007 <1> mov al, 7 2501 0000B90D E812F9 <1> call putc 2502 <1> 2503 0000B910 C646EB00 <1> mov byte [bp + ?beep], 0 2504 <1> .no_do_beep: 2505 <1> 2506 0000B914 E84CF9 <1> call getc 2507 <1> 2508 <1> ; check scancode for int 16h in non-dumb dosemu first 2509 0000B917 86C4 <1> xchg al, ah 2510 0000B919 3C48 <1> cmp al, 48h 2511 0000B91B 7503E9F901 <1> je .up 2512 0000B920 3C4B <1> cmp al, 4Bh 2513 0000B922 7503E9CA01 <1> je .left 2514 0000B927 3C50 <1> cmp al, 50h 2515 0000B929 7503E90702 <1> je .down 2516 0000B92E 3C4D <1> cmp al, 4Dh 2517 0000B930 7503E9CF01 <1> je .right 2518 0000B935 3C52 <1> cmp al, 52h 2519 0000B937 7503E95502 <1> je .insert 2520 0000B93C 3C53 <1> cmp al, 53h 2521 0000B93E 7503E96101 <1> je .del 2522 0000B943 3C47 <1> cmp al, 47h 2523 0000B945 7503E98301 <1> je .home 2524 0000B94A 3C4F <1> cmp al, 4Fh 2525 0000B94C 7503E98D01 <1> je .end 2526 0000B951 3C49 <1> cmp al, 49h 2527 0000B953 7503E93902 <1> je .pageup 2528 0000B958 3C51 <1> cmp al, 51h 2529 0000B95A 7503E93202 <1> je .pagedown 2530 <1> 2531 <1> ; not a special scancode, check character returned 2532 0000B95F 86C4 <1> xchg al, ah 2533 0000B961 3C1B <1> cmp al, 1Bh 2534 0000B963 7403E98B00 <1> jne .not_esc 2535 <1> 2536 <1> ; check escape scancodes for int 16h in -dumb dosemu 2537 <1> ; or input from serial I/O (picocom/screen/ssh/mate-terminal) 2538 <1> .esc: 2539 0000B968 E8F8F8 <1> call getc 2540 0000B96B 3C5B <1> cmp al, '[' 2541 0000B96D 7403E91F02 <1> jne .beep 2542 0000B972 E8EEF8 <1> call getc 2543 0000B975 3C41 <1> cmp al, 41h 2544 0000B977 7503E99D01 <1> je .up 2545 0000B97C 3C44 <1> cmp al, 44h 2546 0000B97E 7503E96E01 <1> je .left 2547 0000B983 3C42 <1> cmp al, 42h 2548 0000B985 7503E9AB01 <1> je .down 2549 0000B98A 3C43 <1> cmp al, 43h 2550 0000B98C 7503E97301 <1> je .right 2551 0000B991 3C32 <1> cmp al, 32h 2552 0000B993 7425 <1> je .check_insert 2553 0000B995 3C33 <1> cmp al, 33h 2554 0000B997 7421 <1> je .check_del 2555 0000B999 3C31 <1> cmp al, 31h 2556 0000B99B 741D <1> je .check_home 2557 0000B99D 3C34 <1> cmp al, 34h 2558 0000B99F 7419 <1> je .check_end 2559 0000B9A1 3C48 <1> cmp al, 48h 2560 0000B9A3 7503E92501 <1> je .home 2561 0000B9A8 3C46 <1> cmp al, 46h 2562 0000B9AA 7503E92F01 <1> je .end 2563 0000B9AF 3C35 <1> cmp al, 35h 2564 0000B9B1 7407 <1> je .check_pageup 2565 0000B9B3 3C36 <1> cmp al, 36h 2566 0000B9B5 7403 <1> je .check_pagedown 2567 0000B9B7 E9D701 <1> jmp .beep 2568 <1> 2569 <1> 2570 <1> .check_insert: 2571 <1> .check_del: 2572 <1> .check_home: 2573 <1> .check_end: 2574 <1> .check_pageup: 2575 <1> .check_pagedown: 2576 0000B9BA 50 <1> push ax 2577 0000B9BB E8A5F8 <1> call getc 2578 0000B9BE 3C7E <1> cmp al, 7Eh 2579 0000B9C0 58 <1> pop ax 2580 0000B9C1 7403E9CB01 <1> jne .beep 2581 <1> 2582 0000B9C6 3C32 <1> cmp al, 32h 2583 0000B9C8 7503E9C401 <1> je .insert 2584 0000B9CD 3C33 <1> cmp al, 33h 2585 0000B9CF 7503E9D000 <1> je .del 2586 0000B9D4 3C31 <1> cmp al, 31h 2587 0000B9D6 7503E9F200 <1> je .home 2588 0000B9DB 3C34 <1> cmp al, 34h 2589 0000B9DD 7503E9FC00 <1> je .end 2590 0000B9E2 3C35 <1> cmp al, 35h 2591 0000B9E4 7503E9A801 <1> je .pageup 2592 0000B9E9 3C36 <1> cmp al, 36h 2593 0000B9EB 7503E9A101 <1> je .pagedown 2594 <1> 2595 0000B9F0 E99E01 <1> jmp .beep 2596 <1> 2597 <1> 2598 <1> .not_esc: 2599 <1> ; check regular characters 2600 0000B9F3 84C0 <1> test al, al ; waste? 2601 0000B9F5 7503E950FE <1> je .next 2602 0000B9FA 3CE0 <1> cmp al, 0E0h 2603 0000B9FC 7503E949FE <1> je .next ; waste --> 2604 <1> 2605 0000BA01 3C03 <1> cmp al, 03h 2606 0000BA03 7503E99001 <1> je .ctrlc 2607 0000BA08 3C09 <1> cmp al, 09h 2608 0000BA0A 7503E98201 <1> je .beep ; tab 2609 0000BA0F 3C08 <1> cmp al, 08h 2610 0000BA11 745D <1> je .backspace 2611 0000BA13 3C7F <1> cmp al, 7Fh 2612 <1> ; On the server in int 16h of -dumb dosemu, as well as on 2613 <1> ; both systems across serial I/O this code is used. 2614 0000BA15 7459 <1> je .backspace 2615 0000BA17 3C0A <1> cmp al, 10 ; (allow Linux style linebreak) 2616 0000BA19 7503E97D01 <1> je .done 2617 0000BA1E 3C0D <1> cmp al, 13 ; (match for CR keypress) 2618 0000BA20 7503E97601 <1> je .done 2619 <1> 2620 <1> .textcodepoint: 2621 0000BA25 8B5EF0 <1> mov bx, word [bp + ?length_input] 2622 0000BA28 81FBFE00 <1> cmp bx, ?limit 2623 0000BA2C 720B <1> jb @F 2624 0000BA2E C646EA01 <1> mov byte [bp + ?redraw], 1 2625 0000BA32 C646EB01 <1> mov byte [bp + ?beep], 1 2626 0000BA36 E911FE <1> jmp .next 2627 <1> @@: 2628 <1> 2629 0000BA39 C646E801 <1> mov byte [bp + ?edited], 1 2630 0000BA3D 8B56F0 <1> mov dx, word [bp + ?length_input] 2631 0000BA40 89D1 <1> mov cx, dx 2632 0000BA42 89D7 <1> mov di, dx 2633 0000BA44 16 <1> push ss 2634 0000BA45 07 <1> pop es 2635 0000BA46 81C7[0200] <1> add di, line_in + 2 ; di -> behind end of input 2636 0000BA4A 89FE <1> mov si, di 2637 0000BA4C 4E <1> dec si ; si -> at last entry of input 2638 0000BA4D 2B4EEE <1> sub cx, word [bp + ?offset] 2639 0000BA50 FD <1> std ; AMD erratum 109 workaround done 2640 <1> numdef AMD_ERRATUM_109_WORKAROUND, 1 2641 <1> %if _AMD_ERRATUM_109_WORKAROUND 2642 0000BA51 E308 <1> jcxz @FF 2643 0000BA53 83F914 <1> cmp cx, 20 2644 0000BA56 7703 <1> ja @FF 2645 <1> @@: 2646 0000BA58 A4 <1> movsb 2647 0000BA59 E2FD <1> loop @B 2648 <1> @@: 2649 <1> %endif 2650 0000BA5B F3A4 <1> rep movsb 2651 0000BA5D FC <1> cld 2652 0000BA5E 8805 <1> mov byte [di], al 2653 0000BA60 FF46E6 <1> inc word [bp + ?column] 2654 0000BA63 FF46EE <1> inc word [bp + ?offset] 2655 0000BA66 FF46F0 <1> inc word [bp + ?length_input] 2656 0000BA69 C646EA01 <1> mov byte [bp + ?redraw], 1 2657 0000BA6D E9DAFD <1> jmp .next 2658 <1> 2659 <1> .backspace: 2660 0000BA70 837EEE00 <1> cmp word [bp + ?offset], 0 2661 0000BA74 7427 <1> je .backspace_offset_0 2662 <1> 2663 0000BA76 C646E801 <1> mov byte [bp + ?edited], 1 2664 0000BA7A 16 <1> push ss 2665 0000BA7B 07 <1> pop es 2666 0000BA7C 8B7EEE <1> mov di, word [bp + ?offset] 2667 0000BA7F 8B4EF0 <1> mov cx, word [bp + ?length_input] 2668 0000BA82 29F9 <1> sub cx, di ; length after offset 2669 0000BA84 81C7[0200] <1> add di, line_in + 2 ; -> at offset in line 2670 0000BA88 89FE <1> mov si, di ; -> at offset in line 2671 0000BA8A 4F <1> dec di ; -> at offset - 1 in line 2672 0000BA8B F3A4 <1> rep movsb ; move down additional content 2673 0000BA8D FF4EE6 <1> dec word [bp + ?column] 2674 0000BA90 FF4EEE <1> dec word [bp + ?offset] 2675 0000BA93 FF4EF0 <1> dec word [bp + ?length_input] 2676 0000BA96 C646EA01 <1> mov byte [bp + ?redraw], 1 2677 0000BA9A E9ADFD <1> jmp .next 2678 <1> 2679 <1> .backspace_offset_0: 2680 <1> .del_offset_ae_length_input: 2681 <1> .left_offset_0: 2682 <1> .right_offset_too_high: 2683 0000BA9D C646EB01 <1> mov byte [bp + ?beep], 1 2684 0000BAA1 E9A6FD <1> jmp .next 2685 <1> 2686 <1> .del: 2687 0000BAA4 8B46EE <1> mov ax, word [bp + ?offset] 2688 0000BAA7 3B46F0 <1> cmp ax, word [bp + ?length_input] 2689 0000BAAA 73F1 <1> jae .del_offset_ae_length_input 2690 0000BAAC C646E801 <1> mov byte [bp + ?edited], 1 2691 0000BAB0 89C7 <1> mov di, ax 2692 0000BAB2 81C7[0200] <1> add di, line_in + 2 ; -> at current offset 2693 0000BAB6 89FE <1> mov si, di 2694 0000BAB8 46 <1> inc si ; -> after current offset 2695 0000BAB9 40 <1> inc ax ; offset + 1 2696 0000BABA F7D8 <1> neg ax ; - (offset + 1) 2697 0000BABC 0346F0 <1> add ax, word [bp + ?length_input]; length input - (offset + 1) 2698 0000BABF 89C1 <1> mov cx, ax 2699 0000BAC1 F3A4 <1> rep movsb ; move down part after deleted point 2700 0000BAC3 FF4EF0 <1> dec word [bp + ?length_input] 2701 0000BAC6 C646EA01 <1> mov byte [bp + ?redraw], 1 2702 0000BACA E97DFD <1> jmp .next 2703 <1> 2704 <1> .home: 2705 0000BACD 8366EE00 <1> and word [bp + ?offset], 0 2706 0000BAD1 FF76E4 <1> push word [bp + ?promptlength] 2707 0000BAD4 8F46E6 <1> pop word [bp + ?column] 2708 0000BAD7 C646EA01 <1> mov byte [bp + ?redraw], 1 2709 0000BADB E96CFD <1> jmp .next 2710 <1> 2711 <1> .end: 2712 0000BADE 8B46F0 <1> mov ax, word [bp + ?length_input] 2713 0000BAE1 8946EE <1> mov word [bp + ?offset], ax 2714 0000BAE4 0346E4 <1> add ax, word [bp + ?promptlength] 2715 0000BAE7 8946E6 <1> mov word [bp + ?column], ax 2716 0000BAEA C646EA01 <1> mov byte [bp + ?redraw], 1 2717 0000BAEE E959FD <1> jmp .next 2718 <1> 2719 <1> .left: 2720 0000BAF1 837EEE00 <1> cmp word [bp + ?offset], 0 2721 0000BAF5 74A6 <1> je .left_offset_0 2722 0000BAF7 FF4EEE <1> dec word [bp + ?offset] 2723 0000BAFA FF4EE6 <1> dec word [bp + ?column] 2724 0000BAFD C646EA01 <1> mov byte [bp + ?redraw], 1 2725 0000BB01 E946FD <1> jmp .next 2726 <1> 2727 <1> .right: 2728 0000BB04 8B46EE <1> mov ax, word [bp + ?offset] 2729 0000BB07 3B46F0 <1> cmp ax, word [bp + ?length_input] 2730 0000BB0A 7391 <1> jnb .right_offset_too_high 2731 0000BB0C FF46EE <1> inc word [bp + ?offset] 2732 0000BB0F FF46E6 <1> inc word [bp + ?column] 2733 0000BB12 C646EA01 <1> mov byte [bp + ?redraw], 1 2734 0000BB16 E931FD <1> jmp .next 2735 <1> 2736 <1> .up: 2737 0000BB19 807EE800 <1> cmp byte [bp + ?edited], 0 2738 0000BB1D 7572 <1> jne .beep 2739 <1> %if _HISTORY 2740 0000BB1F 8B76F4 <1> mov si, word [bp + ?historyentry] 2741 0000BB22 85F6 <1> test si, si 2742 0000BB24 8D7402 <1> lea si, [si + 2] 2743 0000BB27 7504 <1> jnz @F 2744 0000BB29 8B36[400B] <1> mov si, word [history.last] 2745 <1> @@: 2746 0000BB2D 3B36[3E0B] <1> cmp si, word [history.first] 2747 0000BB31 745E <1> je .beep 2748 0000BB33 EB1B <1> jmp .copyline 2749 <1> 2750 <1> .down: 2751 0000BB35 807EE800 <1> cmp byte [bp + ?edited], 0 2752 0000BB39 7556 <1> jne .beep 2753 0000BB3B 8B76F4 <1> mov si, word [bp + ?historyentry] 2754 0000BB3E 85F6 <1> test si, si 2755 0000BB40 744F <1> jz .beep 2756 0000BB42 3B36[400B] <1> cmp si, word [history.last] 2757 0000BB46 7506 <1> jne @F 2758 0000BB48 31C0 <1> xor ax, ax 2759 0000BB4A 31C9 <1> xor cx, cx 2760 0000BB4C EB10 <1> jmp .setline 2761 <1> 2762 <1> @@: 2763 0000BB4E 4E <1> dec si 2764 0000BB4F 4E <1> dec si 2765 <1> 2766 <1> .copyline: 2767 0000BB50 89F0 <1> mov ax, si 2768 <1> gethistorysegment ds 225 0000BB52 368E1E[3C0B] <2> mov %1, word [ss:history.segorsel] 2769 0000BB57 8B0C <1> mov cx, [si] 2770 0000BB59 8B7402 <1> mov si, [si + 2] 2771 0000BB5C 29F1 <1> sub cx, si 2772 <1> 2773 <1> .setline: 2774 0000BB5E 8946F4 <1> mov word [bp + ?historyentry], ax 2775 <1> gethistoryoffset bx 228 0000BB61 BB0000 <2> mov %1, 0 2776 0000BB64 8D30 <1> lea si, [si + bx] 2777 0000BB66 16 <1> push ss 2778 0000BB67 07 <1> pop es 2779 0000BB68 BF[0100] <1> mov di, line_in + 1 2780 0000BB6B 88C8 <1> mov al, cl 2781 0000BB6D AA <1> stosb 2782 0000BB6E F3A4 <1> rep movsb 2783 0000BB70 B00D <1> mov al, 13 2784 0000BB72 AA <1> stosb 2785 0000BB73 16 <1> push ss 2786 0000BB74 1F <1> pop ds 2787 <1> %else 2788 <1> .down: equ .beep 2789 <1> 2790 <1> mov byte [bp + ?edited], 1 2791 <1> %endif 2792 0000BB75 31C0 <1> xor ax, ax 2793 0000BB77 A0[0100] <1> mov al, byte [line_in + 1] 2794 0000BB7A 8946EE <1> mov word [bp + ?offset], ax 2795 0000BB7D 8946F0 <1> mov word [bp + ?length_input], ax 2796 0000BB80 0346E4 <1> add ax, word [bp + ?promptlength] 2797 0000BB83 8946E6 <1> mov word [bp + ?column], ax 2798 0000BB86 8366EC00 <1> and word [bp + ?lastskip], 0 2799 0000BB8A C646EA01 <1> mov byte [bp + ?redraw], 1 2800 0000BB8E E9B9FC <1> jmp .next 2801 <1> 2802 <1> .insert: 2803 <1> .pageup: 2804 <1> .pagedown: 2805 <1> .beep: 2806 0000BB91 C646EB01 <1> mov byte [bp + ?beep], 1 2807 0000BB95 E9B2FC <1> jmp .next 2808 <1> 2809 <1> .ctrlc: 2810 0000BB98 E99A80 <1> jmp handle_ctrl_c 2811 <1> 2812 <1> .done: 2813 0000BB9B 8B7EF0 <1> mov di, word [bp + ?length_input] 2814 <1> 2815 0000BB9E 8B56EC <1> mov dx, word [bp + ?lastskip] 2816 0000BBA1 0356F2 <1> add dx, word [bp + ?length_displayed] 2817 <1> ; offset into line (with length displayed) 2818 0000BBA4 0356E4 <1> add dx, word [bp + ?promptlength]; offset into display 2819 0000BBA7 3B56E6 <1> cmp dx, word [bp + ?column] ; same as column ? 2820 0000BBAA 750A <1> jne @F ; no, always redraw --> 2821 <1> 2822 0000BBAC 89F8 <1> mov ax, di 2823 0000BBAE 0346E4 <1> add ax, word [bp + ?promptlength] 2824 0000BBB1 3946FE <1> cmp word [bp + ?columns], ax 2825 0000BBB4 7719 <1> ja .done_no_redraw 2826 <1> 2827 <1> @@: 2828 0000BBB6 B00D <1> mov al, 13 2829 0000BBB8 E867F6 <1> call putc ; reset cursor 2830 0000BBBB C456F6 <1> les dx, [bp + ?prompt] 2831 0000BBBE 8B4EE4 <1> mov cx, [bp + ?promptlength] 2832 0000BBC1 E8CCF2 <1> call puts ; redraw prompt 2833 0000BBC4 16 <1> push ss 2834 0000BBC5 07 <1> pop es 2835 0000BBC6 BA[0200] <1> mov dx, line_in + 2 2836 0000BBC9 8B4EF0 <1> mov cx, word [bp + ?length_input] 2837 0000BBCC E8C1F2 <1> call puts ; draw 2838 <1> 2839 <1> .done_no_redraw: 2840 0000BBCF 81C7[0200] <1> add di, line_in + 2 2841 0000BBD3 B00D <1> mov al, 13 2842 0000BBD5 AA <1> stosb ; store the CR (there always is room) 2843 0000BBD6 97 <1> xchg ax, di ; -> behind CR 2844 0000BBD7 2C33 <1> sub al, ((-section.DATASTACK.vstart+100h+ldebug_data_entry_size +asmtable1_size+asmtable2_size) +line_in+3) & 0FFh ; length of string, excluding CR 2847 <1> ; (This instruction disregards the unnecessary higher byte.) 2848 0000BBD9 5F <1> pop di ; restore di 2849 0000BBDA A2[0100] <1> mov byte [line_in+1], al ; store the length byte 2850 0000BBDD 89EC5D <1> lleave code 2851 0000BBE0 E9BFFA <1> jmp getline_eol_enter_history 2852 <1> 2853 <1> lleave ctx 2854 <1> 2855 <1> 2856 <1> fullbsout: 2857 0000BBE3 B008 <1> mov al, 8 2858 0000BBE5 E83AF6 <1> call putc 2859 0000BBE8 B020 <1> mov al, 32 2860 0000BBEA E835F6 <1> call putc 2861 0000BBED B008 <1> mov al, 8 2862 0000BBEF E930F6 <1> jmp putc 2863 <1> 2864 <1> 2865 <1> ; INP: - 2866 <1> ; OUT: ax = number of columns to use 2867 <1> ; STT: ds = ss = debugger data selector 2868 <1> get_columns: 2869 0000BBF2 31C0 <1> xor ax, ax 2870 0000BBF4 F606[9500]40 <1> testopt [options], enable_serial ; serial ? 2871 0000BBF9 7411 <1> jz @F ; no --> 2872 0000BBFB 0A06[E20B] <1> or al, byte [serial_columns] ; ax = number of columns if serial 2873 0000BBFF 7407 <1> jz .default_columns 2874 0000BC01 3C01 <1> cmp al, 1 2875 0000BC03 751C <1> jne @FF 2876 0000BC05 48 <1> dec ax ; = 0 2877 0000BC06 EB04 <1> jmp @F ; use IOC / BDA selection 2878 <1> .default_columns: 2879 0000BC08 B050 <1> mov al, 80 2880 0000BC0A EB15 <1> jmp @FF 2881 <1> @@: 2882 0000BC0C 0A06[F10B] <1> or al, [io_columns] 2883 0000BC10 74F6 <1> jz .default_columns 2884 0000BC12 3C01 <1> cmp al, 1 ; is 1 ? 2885 0000BC14 750B <1> jne @F ; no, use as columns --> 2886 <1> ; yes, automatic (use BDA) 2887 0000BC16 06 <1> push es 2888 0000BC17 B84000 <1> mov ax, 40h ; 0040h is a bimodal segment/selector 2889 0000BC1A 8EC0 <1> mov es, ax 2890 0000BC1C 26A14A00 <1> mov ax, word [ es:4Ah ] ; columns on screen 2891 0000BC20 07 <1> pop es 2892 <1> @@: 2893 0000BC21 C3 <1> retn 2894 <1> 2895 <1> 2896 <1> getline_reset_notatty: 2897 0000BC22 F606[CF00]02 <1> testopt [internalflags3], dif3_input_re_closed 2898 0000BC27 7421 <1> jz @F 2899 0000BC29 8026[CF00]FD <1> clropt [internalflags3], dif3_input_re_closed 2900 0000BC2E F606[CD00]01 <1> testopt [internalflags3], dif3_input_cmdline 2901 0000BC33 7515 <1> jnz @F 2902 <1> %if _INPUT_FILE_HANDLES 2903 0000BC35 E865DF <1> call InDos 2904 0000BC38 7507 <1> jnz .notfile1 2905 0000BC3A F606[CA00]10 <1> testopt [internalflags2], dif2_input_file 2906 0000BC3F 7509 <1> jnz @F 2907 <1> .notfile1: 2908 <1> %endif 2909 <1> %if _INPUT_FILE_BOOT 2910 0000BC41 F606[CB00]02 <1> testopt [internalflags2], dif2_input_file_boot 2911 0000BC46 7502 <1> jnz @F 2912 <1> %endif 2913 0000BC48 EB47 <1> jmp .clear_notatty 2914 <1> 2915 <1> @@: 2916 0000BC4A F606[CD00]02 <1> testopt [internalflags3], dif3_input_cmdline_closed 2917 0000BC4F 741A <1> jz @F 2918 0000BC51 8026[CD00]FD <1> clropt [internalflags3], dif3_input_cmdline_closed 2919 <1> %if _INPUT_FILE_HANDLES 2920 0000BC56 E844DF <1> call InDos 2921 0000BC59 7507 <1> jnz .notfile2 2922 0000BC5B F606[CA00]10 <1> testopt [internalflags2], dif2_input_file 2923 0000BC60 7509 <1> jnz @F 2924 <1> .notfile2: 2925 <1> %endif 2926 <1> %if _INPUT_FILE_BOOT 2927 0000BC62 F606[CB00]02 <1> testopt [internalflags2], dif2_input_file_boot 2928 0000BC67 7502 <1> jnz @F 2929 <1> %endif 2930 0000BC69 EB26 <1> jmp .clear_notatty 2931 <1> 2932 <1> @@: 2933 <1> %if _INPUT_FILE_BOOT 2934 0000BC6B F606[CB00]04 <1> testopt [internalflags2], dif2_closed_input_file_boot 2935 0000BC70 7413 <1> jz @F 2936 0000BC72 8026[CB00]FB <1> clropt [internalflags2], dif2_closed_input_file_boot 2937 <1> %if _INPUT_FILE_HANDLES 2938 0000BC77 E823DF <1> call InDos 2939 0000BC7A 7507 <1> jnz .notfile3 2940 0000BC7C F606[CA00]10 <1> testopt [internalflags2], dif2_input_file 2941 0000BC81 7502 <1> jnz @F 2942 <1> .notfile3: 2943 <1> %endif 2944 0000BC83 EB0C <1> jmp .clear_notatty 2945 <1> @@: 2946 <1> %endif 2947 <1> %if _INPUT_FILE_HANDLES 2948 0000BC85 F606[CA00]20 <1> testopt [internalflags2], dif2_closed_input_file 2949 0000BC8A 7411 <1> jz @F 2950 0000BC8C 8026[CA00]DF <1> clropt [internalflags2], dif2_closed_input_file 2951 <1> %else 2952 <1> jmp @F 2953 <1> %endif 2954 <1> .clear_notatty: 2955 0000BC91 F606[C400]30 <1> testopt [internalflags], inputfile | notstdinput 2956 0000BC96 7505 <1> jnz @F 2957 0000BC98 C606[2C0B]00 <1> mov byte [notatty], 0 ; it _is_ a tty 2958 <1> @@: 2959 0000BC9D C3 <1> retn 2960 <1> 2961 <1> 2962 <1> ; Fill input buffer from file. 2963 <1> ; 2964 <1> ; INP: di-> first available byte in input buffer 2965 <1> ; OUT: CY if DOS returned an error or EOF occured 2966 <1> ; NC if no error 2967 <1> ; si = di 2968 <1> ; CHG: - 2969 <1> fillbuf: 2970 0000BC9E E81E7F <1> call handle_serial_flags_ctrl_c 2971 0000BCA1 50 <1> push ax 2972 0000BCA2 53 <1> push bx 2973 0000BCA3 51 <1> push cx 2974 0000BCA4 52 <1> push dx 2975 0000BCA5 89FE <1> mov si, di ; we know this already 2976 0000BCA7 B9[0101] <1> mov cx, line_in+LINE_IN_LEN 2977 0000BCAA 89FA <1> mov dx, di 2978 0000BCAC 29F9 <1> sub cx, di 2979 0000BCAE 7703E99E00 <1> jbe .ret_cy ; if no more room --> 2980 <1> 2981 0000BCB3 F606[CF00]01 <1> testopt [internalflags3], dif3_input_re 2982 0000BCB8 7429 <1> jz .not_re 2983 0000BCBA 56 <1> push si 2984 0000BCBB 57 <1> push di 2985 0000BCBC 89CB <1> mov bx, cx 2986 0000BCBE 8B36[140A] <1> mov si, word [re_buffer.position] 2987 0000BCC2 89F7 <1> mov di, si 2988 0000BCC4 B9FFFF <1> mov cx, -1 2989 0000BCC7 31C0 <1> xor ax, ax 2990 0000BCC9 F2AE <1> repne scasb 2991 0000BCCB F7D1 <1> not cx 2992 0000BCCD 49 <1> dec cx 2993 0000BCCE 39CB <1> cmp bx, cx 2994 0000BCD0 7702 <1> ja @F 2995 0000BCD2 89D9 <1> mov cx, bx 2996 <1> @@: 2997 0000BCD4 89C8 <1> mov ax, cx 2998 0000BCD6 89D7 <1> mov di, dx 2999 0000BCD8 F3A4 <1> rep movsb 3000 0000BCDA 8936[140A] <1> mov word [re_buffer.position], si 3001 0000BCDE 5F <1> pop di 3002 0000BCDF 5E <1> pop si 3003 0000BCE0 F8 <1> clc 3004 0000BCE1 EB60 <1> jmp .after 3005 <1> 3006 <1> .not_re: 3007 <1> 3008 <1> %if _INPUT_FILE_BOOT 3009 0000BCE3 F606[CB00]02 <1> testopt [internalflags2], dif2_input_file_boot 3010 0000BCE8 7408 <1> jz @F 3011 0000BCEA E8FA03 <1> call yy_boot_remember_seek 3012 0000BCED E892B7 <1> call yy_boot_read 3013 0000BCF0 EB51 <1> jmp .after 3014 <1> @@: 3015 <1> %endif 3016 <1> 3017 <1> %if _INPUT_FILE_HANDLES 3018 0000BCF2 E8A8DE <1> call InDos 3019 0000BCF5 750E <1> jnz @F 3020 0000BCF7 F606[CA00]10 <1> testopt [internalflags2], dif2_input_file 3021 0000BCFC 7407 <1> jz @F ; if not input file --> 3022 0000BCFE 57 <1> push di 3023 0000BCFF E82EF7 <1> call yy_get_handle ; bx = handle 3024 0000BD02 5F <1> pop di 3025 0000BD03 EB37 <1> jmp .file_handle 3026 <1> %endif 3027 <1> 3028 <1> @@: 3029 0000BD05 F606[CD00]01 <1> testopt [internalflags3], dif3_input_cmdline 3030 0000BD0A 7429 <1> jz .not_cmdline 3031 0000BD0C 56 <1> push si 3032 0000BD0D 57 <1> push di 3033 0000BD0E 89CB <1> mov bx, cx 3034 0000BD10 8B36[1002] <1> mov si, word [cmdline_buffer.position] 3035 0000BD14 89F7 <1> mov di, si 3036 0000BD16 B9FFFF <1> mov cx, -1 3037 0000BD19 31C0 <1> xor ax, ax 3038 0000BD1B F2AE <1> repne scasb 3039 0000BD1D F7D1 <1> not cx 3040 0000BD1F 49 <1> dec cx 3041 0000BD20 39CB <1> cmp bx, cx 3042 0000BD22 7702 <1> ja @F 3043 0000BD24 89D9 <1> mov cx, bx 3044 <1> @@: 3045 0000BD26 89C8 <1> mov ax, cx 3046 0000BD28 89D7 <1> mov di, dx 3047 0000BD2A F3A4 <1> rep movsb 3048 0000BD2C 8936[1002] <1> mov word [cmdline_buffer.position], si 3049 0000BD30 5F <1> pop di 3050 0000BD31 5E <1> pop si 3051 0000BD32 F8 <1> clc 3052 0000BD33 EB0E <1> jmp .after 3053 <1> 3054 <1> .not_cmdline: 3055 <1> 3056 <1> @@: 3057 0000BD35 31DB <1> xor bx, bx ; bx = handle (0 is STDIN) 3058 0000BD37 E863DE <1> call InDos 3059 0000BD3A 7515 <1> jnz .ret_cy 3060 <1> 3061 <1> .file_handle: 3062 0000BD3C B43F <1> mov ah, 3Fh ; read from file 3063 0000BD3E E87003 <1> call yy_remember_seek 3064 <1> doscall 2334 0000BD41 CD21 <2> int 21h 3065 <1> .after: 3066 0000BD43 720C <1> jc .ret_cy ; if error --> 3067 0000BD45 85C0 <1> test ax, ax 3068 0000BD47 7408 <1> jz .ret_cy ; if EOF --> 3069 0000BD49 01C2 <1> add dx, ax ; -> behind last valid byte 3070 <1> 3071 0000BD4B 8026[CD00]FB <1> clropt [internalflags3], dif3_at_line_end 3072 <1> 3073 0000BD50 A8 <1> db __TEST_IMM8 ; (NC) 3074 <1> .ret_cy: 3075 0000BD51 F9 <1> stc 3076 0000BD52 8916[340B] <1> mov word [bufend], dx ; -> behind last valid byte 3077 0000BD56 5A <1> pop dx 3078 0000BD57 59 <1> pop cx 3079 0000BD58 5B <1> pop bx 3080 0000BD59 58 <1> pop ax 3081 0000BD5A C3 <1> retn 3082 <1> 3083 <1> 3084 <1> %ifn _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 3085 <1> yy equ error 3086 <1> %else 3087 <1> yy: 3088 0000BD5B E87248 <1> call guard_re 3089 <1> %if _INPUT_FILE_BOOT 3090 0000BD5E F606[C500]40 <1> testopt [internalflags], nodosloaded 3091 0000BD63 7403E9B1B3 <1> jnz yy_boot 3092 <1> %endif 3093 <1> %ifn _INPUT_FILE_HANDLES 3094 <1> jmp error 3095 <1> %else 3096 0000BD68 E832DE <1> call InDos 3097 0000BD6B 740B <1> jz @F 3098 0000BD6D B80503 <1> mov ax, 0305h 3099 0000BD70 E890DB <1> call setrc 3100 0000BD73 BA[2A70] <1> mov dx, msg.yy_no_dos 3101 0000BD76 EB2F <1> jmp .disp_error_1 3102 <1> 3103 <1> @@: 3104 <1> ; If input_file_handles.to_close is set, 3105 <1> ; close all left over open files. (This 3106 <1> ; may only be done when DOS is available.) 3107 0000BD78 31DB <1> xor bx, bx ; if none left open, -> first structure 3108 0000BD7A F606[CA00]10 <1> testopt [internalflags2], dif2_input_file 3109 0000BD7F 740B <1> jz @F 3110 0000BD81 8B1E[B80A] <1> mov bx, word [input_file_handles.active] 3111 0000BD85 43 <1> inc bx ; point to first unused structure 3112 0000BD86 D1E3 <1> shl bx, 1 3113 0000BD88 D1E3 <1> shl bx, 1 3114 0000BD8A D1E3 <1> shl bx, 1 ; to qword array index 3115 <1> %if INPUTFILEHANDLE_size != 8 3116 <1> %error Unexpected structure size 3117 <1> %endif 3118 <1> @@: 3119 0000BD8C 89DF <1> mov di, bx ; + input_file_handles -> to close 3120 0000BD8E 31C0 <1> xor ax, ax ; zero base amount to close 3121 0000BD90 E880F6 <1> call yy_close_file_handles 3122 <1> ; CHG: ax, bx, di 3123 <1> ; if we remembered to close any, do it now 3124 <1> 3125 0000BD93 4E <1> dec si 3126 0000BD94 89F3 <1> mov bx, si ; -> start of name 3127 0000BD96 89F7 <1> mov di, si ; -> start of name 3128 0000BD98 AC <1> lodsb ; load character 3129 0000BD99 E8B1EF <1> call iseol? 3130 0000BD9C 7515 <1> jne @F 3131 0000BD9E BA[6C6F] <1> mov dx, msg.yy_requires_filename 3132 0000BDA1 B80403 <1> mov ax, 0304h 3133 0000BDA4 E85CDB <1> call setrc 3134 <1> .disp_error_1: 3135 0000BDA7 B8FF03 <1> mov ax, 03FFh 3136 0000BDAA E856DB <1> call setrc 3137 0000BDAD E84AF4 <1> call putsz_error 3138 0000BDB0 E94D42 <1> jmp cmd3 3139 <1> 3140 <1> @@: 3141 <1> .unquoted_loop: 3142 0000BDB3 3C20 <1> cmp al, 32 ; blank or EOL outside quoted part ? 3143 0000BDB5 7434 <1> je .blank 3144 0000BDB7 3C09 <1> cmp al, 9 3145 0000BDB9 7430 <1> je .blank 3146 0000BDBB E88FEF <1> call iseol? ; (includes semicolon in lDebug) 3147 0000BDBE 742B <1> je .blank ; yes --> 3148 0000BDC0 3C22 <1> cmp al, '"' ; starting quote mark ? 3149 0000BDC2 740E <1> je .quoted ; yes --> 3150 0000BDC4 AA <1> stosb ; store character 3151 <1> .unquote: 3152 0000BDC5 AC <1> lodsb ; load character 3153 0000BDC6 EBEB <1> jmp .unquoted_loop ; continue in not-quoted loop --> 3154 <1> 3155 <1> .quoted_loop: 3156 0000BDC8 E886EF <1> call iseol?.notsemicolon; EOL inside quoted part ? 3157 0000BDCB 7413 <1> je .quoted_eol ; if yes, error --> 3158 0000BDCD 3C22 <1> cmp al, '"' ; ending quote mark ? 3159 0000BDCF 74F4 <1> je .unquote ; yes --> 3160 0000BDD1 AA <1> stosb ; store character 3161 <1> .quoted: 3162 0000BDD2 AC <1> lodsb ; load character 3163 0000BDD3 EBF3 <1> jmp .quoted_loop ; continue in quoted loop --> 3164 <1> 3165 <1> .empty: 3166 0000BDD5 B80603 <1> mov ax, 0306h 3167 0000BDD8 E828DB <1> call setrc 3168 0000BDDB BA[8D6F] <1> mov dx, msg.yy_filename_empty 3169 0000BDDE EBC7 <1> jmp .disp_error_1 3170 <1> 3171 <1> .quoted_eol: 3172 0000BDE0 B80703 <1> mov ax, 0307h 3173 0000BDE3 E81DDB <1> call setrc 3174 0000BDE6 BA[5470] <1> mov dx, msg.yy_filename_missing_unquote 3175 0000BDE9 EBBC <1> jmp .disp_error_1 3176 <1> 3177 <1> .blank: 3178 <1> ; mov byte [si - 1], 0 ; terminate (shouldn't be needed) 3179 <1> 3180 0000BDEB B000 <1> mov al, 0 3181 0000BDED 8605 <1> xchg al, byte [di] ; terminate after filename 3182 0000BDEF 893E[080C] <1> mov word [terminator_in_line_in.offset], di 3183 0000BDF3 A2[0A0C] <1> mov byte [terminator_in_line_in.value], al 3184 0000BDF6 39FB <1> cmp bx, di ; empty ? 3185 0000BDF8 74DB <1> je .empty ; yes --> 3186 <1> ; done 3187 <1> 3188 0000BDFA F606[CA00]10 <1> testopt [internalflags2], dif2_input_file 3189 0000BDFF 7412 <1> jz @F 3190 <1> ; IFH = 1 3191 <1> ; IFH - 1 = 0 3192 <1> ; cmp active, 0 3193 <1> ; active >= 0 --> error 3194 <1> 3195 <1> ; IFH = 2 3196 <1> ; IFH - 1 = 1 3197 <1> ; cmp active, 1 3198 <1> ; active >= 1 --> error 3199 0000BE01 833E[B80A]0F <1> cmp word [input_file_handles.active], _INPUT_FILE_HANDLES - 1 3200 0000BE06 720B <1> jb @F 3201 <1> 3202 0000BE08 B80803 <1> mov ax, 0308h 3203 0000BE0B E8F5DA <1> call setrc 3204 0000BE0E BA[AC6F] <1> mov dx, msg.yy_too_many_handles 3205 0000BE11 EB94 <1> jmp .disp_error_1 3206 <1> @@: 3207 <1> 3208 0000BE13 803F3A <1> cmp byte [bx], ':' 3209 0000BE16 7550 <1> jne .not_yy_goto_subfunction 3210 <1> 3211 0000BE18 F606[CA00]10 <1> testopt [internalflags2], dif2_input_file 3212 0000BE1D 750C <1> jnz @F 3213 <1> 3214 0000BE1F E849F9 <1> call getline_is_input_file? 3215 0000BE22 7238 <1> jc .no_file 3216 0000BE24 F606[CD00]01 <1> testopt [internalflags3], dif3_input_cmdline 3217 0000BE29 7531 <1> jnz .no_file 3218 <1> @@: 3219 0000BE2B 43 <1> inc bx 3220 0000BE2C 89DD <1> mov bp, bx 3221 <1> 3222 0000BE2E E86901 <1> call yy_reset_buf 3223 <1> 3224 0000BE31 31DB <1> xor bx, bx ; bx = handle (0 is STDIN) 3225 <1> %if _INPUT_FILE_HANDLES 3226 0000BE33 F606[CA00]10 <1> testopt [internalflags2], dif2_input_file 3227 0000BE38 7405 <1> jz @F ; if not input file --> 3228 0000BE3A 57 <1> push di 3229 0000BE3B E8F2F5 <1> call yy_get_handle ; bx = handle 3230 0000BE3E 5F <1> pop di 3231 <1> @@: 3232 <1> %endif 3233 0000BE3F B445 <1> mov ah, 45h 3234 <1> doscall ; duplicate file handle 2334 0000BE41 CD21 <2> int 21h 3235 0000BE43 7303E9D700 <1> jc yy_open_file.error 3236 0000BE48 93 <1> xchg ax, bx 3237 <1> 3238 0000BE49 31C9 <1> xor cx, cx 3239 0000BE4B 31D2 <1> xor dx, dx 3240 0000BE4D B80142 <1> mov ax, 4201h ; lseek, from current file position 3241 <1> doscall ; call DOS 2334 0000BE50 CD21 <2> int 21h 3242 0000BE52 91 <1> xchg ax, cx ; dx:cx = current seek 3243 0000BE53 87D1 <1> xchg dx, cx ; cx:dx = current seek 3244 0000BE55 BE0001 <1> mov si, ifhfIsDup 3245 0000BE58 93 <1> xchg ax, bx 3246 0000BE59 E9ED00 <1> jmp yy_finish 3247 <1> 3248 <1> 3249 <1> .no_file: 3250 0000BE5C B80903 <1> mov ax, 0309h 3251 0000BE5F E8A1DA <1> call setrc 3252 0000BE62 BA[F26F] <1> mov dx, msg.yy_no_file 3253 0000BE65 E93FFF <1> jmp .disp_error_1 3254 <1> 3255 <1> .not_yy_goto_subfunction: 3256 0000BE68 31ED <1> xor bp, bp 3257 0000BE6A E836EF <1> call skipwh0 3258 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 3259 0000BE6D 8936[000C] <1> mov word [if_exists_then_address], si 3260 <1> %endif 3261 0000BE71 E8C8EE <1> call iseol?_or_then 3262 0000BE74 7425 <1> je .not_yy_goto 3263 <1> 3264 0000BE76 3C3A <1> cmp al, ':' 3265 0000BE78 7403E93FDA <1> jne error 3266 <1> 3267 0000BE7D E822EF <1> call skipwhite 3268 0000BE80 4E <1> dec si 3269 0000BE81 89F5 <1> mov bp, si 3270 <1> 3271 <1> @@: 3272 0000BE83 AC <1> lodsb 3273 0000BE84 3C20 <1> cmp al, 32 3274 0000BE86 7409 <1> je @F 3275 0000BE88 3C09 <1> cmp al, 9 3276 0000BE8A 7405 <1> je @F 3277 0000BE8C E8BEEE <1> call iseol? 3278 0000BE8F 75F2 <1> jne @B 3279 <1> @@: 3280 0000BE91 E80FEF <1> call skipwh0 3281 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 3282 0000BE94 8936[000C] <1> mov word [if_exists_then_address], si 3283 <1> %endif 3284 0000BE98 E8BDEE <1> call chkeol_or_then 3285 <1> 3286 <1> .not_yy_goto: 3287 0000BE9B 89DF <1> mov di, bx 3288 <1> 3289 <1> ; INP: ds:di -> filename 3290 <1> ; OUT: File opened, 3291 <1> ; bx = file handle 3292 <1> ; STT: ds = es = ss = debugger data selector/segment 3293 <1> yy_open_file: 3294 0000BE9D E89500 <1> call .setup_opencreate ; ds:si -> pathname 3295 0000BEA0 B86C71 <1> mov ax, 716Ch ; LFN open-create 3296 0000BEA3 57 <1> push di 3297 0000BEA4 31FF <1> xor di, di ; alias hint 3298 0000BEA6 F9 <1> stc 3299 <1> doscall 2334 0000BEA7 CD21 <2> int 21h 3300 0000BEA9 5F <1> pop di 3301 0000BEAA 7203E99100 <1> jnc .got ; LFN call succeeded --> 3302 <1> 3303 <1> ; Early case for no-LFN-interface available. 3304 <1> ; cmp ax, 1 3305 <1> ; je .try_sfn 3306 0000BEAF 3D0071 <1> cmp ax, 7100h 3307 0000BEB2 744B <1> je .try_sfn 3308 <1> 3309 <1> ; Only now, we check whether the used drive supports LFNs. 3310 <1> ; If it does, then we treat the error received as an 3311 <1> ; actual error and cancel here. If not, the SFN function 3312 <1> ; is called next as a fallback. 3313 <1> ; 3314 <1> ; We cannot rely on specific error returns like the 3315 <1> ; expected 7100h CY (or 7100h CF-unchanged) or the similar 3316 <1> ; 0001h CY (Invalid function) because no one agrees on what 3317 <1> ; error code to use. 3318 <1> ; 3319 <1> ; dosemu returns 0003h (Path not found) on FATFS and 3320 <1> ; redirected-non-dosemu drives. But may be changed so as to 3321 <1> ; return 0059h (Function not supported on network). 3322 <1> ; MSWindows 98SE returns 0002h (File not found) on 3323 <1> ; DOS-redirected drives. 3324 <1> ; DOSLFN with Fallback mode enabled supports the call (albeit 3325 <1> ; limited to SFNs). 3326 <1> ; 3327 <1> ; To suss out what the error means, check LFN availability. 3328 <1> ; 3329 <1> ; Refer to https://github.com/stsp/dosemu2/issues/770 3330 0000BEB4 1E <1> push ds 3331 0000BEB5 06 <1> push es 3332 0000BEB6 57 <1> push di 3333 0000BEB7 50 <1> push ax 3334 <1> lframe 3335 <1> lvar 34, fstype_buffer 3336 <1> lvar 4, pathname_buffer 3337 0000BEB8 5589E58D66DA <1> lenter 3338 <1> 3339 0000BEBE AD <1> lodsw ; load first two bytes of pathname 3340 <1> 3341 0000BEBF 16 <1> push ss 3342 0000BEC0 1F <1> pop ds 3343 0000BEC1 89E2 <1> mov dx, sp ; ds:dx -> ?pathname_buffer 3344 0000BEC3 16 <1> push ss 3345 0000BEC4 07 <1> pop es 3346 0000BEC5 89E7 <1> mov di, sp ; es:di -> ?pathname_buffer 3347 <1> 3348 0000BEC7 80FC3A <1> cmp ah, ':' ; starts with drive specifier ? 3349 0000BECA 7408 <1> je @F ; yes --> 3350 <1> 3351 0000BECC B419 <1> mov ah, 19h 3352 <1> doscall ; get current default drive 2334 0000BECE CD21 <2> int 21h 3353 0000BED0 0441 <1> add al, 'A' ; A: = 0, convert to drive letter 3354 0000BED2 B43A <1> mov ah, ':' ; drive specifier 3355 <1> @@: 3356 0000BED4 AB <1> stosw 3357 0000BED5 B85C00 <1> mov ax, '\' ; backslash and zero terminator 3358 0000BED8 AB <1> stosw ; es:di -> ?fstype_buffer 3359 <1> 3360 0000BED9 31C0 <1> xor ax, ax 3361 0000BEDB B91100 <1> mov cx, 34 >> 1 3362 0000BEDE 57 <1> push di 3363 0000BEDF F3AB <1> rep stosw ; initialise ?fstype_buffer to all zeros 3364 0000BEE1 5F <1> pop di ; -> ?fstype_buffer 3365 <1> 3366 0000BEE2 B92000 <1> mov cx, 32 ; size of ?fstype_buffer 3367 0000BEE5 31DB <1> xor bx, bx ; harden, initialise this 3368 0000BEE7 B8A071 <1> mov ax, 71A0h ; get volume information 3369 0000BEEA F9 <1> stc 3370 <1> doscall ; (depends on ds = es = ss) 2334 0000BEEB CD21 <2> int 21h 3371 <1> 3372 0000BEED 7207 <1> jc @F ; if call not supported --> 3373 <1> ; bx = FS flags 3374 0000BEEF F6C740 <1> test bh, 0100_0000b ; LFN interface available ? 3375 0000BEF2 F9 <1> stc ; if no 3376 0000BEF3 7401 <1> jz @F ; no --> 3377 <1> 3378 0000BEF5 F8 <1> clc ; is available 3379 <1> @@: 3380 <1> 3381 0000BEF6 89EC5D <1> lleave 3382 0000BEF9 58 <1> pop ax ; (restore error code) 3383 0000BEFA 5F <1> pop di 3384 0000BEFB 07 <1> pop es 3385 0000BEFC 1F <1> pop ds 3386 0000BEFD 7320 <1> jnc .error ; if LFN interface is available, actual error 3387 <1> ; if LFN interface is not available, try SFN 3388 <1> 3389 <1> .try_sfn: 3390 0000BEFF E83300 <1> call .setup_opencreate 3391 0000BF02 B8006C <1> mov ax, 6C00h ; Open-create 3392 0000BF05 F9 <1> stc 3393 <1> doscall 2334 0000BF06 CD21 <2> int 21h 3394 0000BF08 7336 <1> jnc .got 3395 <1> 3396 0000BF0A 83F801 <1> cmp ax, 1 3397 0000BF0D 7405 <1> je .try_old_open 3398 0000BF0F 3D006C <1> cmp ax, 6C00h 3399 0000BF12 750B <1> jne .error 3400 <1> 3401 <1> .try_old_open: 3402 0000BF14 88D8 <1> mov al, bl ; access and sharing modes 3403 0000BF16 B43D <1> mov ah, 3Dh ; Open 3404 0000BF18 89F2 <1> mov dx, si ; -> filename 3405 0000BF1A F9 <1> stc 3406 <1> doscall 2334 0000BF1B CD21 <2> int 21h 3407 0000BF1D 7321 <1> jnc .got 3408 <1> 3409 <1> .error: 3410 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 3411 0000BF1F F606[CF00]08 <1> testopt [internalflags3], dif3_in_if 3412 0000BF24 7403E97AC6 <1> jnz if_exists_not_found 3413 <1> %endif 3414 0000BF29 B80A03 <1> mov ax, 030Ah 3415 0000BF2C E8D4D9 <1> call setrc 3416 0000BF2F BA[D16F] <1> mov dx, msg.yy_error_file_open 3417 0000BF32 E972FE <1> jmp yy.disp_error_1 3418 <1> 3419 <1> .setup_opencreate: 3420 0000BF35 89FE <1> mov si, di ; -> filename 3421 0000BF37 BB2060 <1> mov bx, 0110_0000_0010_0000b ; Auto-commit, no int 24h 3422 <1> ; DENY WRITE, Read-only 3423 0000BF3A 31C9 <1> xor cx, cx ; create attribute 3424 0000BF3C BA0100 <1> mov dx, 0000_0000_0000_0001b ; no create / open, no truncate 3425 0000BF3F C3 <1> retn 3426 <1> 3427 <1> .got: 3428 <1> ; ax = file handle 3429 0000BF40 E85700 <1> call yy_reset_buf 3430 <1> 3431 0000BF43 31C9 <1> xor cx, cx 3432 0000BF45 31D2 <1> xor dx, dx 3433 0000BF47 31F6 <1> xor si, si 3434 <1> yy_finish: 3435 0000BF49 F606[CA00]10 <1> testopt [internalflags2], dif2_input_file 3436 0000BF4E 7509 <1> jnz @F 3437 0000BF50 800E[CA00]10 <1> setopt [internalflags2], dif2_input_file 3438 0000BF55 31DB <1> xor bx, bx 3439 0000BF57 EB18 <1> jmp @FF 3440 <1> 3441 <1> @@: 3442 0000BF59 FF06[B80A] <1> inc word [input_file_handles.active] 3443 0000BF5D 8B1E[B80A] <1> mov bx, word [input_file_handles.active] 3444 0000BF61 D1E3 <1> shl bx, 1 3445 0000BF63 D1E3 <1> shl bx, 1 3446 0000BF65 D1E3 <1> shl bx, 1 ; to qword array index 3447 <1> %if INPUTFILEHANDLE_size != 8 3448 <1> %error Unexpected structure size 3449 <1> %endif 3450 0000BF67 8BBF[320A] <1> mov di, word [input_file_handles + bx - INPUTFILEHANDLE_size + ifhFlags] 3451 0000BF6B 81E700F0 <1> and di, ifhfTestReserved1 | ifhfTestReserved2 | ifhfQuietInput | ifhfQuietOutput 3453 0000BF6F 09FE <1> or si, di 3454 <1> @@: 3455 <1> 3456 0000BF71 8987[380A] <1> mov word [input_file_handles + bx + ifhHandle], ax 3457 0000BF75 89B7[3A0A] <1> mov word [input_file_handles + bx + ifhFlags], si 3458 0000BF79 8997[3C0A] <1> mov word [input_file_handles + bx + ifhParentSeek], dx 3459 0000BF7D 898F[3E0A] <1> mov word [input_file_handles + bx + ifhParentSeek + 2], cx 3460 <1> 3461 0000BF81 8026[CF00]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 3462 0000BF86 89EE <1> mov si, bp 3463 0000BF88 85F6 <1> test si, si 3464 0000BF8A 7403E99701 <1> jnz cmd_goto.yy_entry 3465 <1> 3466 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 3467 0000BF8F F606[CF00]08 <1> testopt [internalflags3], dif3_in_if 3468 0000BF94 7403E917C6 <1> jnz if_exists_found_open 3469 <1> %endif 3470 0000BF99 C3 <1> retn 3471 <1> %endif 3472 <1> %endif 3473 <1> 3474 <1> 3475 <1> ; INP: word [bufnext], word [bufend] 3476 <1> ; CHG: - 3477 <1> ; 3478 <1> ; Note: When reading from a file, we buffer some of the input 3479 <1> ; in line_in. When switching to a non-file, or starting 3480 <1> ; to read from another file, we have to reset the seek 3481 <1> ; position of the (prior) file to avoid losing the data. 3482 <1> ; This cropped up during yy development, but actually 3483 <1> ; affects serial and InDOS input, too. Therefore, 3484 <1> ; this function is not below the conditional for yy. 3485 <1> yy_reset_buf: 3486 0000BF9A 51 <1> push cx 3487 <1> %if _NEWFULLHANDLING 3488 0000BF9B B9[0300] <1> mov cx, line_in + 3 3489 <1> %else 3490 <1> mov cx, line_in + 2 3491 <1> %endif 3492 0000BF9E 870E[320B] <1> xchg cx, word [bufnext] 3493 0000BFA2 F7D9 <1> neg cx 3494 0000BFA4 030E[340B] <1> add cx, word [bufend] ; cx = how much remaining in buffer 3495 <1> %if _NEWFULLHANDLING 3496 0000BFA8 C706[340B][0300] <1> mov word [bufend], line_in + 3 3497 <1> %else 3498 <1> mov word [bufend], line_in + 2 3499 <1> %endif 3500 <1> 3501 0000BFAE F606[CA00]40 <1> testopt [internalflags2], dif2_did_getline_file 3502 0000BFB3 7469 <1> jz .not_used 3503 <1> 3504 0000BFB5 50 <1> push ax 3505 0000BFB6 52 <1> push dx 3506 0000BFB7 53 <1> push bx 3507 0000BFB8 89CA <1> mov dx, cx 3508 0000BFBA 31C9 <1> xor cx, cx 3509 0000BFBC F7DA <1> neg dx ; dx = minus how much remaining 3510 0000BFBE 7456 <1> jz .done ; if zero, do not seek at all --> 3511 0000BFC0 49 <1> dec cx ; sign extension into cx:dx 3512 <1> 3513 0000BFC1 F606[CF00]01 <1> testopt [internalflags3], dif3_input_re 3514 0000BFC6 7406 <1> jz @F 3515 0000BFC8 0116[140A] <1> add word [re_buffer.position], dx 3516 0000BFCC EB48 <1> jmp .done 3517 <1> @@: 3518 <1> 3519 <1> %if _INPUT_FILE_BOOT 3520 0000BFCE F606[CB00]02 <1> testopt [internalflags2], dif2_input_file_boot 3521 0000BFD3 741E <1> jz @F 3522 0000BFD5 F606[CF00]30 <1> testopt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 3523 0000BFDA 7412 <1> jz .do_boot_seek 3524 <1> 3525 0000BFDC FF36[308F] <1> push word [load_input_file.active] 3526 0000BFE0 8F06[C80A] <1> pop word [boot_remember_seek_handle] 3527 0000BFE4 890E[C60A] <1> mov word [boot_remember_seek_offset + 2], cx 3528 0000BFE8 8916[C40A] <1> mov word [boot_remember_seek_offset], dx 3529 0000BFEC EB28 <1> jmp .done 3530 <1> 3531 <1> .do_boot_seek: 3532 0000BFEE E81BB6 <1> call yy_boot_seek_current 3533 0000BFF1 EB23 <1> jmp .done 3534 <1> @@: 3535 <1> %endif 3536 <1> 3537 <1> %if _INPUT_FILE_HANDLES 3538 0000BFF3 F606[CA00]10 <1> testopt [internalflags2], dif2_input_file 3539 0000BFF8 7407 <1> jz @F ; if not input file --> 3540 0000BFFA 57 <1> push di 3541 0000BFFB E832F4 <1> call yy_get_handle ; bx = handle 3542 0000BFFE 5F <1> pop di 3543 0000BFFF EB0F <1> jmp .filehandle 3544 <1> @@: 3545 <1> %endif 3546 <1> 3547 0000C001 F606[CD00]01 <1> testopt [internalflags3], dif3_input_cmdline 3548 0000C006 7406 <1> jz @F 3549 0000C008 0116[1002] <1> add word [cmdline_buffer.position], dx 3550 0000C00C EB08 <1> jmp .done 3551 <1> @@: 3552 <1> 3553 0000C00E 31DB <1> xor bx, bx ; bx = handle (0 is STDIN) 3554 <1> .filehandle: 3555 0000C010 B80142 <1> mov ax, 4201h ; lseek, from current file position 3556 0000C013 E80A00 <1> call handle_seek_or_remember 3557 <1> 3558 <1> .done: 3559 0000C016 5B <1> pop bx 3560 0000C017 5A <1> pop dx 3561 0000C018 58 <1> pop ax 3562 <1> 3563 0000C019 8026[CA00]BF <1> clropt [internalflags2], dif2_did_getline_file 3564 <1> 3565 <1> .not_used: 3566 0000C01E 59 <1> pop cx 3567 0000C01F C3 <1> retn 3568 <1> 3569 <1> 3570 <1> handle_seek_or_remember: 3571 0000C020 E87ADB <1> call InDos 3572 0000C023 7411 <1> jz @F 3573 <1> 3574 0000C025 A3[BC0A] <1> mov word [indos_remember_seek_function], ax 3575 0000C028 891E[BE0A] <1> mov word [indos_remember_seek_handle], bx 3576 0000C02C 890E[C20A] <1> mov word [indos_remember_seek_offset + 2], cx 3577 0000C030 8916[C00A] <1> mov word [indos_remember_seek_offset], dx 3578 0000C034 EB02 <1> jmp .done 3579 <1> 3580 <1> @@: 3581 <1> doscall ; call DOS 2334 0000C036 CD21 <2> int 21h 3582 <1> .done: 3583 0000C038 C3 <1> retn 3584 <1> 3585 <1> 3586 <1> yy_reset_buf_and_seek_start: 3587 0000C039 51 <1> push cx 3588 0000C03A 50 <1> push ax 3589 0000C03B 52 <1> push dx 3590 0000C03C 53 <1> push bx 3591 <1> %if _NEWFULLHANDLING 3592 0000C03D B8[0300] <1> mov ax, line_in + 3 3593 <1> %else 3594 <1> mov ax, line_in + 2 3595 <1> %endif 3596 0000C040 A3[320B] <1> mov word [bufnext], ax 3597 0000C043 A3[340B] <1> mov word [bufend], ax 3598 <1> 3599 0000C046 31D2 <1> xor dx, dx 3600 0000C048 31C9 <1> xor cx, cx 3601 <1> 3602 0000C04A F606[CF00]01 <1> testopt [internalflags3], dif3_input_re 3603 0000C04F 7408 <1> jz @F 3604 0000C051 C706[140A][1402] <1> mov word [re_buffer.position], re_buffer 3605 0000C057 EB37 <1> jmp .done 3606 <1> @@: 3607 <1> 3608 <1> %if _INPUT_FILE_BOOT 3609 0000C059 F606[CB00]02 <1> testopt [internalflags2], dif2_input_file_boot 3610 0000C05E 7408 <1> jz @F 3611 0000C060 E86900 <1> call yy_boot_clear_remember_seek 3612 0000C063 E8F0B7 <1> call yy_boot_seek_start 3613 0000C066 EB28 <1> jmp .done 3614 <1> @@: 3615 <1> %endif 3616 <1> 3617 <1> %if _INPUT_FILE_HANDLES 3618 0000C068 F606[CA00]10 <1> testopt [internalflags2], dif2_input_file 3619 0000C06D 7407 <1> jz @F ; if not input file --> 3620 0000C06F 57 <1> push di 3621 0000C070 E8BDF3 <1> call yy_get_handle ; bx = handle 3622 0000C073 5F <1> pop di 3623 0000C074 EB11 <1> jmp .filehandle 3624 <1> @@: 3625 <1> %endif 3626 <1> 3627 0000C076 F606[CD00]01 <1> testopt [internalflags3], dif3_input_cmdline 3628 0000C07B 7408 <1> jz @F 3629 0000C07D C706[1002][1001] <1> mov word [cmdline_buffer.position], cmdline_buffer 3630 0000C083 EB0B <1> jmp .done 3631 <1> @@: 3632 <1> 3633 0000C085 31DB <1> xor bx, bx ; bx = handle (0 is STDIN) 3634 <1> 3635 <1> .filehandle: 3636 0000C087 E80B00 <1> call yy_clear_remember_seek 3637 0000C08A B80042 <1> mov ax, 4200h ; seek from start 3638 0000C08D E890FF <1> call handle_seek_or_remember 3639 <1> .done: 3640 0000C090 5B <1> pop bx 3641 0000C091 5A <1> pop dx 3642 0000C092 58 <1> pop ax 3643 0000C093 59 <1> pop cx 3644 0000C094 C3 <1> retn 3645 <1> 3646 <1> 3647 <1> yy_clear_remember_seek: 3648 0000C095 391E[BE0A] <1> cmp word [indos_remember_seek_handle], bx 3649 0000C099 7515 <1> jne .ret 3650 <1> .clear: 3651 0000C09B C706[BC0A]0142 <1> mov word [indos_remember_seek_function], 4201h 3652 0000C0A1 830E[BE0A]FF <1> or word [indos_remember_seek_handle], -1 3653 0000C0A6 8326[C20A]00 <1> and word [indos_remember_seek_offset + 2], 0 3654 0000C0AB 8326[C00A]00 <1> and word [indos_remember_seek_offset], 0 3655 <1> .ret: 3656 0000C0B0 C3 <1> retn 3657 <1> 3658 <1> 3659 <1> yy_remember_seek: 3660 0000C0B1 391E[BE0A] <1> cmp word [indos_remember_seek_handle], bx 3661 0000C0B5 75F9 <1> jne yy_clear_remember_seek.ret 3662 <1> 3663 0000C0B7 50 <1> push ax 3664 0000C0B8 51 <1> push cx 3665 0000C0B9 52 <1> push dx 3666 0000C0BA 8B0E[C20A] <1> mov cx, word [indos_remember_seek_offset + 2] 3667 0000C0BE 8B16[C00A] <1> mov dx, word [indos_remember_seek_offset] 3668 0000C0C2 A1[BC0A] <1> mov ax, word [indos_remember_seek_function] 3669 <1> doscall ; call DOS 2334 0000C0C5 CD21 <2> int 21h 3670 0000C0C7 5A <1> pop dx 3671 0000C0C8 59 <1> pop cx 3672 0000C0C9 58 <1> pop ax 3673 0000C0CA EBCF <1> jmp yy_clear_remember_seek.clear 3674 <1> 3675 <1> 3676 <1> %if _INPUT_FILE_BOOT 3677 <1> yy_boot_clear_remember_seek: 3678 0000C0CC 50 <1> push ax 3679 0000C0CD A1[308F] <1> mov ax, word [load_input_file.active] 3680 0000C0D0 3906[C80A] <1> cmp word [boot_remember_seek_handle], ax 3681 0000C0D4 750F <1> jne .ret_pop_ax 3682 <1> .clear: 3683 0000C0D6 830E[C80A]FF <1> or word [boot_remember_seek_handle], -1 3684 0000C0DB 8326[C60A]00 <1> and word [boot_remember_seek_offset + 2], 0 3685 0000C0E0 8326[C40A]00 <1> and word [boot_remember_seek_offset], 0 3686 <1> .ret_pop_ax: 3687 0000C0E5 58 <1> pop ax 3688 0000C0E6 C3 <1> retn 3689 <1> 3690 <1> 3691 <1> yy_boot_remember_seek: 3692 0000C0E7 50 <1> push ax 3693 0000C0E8 A1[308F] <1> mov ax, word [load_input_file.active] 3694 0000C0EB 3906[C80A] <1> cmp word [boot_remember_seek_handle], ax 3695 0000C0EF 75F4 <1> jne yy_boot_clear_remember_seek.ret_pop_ax 3696 <1> 3697 0000C0F1 53 <1> push bx 3698 0000C0F2 51 <1> push cx 3699 0000C0F3 52 <1> push dx 3700 0000C0F4 8B0E[C60A] <1> mov cx, word [boot_remember_seek_offset + 2] 3701 0000C0F8 8B16[C40A] <1> mov dx, word [boot_remember_seek_offset] 3702 0000C0FC E80DB5 <1> call yy_boot_seek_current 3703 0000C0FF 5A <1> pop dx 3704 0000C100 59 <1> pop cx 3705 0000C101 5B <1> pop bx 3706 0000C102 EBD2 <1> jmp yy_boot_clear_remember_seek.clear 3707 <1> %endif 3708 <1> 3709 <1> 3710 <1> cmd_goto: 3711 0000C104 E89BEC <1> call skipwhite 3712 0000C107 3C3A <1> cmp al, ':' 3713 0000C109 7503 <1> jne @F 3714 0000C10B E894EC <1> call skipwhite 3715 <1> @@: 3716 <1> 3717 0000C10E E85AF6 <1> call getline_is_input_file? 3718 0000C111 7312 <1> jnc @F 3719 0000C113 BA[4666] <1> mov dx, msg.goto_not_file 3720 0000C116 B80003 <1> mov ax, 0300h 3721 0000C119 E8E7D7 <1> call setrc 3722 <1> .error: 3723 0000C11C B8FF03 <1> mov ax, 03FFh 3724 0000C11F E8E1D7 <1> call setrc 3725 0000C122 E9D5F0 <1> jmp putsz_error 3726 <1> 3727 <1> @@: 3728 0000C125 4E <1> dec si 3729 <1> .yy_entry: ; si -> destination label 3730 0000C126 BA[3E66] <1> mov dx, msg.sof 3731 0000C129 E8C2EB <1> call isstring? 3732 0000C12C 751B <1> jne @F 3733 0000C12E E871EC <1> call skipwhite 3734 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 3735 0000C131 8936[000C] <1> mov word [if_exists_then_address], si 3736 <1> %endif 3737 0000C135 E820EC <1> call chkeol_or_then 3738 0000C138 E8D700 <1> call resetrc 3739 0000C13B E8FBFE <1> call yy_reset_buf_and_seek_start 3740 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 3741 0000C13E F606[CF00]08 <1> testopt [internalflags3], dif3_in_if 3742 0000C143 7403E968C4 <1> jnz if_exists_found_open 3743 <1> %endif 3744 0000C148 C3 <1> retn 3745 <1> 3746 <1> @@: 3747 0000C149 BA[4266] <1> mov dx, msg.eof 3748 0000C14C E89FEB <1> call isstring? 3749 0000C14F 751B <1> jne @F 3750 0000C151 E84EEC <1> call skipwhite 3751 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 3752 0000C154 8936[000C] <1> mov word [if_exists_then_address], si 3753 <1> %endif 3754 0000C158 E8FDEB <1> call chkeol_or_then 3755 0000C15B E8B400 <1> call resetrc 3756 0000C15E E843F6 <1> call getline_close_file 3757 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 3758 0000C161 F606[CF00]08 <1> testopt [internalflags3], dif3_in_if 3759 0000C166 7403E94AC4 <1> jnz if_exists_found_closed 3760 <1> %endif 3761 0000C16B C3 <1> retn 3762 <1> 3763 <1> @@: 3764 0000C16C 89F3 <1> mov bx, si 3765 0000C16E B9FFFF <1> mov cx, -1 3766 <1> .loop: 3767 0000C171 41 <1> inc cx 3768 0000C172 AC <1> lodsb 3769 0000C173 3C20 <1> cmp al, 32 3770 0000C175 7409 <1> je .end 3771 0000C177 3C09 <1> cmp al, 9 3772 0000C179 7405 <1> je .end 3773 0000C17B E8CFEB <1> call iseol? 3774 0000C17E 75F1 <1> jne .loop 3775 <1> .end: 3776 0000C180 C644FF00 <1> mov byte [si - 1], 0 ; terminate 3777 0000C184 E81CEC <1> call skipwh0 3778 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 3779 0000C187 8936[000C] <1> mov word [if_exists_then_address], si 3780 <1> %endif 3781 0000C18B E8CAEB <1> call chkeol_or_then 3782 0000C18E E376 <1> jcxz .empty 3783 0000C190 41 <1> inc cx ; space for zero terminator 3784 0000C191 41 <1> inc cx ; round up 3785 0000C192 80E1FE <1> and cl, ~1 ; align to word 3786 0000C195 89E5 <1> mov bp, sp 3787 0000C197 29CC <1> sub sp, cx ; allocate stack space 3788 0000C199 89DE <1> mov si, bx ; -> label in line_in 3789 0000C19B 89E7 <1> mov di, sp ; -> buffer on stack 3790 0000C19D 57 <1> push di 3791 <1> @@: 3792 0000C19E AC <1> lodsb 3793 0000C19F E818C0 <1> call uppercase ; normalise the name in buffer 3794 0000C1A2 AA <1> stosb 3795 0000C1A3 E2F9 <1> loop @B ; copy all or all+1 3796 <1> 3797 0000C1A5 E891FE <1> call yy_reset_buf_and_seek_start 3798 <1> 3799 <1> .next_line: 3800 0000C1A8 800E[CD00]88 <1> setopt [internalflags3], dif3_quiet_input_single | dif3_return_eof 3801 0000C1AD 31C9 <1> xor cx, cx 3802 0000C1AF E8B0F3 <1> call getline.use_dif3_flags 3803 0000C1B2 7228 <1> jc .notfound 3804 0000C1B4 89F3 <1> mov bx, si 3805 0000C1B6 3C3A <1> cmp al, ':' 3806 0000C1B8 75EE <1> jne .next_line 3807 0000C1BA E8E5EB <1> call skipwhite 3808 0000C1BD 5A <1> pop dx 3809 0000C1BE 52 <1> push dx 3810 0000C1BF 4E <1> dec si 3811 0000C1C0 E82BEB <1> call isstring? 3812 0000C1C3 75E3 <1> jne .next_line 3813 0000C1C5 8D77FF <1> lea si, [bx - 1] 3814 0000C1C8 AC <1> lodsb 3815 0000C1C9 89EC <1> mov sp, bp 3816 0000C1CB E84400 <1> call resetrc 3817 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 3818 0000C1CE F606[CF00]08 <1> testopt [internalflags3], dif3_in_if 3819 0000C1D3 7403E9D8C3 <1> jnz if_exists_found_open 3820 <1> %endif 3821 0000C1D8 5A <1> pop dx ; return address to cmd3 3822 0000C1D9 E9BF41 <1> jmp cmd3_notblank 3823 <1> 3824 <1> .notfound: 3825 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 3826 0000C1DC F606[CF00]08 <1> testopt [internalflags3], dif3_in_if 3827 0000C1E1 751B <1> jnz @F 3828 <1> %endif 3829 0000C1E3 B80103 <1> mov ax, 0301h 3830 0000C1E6 E81AD7 <1> call setrc 3831 0000C1E9 BA[AE66] <1> mov dx, msg.goto_not_found.1 3832 0000C1EC E80BF0 <1> call putsz_error 3833 0000C1EF 5A <1> pop dx 3834 0000C1F0 E807F0 <1> call putsz_error 3835 0000C1F3 BA[CE66] <1> mov dx, msg.goto_not_found.2 3836 0000C1F6 E801F0 <1> call putsz_error 3837 0000C1F9 89EC <1> mov sp, bp 3838 0000C1FB E9A6F5 <1> jmp getline_close_file 3839 <1> 3840 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 3841 <1> @@: 3842 0000C1FE 89EC <1> mov sp, bp 3843 0000C200 E8A1F5 <1> call getline_close_file 3844 0000C203 E99DC3 <1> jmp if_exists_not_found 3845 <1> %endif 3846 <1> 3847 <1> .empty: 3848 0000C206 B80203 <1> mov ax, 0302h 3849 0000C209 E8F7D6 <1> call setrc 3850 0000C20C BA[8566] <1> mov dx, msg.goto_empty 3851 0000C20F E90AFF <1> jmp .error 3852 <1> 3853 <1> 3854 <1> resetrc: 3855 0000C212 FF36[380B] <1> push word [priorrc] 3856 0000C216 8F06[360B] <1> pop word [rc] 3857 0000C21A C3 <1> retn 3858 <1> 3859 <1> 3860 <1> %include "serialp.asm" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Serial port handling code 5 <2> 6 <2> 2019 by C. Masloch 7 <2> based on http://www.sci.muni.cz/docs/pc/serport.txt The Serial Port rel. 14 8 <2> 9 <2> Usage of the works is permitted provided that this 10 <2> instrument is retained with the works, so that any entity 11 <2> that uses the works is notified of this instrument. 12 <2> 13 <2> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 14 <2> 15 <2> %endif 16 <2> 17 <2> 18 <2> usesection lDEBUG_DATA_ENTRY 19 <2> 20 000096AB CB <2> iisphwreset serial_interrupt_handler 21 <2> 22 <2> align 2, db 0 23 000096AC EB10000000004B4280- <2> iispentry serial_interrupt_handler, 80h, serial_interrupt_handler 23 000096B5 EBF400 <2> 24 000096BE 2EF606[E50B]01 <2> testopt [cs:serial_flags], sf_init_done 25 000096C4 7505 <2> jnz @F 26 000096C6 2EFF2E[AE96] <2> jmp far [cs:.next] 27 <2> @@: 28 000096CB 50 <2> push ax 29 000096CC 51 <2> push cx 30 000096CD 52 <2> push dx ; first save the regs we need to change 31 000096CE 1E <2> push ds 32 000096CF 56 <2> push si 33 <2> 34 000096D0 0E <2> push cs 35 000096D1 1F <2> pop ds 36 000096D2 B020 <2> mov al, 20h ; acknowledge interrupt 37 000096D4 803E[CB08]00 <2> cmp byte [serial_use_irqmask + 1], 0 38 000096D9 7402 <2> je @F 39 000096DB E6A0 <2> out 0A0h, al ; to secondary PIC 40 <2> @@: 41 000096DD E620 <2> out 20h, al ; to primary PIC 42 000096DF FC <2> cld 43 <2> ih_continue: 44 000096E0 8B16[C608] <2> mov dx, [baseport] 45 000096E4 42 <2> inc dx 46 000096E5 42 <2> inc dx ; (base + 2) write FCR, read IIR 47 <2> %if _USE_TX_FIFO 48 000096E6 A0[C108] <2> mov al, byte [serial_fcr_setting] 49 000096E9 24F9 <2> and al, ~ 0000_0110b 50 000096EB EE <2> out dx, al ; (write FCR) configure FIFOs 51 000096EC 31C0 <2> xor ax, ax 52 <2> %else 53 <2> xor ax, ax 54 <2> out dx, al ; (write FCR) configure FIFOs 55 <2> nop 56 <2> %endif 57 000096EE EC <2> in al, dx ; (read IIR) get interrupt cause 58 000096EF A801 <2> test al, 1 ; did the UART generate the int? 59 000096F1 750C <2> jnz ih_sep ; no, then it's somebody else's problem 60 000096F3 2406 <2> and al, 6 ; mask bits not needed 61 000096F5 89C6 <2> mov si, ax ; make a pointer out of it 62 000096F7 4A <2> dec dx 63 000096F8 4A <2> dec dx ; = base 64 000096F9 FF94[0697] <2> call near word [serial_interrupt_table + si] ; serve this int 65 000096FD EBE1 <2> jmp ih_continue ; and look for more things to be done 66 <2> ih_sep: 67 000096FF 5E <2> pop si 68 00009700 1F <2> pop ds 69 00009701 5A <2> pop dx ; restore regs 70 00009702 59 <2> pop cx 71 00009703 58 <2> pop ax 72 00009704 CF <2> iret 73 <2> 74 00009705 00 <2> align 2, db 0 75 00009706 [0E97][1397][5B97]- <2> serial_interrupt_table: dw int_modem,int_tx,int_rx,int_status 75 0000970C [AE97] <2> 76 <2> 77 <2> 78 <2> int_modem: 79 <2> ; just clear modem status, we are not interested in it 80 0000970E 83C206 <2> add dx, 6 81 00009711 EC <2> in al, dx ; read MSR 82 00009712 C3 <2> retn 83 <2> 84 <2> 85 <2> int_tx: 86 00009713 8B16[C608] <2> mov dx, [baseport] 87 00009717 8B36[D208] <2> mov si, word [txtail] 88 <2> 89 0000971B 52 <2> push dx 90 0000971C 83C205 <2> add dx, 5 91 0000971F EC <2> in al, dx ; (base + 5) read LSR 92 00009720 5A <2> pop dx 93 00009721 A820 <2> test al, 20h ; Transmitter Holding Register Empty ? 94 00009723 7421 <2> jz itx_setup_int ; no, it was a spurious interrupt --> 95 <2> ; This conditional detects the condition specified in 96 <2> ; the section "Known problems with several chips": 97 <2> ; When a 1 is written to the bit 1 (Tx int enab) in the 98 <2> ; IER, a Tx interrupt is generated. This is an erroneous 99 <2> ; interrupt if the THRE bit is not set. [So don't set 100 <2> ; this bit as long as the THRE bit isn't set. CB] 101 <2> 102 <2> ; check if there's something to be sent 103 <2> %if _USE_TX_FIFO 104 00009725 B90100 <2> mov cx, 1 105 00009728 F606[E50B]08 <2> test byte [serial_flags], sf_built_in_fifo 106 0000972D 7404 <2> jz @F 107 0000972F 8A0E[E40B] <2> mov cl, byte [serial_fifo_size] 108 <2> @@: 109 <2> %endif 110 <2> itx_more: 111 00009733 3B36[D008] <2> cmp si, word [txhead] 112 00009737 7419 <2> je itx_nothing 113 00009739 AC <2> lodsb 114 0000973A EE <2> out dx, al ; write it to the THR 115 <2> ; check for wrap-around in our fifo 116 <2> tx_checkwrap 98 0000973B 81FE[E009] <3> cmp si, txfifo+_TXFIFOSIZE 99 0000973F 7203 <3> jb %%tx_nowrap 100 00009741 BE[6009] <3> mov si, txfifo 101 <3> %%tx_nowrap: 117 <2> %if _USE_TX_FIFO 118 <2> ; send as much bytes as the chip can take when available 119 00009744 E2ED <2> loop itx_more 120 <2> %endif 121 <2> itx_setup_int: 122 00009746 3B36[D008] <2> cmp si, word [txhead] 123 0000974A 7406 <2> je itx_nothing 124 0000974C 42 <2> inc dx 125 0000974D B003 <2> mov al, 0000_0011b 126 0000974F EE <2> out dx, al ; write to IER 127 00009750 EB04 <2> jmp itx_dontstop 128 <2> itx_nothing: 129 <2> ; no more data in the fifo, so inhibit TX interrupts 130 00009752 42 <2> inc dx 131 00009753 B001 <2> mov al, 0000_0001b 132 00009755 EE <2> out dx, al ; write to IER 133 <2> itx_dontstop: 134 00009756 8936[D208] <2> mov word [txtail], si 135 0000975A C3 <2> retn 136 <2> 137 <2> 138 <2> int_rx: 139 0000975B 8B36[CC08] <2> mov si, word [rxhead] 140 <2> irx_more: 141 0000975F 8B16[C608] <2> mov dx, [baseport] 142 00009763 EC <2> in al, dx ; read from RBR 143 00009764 3C03 <2> cmp al, 3 144 00009766 7511 <2> jne @FF 145 00009768 F606[E50B]02 <2> testopt [serial_flags], sf_ctrl_c 146 0000976D 7405 <2> jz @F 147 0000976F 800E[E50B]04 <2> setopt [serial_flags], sf_double_ctrl_c 148 <2> @@: 149 00009774 800E[E50B]02 <2> setopt [serial_flags], sf_ctrl_c 150 <2> @@: 151 00009779 8804 <2> mov byte [si], al 152 0000977B 89F0 <2> mov ax, si 153 0000977D 46 <2> inc si 154 <2> ; check for wrap-around 155 <2> rx_checkwrap 91 0000977E 81FE[6009] <3> cmp si, rxfifo+_RXFIFOSIZE 92 00009782 7203 <3> jb %%rx_nowrap 93 00009784 BE[E008] <3> mov si, rxfifo 94 <3> %%rx_nowrap: 156 00009787 3936[CE08] <2> cmp word [rxtail], si 157 0000978B 7415 <2> je @FF 158 <2> ; see if there are more bytes to be read 159 0000978D 83C205 <2> add dx, 5 160 00009790 EC <2> in al, dx ; read LSR 161 00009791 A801 <2> test al, 1 ; Data Available ? 162 00009793 75CA <2> jnz irx_more 163 <2> .end: 164 00009795 8936[CC08] <2> mov word [rxhead], si 165 <2> ; test al, 20h ; Transmitter Holding Register Empty ? 166 <2> ; jnz int_tx ; yes, do transmit next --> 167 <2> ; Sometimes when sending and receiving at the 168 <2> ; same time, TX ints get lost. This is a cure. 169 <2> ; retn 170 00009799 E977FF <2> jmp int_tx ; (this checks for THRE) 171 <2> 172 <2> @@: 173 0000979C 8B16[C608] <2> mov dx, [baseport] 174 000097A0 EC <2> in al, dx ; read RBR (discard) 175 000097A1 A9 <2> db __TEST_IMM16 ; (skip mov) 176 <2> @@: 177 000097A2 89C6 <2> mov si, ax 178 000097A4 83C205 <2> add dx, 5 179 000097A7 EC <2> in al, dx ; read LSR 180 000097A8 A801 <2> test al, 1 ; Data Available ? 181 000097AA 75F0 <2> jnz @BB 182 000097AC EBE7 <2> jmp .end 183 <2> 184 <2> 185 <2> int_status: 186 <2> ; just clear the status ("this trivial task is left as an exercise 187 <2> ; to the student") 188 000097AE 83C205 <2> add dx, 5 189 000097B1 EC <2> in al, dx ; read LSR 190 000097B2 C3 <2> retn 191 <2> 192 <2> 193 <2> usesection lDEBUG_CODE 194 <2> 195 <2> ; OUT: ZR if no new character in buffer 196 <2> ; NZ if new character read, 197 <2> ; al = character 198 <2> ; STT: ds = debugger segment 199 <2> serial_receive_char: 200 0000C21B 56 <2> push si 201 <2> ; see if there are bytes to be read from the fifo 202 0000C21C 8B36[CE08] <2> mov si, word [rxtail] 203 <2> 204 0000C220 3B36[CC08] <2> cmp si, word [rxhead] 205 0000C224 7412 <2> je .nodata 206 0000C226 AC <2> lodsb 207 <2> %if _ECHO_RX_TO_TX 208 <2> %if _RX_TO_TX_ADD_LF 209 <2> call serial_send_char_add_lf 210 <2> %else 211 <2> call serial_send_char 212 <2> %endif 213 <2> %endif 214 <2> ; check for wrap-around 215 <2> rx_checkwrap 91 0000C227 81FE[6009] <3> cmp si, rxfifo+_RXFIFOSIZE 92 0000C22B 7203 <3> jb %%rx_nowrap 93 0000C22D BE[E008] <3> mov si, rxfifo 94 <3> %%rx_nowrap: 216 0000C230 8936[CE08] <2> mov word [rxtail], si 217 0000C234 85F6 <2> test si, si ; (NZ) 218 0000C236 EB02 <2> jmp .return 219 <2> 220 <2> .nodata: 221 0000C238 31C0 <2> xor ax, ax ; (ZR) 222 <2> .return: 223 0000C23A 5E <2> pop si 224 0000C23B C3 <2> retn 225 <2> 226 <2> 227 <2> ; OUT: ZR if no new character in buffer 228 <2> ; NZ if new character available, 229 <2> ; al = character 230 <2> ; STT: ds = debugger segment 231 <2> serial_check_receive_char: 232 0000C23C 56 <2> push si 233 <2> ; see if there are bytes to be read from the fifo 234 0000C23D 8B36[CE08] <2> mov si, word [rxtail] 235 <2> 236 0000C241 3B36[CC08] <2> cmp si, word [rxhead] 237 0000C245 7405 <2> je .nodata 238 0000C247 AC <2> lodsb 239 0000C248 85F6 <2> test si, si ; (NZ) 240 0000C24A EB02 <2> jmp .return 241 <2> 242 <2> .nodata: 243 0000C24C 31C0 <2> xor ax, ax ; (ZR) 244 <2> .return: 245 0000C24E 5E <2> pop si 246 0000C24F C3 <2> retn 247 <2> 248 <2> 249 <2> ; OUT: NC if successful 250 <2> ; CY if handler hooked in different interrrupt 251 <2> ; and couldn't unhook 252 <2> serial_install_interrupt_handler: 253 <2> ; install interrupt handler first 254 0000C250 A0[C208] <2> mov al, byte [serial_use_intnum] 255 0000C253 F606[D000]01 <2> testopt [internalflags4], dif4_int_serial_hooked 256 0000C258 740D <2> jz @F 257 0000C25A 3A06[120C] <2> cmp al, byte [serial_installed_intnum] 258 0000C25E 7418 <2> je .ret ; --> (NC) 259 0000C260 50 <2> push ax 260 0000C261 E84A01 <2> call serial_uninstall_interrupt_handler 261 0000C264 58 <2> pop ax 262 0000C265 7211 <2> jc .ret ; --> (CY) 263 <2> @@: 264 0000C267 A2[120C] <2> mov byte [serial_installed_intnum], al 265 0000C26A BE[AC96] <2> mov si, serial_interrupt_handler 266 0000C26D E8D001 <2> call install_86m_interrupt_handler 267 0000C270 800E[D000]01 <2> setopt [internalflags4], dif4_int_serial_hooked 268 0000C275 E8CE03 <2> call update_inttab_optional 269 <2> ; (NC) 270 <2> .ret: 271 0000C278 C3 <2> retn 272 <2> 273 <2> 274 <2> %if 0 275 <2> 276 <2> If you do the following: 277 <2> 278 <2> r dspvi FF 279 <2> r dco or= 4000 280 <2> (wait for KEEP prompt to fail) 281 <2> r dspvi 0B 282 <2> r dco or= 4000 283 <2> (try to reply to the KEEP prompt) 284 <2> 285 <2> In dosemu2 the default interrupt handler apparently 286 <2> doesn't send an EOI to the PIC and thus the interrupts 287 <2> get stuck when prompting with the correct handler. 288 <2> Therefore, we should send an EOI to the PIC just in case. 289 <2> 290 <2> %endif 291 <2> 292 <2> ; INP: word [serial_use_irqmask] 293 <2> ; CHG: ax 294 <2> serial_eoi: 295 0000C279 B020 <2> mov al, 20h ; acknowledge interrupt 296 0000C27B 803E[CB08]00 <2> cmp byte [serial_use_irqmask + 1], 0 297 0000C280 7402 <2> je @F 298 0000C282 E6A0 <2> out 0A0h, al ; to secondary PIC 299 <2> @@: 300 0000C284 E620 <2> out 20h, al ; to primary PIC 301 0000C286 C3 <2> retn 302 <2> 303 <2> 304 <2> serial_clear_fifos: 305 <2> ; clear fifos (not those in the 16550A, but ours) 306 0000C287 B8[E008] <2> mov ax, rxfifo 307 0000C28A A3[CC08] <2> mov word [rxhead], ax 308 0000C28D A3[CE08] <2> mov word [rxtail], ax 309 0000C290 B8[6009] <2> mov ax, txfifo 310 0000C293 A3[D008] <2> mov word [txhead], ax 311 0000C296 A3[D208] <2> mov word [txtail], ax 312 0000C299 C3 <2> retn 313 <2> 314 <2> 315 <2> numdef SERIAL_DL_WORD, 0 316 <2> 317 <2> serial_init_UART: 318 0000C29A E8DCFF <2> call serial_eoi 319 <2> ; initialize the UART 320 0000C29D 8B16[C608] <2> mov dx, [baseport] 321 0000C2A1 83C203 <2> add dx, 3 ; (base + 3) read/write LCR 322 0000C2A4 EC <2> in al, dx ; read LCR 323 0000C2A5 A2[BF08] <2> mov byte [serial_save_lcr], al 324 0000C2A8 B080 <2> mov al, 80h ; DLAB = 1 325 0000C2AA EE <2> out dx, al ; write LCR, make DL register accessible 326 0000C2AB 52 <2> push dx 327 0000C2AC 8B16[C608] <2> mov dx, [baseport] ; (base) 328 <2> %if _SERIAL_DL_WORD 329 <2> in ax, dx ; read bps rate divisor (DL) 330 <2> mov word [serial_save_dl], ax 331 <2> mov ax, word [serial_use_dl] 332 <2> out dx, ax ; write bps rate divisor (DL) 333 <2> %else 334 0000C2B0 EC <2> in al, dx ; read bps rate divisor low byte (DL) 335 0000C2B1 42 <2> inc dx 336 0000C2B2 A2[BC08] <2> mov byte [serial_save_dl], al 337 0000C2B5 EC <2> in al, dx ; read bps rate divisor high byte (DL) 338 0000C2B6 A2[BD08] <2> mov byte [serial_save_dl + 1], al 339 0000C2B9 A0[C908] <2> mov al, byte [serial_use_dl + 1] 340 0000C2BC EE <2> out dx, al ; write bps rate divisor high byte (DL) 341 0000C2BD 4A <2> dec dx 342 0000C2BE A0[C808] <2> mov al, byte [serial_use_dl] 343 0000C2C1 EE <2> out dx, al ; write bps rate divisor low byte (DL) 344 <2> %endif 345 0000C2C2 5A <2> pop dx ; (base + 3) write LCR 346 0000C2C3 A0[C308] <2> mov al, byte [serial_use_params] 347 <2> ; DLAB = 0 and control parameters 348 0000C2C6 EE <2> out dx, al ; write parameters 349 <2> 350 <2> ; is it a 16550A? 351 0000C2C7 4A <2> dec dx ; (base + 2) write FCR, read IIR 352 <2> %if _USE_TX_FIFO 353 0000C2C8 B007 <2> mov al, 0000_0111b 354 0000C2CA 0A06[C408] <2> or al, byte [serial_use_fifo] 355 0000C2CE A2[C108] <2> mov byte [serial_fcr_setting], al 356 0000C2D1 EE <2> out dx, al ; (write FCR) try to clear and enable FIFOs 357 0000C2D2 90 <2> nop 358 0000C2D3 EC <2> in al, dx ; read IIR 359 0000C2D4 800E[E50B]08 <2> or byte [serial_flags], sf_built_in_fifo 360 <2> ; in case of built-in tx FIFO 361 0000C2D9 24C0 <2> and al, 1100_0000b ; mask of FIFO functional bits 362 0000C2DB 3CC0 <2> cmp al, 1100_0000b ; both bits set ? 363 0000C2DD 740B <2> je @F ; yes --> 364 0000C2DF 8026[E50B]F7 <2> and byte [serial_flags], ~ sf_built_in_fifo 365 <2> ; no built-in tx FIFO 366 0000C2E4 31C0 <2> xor ax, ax 367 0000C2E6 A2[C108] <2> mov byte [serial_fcr_setting], al 368 0000C2E9 EE <2> out dx, al ; (write FCR) disable the FIFOs 369 <2> @@: 370 <2> %else 371 <2> xor ax, ax 372 <2> out dx, al ; (write FCR) disable the FIFOs 373 <2> %endif 374 0000C2EA 4A <2> dec dx ; (base + 1) 375 0000C2EB EC <2> in al, dx ; read IER 376 0000C2EC A2[BE08] <2> mov byte [serial_save_ier], al 377 0000C2EF B001 <2> mov al, 0000_0001b ; allow RX interrupts 378 0000C2F1 EE <2> out dx, al ; write to IER 379 0000C2F2 4A <2> dec dx ; (base + 0) read RBR 380 0000C2F3 EC <2> in al, dx ; clear receiver 381 0000C2F4 83C205 <2> add dx, 5 ; (base + 5) read LSR 382 0000C2F7 EC <2> in al, dx ; clear line status 383 0000C2F8 42 <2> inc dx ; (base + 6) read MSR 384 0000C2F9 EC <2> in al, dx ; clear modem status 385 <2> ; free interrupt in the ICU 386 0000C2FA 8B0E[CA08] <2> mov cx, word [serial_use_irqmask] 387 0000C2FE F7D1 <2> not cx ; negated mask of bits to change 388 0000C300 31DB <2> xor bx, bx ; all bits clear (= IRQ ON) 389 0000C302 E81200 <2> call set_irq 390 0000C305 891E[BA08] <2> mov word [serial_save_irq_off], bx 391 0000C309 890E[B808] <2> mov word [serial_save_irq_mask], cx 392 <2> ; and enable ints from the UART 393 0000C30D 4A <2> dec dx 394 0000C30E 4A <2> dec dx ; (base + 4) 395 0000C30F EC <2> in al, dx ; read MCR 396 0000C310 A2[C008] <2> mov byte [serial_save_mcr], al 397 0000C313 B008 <2> mov al, 0000_1000b 398 0000C315 EE <2> out dx, al ; write MCR 399 0000C316 C3 <2> retn 400 <2> 401 <2> ; INP: cx = negated mask of bits to change 402 <2> ; (if bit is clear, modify corresponding IRQ) 403 <2> ; bx = mask of what to set bits to (0 = IRQ ON, 1 = IRQ OFF) 404 <2> ; OUT: bx = mask of bits previously set 405 <2> ; CHG: ax 406 <2> set_irq: 407 0000C317 52 <2> push dx 408 0000C318 BA0100 <2> mov dx, 1 409 <2> .loop: 410 0000C31B 85CA <2> test dx, cx 411 0000C31D 753E <2> jnz .next 412 0000C31F 84D2 <2> test dl, dl 413 0000C321 741E <2> jz .high 414 <2> 415 <2> .low: 416 0000C323 E421 <2> in al, 21h ; get PIC configuration 417 0000C325 50 <2> push ax 418 0000C326 F7D2 <2> not dx ; dx = mask of bits to keep 419 0000C328 20D0 <2> and al, dl ; mask to 0 the bit to set 420 0000C32A 53 <2> push bx 421 0000C32B F7D2 <2> not dx ; dx = mask of bits to change 422 0000C32D 20D3 <2> and bl, dl ; get bit state to change to 423 0000C32F 08D8 <2> or al, bl ; set this bit state 424 0000C331 E621 <2> out 21h, al ; configure the PIC 425 0000C333 5B <2> pop bx ; = saved states / still to set states 426 0000C334 F7D2 <2> not dx ; dx = mask of bits to keep 427 0000C336 58 <2> pop ax ; = prior config 428 0000C337 20D3 <2> and bl, dl ; clear bits to change 429 0000C339 F7D2 <2> not dx ; dx = mask of bits to change 430 0000C33B 20D0 <2> and al, dl ; separate out only bits to change 431 0000C33D 08C3 <2> or bl, al ; set in bx 432 0000C33F EB1C <2> jmp .next 433 <2> 434 <2> .high: 435 0000C341 E4A1 <2> in al, 0A1h ; get PIC configuration 436 0000C343 50 <2> push ax 437 0000C344 F7D2 <2> not dx ; dx = mask of bits to keep 438 0000C346 20F0 <2> and al, dh ; mask to 0 the bit to set 439 0000C348 53 <2> push bx 440 0000C349 F7D2 <2> not dx ; dx = mask of bits to change 441 0000C34B 20F7 <2> and bh, dh ; get bit state to change to 442 0000C34D 08F8 <2> or al, bh ; set this bit state 443 0000C34F E6A1 <2> out 0A1h, al ; configure the PIC 444 0000C351 5B <2> pop bx ; = saved states / still to set states 445 0000C352 F7D2 <2> not dx ; dx = mask of bits to keep 446 0000C354 58 <2> pop ax ; = prior config 447 0000C355 20F7 <2> and bh, dh ; clear bits to change 448 0000C357 F7D2 <2> not dx ; dx = mask of bits to change 449 0000C359 20F0 <2> and al, dh ; separate out only bits to change 450 0000C35B 08C7 <2> or bh, al ; set in bx 451 <2> 452 <2> .next: 453 0000C35D 01D2 <2> add dx, dx 454 0000C35F 75BA <2> jnz .loop 455 0000C361 5A <2> pop dx 456 0000C362 C3 <2> retn 457 <2> 458 <2> 459 <2> ; OUT: NC if successful 460 <2> ; CY if couldn't unhook 461 <2> serial_clean_up: 462 0000C363 E813FF <2> call serial_eoi 463 0000C366 31C0 <2> xor ax, ax 464 0000C368 8B16[C608] <2> mov dx, [baseport] 465 0000C36C 83C204 <2> add dx, 4 ; (base + 4) 466 <2> ; disconnect the UART from the int line 467 0000C36F EE <2> out dx, al ; write MCR 468 0000C370 4A <2> dec dx 469 0000C371 4A <2> dec dx 470 0000C372 4A <2> dec dx ; (base + 1) disable UART ints 471 0000C373 EE <2> out dx, al ; write IER 472 0000C374 42 <2> inc dx ; (base + 2) 473 <2> ; disable the FIFOs (old software relies on it) 474 0000C375 EE <2> out dx, al ; write FCR 475 <2> 476 <2> ; reset the UART 477 0000C376 8B16[C608] <2> mov dx, [baseport] 478 0000C37A 83C203 <2> add dx, 3 ; (base + 3) read/write LCR 479 0000C37D B080 <2> mov al, 80h ; DLAB = 1 480 0000C37F EE <2> out dx, al ; write LCR, make DL register accessible 481 0000C380 52 <2> push dx 482 0000C381 8B16[C608] <2> mov dx, [baseport] ; (base) 483 <2> %if _SERIAL_DL_WORD 484 <2> mov ax, word [serial_save_dl] 485 <2> out dx, ax ; write bps rate divisor (DL) 486 <2> %else 487 0000C385 A0[BC08] <2> mov al, byte [serial_save_dl] 488 0000C388 EE <2> out dx, al ; write bps rate divisor low byte (DL) 489 0000C389 42 <2> inc dx 490 0000C38A A0[BD08] <2> mov al, byte [serial_save_dl + 1] 491 0000C38D EE <2> out dx, al ; write bps rate divisor high byte (DL) 492 <2> %endif 493 0000C38E 5A <2> pop dx ; (base + 3) write LCR 494 0000C38F A0[BF08] <2> mov al, byte [serial_save_lcr] 495 0000C392 EE <2> out dx, al ; write parameters 496 <2> 497 0000C393 4A <2> dec dx ; (base + 2) write FCR, read IIR 498 0000C394 31C0 <2> xor ax, ax 499 0000C396 EE <2> out dx, al ; (write FCR) disable the FIFOs 500 0000C397 4A <2> dec dx ; (base + 1) 501 0000C398 A0[BE08] <2> mov al, byte [serial_save_ier] 502 0000C39B EE <2> out dx, al ; write to IER 503 0000C39C 8B1E[BA08] <2> mov bx, [serial_save_irq_off] 504 <2> ; bits clear for IRQ ON 505 0000C3A0 8B0E[B808] <2> mov cx, [serial_save_irq_mask] 506 <2> ; negated mask of bits to change 507 0000C3A4 E870FF <2> call set_irq 508 0000C3A7 42 <2> inc dx 509 0000C3A8 42 <2> inc dx 510 0000C3A9 42 <2> inc dx ; (base + 4) 511 0000C3AA A0[C008] <2> mov al, byte [serial_save_mcr] 512 0000C3AD EE <2> out dx, al ; write MCR 513 <2> 514 <2> ; restore int vector 515 <2> ; OUT: NC if successful 516 <2> ; CY if couldn't unhook 517 <2> serial_uninstall_interrupt_handler: 518 0000C3AE BE[AC96] <2> mov si, serial_interrupt_handler 519 0000C3B1 A0[120C] <2> mov al, byte [serial_installed_intnum] 520 0000C3B4 BA0100 <2> mov dx, opt4_int_serial_force >> 16 521 0000C3B7 E88701 <2> call UnhookInterruptForce 522 0000C3BA 7208 <2> jc @F 523 0000C3BC 8026[D000]FE <2> clropt [internalflags4], dif4_int_serial_hooked 524 0000C3C1 E88202 <2> call update_inttab_optional 525 <2> ; (NC) 526 <2> @@: 527 0000C3C4 C3 <2> retn 528 <2> 529 <2> 530 <2> serial_send_char_add_lf: 531 0000C3C5 50 <2> push ax 532 <2> .loop: 533 0000C3C6 E80800 <2> call serial_send_char 534 0000C3C9 3C0D <2> cmp al, 13 ; add LF after CR; change it if you don't like it 535 0000C3CB B00A <2> mov al, 10 536 0000C3CD 74F7 <2> je .loop 537 0000C3CF 58 <2> pop ax 538 0000C3D0 C3 <2> retn 539 <2> 540 <2> serial_send_char: 541 0000C3D1 56 <2> push si 542 0000C3D2 51 <2> push cx 543 0000C3D3 52 <2> push dx 544 0000C3D4 06 <2> push es 545 <2> 546 0000C3D5 8B36[D008] <2> mov si, word [txhead] 547 0000C3D9 8804 <2> mov byte [si],al 548 0000C3DB 46 <2> inc si 549 <2> ; check for wrap-around 550 <2> tx_checkwrap 98 0000C3DC 81FE[E009] <3> cmp si, txfifo+_TXFIFOSIZE 99 0000C3E0 7203 <3> jb %%tx_nowrap 100 0000C3E2 BE[6009] <3> mov si, txfifo 101 <3> %%tx_nowrap: 551 <2> 552 0000C3E5 50 <2> push ax 553 <2> %if _PM 554 <2> push ax 555 <2> call push_if 556 <2> %else 557 0000C3E6 9C <2> pushf 558 <2> %endif 559 0000C3E7 3936[D208] <2> cmp word [txtail], si 560 0000C3EB 7532 <2> jne .no_wait 561 <2> 562 <2> ; Because we enable the tx empty interrupt 563 <2> ; when putting data into the buffer, it 564 <2> ; should still be enabled here when the 565 <2> ; buffer is currently full. So we only 566 <2> ; need to wait for the interrupt to 567 <2> ; occur and be processed by our handler. 568 <2> 569 0000C3ED 31C9 <2> xor cx, cx 570 0000C3EF BA4000 <2> mov dx, 40h ; 0040h is a bimodal segment/selector 571 0000C3F2 8EC2 <2> mov es, dx 572 <2> .wait_reset_dx: 573 0000C3F4 268B166C00 <2> mov dx, word [es:6Ch] 574 <2> 575 <2> .wait: 576 0000C3F9 E81BF1 <2> call idle 577 <2> %if _PM 578 <2> call pop_if 579 <2> push ax 580 <2> call push_if 581 <2> %else 582 0000C3FC 9D <2> popf 583 0000C3FD 9C <2> pushf 584 <2> %endif 585 <2> 586 0000C3FE 3B36[D208] <2> cmp si, word [txtail] 587 0000C402 751B <2> jne .no_wait 588 <2> 589 0000C404 263B166C00 <2> cmp dx, word [es:6Ch] 590 0000C409 74EE <2> je .wait 591 0000C40B 41 <2> inc cx 592 0000C40C 83F95A <2> cmp cx, 5 * 18 593 0000C40F 72E3 <2> jb .wait_reset_dx 594 <2> 595 0000C411 8026[9500]BF <2> clropt [options], enable_serial 596 0000C416 BA[2E6B] <2> mov dx, msg.no_progress 597 0000C419 E8E4ED <2> call putsz 598 0000C41C E9E13B <2> jmp cmd3 599 <2> 600 <2> .no_wait: 601 0000C41F 8936[D008] <2> mov word [txhead], si 602 0000C423 FA <2> cli ; try to avoid interrupt while emptying buffer 603 <2> ; test if we can send a byte right away 604 <2> %if 0 ; int_tx checks for THRE ...- 605 <2> mov dx, [baseport] 606 <2> add dx, 5 ; (base + 5) 607 <2> in al, dx ; read LSR 608 <2> test al, 20h ; Transmitter Holding Register Empty ? 609 <2> jz .crank ; no, just enable the interrupt --> 610 <2> %endif 611 <2> 612 <2> ; call int_tx ; send bytes, enables or disables the tx interrupt 613 0000C424 0E <2> push cs 614 0000C425 E80700 <2> call code_to_int_tx 615 <2> 616 <2> %if 0 ; -... and sets up the interrupt accordingly 617 <2> jmp .dontcrank 618 <2> .crank: 619 <2> ; crank it up 620 <2> ; note that this might not work with some very old 8250s 621 <2> add dx, 1 - 5 ; (base + 1) write IER 622 <2> mov al, 0000_0011b 623 <2> out dx, al ; enable tx empty interrupt 624 <2> .dontcrank: 625 <2> %endif 626 <2> %if _PM 627 <2> call pop_if 628 <2> %else 629 0000C428 9D <2> popf 630 <2> %endif 631 0000C429 58 <2> pop ax 632 0000C42A 07 <2> pop es 633 0000C42B 5A <2> pop dx 634 0000C42C 59 <2> pop cx 635 0000C42D 5E <2> pop si 636 0000C42E C3 <2> retn 637 <2> 638 <2> %if _PM 639 <2> push_if: 640 <2> lframe near 641 <2> lpar word, flags 642 <2> lpar_return 643 <2> lenter 644 <2> call ispm 645 <2> jnz .86m 646 <2> .pm: 647 <2> push ax 648 <2> mov ax, 0902h 649 <2> int 31h 650 <2> test al, al ; 0 = disabled ? 651 <2> mov ax, 0 ; initialise to IF=0 652 <2> jz @F 653 <2> mov ah, 2 ; else, IF=1 654 <2> @@: 655 <2> mov word [bp + ?flags], ax 656 <2> pop ax 657 <2> jmp .end 658 <2> .86m: 659 <2> pushf 660 <2> pop word [bp + ?flags] 661 <2> .end: 662 <2> lleave 663 <2> lret 664 <2> 665 <2> pop_if: 666 <2> lframe near 667 <2> lpar word, flags 668 <2> lenter 669 <2> call ispm 670 <2> jnz .86m 671 <2> push ax 672 <2> mov ax, 0900h ; initialise to disable VIF = 0900h 673 <2> test byte [bp + ?flags + 1], 2 674 <2> jz @F ; if to disable --> 675 <2> inc ax ; else enable VIF = 0901h 676 <2> @@: 677 <2> int 31h 678 <2> pop ax 679 <2> jmp .end 680 <2> .86m: 681 <2> push word [bp + ?flags] 682 <2> popf 683 <2> .end: 684 <2> lleave 685 <2> lret 686 <2> %endif 687 <2> 688 <2> code_to_int_tx: 689 0000C42F 2EFF36[3EC4] <2> push word [cs:.entry_retf_word] 690 <2> %if _PM 691 <2> ; near return address 692 <2> call ispm 693 <2> jnz .rm 694 <2> 695 <2> push word [cssel] 696 <2> jmp @F 697 <2> 698 <2> %endif 699 <2> .rm: 700 0000C434 16 <2> push ss 701 <2> @@: 702 0000C435 2EFF36[3CC4] <2> push word [cs:.int_tx_word] 703 0000C43A CB <2> retf ; jump to lDEBUG_DATA_ENTRY:int_tx 704 <2> 705 0000C43B 00 <2> align 2, db 0 706 <2> .int_tx_word: 707 0000C43C [1397] <2> dw int_tx 708 <2> .entry_retf_word: 709 0000C43E [B497] <2> dw entry_retf 710 <2> 711 <2> 712 <2> usesection lDEBUG_DATA_ENTRY 713 <2> 714 <2> entry_int3_retf: 715 000097B3 CC <2> int3 716 <2> entry_retf: 717 000097B4 CB <2> retf 5791 5792 5793 %include "ints.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> Interrupt hooking and unhooking 5 <1> 6 <1> 2021 by C. Masloch 7 <1> 8 <1> Usage of the works is permitted provided that this 9 <1> instrument is retained with the works, so that any entity 10 <1> that uses the works is notified of this instrument. 11 <1> 12 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 <1> 14 <1> %endif 15 <1> 16 <1> usesection lDEBUG_CODE 17 <1> 18 <1> 19 <1> ; INP: 86 Mode ss = word [pspdbg] = cs for handler 20 <1> ; si -> handler entrypoint 21 <1> ; dword [si + ieNext] = storage for next vector 22 <1> ; al = interrupt number 23 <1> ; CHG: ax, bx, cx, dx 24 <1> ; STT: ss = ds (= word [pspdbg] if in 86 Mode) 25 <1> install_86m_interrupt_handler: 26 <1> %if _PM 27 <1> call ispm 28 <1> jnz .rm 29 <1> 30 <1> xchg ax, bx ; bl = interrupt number 31 <1> mov ax, 0200h 32 <1> int 31h ; cx:dx = interrupt vector 33 <1> mov word [si + ieNext], dx 34 <1> mov word [si + ieNext + 2], cx 35 <1> 36 <1> mov ax, 0201h 37 <1> ; bl still = interrupt number 38 <1> mov cx, word [pspdbg] ; cx => lDEBUG_DATA_ENTRY 39 <1> mov dx, si ; cx:dx -> our entrypoint 40 <1> int 31h ; change vector to our handler 41 <1> retn 42 <1> 43 <1> .rm: 44 <1> %endif 45 <1> 46 0000C440 E85AD7 <1> call InDos 47 0000C443 741E <1> jz .notindos 48 0000C445 06 <1> push es 49 0000C446 1E <1> push ds 50 0000C447 31DB <1> xor bx, bx 51 0000C449 8EDB <1> mov ds, bx 52 0000C44B 88C3 <1> mov bl, al 53 0000C44D 01DB <1> add bx, bx 54 0000C44F 01DB <1> add bx, bx ; ds:bx -> interrupt vector 55 0000C451 C417 <1> les dx, [bx] ; es:dx = vector 56 0000C453 36895402 <1> mov word [ss:si + ieNext], dx 57 0000C457 368C4404 <1> mov word [ss:si + ieNext + 2], es 58 <1> ; save prior vector 59 0000C45B 8937 <1> mov word [bx], si 60 0000C45D 8C5702 <1> mov word [bx + 2], ss ; ss => lDEBUG_DATA_ENTRY 61 <1> ; change vector to our handler 62 0000C460 1F <1> pop ds 63 0000C461 07 <1> pop es 64 0000C462 C3 <1> retn 65 <1> 66 <1> .notindos: 67 0000C463 06 <1> push es 68 0000C464 B435 <1> mov ah, 35h 69 0000C466 CD21 <1> int 21h 70 0000C468 895C02 <1> mov word [si + ieNext], bx 71 0000C46B 8C4404 <1> mov word [si + ieNext + 2], es 72 0000C46E 07 <1> pop es 73 0000C46F B425 <1> mov ah, 25h 74 0000C471 89F2 <1> mov dx, si ; ds => lDEBUG_DATA_ENTRY 75 0000C473 CD21 <1> int 21h ; change vector to our handler 76 0000C475 C3 <1> retn 77 <1> 78 <1> 79 <1> %if _PM 80 <1> get_86m_interrupt_handler_no_dos: 81 <1> call ispm 82 <1> jnz get_86m_interrupt_handler.rm_indos 83 <1> %endif 84 <1> 85 <1> ; INP: al = interrupt number 86 <1> ; OUT: dx:bx = 86 Mode far pointer 87 <1> ; CHG: ah 88 <1> get_86m_interrupt_handler: 89 <1> %if _PM 90 <1> call ispm 91 <1> jnz .rm 92 <1> 93 <1> push ax 94 <1> push cx 95 <1> xchg ax, bx ; bl = interrupt number 96 <1> mov ax, 0200h 97 <1> int 31h ; cx:dx = interrupt vector 98 <1> xchg cx, bx ; bx:dx 99 <1> xchg bx, dx ; dx:bx 100 <1> pop cx 101 <1> pop ax 102 <1> retn 103 <1> 104 <1> .rm: 105 <1> %endif 106 <1> 107 0000C476 E824D7 <1> call InDos 108 0000C479 7412 <1> jz .notindos 109 <1> %ifn _PM 110 <1> get_86m_interrupt_handler_no_dos: equ $ 111 <1> %endif 112 <1> .rm_indos: 113 0000C47B 1E <1> push ds 114 0000C47C 31DB <1> xor bx, bx 115 0000C47E 8EDB <1> mov ds, bx 116 0000C480 88C3 <1> mov bl, al 117 0000C482 01DB <1> add bx, bx 118 0000C484 01DB <1> add bx, bx ; ds:bx -> interrupt vector 119 0000C486 8B5702 <1> mov dx, word [bx + 2] 120 0000C489 8B1F <1> mov bx, word [bx] 121 0000C48B 1F <1> pop ds 122 0000C48C C3 <1> retn 123 <1> 124 <1> .notindos: 125 0000C48D 06 <1> push es 126 0000C48E B435 <1> mov ah, 35h 127 0000C490 CD21 <1> int 21h 128 0000C492 8CC2 <1> mov dx, es 129 0000C494 07 <1> pop es 130 0000C495 C3 <1> retn 131 <1> 132 <1> 133 <1> ; INP: al = interrupt number 134 <1> ; OUT: ZR if offset = -1 or segment = 0 135 <1> ; NZ else 136 <1> ; CHG: ah, dx, bx 137 <1> intchk: 138 0000C496 E8DDFF <1> call get_86m_interrupt_handler 139 0000C499 43 <1> inc bx 140 0000C49A 7402 <1> jz @F ; was 0FFFFh --> 141 0000C49C 85D2 <1> test dx, dx 142 <1> ; jz @F ; was 0000h --> 143 <1> @@: 144 0000C49E C3 <1> retn 145 <1> 146 <1> 147 <1> ; INP: al = interrupt number 148 <1> ; dx:bx = 86 Mode far pointer 149 <1> ; CHG: ah 150 <1> set_86m_interrupt_handler: 151 0000C49F 50 <1> push ax 152 0000C4A0 53 <1> push bx 153 0000C4A1 51 <1> push cx 154 0000C4A2 52 <1> push dx 155 <1> %if _PM 156 <1> call ispm 157 <1> jnz .rm 158 <1> 159 <1> xchg ax, bx ; bl = interrupt number, 160 <1> ; dx:ax = vector 161 <1> xchg ax, dx ; ax:dx 162 <1> xchg cx, ax ; cx:dx 163 <1> mov ax, 0201h 164 <1> int 31h ; cx:dx = interrupt vector 165 <1> jmp .ret 166 <1> 167 <1> .rm: 168 <1> %endif 169 <1> 170 0000C4A3 1E <1> push ds 171 0000C4A4 E8F6D6 <1> call InDos 172 0000C4A7 7412 <1> jz .notindos 173 0000C4A9 53 <1> push bx 174 0000C4AA 31DB <1> xor bx, bx 175 0000C4AC 8EDB <1> mov ds, bx 176 0000C4AE 88C3 <1> mov bl, al 177 0000C4B0 01DB <1> add bx, bx 178 0000C4B2 01DB <1> add bx, bx ; ds:bx -> interrupt vector 179 0000C4B4 895702 <1> mov word [bx + 2], dx 180 0000C4B7 8F07 <1> pop word [bx] 181 0000C4B9 EB08 <1> jmp .ret_ds 182 <1> 183 <1> .notindos: 184 0000C4BB 87DA <1> xchg bx, dx 185 0000C4BD 8EDB <1> mov ds, bx ; ds:dx = vector 186 0000C4BF B425 <1> mov ah, 25h 187 0000C4C1 CD21 <1> int 21h 188 <1> .ret_ds: 189 0000C4C3 1F <1> pop ds 190 <1> .ret: 191 0000C4C4 5A <1> pop dx 192 0000C4C5 59 <1> pop cx 193 0000C4C6 5B <1> pop bx 194 0000C4C7 58 <1> pop ax 195 0000C4C8 C3 <1> retn 196 <1> 197 <1> 198 <1> ; INP: dx = 86 Mode segment to access 199 <1> ; OUT: es => segment 200 <1> ; CHG: - 201 <1> %if _PM 202 <1> setes2dx: 203 <1> call ispm 204 <1> jnz @F 205 <1> push bx 206 <1> call setrmsegm 207 <1> mov es, bx 208 <1> pop bx 209 <1> retn 210 <1> 211 <1> @@: 212 <1> mov es, dx 213 <1> retn 214 <1> %endif ; _PM 215 <1> 216 <1> 217 <1> ; INP: ds:si -> source IISP header (or pseudo header) 218 <1> ; es:di -> destination IISP header 219 <1> ; OUT: EI 220 <1> ; si and di both incremented by 6 221 <1> ; CHG: - 222 <1> ; STT: UP 223 <1> update_iisp_header: 224 0000C4C9 50 <1> push ax 225 0000C4CA 51 <1> push cx 226 0000C4CB 52 <1> push dx 227 0000C4CC 57 <1> push di 228 0000C4CD 56 <1> push si 229 0000C4CE 06 <1> push es 230 <1> %if _PM 231 <1> call selector_to_segment 232 <1> %endif 233 0000C4CF 1E <1> push ds 234 0000C4D0 16 <1> push ss 235 0000C4D1 1F <1> pop ds 236 <1> 237 <1> findinstalleddebugger: 238 0000C4D2 B02D <1> mov al, 2Dh 239 0000C4D4 53 <1> push bx 240 0000C4D5 E8BEFF <1> call intchk 241 0000C4D8 5B <1> pop bx 242 0000C4D9 741E <1> jz .zero 243 <1> 244 0000C4DB F606[9F00]08 <1> testopt [options3], opt3_no_call_update 245 0000C4E0 7517 <1> jnz .zero 246 <1> 247 0000C4E2 8A26[B482] <1> mov ah, byte [try_debugger_amis_multiplex_number] 248 0000C4E6 E81400 <1> call .check 249 0000C4E9 7305 <1> jnc @F 250 <1> 251 0000C4EB B4FF <1> mov ah, 0FFh ; start with multiplex number 0FFh 252 <1> .loop: 253 0000C4ED E80D00 <1> call .check 254 <1> @@: 255 0000C4F0 B030 <1> mov al, 30h ; al = 30h to indicate found, ah = multiplex number 256 0000C4F2 732C <1> jnc .end 257 0000C4F4 80EC01 <1> sub ah, 1 ; search is backward (to find latest installed first), from 0FFh to 00h including 258 0000C4F7 73F4 <1> jnc .loop ; try next if we didn't check all yet --> 259 <1> 260 <1> .zero: 261 0000C4F9 31C0 <1> xor ax, ax ; al = 0 to indicate none found 262 0000C4FB EB23 <1> jmp .end ; If not found, continue --> 263 <1> 264 <1> 265 <1> ; INP: ah = multiplex number to check 266 <1> ; ds = ss = cs 267 <1> ; OUT: CY if multiplex number unused or no signature match, 268 <1> ; bp, ah, ds unmodified 269 <1> ; NC if match found, 270 <1> ; ah = multiplex number (unmodified) 271 <1> ; CHG: si, di, es, cx, dx 272 <1> .check: 273 0000C4FD F606[D000]08 <1> testopt [internalflags4], dif4_int_2D_hooked 274 0000C502 7406 <1> jz @F 275 0000C504 3A26[CA82] <1> cmp ah, byte [amis_multiplex_number] 276 0000C508 7414 <1> je .notfound ; do not use our own multiplexer --> 277 <1> @@: 278 0000C50A B000 <1> mov al, 00h ; AMIS installation check 279 <1> %if _PM 280 <1> call call_int2D 281 <1> %else 282 0000C50C CD2D <1> int 2Dh ; AMIS (or "DOS reserved" = iret if no AMIS present) 283 <1> %endif 284 0000C50E 3CFF <1> cmp al, 0FFh 285 0000C510 750C <1> jne .notfound 286 0000C512 BE[7082] <1> mov si, debuggeramissig ; ds:si -> our AMIS name strings 287 <1> %if _PM 288 <1> call setes2dx 289 <1> %else 290 0000C515 8EC2 <1> mov es, dx ; es:di -> name strings of AMIS multiplexer that just answered 291 <1> %endif 292 0000C517 B90800 <1> mov cx, 8 ; Ignore description, only compare vendor and program name 293 0000C51A F3A7 <1> repe cmpsw 294 0000C51C 7401 <1> je .checkret ; ZR, NC = match --> 295 <1> .notfound: 296 0000C51E F9 <1> stc ; NZ, CY no match 297 <1> .checkret: 298 0000C51F C3 <1> retn 299 <1> 300 <1> .end: 301 0000C520 A3[6E82] <1> mov word [debuggerfunction], ax 302 <1> 303 0000C523 1F <1> pop ds ; must be not using scratchsel ! 304 <1> %if _PM 305 <1> pop dx 306 <1> call setes2dx ; this one uses scratchsel 307 <1> %else 308 0000C524 07 <1> pop es 309 <1> %endif 310 0000C525 5E <1> pop si 311 0000C526 5F <1> pop di 312 0000C527 5A <1> pop dx 313 0000C528 59 <1> pop cx 314 <1> ; push ax 315 0000C529 36A1[6E82] <1> mov ax, word [ss:debuggerfunction] 316 0000C52D 85C0 <1> test ax, ax ; found the debugger ? 317 0000C52F 7408 <1> jz @F ; no --> 318 <1> %if _PM 319 <1> call ispm 320 <1> jnz .86m 321 <1> [cpu 286] 322 <1> push es ; es 323 <1> call selector_to_segment ; convert to segment 324 <1> push ds ; ds 325 <1> call selector_to_segment ; convert to segment 326 <1> push word 2Dh ; int 2Dh 327 <1> push bp ; bp 328 <1> call intcall_return_parameter_es_parameter_ds 329 <1> add sp, 4 ; discard returned ds, es 330 <1> __CPU__ 331 <1> db __TEST_IMM16 ; (skip int) 332 <1> %endif 333 <1> .86m: 334 0000C531 CD2D <1> int 2Dh ; call its Update IISP Header function 335 0000C533 3CFF <1> cmp al, 0FFh ; supported ? 336 0000C535 58 <1> pop ax 337 0000C536 7408 <1> je .ret ; yes. done --> 338 0000C538 A8 <1> db __TEST_IMM8 ; (skip pop) 339 <1> @@: 340 0000C539 58 <1> pop ax ; restore ax, then do manual update 341 <1> %if _PM 342 <1> push ax 343 <1> call push_if 344 <1> %else 345 0000C53A 9C <1> pushf 346 <1> %endif 347 0000C53B FA <1> cli ; try to rest while updating chain 348 0000C53C A7 <1> cmpsw ; skip over first word (entrypoint) 349 <1> ; (generally xxEBh or 0EA90h) 350 0000C53D A5 <1> movsw 351 0000C53E A5 <1> movsw ; transfer source ieNext to dest ieNext 352 <1> %if _PM 353 <1> call pop_if 354 <1> %else 355 0000C53F 9D <1> popf 356 <1> %endif 357 <1> .ret: 358 0000C540 C3 <1> retn 359 <1> 360 <1> 361 <1> ; INP: al = interrupt number 362 <1> ; ds:si-> interrupt entry 363 <1> ; dx = flag in word [options4 + 2] to force 364 <1> ; dx = -1 to force unconditionally 365 <1> ; OUT: es = ss 366 <1> ; CY if unhooking failed, 367 <1> ; ds:si preserved 368 <1> ; NC if unhooking successful 369 <1> ; CHG: ah, di, si 370 <1> ; STT: ds = ss => data entry segment/selector 371 <1> ; word [pspdbg] = data entry 86 Mode segment 372 <1> UnhookInterruptForce: 373 0000C541 E80F00 <1> call UnhookInterrupt 374 0000C544 730C <1> jnc .ret 375 0000C546 83FAFF <1> cmp dx, -1 376 0000C549 7414 <1> je UnhookInterrupt.easy 377 0000C54B 8516[A200] <1> test word [options4 + 2], dx 378 0000C54F 750E <1> jnz UnhookInterrupt.easy 379 0000C551 F9 <1> stc 380 <1> .ret: 381 0000C552 C3 <1> retn 382 <1> 383 <1> 384 <1> ; INP: al = interrupt number 385 <1> ; ds:si-> interrupt entry 386 <1> ; OUT: es = ss 387 <1> ; CY if unhooking failed, 388 <1> ; ds:si preserved 389 <1> ; NC if unhooking successful 390 <1> ; CHG: ah, di, si 391 <1> ; STT: ds = ss => data entry segment/selector 392 <1> ; word [pspdbg] = data entry 86 Mode segment 393 <1> UnhookInterrupt: 394 <1> ; UnhookInterruptSim (below) only checks if it's possible to unhook this interrupt. 395 <1> ; This function really unhooks the interrupt if possible. 396 <1> ; 397 <1> ; This is to cover the situation when some of the hooked interrupts can unhook, 398 <1> ; but some can't. If the uninstaller would start to unhook the interrupts and then 399 <1> ; catch the interrupt that can't be unhooked the user would end up with a dead TSR 400 <1> ; that's uninstalled halfway. Very bad. 401 <1> ; 402 <1> ; "Simulating" the unhooking first and checking if all interrupts can unhook 403 <1> ; usually will not return such a state. 404 0000C553 E82000 <1> call UnhookInterruptSim 405 0000C556 7215 <1> jc .ret ; bad. --> (CY) 406 0000C558 7405 <1> jz .easy 407 <1> .hard: 408 <1> ; "hard" case: UnhookInterruptSim has however already done the work, 409 <1> ; so the hard case is here indeed easier than the easy case. 410 0000C55A E86CFF <1> call update_iisp_header ; copies our stored pointer into the other's entry 411 0000C55D EB0D <1> jmp .ret_NC 412 <1> .easy: 413 0000C55F 52 <1> push dx 414 0000C560 53 <1> push bx 415 0000C561 8B5404 <1> mov dx, word [si + ieNext + 2] 416 0000C564 8B5C02 <1> mov bx, word [si + ieNext] ; get what we stored in the entry 417 0000C567 E835FF <1> call set_86m_interrupt_handler ; easy case - just reset to the value stored 418 0000C56A 5B <1> pop bx 419 0000C56B 5A <1> pop dx 420 <1> .ret_NC: 421 0000C56C F8 <1> clc 422 <1> .ret: 423 0000C56D 16 <1> push ss 424 0000C56E 07 <1> pop es 425 0000C56F C3 <1> retn 426 <1> 427 <1> 428 <1> ; INP: al = interrupt number 429 <1> ; ds:si-> interrupt entry 430 <1> ; dx = flag in word [options4 + 2] to force 431 <1> ; OUT: NC if no error (hard, easy, or forced case) 432 <1> ; CY if error 433 <1> ; CHG: ah, es, di 434 <1> ; STT: ds = ss => data entry segment/selector 435 <1> ; word [pspdbg] = data entry 86 Mode segment 436 <1> UnhookInterruptForceSim: 437 0000C570 8516[A200] <1> test word [options4 + 2], dx 438 0000C574 751D <1> jnz UnhookInterruptSim.retn ; --> (NC) 439 <1> 440 <1> 441 <1> ; INP: ds:si-> IISP entry 442 <1> ; al = interrupt number 443 <1> ; OUT: NC if no error (either hard or easy case), 444 <1> ; ZR if easy case, 445 <1> ; ds:si-> our IISP entry, containing stored interrupt 446 <1> ; NZ if hard case, 447 <1> ; ds:si-> our IISP entry 448 <1> ; es:di-> IISP entry to modify 449 <1> ; implies dword [es:di + 2] = far pointer to ours 450 <1> ; CY if error (not first handler and no IISP chain to this handler) 451 <1> ; CHG: ah, es, di 452 <1> ; STT: ds = ss => data entry segment/selector 453 <1> ; word [pspdbg] = data entry 86 Mode segment 454 <1> UnhookInterruptSim: 455 0000C576 52 <1> push dx 456 0000C577 53 <1> push bx 457 <1> 458 <1> ; harden this, check we are an IISP entry 459 0000C578 1E <1> push ds 460 0000C579 07 <1> pop es ; es => our handler segment 461 0000C57A 89F3 <1> mov bx, si ; es:bx -> our handler 462 0000C57C E89900 <1> call IsIISPEntry? ; does it have an IISP header ? 463 0000C57F 753B <1> jne .fail ; fail if not 464 <1> 465 0000C581 E8F2FE <1> call get_86m_interrupt_handler ; get current vector 466 0000C584 39DE <1> cmp si, bx ; our pointer ? 467 0000C586 750C <1> jne .hard 468 0000C588 3916[E00A] <1> cmp word [pspdbg], dx ; our segment ? 469 0000C58C 7506 <1> jne .hard 470 <1> 471 0000C58E 80E400 <1> and ah, 00h ; NC, ZR 472 0000C591 5B <1> pop bx 473 0000C592 5A <1> pop dx 474 <1> .retn: 475 0000C593 C3 <1> retn 476 <1> 477 <1> .hard: 478 <1> %if _PM 479 <1> call setes2dx 480 <1> %else 481 0000C594 8EC2 <1> mov es, dx 482 <1> %endif 483 <1> 484 <1> ; INP: ds:si-> IISP entry 485 <1> ; es:bx-> current interrupt entry 486 <1> ; OUT: CY if error 487 <1> ; NC, NZ if no error, 488 <1> ; ds:si-> our IISP entry 489 <1> ; es:di-> IISP entry to modify 490 <1> ; implies dword [es:di + 2] = far pointer to ours 491 <1> ; CHG: ah, es, di, (bx, dx) 492 <1> ; STT: ds = ss => data entry segment/selector 493 <1> ; word [pspdbg] = data entry 86 Mode segment 494 0000C596 E86900 <1> call SearchIISPChain 495 0000C599 7508 <1> jne .harder 496 <1> .found: ; found reference to our interrupt handler 497 0000C59B 89DF <1> mov di, bx ; es:di-> IISP entry that references our's 498 0000C59D 80CCFF <1> or ah, 0FFh ; NC, NZ 499 0000C5A0 5B <1> pop bx 500 0000C5A1 5A <1> pop dx 501 0000C5A2 C3 <1> retn 502 <1> 503 <1> .harder: ; Desperate attempt to find IISP entry that references ours by 504 <1> ; searching through the interrupts hooked by other AMIS TSRs. Note 505 <1> ; that the plexer loop will find and search through the list of 506 <1> ; hooked interrupts of the uninstalling TSR itself, but this causes 507 <1> ; no trouble. 508 <1> ; INP: ds:si-> IISP entry 509 <1> ; OUT: CY if error 510 <1> ; NC, NZ if no error, 511 <1> ; ds:si-> our IISP entry 512 <1> ; es:di-> IISP entry to modify 513 <1> ; implies dword [es:di + 2] = far pointer to ours 514 <1> ; CHG: ah, es, di, (bx, dx) 515 <1> ; STT: ds = ss => data entry segment/selector 516 <1> ; word [pspdbg] = data entry 86 Mode segment 517 0000C5A3 50 <1> push ax ; register with interrupt number last 518 <1> 519 0000C5A4 B02D <1> mov al, 2Dh 520 0000C5A6 E8EDFE <1> call intchk ; ZR if offset = -1 or segment = 0 521 <1> ; CHG: ax, dx, bx 522 0000C5A9 7410 <1> jz .fail_ax 523 <1> 524 0000C5AB 31C0 <1> xor ax, ax 525 <1> .loopplex: 526 0000C5AD B000 <1> mov al, 00h ; AMIS installation check 527 0000C5AF 51 <1> push cx 528 <1> ; function 0 changes dx, di, cx, al 529 <1> %if _PM 530 <1> call call_int2D 531 <1> %else 532 0000C5B0 CD2D <1> int 2Dh ; enquire whether there's anyone 533 <1> %endif 534 0000C5B2 59 <1> pop cx ; but we don't care who it might be 535 0000C5B3 FEC0 <1> inc al ; = FFh ? 536 0000C5B5 7409 <1> jz .search ; yes, it is in use --> 537 <1> .nextplex: 538 0000C5B7 FEC4 <1> inc ah 539 0000C5B9 75F2 <1> jnz .loopplex ; try next multiplexer --> 540 <1> .fail_ax: 541 0000C5BB 58 <1> pop ax 542 <1> .fail: ; IISP incompatible TSR between current interrupt entry and our entry 543 <1> ; and no AMIS compatible TSR installed on top of our entry 544 0000C5BC F9 <1> stc 545 0000C5BD 5B <1> pop bx 546 0000C5BE 5A <1> pop dx 547 0000C5BF C3 <1> retn 548 <1> 549 <1> ; INP: ah = multiplex number of AMIS TSR to search through 550 <1> ; ss:sp-> interrupt number (byte), must be preserved 551 <1> ; CHG: es, di, dx, bx 552 <1> .search: 553 0000C5C0 B004 <1> mov al, 04h 554 0000C5C2 5B <1> pop bx 555 0000C5C3 53 <1> push bx ; low byte is the interrupt number 556 <1> ; function 4 changes dx, bx, al 557 <1> %if _PM 558 <1> call call_int2D 559 <1> %else 560 0000C5C4 CD2D <1> int 2Dh 561 <1> %endif 562 0000C5C6 3C03 <1> cmp al, 03h ; returned its interrupt entry ? 563 <1> ; RBIL doesn't explicitly state that this interrupt entry has to 564 <1> ; be IISP compatible. But I'm too lazy to look up the older AMIS, 565 <1> ; and SearchIISPChain checks the interrupt entry anyway. 566 0000C5C8 742A <1> je .search_dxbx 567 0000C5CA 3C04 <1> cmp al, 04h ; returned list of hooked interrupts ? 568 0000C5CC 75E9 <1> jne .nextplex ; no, try next multiplexer --> 569 0000C5CE 89DF <1> mov di, bx 570 0000C5D0 5B <1> pop bx 571 0000C5D1 53 <1> push bx ; bl = interrupt number 572 0000C5D2 88D8 <1> mov al, bl 573 <1> .search_intlist_seg: 574 <1> %if _PM 575 <1> call setes2dx 576 <1> %else 577 0000C5D4 8EC2 <1> mov es, dx ; es:di-> list 578 <1> %endif 579 <1> .search_intlist: ; Search the returned list for the required interrupt number. 580 0000C5D6 AE <1> scasb ; our interrupt number ? 581 0000C5D7 740A <1> je .search_found_intlist 582 0000C5D9 26807DFF2D <1> cmp byte [es:di-1], 2Dh ; was last in list ? 583 0000C5DE 74D7 <1> je .nextplex 584 0000C5E0 AF <1> scasw ; skip pointer 585 0000C5E1 EBF3 <1> jmp short .search_intlist ; try next entry --> 586 <1> 587 <1> .search_found_intlist: 588 0000C5E3 268B1D <1> mov bx, word [es:di] ; dx:bx = es:bx -> IISP entry 589 0000C5E6 AF <1> scasw ; skip pointer 590 0000C5E7 52 <1> push dx ; preserve dx for .search_intlist_seg 591 0000C5E8 E81700 <1> call SearchIISPChain 592 0000C5EB 5A <1> pop dx 593 0000C5EC 740D <1> je .search_found ; found entry --> 594 <1> ; This specific jump supports TSRs that hook the same 595 <1> ; interrupt more than once; jumping to .nextplex instead 596 <1> ; (as previously) aborts the search after the first match 597 <1> ; in the interrupt list. This support might become useful. 598 0000C5EE 3C2D <1> cmp al, 2Dh ; was last in list ? 599 0000C5F0 74C5 <1> je .nextplex 600 0000C5F2 EBE0 <1> jmp short .search_intlist_seg 601 <1> 602 <1> .search_dxbx: 603 <1> %if _PM 604 <1> call setes2dx 605 <1> %else 606 0000C5F4 8EC2 <1> mov es, dx ; es:bx-> (IISP) interrupt entry 607 <1> %endif 608 <1> ; The entry we found now is possibly behind the non-IISP entry that 609 <1> ; terminated our first SearchIISPChain call (at .hard). We then 610 <1> ; possibly might find our entry in this hidden part of the chain. 611 0000C5F6 E80900 <1> call SearchIISPChain 612 0000C5F9 75BC <1> jne .nextplex ; didn't find our entry in the chain --> 613 <1> .search_found: 614 0000C5FB 58 <1> pop ax 615 0000C5FC EB9D <1> jmp short .found 616 <1> 617 <1> 618 <1> SearchIISPChain.next: 619 <1> %if _PM 620 <1> ; dx already next segment 621 <1> mov bx, word [es:bx + ieNext] ; get next offset 622 <1> call setes2dx ; point es:bx -> next handler 623 <1> %else 624 0000C5FE 26C45F02 <1> les bx, [es:bx + ieNext] ; get next interrupt entry 625 <1> %endif 626 <1> 627 <1> ; INP: ds:si-> IISP entry 628 <1> ; es:bx-> current interrupt entry 629 <1> ; OUT: NZ if reference to ds:si not found in IISP chain es:bx-> 630 <1> ; ZR if reference found, 631 <1> ; es:bx-> IISP (or uninstalled iHPFS) interrupt entry with reference 632 <1> ; CHG: es, bx, dx 633 <1> SearchIISPChain: 634 0000C602 E81300 <1> call IsIISPEntry? ; that an IISP entry ? 635 0000C605 7510 <1> jnz .return ; nope --> (NZ) 636 0000C607 268B5704 <1> mov dx, word [es:bx + ieNext + 2] ; (for _PM: dx = next segment) 637 0000C60B 263B7702 <1> cmp si, word [es:bx + ieNext] ; our offset ? 638 0000C60F 75ED <1> jne .next ; no, try next --> 639 0000C611 3B16[E00A] <1> cmp dx, word [pspdbg] ; our segment ? 640 0000C615 75E7 <1> jne .next ; no, try next --> 641 <1> .return: ; yes, found (ZR) 642 0000C617 C3 <1> retn 643 <1> 644 <1> 645 <1> ; INP: es:bx-> interrupt entry 646 <1> ; OUT: NZ if non-IISP entry 647 <1> ; ZR if IISP entry 648 <1> IsIISPEntry?: 649 0000C618 83FBF8 <1> cmp bx, - (ieSignature + 2) ; may access word at offset FFFFh ? 650 0000C61B 7728 <1> ja .return ; yes, avoid --> (NZ) 651 0000C61D 26817F064B42 <1> cmp word [ es:bx + ieSignature ], "KB" ; "KB"/424Bh ? ("BK" in MASM) 652 0000C623 7520 <1> jne .return 653 0000C625 26813F90EA <1> cmp word [ es:bx + ieEntry ], 0EA90h ; nop\jmp far imm16:imm16 ? 654 0000C62A 7419 <1> je .return ; unused IISP entry (created by iHPFS) --> 655 0000C62C 26803FEB <1> cmp byte [ es:bx + ieEntry ], 0EBh ; jmp short ... ? 656 <1> ; (This opcode should strictly be jmp short $+18 but there's programs 657 <1> ; that save an additional jmp opcode by jumping directly into their 658 <1> ; code even though it's not right behind the header.) 659 0000C630 7513 <1> jne .return 660 0000C632 26807F09EB <1> cmp byte [ es:bx + ieJmphwreset ], 0EBh ; jmp short ... ? 661 0000C637 740C <1> je .return ; usual IISP entry --> 662 0000C639 26807F09CB <1> cmp byte [ es:bx + ieJmphwreset ], 0CBh ; retf ? 663 0000C63E 7405 <1> je .return ; a shorter variant --> 664 0000C640 26807F09CF <1> cmp byte [ es:bx + ieJmphwreset ], 0CFh ; iret ? 665 <1> .return: 666 0000C645 C3 <1> retn 667 <1> 668 <1> 669 <1> update_inttab_optional: 670 0000C646 50 <1> push ax 671 0000C647 53 <1> push bx 672 0000C648 51 <1> push cx 673 0000C649 52 <1> push dx 674 0000C64A 56 <1> push si 675 0000C64B BE[120C] <1> mov si, inttab_optional 676 0000C64E BB[280C] <1> mov bx, inttab 677 <1> .loop: 678 0000C651 AD <1> lodsw 679 0000C652 83F8FF <1> cmp ax, -1 680 0000C655 7415 <1> je .end 681 0000C657 91 <1> xchg ax, cx 682 0000C658 AD <1> lodsw 683 0000C659 91 <1> xchg ax, cx 684 0000C65A 92 <1> xchg ax, dx 685 0000C65B AD <1> lodsw 686 0000C65C 92 <1> xchg ax, dx 687 0000C65D 8516[D000] <1> test word [internalflags4], dx 688 0000C661 7407 <1> jz .next 689 0000C663 4B <1> dec bx 690 0000C664 4B <1> dec bx 691 0000C665 890F <1> mov word [bx], cx 692 0000C667 4B <1> dec bx 693 0000C668 8807 <1> mov byte [bx], al 694 <1> .next: 695 0000C66A EBE5 <1> jmp .loop 696 <1> 697 <1> .end: 698 0000C66C 891E[200C] <1> mov word [amisintr_offset], bx 699 0000C670 5E <1> pop si 700 0000C671 5A <1> pop dx 701 0000C672 59 <1> pop cx 702 0000C673 5B <1> pop bx 703 0000C674 58 <1> pop ax 704 0000C675 C3 <1> retn 5794 5795 5796 usesection lDEBUG_CODE 5797 5798 %if _BOOTLDR 5799 ; Determine the amount of actual memory 5800 ; 5801 ; This is important to call at the time we need the size, 5802 ; not just save the size initially. Loading other pre-boot 5803 ; installers or RPLs will change the size. 5804 ; 5805 ; INP: - 5806 ; OUT: dx = segment behind usable memory (taking EBDAs & RPLs into account) 5807 ; ds = ss 5808 ; CHG: ax, cx, di, si, ds 5809 bootgetmemorysize: 5810 0000C676 06 push es 5811 0000C677 31C0 xor ax, ax 5812 0000C679 8ED8 mov ds, ax 5813 0000C67B CD12 int 12h ; get memory size in KiB 5814 0000C67D B106 mov cl, 6 5815 0000C67F D3E0 shl ax, cl ; *64, convert to paragraphs 5816 0000C681 50 push ax 5817 0000C682 C536BC00 lds si, [ 2Fh *4 ] ; get current Int2F 5818 0000C686 46 inc si ; pointer valid (not 0FFFFh) ? (left increased!) 5819 0000C687 741B jz .norpl ; no --> 5820 0000C689 8CD8 mov ax, ds 5821 0000C68B 85C0 test ax, ax ; segment valid (not zero) ? 5822 0000C68D 7415 jz .norpl ; no --> 5823 0000C68F 46 times 2 inc si ; +3 with above inc 5824 0000C691 0E push cs 5825 0000C692 07 pop es 5826 0000C693 BF[A9C6] mov di, .rpl 5827 0000C696 B90300 mov cx, .rpl_size 5828 0000C699 F3A6 repe cmpsb ; "RPL" signature ? 5829 0000C69B 7507 jne .norpl ; no --> 5830 0000C69D 5A pop dx 5831 0000C69E B8064A mov ax, 4A06h 5832 0000C6A1 CD2F int 2Fh ; adjust usable memory size for RPL 5833 0000C6A3 A8 db __TEST_IMM8 ; (skip pop) 5834 .norpl: 5835 0000C6A4 5A pop dx 5836 ; dx = segment behind last available memory 5837 0000C6A5 16 push ss 5838 0000C6A6 1F pop ds 5839 0000C6A7 07 pop es 5840 0000C6A8 C3 retn 5841 5842 0000C6A9 52504C .rpl: db "RPL" 5843 endarea .rpl 5844 %endif 5845 5846 5847 ; Ensure a debuggee process is loaded 5848 ; 5849 ; INP: si:di = to preserve if have a process already 5850 ; OUT: NZ if have no process and unable to create process 5851 ; ZR if have a process or created empty process 5852 ; NC if had no process yet, created one or not 5853 ; CY if had a process already, 5854 ; si:di = preserved input 5855 ; NC, ZR if had no process, created empty one, 5856 ; si:di = debuggee cs:ip 5857 ; NC, NZ if int19 occurred (or bootloaded) 5858 ; CHG: si, di, cx 5859 ensuredebuggeeloaded: 5860 0000C6AC 50 push ax 5861 0000C6AD 53 push bx 5862 0000C6AE 52 push dx 5863 5864 0000C6AF F606[CE00]20 testopt [internalflags3], dif3_gotint19 5865 0000C6B4 746F jz .notint19 5866 5867 0000C6B6 8026[CE00]DF clropt [internalflags3], dif3_gotint19 5868 %if _BOOTLDR 5869 0000C6BB F606[C500]40 testopt [internalflags], nodosloaded 5870 0000C6C0 743B jz .dosint19 5871 5872 .bootint19: 5873 0000C6C2 E83901 call zeroregs 5874 5875 0000C6C5 B86000 mov ax, 60h 5876 0000C6C8 50 push ax 5877 0000C6C9 BF[7C0C] mov di, reg_ds 5878 0000C6CC AB stosw 5879 0000C6CD AF scasw ; (skip dummy high word) 5880 0000C6CE AB stosw 5881 0000C6CF AF scasw 5882 0000C6D0 AB stosw 5883 0000C6D1 AF scasw 5884 0000C6D2 AB stosw 5885 0000C6D3 E887C2 call adusetup 5886 0000C6D6 E89DFF call bootgetmemorysize 5887 0000C6D9 83EA60 sub dx, 60h 5888 0000C6DC 81FA0010 cmp dx, 1000h 5889 0000C6E0 7602 jbe .bootbelow64kib ; if memory left <= 64 KiB 5890 0000C6E2 31D2 xor dx, dx ; dx = 1000h (same thing, after shifting) 5891 .bootbelow64kib: 5892 0000C6E4 B104 mov cl, 4 5893 0000C6E6 D3E2 shl dx, cl 5894 0000C6E8 4A dec dx 5895 0000C6E9 4A dec dx 5896 0000C6EA 8916[6C0C] mov word [reg_esp], dx 5897 0000C6EE 07 pop es 5898 0000C6EF 87D7 xchg dx, di ; es:di = child stack pointer 5899 0000C6F1 31C0 xor ax, ax 5900 0000C6F3 AB stosw ; push 0 on client's stack 5901 5902 0000C6F4 26C7060000CD19 mov word [es:0], 019CDh ; place opcode for int 19h at cs:ip 5903 0000C6FB EB1B jmp @F 5904 %endif 5905 5906 .dosint19: 5907 0000C6FD 8B16[6C0C] mov dx, word [reg_esp] 5908 0000C701 8B1E[840C] mov bx, word [reg_ss] 5909 5910 0000C705 E8F600 call zeroregs 5911 5912 ; Upon receiving an int 19h in DOS 5913 ; just set up some shim that will 5914 ; lead to process termination. 5915 ; Unlike before we do not longer try 5916 ; to create a new process then. 5917 0000C708 8916[6C0C] mov word [reg_esp], dx 5918 0000C70C 891E[840C] mov word [reg_ss], bx ; preserve our stack 5919 0000C710 FF36[DE0A] push word [pspdbe] 5920 0000C714 8F06[880C] pop word [reg_cs] ; cs = PSP, ip = 0, 5921 ; cs:ip -> int 20h instruction 5922 5923 @@: 5924 0000C718 F606[C600]80 testopt [internalflags], attachedterm 5925 0000C71D 7511 jnz .noprocess ; if also process not loaded 5926 5927 0000C71F 80CA01 or dl, 1 ; flags return NC, NZ 5928 0000C722 E9C900 jmp .return 5929 5930 .notint19: 5931 0000C725 F606[C600]80 testopt [internalflags], attachedterm 5932 0000C72A 7504 jnz .noprocess ; not loaded, create --> 5933 ; flags return ZR 5934 0000C72C F9 stc ; flags return CY 5935 0000C72D E9BE00 jmp .return 5936 5937 .noprocess: 5938 %if _BOOTLDR 5939 0000C730 F606[C500]40 testopt [internalflags], nodosloaded 5940 0000C735 7403E9B400 jnz .return ; flags return NC, NZ 5941 %endif 5942 5943 .dosnoprocess: 5944 0000C73A B448 mov ah, 48h ; get size of largest free block 5945 0000C73C BBFFFF mov bx, -1 5946 0000C73F CD21 int 21h 5947 0000C741 83FB11 cmp bx, 11h ; enough for PSP + one paragraph for code/stack ? 5948 0000C744 7303E9AB00 jb .return_no_clr ; no --> 5949 0000C749 B448 mov ah, 48h ; allocate it 5950 0000C74B CD21 int 21h 5951 0000C74D 7303E9A200 jc .return_no_clr ; (memory taken between the calls) 5952 5953 0000C752 50 push ax 5954 0000C753 E8A800 call zeroregs 5955 0000C756 C606[950C]01 mov byte [reg_eip+1], 100h>>8 5956 0000C75B 58 pop ax 5957 5958 0000C75C 53 push bx 5959 %if _SYMBOLIC 5960 push bx 5961 %endif 5962 0000C75D BF[7C0C] mov di, reg_ds ; fill segment registers ds,es,ss,cs 5963 0000C760 AB stosw 5964 0000C761 AF scasw ; (skip dummy high word) 5965 0000C762 AB stosw 5966 0000C763 AF scasw 5967 0000C764 AB stosw 5968 0000C765 AF scasw 5969 0000C766 AB stosw 5970 0000C767 E8F3C1 call adusetup 5971 0000C76A 8B1E[880C] mov bx, word [reg_cs] ; bx:dx = where to load program 5972 0000C76E 8EC3 mov es, bx 5973 0000C770 58 pop ax ; get size of memory block 5974 0000C771 89C2 mov dx, ax 5975 0000C773 01DA add dx, bx 5976 0000C775 2689160200 mov word [es:ALASAP], dx 5977 0000C77A 3D0010 cmp ax, 1000h 5978 0000C77D 7602 jbe .below64kib ; if memory left <= 64 KiB 5979 0000C77F 31C0 xor ax, ax ; ax = 1000h (same thing, after shifting) 5980 .below64kib: 5981 0000C781 B104 mov cl, 4 5982 0000C783 D3E0 shl ax, cl 5983 0000C785 48 dec ax 5984 0000C786 48 dec ax 5985 0000C787 A3[6C0C] mov word [reg_esp], ax 5986 0000C78A 97 xchg ax, di ; es:di = child stack pointer 5987 0000C78B 31C0 xor ax, ax 5988 0000C78D AB stosw ; push 0 on client's stack 5989 5990 ; Create a PSP 5991 0000C78E B455 mov ah, 55h ; create child PSP 5992 0000C790 8CC2 mov dx, es 5993 0000C792 268B360200 mov si, word [es:ALASAP] 5994 0000C797 F8 clc ; works around OS/2 bug 5995 0000C798 CD21 int 21h 5996 0000C79A E854BF call setpspdbg ; reset PSP to ours 5997 5998 ; Finish up. Set termination address. 5999 0000C79D B82225 mov ax, 2522h ; set interrupt vector 22h 6000 0000C7A0 BA[3787] mov dx, int22 6001 0000C7A3 CD21 int 21h 6002 0000C7A5 2689160A00 mov word [es:TPIV], dx 6003 0000C7AA 268C1E0C00 mov word [es:TPIV+2], ds 6004 6005 0000C7AF 26C6060001C3 mov byte [es:100h], 0C3h ; place opcode for retn at cs:ip 6006 6007 %if _SYMBOLIC 6008 pop bx ; size of memory block 6009 %endif 6010 0000C7B5 8C06[DE0A] mov word [pspdbe], es 6011 0000C7B9 8CC0 mov ax, es 6012 0000C7BB 48 dec ax 6013 0000C7BC 8EC0 mov es, ax 6014 0000C7BE 40 inc ax 6015 0000C7BF 26C70608004445 mov word [es:8+0], "DE" 6016 0000C7C6 26C7060A004255 mov word [es:8+2], "BU" 6017 0000C7CD 26C7060C004747 mov word [es:8+4], "GG" 6018 0000C7D4 26C7060E004545 mov word [es:8+6], "EE" ; set MCB name 6019 0000C7DB 26A30100 mov word [es:1], ax ; set MCB owner 6020 6021 %if _SYMBOLIC 6022 setopt [internalflags2], dif2_createdprocess 6023 mov word [created_psp], ax 6024 mov word [created_size], bx 6025 %endif 6026 6027 0000C7DF 8B36[880C] mov si, word [reg_cs] 6028 0000C7E3 8B3E[940C] mov di, word [reg_eip] ; ? is this ever used ? 6029 6030 0000C7E7 8026[C600]7F clropt [internalflags], attachedterm 6031 0000C7EC 38C0 cmp al, al ; flags return ZR, NC 6032 6033 .return: 6034 @@: 6035 0000C7EE 16 push ss 6036 0000C7EF 07 pop es 6037 6038 0000C7F0 5A pop dx 6039 0000C7F1 5B pop bx 6040 0000C7F2 58 pop ax 6041 0000C7F3 C3 retn 6042 6043 .return_no_clr: 6044 0000C7F4 BA[5F6E] mov dx, msg.ensure_no_memory 6045 0000C7F7 E806EA call putsz 6046 0000C7FA 85D2 test dx, dx ; flags return NZ, NC 6047 0000C7FC EBF0 jmp .return 6048 6049 6050 zeroregs: 6051 ; call set_efl_to_fl ; initialise EFL, and ax = 0 6052 ; set_efl_to_fl: 6053 0000C7FE 31C0 xor ax, ax ; initialise ax = 0 and FL = ZR NC etc 6054 0000C800 50 _no386 push ax ; dummy high word 6055 0000C801 66 _386_o32 ; pushfd 6056 0000C802 9C pushf 6057 0000C803 8F06[980C] pop word [reg_efl] ; set to FL 6058 0000C807 8F06[9A0C] pop word [reg_efl+2] ; set to high word of EFL, or zero 6059 ; retn 6060 6061 0000C80B BF[5C0C] mov di, regs 6062 0000C80E B91E00 mov cx, 15 * 2 ; (8 standard + 6 segregs + eip) * 2 6063 0000C811 F3AB rep stosw ; initialise all registers 6064 0000C813 C3 retn 6065 6066 6067 %if _PM 6068 ; Hook Int2F if a DPMI host is found. However for Win9x and DosEmu 6069 ; Int2F.1687 is not hooked because it doesn't work. Debugging in 6070 ; protected mode may still work, but the initial switch must be 6071 ; single-stepped. 6072 ; 6073 ; CHG: ax, bx, cx, dx, di, es 6074 ; STT: V86/RM 6075 ; ss = ds = debugger data segment 6076 hook2F: 6077 call InDos 6078 jnz .return 6079 testopt [internalflags], hooked2F 6080 jnz .return ; don't hook now --> 6081 .loop: 6082 %if _GUARD_86M_INT2F 6083 push es 6084 xor ax, ax 6085 mov es, ax ; (only used in 86 Mode) 6086 mov ax, [es:2Fh * 4] 6087 cmp ax, -1 6088 je @F ; --> (ZR) 6089 or ax, [es:2Fh * 4 + 2] 6090 @@: 6091 pop es 6092 jz .return 6093 %endif 6094 mov ax, 1687h ; DPMI host installed? 6095 int 2Fh 6096 test ax, ax 6097 jnz .return 6098 mov word [dpmientry+0], di ; true host DPMI entry 6099 mov word [dpmientry+2], es 6100 mov word [dpmiwatch+0], di 6101 mov word [dpmiwatch+2], es 6102 testopt [internalflags], nohook2F 6103 jnz .return ; can't hook Int2F --> 6104 testopt [options4], opt4_int_2F_hook 6105 jz .return ; requested to not hook --> 6106 mov ax, 352Fh 6107 int 21h 6108 mov word [oldi2F+0], bx 6109 mov word [oldi2F+2], es 6110 mov dx, debug2F ; ds => lDEBUG_DATA_ENTRY 6111 mov ax, 252Fh 6112 int 21h 6113 6114 ; Test whether we can hook the DPMI entrypoint call. 6115 mov ax, 1687h 6116 int 2Fh 6117 test ax, ax 6118 jnz .nohost 6119 cmp di, mydpmientry ; our entrypoint returned ? 6120 jne .nohook 6121 mov ax, es 6122 mov bx, ds ; bx => lDEBUG_DATA_ENTRY 6123 cmp ax, bx 6124 jne .nohook ; no --> 6125 6126 mov word [dpmiwatch+0], mydpmientry 6127 mov word [dpmiwatch+2], ds ; => lDEBUG_DATA_ENTRY 6128 6129 setopt [internalflags], hooked2F 6130 setopt [internalflags4], dif4_int_2F_hooked 6131 call update_inttab_optional 6132 %if _DISPHOOK 6133 mov ax, ds ; ax => lDEBUG_DATA_ENTRY 6134 push ds 6135 pop es 6136 mov di, dpmihookcs 6137 call hexword 6138 mov dx, dpmihook 6139 call putsz 6140 %endif 6141 .return: 6142 push ds 6143 pop es 6144 retn 6145 6146 .nohost: 6147 .nohook: 6148 lds dx, [oldi2F] 6149 mov ax, 252Fh 6150 int 21h ; unhook 6151 push ss 6152 pop ds 6153 push ss 6154 pop es ; restore segregs 6155 setopt [internalflags], nohook2F 6156 ; note that we cannot hook 6157 mov dx, msg.dpmi_no_hook 6158 call putsz ; display message about it 6159 jmp .loop 6160 %endif 6161 6162 6163 usesection lDEBUG_DATA_ENTRY 6164 000097B5 00 align 16, db 0 6165 ldebug_data_entry_size equ $-section.lDEBUG_DATA_ENTRY.vstart 6166 endarea ldebug_data_entry, 1 6167 6168 usesection ASMTABLE1 6169 000016C3 00 align 16, db 0 6170 asmtable1_size equ $-section.ASMTABLE1.vstart 6171 endarea asmtable1, 1 6172 6173 usesection ASMTABLE2 6174 00000898 00 align 16, db 0 6175 asmtable2_size equ $-section.ASMTABLE2.vstart 6176 endarea asmtable2, 1 6177 6178 6179 usesection DATASTACK 6180 %define SECTIONFIXUP -$$+100h+ldebug_data_entry_size +asmtable1_size+asmtable2_size 6182 6183 ; I/O buffers 6184 alignb 2 6185 00000000 ?? line_in: resb 1 ; maximal length of input line 6186 00000001 ?? resb 1 ; actual length (must be one less than previous byte) 6187 00000002 resb 255 ; buffer for 13-terminated input line 6188 .end: 6189 ; zero-initialisation starts here 6190 ..@init_first: 6191 ; b_bplist and g_bplist are expected in that order by initcont 6192 %if _BREAKPOINTS 6193 00000101 ?? alignb 2 6194 b_bplist: 6195 00000102 ???? .used_mask: resb (_NUM_B_BP + _NUM_SYM_BP + 7) >> 3 6196 ; bitmask of used points 6197 00000104 ???? .disabled_mask: resb (_NUM_B_BP + _NUM_SYM_BP + 7) >> 3 6198 ; bitmask of disabled points 6199 %if _BREAKPOINTS_STICKY 6200 .sticky_mask: resb (_NUM_B_BP + _NUM_SYM_BP + 7) >> 3 6201 ; bitmask of sticky points 6202 ; desc: stay around during DEBUG's operation unless 6203 ; explicitly removed/un-stickified. This allows 6204 ; to keep breakpoints around while changing from PM. 6205 ; Hits while in DEBUG are ignored though, use DDEBUG. 6206 ; Disabling won't remove them, just ignores hits. 6207 %endif 6208 alignb 2 6209 00000106 .bp: resb (_NUM_B_BP + _NUM_SYM_BP) * BPSIZE 6210 alignb 2 6211 00000166 .counter: resw _NUM_B_BP 6212 alignb 2 6213 00000186 .id: resw _NUM_B_BP ; array of lengths/offsets, 0 = unused 6214 ; low 10 bits = offset into .idbuffer (0..1023) 6215 ; high 6 bits = length (0..63, 0 if unused) 6216 alignb 2 6217 000001A6 .when: resw _NUM_B_BP ; array of pointers, 0 = unused 6218 6219 .idbuffer.length: equ _NUM_B_ID_BYTES 6220 .idbuffer.free: 6221 000001C6 ???? resw 1 ; offset into .idbuffer of free space 6222 ; (0..1024) 6223 6224 .whenbuffer.length: equ _NUM_B_WHEN_BYTES 6225 .whenbuffer.free: 6226 000001C8 ???? resw 1 ; *offset* into .whenbuffer 6227 ; (not a pointer) 6228 6229 .idbuffer: 6230 000001CA resb .idbuffer.length ; buffer holding ID strings 6231 .whenbuffer: 6232 0000034A resb .whenbuffer.length ; buffer holding condition strings 6233 %endif 6234 %if _NUM_G_BP 6235 0000074A ?? resb 1 - (($-$$) % 2) ; make g_bplist.bp aligned 6236 g_bplist: 6237 0000074B ?? .used_count: resb 1 ; for the byte counter of saved breakpoints 6238 0000074C .bp: resb _NUM_G_BP*BPSIZE 6239 .end: 6240 %endif 6241 %if _HISTORY && ! _HISTORY_SEPARATE_FIXED 6242 historybuffer: resb _HISTORY_SIZE 6243 .end: 6244 %endif 6245 6246 ; $ - $$ = offset into section 6247 ; % 2 = 1 if odd offset, 0 if even 6248 ; 2 - = 1 if odd, 2 if even 6249 ; % 2 = 1 if odd, 0 if even 6250 ; resb (2 - (($-$$) % 2)) % 2 6251 ; $ - $$ = offset into section 6252 ; % 2 = 1 if odd offset, 0 if even 6253 ; 1 - = 0 if odd, 1 if even 6254 000007AC ?? resb 1 - (($-$$) % 2) ; make line_out aligned 6255 000007AD ?? trim_overflow: resb 1 ; actually part of line_out to avoid overflow of trimputs loop 6256 000007AE line_out: resb 263 6257 000008B5 ?? resb 1 ; reserved for terminating zero 6258 line_out_end: 6259 alignb 2 6260 000008B6 ???? line_out_overflow: resw 1 ; 2642h if line_out didn't overflow 6261 6262 alignb 2 6263 000008B8 ???? serial_save_irq_mask: resw 1 6264 000008BA ???? serial_save_irq_off: resw 1 6265 000008BC ???? serial_save_dl: resw 1 6266 000008BE ?? serial_save_ier: resb 1 6267 000008BF ?? serial_save_lcr: resb 1 6268 000008C0 ?? serial_save_mcr: resb 1 6269 %if _USE_TX_FIFO 6270 000008C1 ?? serial_fcr_setting: resb 1 6271 %endif 6272 000008C2 ?? serial_use_intnum: resb 1 6273 000008C3 ?? serial_use_params: resb 1 6274 000008C4 ?? serial_use_fifo: resb 1 6275 000008C5 ?? alignb 2 6276 baseport: 6277 000008C6 ???? serial_use_baseport: resw 1 6278 000008C8 ???? serial_use_dl: resw 1 6279 000008CA ???? serial_use_irqmask: resw 1 6280 6281 alignb 2 6282 000008CC ???? rxhead: resw 1 6283 000008CE ???? rxtail: resw 1 6284 000008D0 ???? txhead: resw 1 6285 000008D2 ???? txtail: resw 1 6286 000008D4 alignb 16 6287 000008E0 rxfifo: resb _RXFIFOSIZE 6288 alignb 16 6289 00000960 txfifo: resb _TXFIFOSIZE 6290 6291 6292 %if _SYMBOLIC 6293 %if _BUFFER_86MM_SLICE || _XMS_SYMBOL_TABLE 6294 alignb 16 6295 access_slice_buffer: 6296 .: 6297 resb ssString + 255 6298 alignb 2 6299 .size: equ $ - . 6300 %if _SECOND_SLICE 6301 alignb 16 6302 second_access_slice_buffer: 6303 .: 6304 resb ssString + 255 6305 alignb 2 6306 .size: equ $ - . 6307 %endif 6308 %endif 6309 alignb 16 6310 str_buffer: resb 512 ; long enough for smName1 + smName2 content 6311 ; by placing this buffer below the stack, a stack overflow 6312 ; might be less harmful if the str_buffer isn't in use. 6313 %endif 6314 6315 ; zero-initialisation ends here 6316 ..@init_behind: 6317 6318 alignb 16 ; stack might be re-used as GDT, so align it on a paragraph 6319 000009E0 stack: resb _STACKSIZE 6320 alignb 2 ; ensure stack aligned 6321 stack_end: 6322 6323 datastack_size equ $-section.DATASTACK.vstart 6324 endarea datastack, 1 6325 6326 6327 usesection INIT 6328 initstart: 6329 6330 %include "init.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug initialisation 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2012 C. Masloch 8 <1> 9 <1> Usage of the works is permitted provided that this 10 <1> instrument is retained with the works, so that any entity 11 <1> that uses the works is notified of this instrument. 12 <1> 13 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 14 <1> 15 <1> %endif 16 <1> 17 <1> 18 <1> usesection INIT 19 <1> 20 <1> initcode: 21 <1> %if ($ - $$) != 0 22 <1> %fatal initcode expected at start of section 23 <1> %endif 24 <1> 25 00000000 8CD0 <1> mov ax, ss 26 00000002 8CDA <1> mov dx, ds 27 00000004 29D0 <1> sub ax, dx 28 00000006 31D2 <1> xor dx, dx 29 00000008 B90400 <1> mov cx, 4 30 <1> @@: 31 0000000B D1E0 <1> shl ax, 1 32 0000000D D1D2 <1> rcl dx, 1 33 0000000F E2FA <1> loop @B 34 <1> 35 00000011 50 <1> push ax ; (if sp was zero) 36 <1> 37 00000012 01E0 <1> add ax, sp 38 00000014 83D200 <1> adc dx, 0 39 00000017 83C00F <1> add ax, 15 40 0000001A 83D200 <1> adc dx, 0 41 <1> 42 0000001D 24F0 <1> and al, ~15 43 <1> 44 0000001F 83FA02 <1> cmp dx, NONBOOTINITSTACK_END >> 16 45 00000022 771B <1> ja .stackdownfirst 46 00000024 7205 <1> jb .memupfirst 47 00000026 3D0005 <1> cmp ax, NONBOOTINITSTACK_END & 0FFFFh 48 00000029 7314 <1> jae .stackdownfirst 49 <1> .memupfirst: 50 0000002B BB5020 <1> mov bx, paras(NONBOOTINITSTACK_END) 51 0000002E B44A <1> mov ah, 4Ah 52 00000030 CD21 <1> int 21h 53 00000032 730B <1> jnc @F 54 <1> .memfail: 55 00000034 BA[6D08] <1> mov dx, imsg.early_mem_fail 56 <1> .earlyfail: 57 00000037 E8CB0E <1> call init_putsz_cs 58 0000003A B8FF4C <1> mov ax, 4CFFh 59 0000003D CD21 <1> int 21h 60 <1> 61 <1> @@: 62 <1> .stackdownfirst: 63 0000003F 8CD8 <1> mov ax, ds 64 00000041 053020 <1> add ax, paras(NONBOOTINITSTACK_START) 65 00000044 FA <1> cli 66 00000045 8ED0 <1> mov ss, ax 67 00000047 BC0002 <1> mov sp, NONBOOTINITSTACK_SIZE 68 0000004A FB <1> sti 69 <1> 70 <1> ; if jumped to .stackdownfirst: now, shrink our memory block 71 <1> ; else: no-op (already grew or shrunk block) 72 0000004B BB5020 <1> mov bx, paras(NONBOOTINITSTACK_END) 73 0000004E B44A <1> mov ah, 4Ah 74 00000050 CD21 <1> int 21h 75 00000052 72E0 <1> jc .memfail 76 <1> 77 <1> 78 00000054 8CD8 <1> mov ax, ds 79 00000056 050718 <1> add ax, paras(INITSECTIONOFFSET) 80 00000059 8CDA <1> mov dx, ds 81 0000005B 81C2C71E <1> add dx, paras(NONBOOTINITTARGET) 82 0000005F B96901 <1> mov cx, init_size_p 83 00000062 E80F0E <1> call init_movp 84 <1> 85 00000065 52 <1> push dx 86 00000066 E88B00 <1> call init_retf 87 <1> 88 00000069 8CDB <1> mov bx, ds 89 0000006B 89DA <1> mov dx, bx 90 0000006D 81C3C518 <1> add bx, paras(AUXTARGET1) 91 00000071 81C2410C <1> add dx, paras(CODETARGET1) 92 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 93 00000075 89D8 <1> mov ax, bx 94 00000077 050102 <1> add ax, paras(auxbuff_size) 95 <1> CODETARGET1_equ equ CODETARGET1 96 <1> CODETARGET2_equ equ CODETARGET2 97 <1> AUXTARGET1_equ equ AUXTARGET1 98 <1> AUXTARGET2_equ equ AUXTARGET2 99 <1> %if AUXTARGET1_equ <= CODETARGET1_equ 100 <1> %assign nn AUXTARGET1_equ 101 <1> %assign mm CODETARGET1_equ 102 <1> %error Unexpected layout aux = nn code = mm 103 <1> %endif 104 <1> %endif 105 0000007A 89D1 <1> mov cx, dx 106 0000007C E87600 <1> call init_check_auxbuff 107 0000007F 742F <1> jz @F 108 <1> 109 00000081 8CDB <1> mov bx, ds 110 00000083 89DA <1> mov dx, bx 111 00000085 81C3410C <1> add bx, paras(AUXTARGET2) 112 00000089 81C2420E <1> add dx, paras(CODETARGET2) 113 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 114 <1> ldebug_code_size_equ equ ldebug_code_size 115 <1> auxbuff_size_equ equ auxbuff_size 116 <1> %if (paras(AUXTARGET1_equ) + paras(auxbuff_size_equ)) != (paras(CODETARGET2_equ) + paras(ldebug_code_size_equ)) 118 <1> %error Unexpected layout 119 <1> %endif 120 <1> %endif 121 0000008D E86500 <1> call init_check_auxbuff 122 00000090 741E <1> jz @F 123 <1> 124 <1> ; If both prior attempts failed, we allocate 125 <1> ; an additional 8 KiB and move the buffer to 126 <1> ; that. This should always succeed. 127 00000092 2EC706[6008]C71E <1> mov word [cs:memsize], paras(AUXTARGET3 + auxbuff_size + historysegment_size) 130 <1> ; enlarge the final memory block size 131 <1> 132 00000099 8CDB <1> mov bx, ds 133 0000009B 81C3C61A <1> add bx, paras(AUXTARGET3) 134 0000009F 89CA <1> mov dx, cx 135 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 136 000000A1 89D8 <1> mov ax, bx 137 000000A3 050102 <1> add ax, paras(auxbuff_size) 138 <1> %endif 139 000000A6 E84C00 <1> call init_check_auxbuff 140 000000A9 7405 <1> jz @F 141 <1> 142 <1> ; Because this shouldn't happen, this is 143 <1> ; considered an internal error. 144 000000AB BA[A608] <1> mov dx, imsg.early_reloc_fail 145 000000AE EB87 <1> jmp .earlyfail 146 <1> 147 <1> @@: 148 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 149 000000B0 50 <1> push ax 150 <1> %endif 151 000000B1 8CD8 <1> mov ax, ds 152 000000B3 05830B <1> add ax, paras(CODESECTIONOFFSET) 153 000000B6 B9840C <1> mov cx, ldebug_code_size_p 154 000000B9 E8B80D <1> call init_movp 155 <1> 156 000000BC 8916[0001] <1> mov word [code_seg], dx ; initialise code segment reference 157 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 158 000000C0 58 <1> pop ax 159 000000C1 A3[3C0B] <1> mov word [history.segorsel + soaSegSel], ax 160 <1> %if _PM 161 <1> mov word [history.segorsel + soaSegment], ax 162 <1> %endif 163 000000C4 8EC0 <1> mov es, ax 164 000000C6 31FF <1> xor di, di 165 000000C8 B90010 <1> mov cx, historysegment_size >> 1 166 000000CB 31C0 <1> xor ax, ax 167 000000CD F3AB <1> rep stosw 168 <1> %endif 169 <1> 170 000000CF 89D8 <1> mov ax, bx 171 <1> 172 000000D1 A3[2A0A] <1> mov word [auxbuff_segorsel + soaSegSel], ax 173 <1> %if _PM 174 <1> mov word [auxbuff_segorsel + soaSegment], ax 175 <1> ; initialise auxbuff references 176 <1> %endif 177 000000D4 8EC0 <1> mov es, ax 178 000000D6 31FF <1> xor di, di 179 000000D8 B90810 <1> mov cx, _AUXBUFFSIZE >> 1 180 000000DB 31C0 <1> xor ax, ax 181 000000DD F3AB <1> rep stosw ; initialise auxbuff 182 <1> 183 000000DF FA <1> cli 184 000000E0 8CD8 <1> mov ax, ds 185 000000E2 8EC0 <1> mov es, ax 186 000000E4 8ED0 <1> mov ss, ax 187 000000E6 BC[E00B] <1> mov sp, stack_end 188 000000E9 FB <1> sti 189 <1> 190 000000EA B44A <1> mov ah, 4Ah 191 000000EC BB3020 <1> mov bx, paras(NONBOOTINITSTACK_START) 192 000000EF CD21 <1> int 21h ; shrink to drop init stack 193 <1> 194 000000F1 E98B0E <1> jmp old_initcode 195 <1> 196 <1> 197 <1> init_retf: 198 000000F4 CB <1> retf 199 <1> 200 <1> 201 <1> ; INP: bx => destination for auxbuff 202 <1> ; (The following are not actually used by this function, 203 <1> ; they're just what is passed in and preserved to 204 <1> ; be used by the caller after returning.) 205 <1> ; dx => destination for code image 206 <1> ; (if boot-loaded:) cx => destination for pseudo-PSP 207 <1> ; (implies cx+10h => destination for data_entry) 208 <1> ; ax => segment for history buffer 209 <1> ; OUT: ZR if this destination for auxbuff doesn't cross 210 <1> ; a 64 KiB boundary 211 <1> ; NZ else 212 <1> ; CHG: si, di 213 <1> init_check_auxbuff: 214 000000F5 89DE <1> mov si, bx ; => auxbuff 215 <1> %if _AUXBUFFSIZE < 8192 216 <1> %error Expected full sector length auxbuff 217 <1> %endif 218 000000F7 8DBC0002 <1> lea di, [si + (8192 >> 4)]; => behind auxbuff (at additional paragraph) 219 000000FB 81E600F0 <1> and si, 0F000h ; => 64 KiB chunk of first paragraph of auxbuff 220 000000FF 81E700F0 <1> and di, 0F000h ; => 64 KiB chunk of additional paragraph 221 00000103 39F7 <1> cmp di, si ; same ? 222 <1> ; ZR if they are the same 223 00000105 C3 <1> retn 224 <1> 225 <1> 226 <1> %if _BOOTLDR 227 <1> ; Our loader transfers control to us with these registers: 228 <1> ; INP: ss:bp -> BPB 229 <1> ; ss:bp - 16 -> loadstackvars 230 <1> ; ss:bp - 32 -> loaddata 231 <1> ; (loader enters at) cs:0 -> loaded payload 232 <1> ; (loader enters at) cs:32 -> entry point 233 <1> ; (entrypoint sets up) ds:100h -> loaded payload 234 <1> ; STT: EI, UP 235 <1> ; all interrupts left from BIOS 236 <1> boot_initcode: 237 00000106 FC <1> cld 238 <1> 239 <1> d4 call init_d4message 240 <1> d4 asciz "In boot_initcode",13,10 241 <1> 242 00000107 8B56E0 <1> mov dx, word [bp + ldMemoryTop] 243 <1> 244 <1> ; initialise sdp 245 0000010A 8B461E <1> mov ax, word [bp + bsBPB + bpbHiddenSectors + 2] 246 0000010D A3[2E8C] <1> mov word [load_data - LOADDATA2 + bsBPB + bpbHiddenSectors + 2], ax 247 00000110 8B461C <1> mov ax, word [bp + bsBPB + bpbHiddenSectors] 248 00000113 A3[2C8C] <1> mov word [load_data - LOADDATA2 + bsBPB + bpbHiddenSectors], ax 249 00000116 8A4640 <1> mov al, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 250 00000119 A2[508C] <1> mov byte [load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit], al 251 <1> 252 0000011C 8CDB <1> mov bx, ds 253 0000011E 8EC3 <1> mov es, bx ; => data entry image 254 00000120 BF[508B] <1> mov di, loaddata_loadedfrom ; -> loaded from data (ldp) 255 <1> 256 <1> ; initialise LOADDATA, LOADSTACKVARS, and BPB 257 00000123 16 <1> push ss 258 00000124 1F <1> pop ds 259 00000125 8D76E0 <1> lea si, [bp + LOADDATA] ; -> LOADDATA on stack 260 00000128 B97A00 <1> mov cx, (-LOADDATA + bsBPB + ebpbNew + BPBN_size) 261 0000012B F3A4 <1> rep movsb 262 <1> 263 <1> ; initialise cmdline_buffer from below LOADDATA 264 0000012D 8DB6E0FE <1> lea si, [bp + ldCommandLine.start] 265 00000131 BF[1001] <1> mov di, cmdline_buffer ; -> our buffer in data entry 266 <1> 267 00000134 813C00FF <1> cmp word [si], 0FF00h 268 00000138 7505 <1> jne @F 269 <1> 270 0000013A 0E <1> push cs 271 0000013B 1F <1> pop ds 272 0000013C BE[010C] <1> mov si, imsg.default_cmdline 273 <1> 274 <1> @@: 275 0000013F AC <1> lodsb 276 00000140 84C0 <1> test al, al 277 00000142 741F <1> jz @FF 278 <1> 279 00000144 26800E[CD00]01 <1> setopt [es:internalflags3], dif3_input_cmdline 280 0000014A A9 <1> db __TEST_IMM16 281 <1> .switch_c_loop: 282 0000014B AA <1> stosb 283 0000014C AC <1> lodsb 284 0000014D 3C00 <1> cmp al, 0 285 0000014F 7411 <1> je @F 286 00000151 3C3B <1> cmp al, ';' 287 00000153 7504 <1> jne .switch_c_not_semicolon 288 00000155 B00D <1> mov al, 13 289 00000157 EBF2 <1> jmp .switch_c_loop 290 <1> 291 <1> .switch_c_not_semicolon: 292 00000159 3C5C <1> cmp al, '\' 293 0000015B 75EE <1> jne .switch_c_loop 294 0000015D AC <1> lodsb 295 0000015E 3C00 <1> cmp al, 0 296 00000160 75E9 <1> jne .switch_c_loop 297 <1> 298 <1> @@: 299 00000162 AA <1> stosb 300 <1> @@: 301 <1> 302 00000163 89D0 <1> mov ax, dx 303 00000165 2D001F <1> sub ax, paras(BOOTDELTA) 304 00000168 7303E9E900 <1> jc .error_out_of_memory 305 <1> ; We exaggerate the target size (BOOTDELTA) for the 306 <1> ; worst case, thus we do not need to check for narrower 307 <1> ; fits later on. BOOTDELTA includes the pseudo-PSP size, 308 <1> ; data_entry size, asmtable1_size, asmtable2_size, 309 <1> ; datastack_size, code_size, 2 times auxbuff_size, 310 <1> ; historysegment_size, 311 <1> ; plus 16 bytes for the image ident prefix paragraph, 312 <1> ; and all of that rounded to a kibibyte boundary. 313 <1> 314 0000016D 8CC9 <1> mov cx, cs 315 0000016F 81C18901 <1> add cx, paras(init_size + BOOTINITSTACK_SIZE) 316 00000173 7303E9DE00 <1> jc .error_out_of_memory 317 00000178 39D1 <1> cmp cx, dx 318 0000017A 7603E9D700 <1> ja .error_out_of_memory 319 <1> 320 0000017F 8CCF <1> mov di, cs 321 00000181 FA <1> cli 322 00000182 8ED7 <1> mov ss, di 323 00000184 BC9018 <1> mov sp, init_size + BOOTINITSTACK_SIZE 324 00000187 FB <1> sti 325 <1> 326 <1> d4 call init_d4message 327 <1> d4 asciz "Switched to init stack",13,10 328 <1> 329 <1> lframe none 330 <1> lvar word, relocatedparas 331 <1> lvar word, target 332 00000188 5589E55050 <1> lenter 333 <1> lvar word, targetstart 334 0000018D 50 <1> push ax 335 <1> lvar word, memtop 336 0000018E 52 <1> push dx 337 0000018F 8D7F10 <1> lea di, [bx + 10h] 338 <1> lvar word, data 339 00000192 57 <1> push di 340 00000193 8DBF830B <1> lea di, [bx + paras(CODESECTIONOFFSET)] 341 <1> lvar word, code 342 00000197 57 <1> push di 343 <1> 344 00000198 39C1 <1> cmp cx, ax ; does init end below-or-equal target ? 345 0000019A 7703E9C500 <1> jbe .no_relocation ; yes, no relocation needed --> 346 <1> 347 <1> d4 call init_d4message 348 <1> d4 asciz "Needs relocation of init segment",13,10 349 <1> 350 0000019F 8B46F6 <1> mov ax, word [bp + ?data] 351 000001A2 2D8901 <1> sub ax, paras(init_size + BOOTINITSTACK_SIZE) 352 000001A5 7303E9AC00 <1> jc .error_out_of_memory ; already at start of memory --> 353 000001AA 83F860 <1> cmp ax, 60h 354 000001AD 7303E9A400 <1> jb .error_out_of_memory ; already at start of memory --> 355 <1> 356 000001B2 0E <1> push cs 357 000001B3 1F <1> pop ds 358 000001B4 31F6 <1> xor si, si ; -> init source 359 000001B6 8EC0 <1> mov es, ax 360 000001B8 31FF <1> xor di, di ; -> init destination 361 000001BA B9480C <1> mov cx, words(init_size + BOOTINITSTACK_SIZE) 362 000001BD F3A5 <1> rep movsw ; relocate only init 363 <1> ; Must not modify the data already on the stack here, 364 <1> ; until after .done_relocation (which relocates ss). 365 <1> 366 000001BF 50 <1> push ax 367 000001C0 E831FF <1> call init_retf ; jump to new init 368 <1> 369 000001C3 8ED0 <1> mov ss, ax 370 000001C5 8B4EF4 <1> mov cx, word [bp + ?code] 371 000001C8 81C1840C <1> add cx, paras(ldebug_code_size) 372 000001CC 3B4EFA <1> cmp cx, word [bp + ?targetstart] 373 <1> ; does code end below-or-equal target ? 374 000001CF 7703E99000 <1> jbe .done_relocation ; yes, relocated enough --> 375 <1> 376 <1> d4 call init_d4message 377 <1> d4 asciz "Needs relocation of entire load image",13,10 378 <1> 379 000001D4 BA6000 <1> mov dx, 60h 380 000001D7 8EC2 <1> mov es, dx 381 000001D9 8CC8 <1> mov ax, cs 382 000001DB 39C2 <1> cmp dx, ax ; already at start of memory ? 383 000001DD 7377 <1> jae .error_out_of_memory ; then error --> 384 <1> 385 000001DF 42 <1> inc dx 386 <1> ; cmp dx, ax 387 <1> ; ja .error_out_of_memory 388 000001E0 52 <1> push dx 389 000001E1 2EFF36[0C02] <1> push word [cs:.word_relocated] ; on stack: far address of .relocated 390 <1> 391 000001E6 89C1 <1> mov cx, ax ; source 392 000001E8 29D1 <1> sub cx, dx ; source - target = how far to relocate 393 000001EA 894EFE <1> mov word [bp + ?relocatedparas], cx 394 <1> ; save away this value 395 <1> 396 000001ED 31FF <1> xor di, di ; es:di -> where to put relocator 397 000001EF 06 <1> push es 398 000001F0 57 <1> push di ; on stack: relocator destination 399 000001F1 0E <1> push cs 400 000001F2 1F <1> pop ds 401 000001F3 BE[0E02] <1> mov si, .relocator ; -> relocator source 402 000001F6 B90800 <1> mov cx, 8 403 000001F9 F3A5 <1> rep movsw ; put relocator stub 404 <1> 405 000001FB 8EC2 <1> mov es, dx 406 000001FD 31FF <1> xor di, di ; -> where to relocate to 407 000001FF 31F6 <1> xor si, si ; -> relocate start 408 <1> 409 <1> BOOTRELOC1 equ paras( init_size + BOOTINITSTACK_SIZE + ldebug_data_entry_size + asmtable1_size + asmtable2_size + ldebug_code_size) 412 <1> 413 <1> %if 0 414 <1> mov cx, BOOTRELOC1 ; how much to relocate 415 <1> mov bx, 1000h 416 <1> mov ax, cx 417 <1> cmp ax, bx ; > 64 KiB? 418 <1> jbe @F 419 <1> mov cx, bx ; first relocate the first 64 KiB 420 <1> @@: 421 <1> sub ax, cx ; how much to relocate later 422 <1> shl cx, 1 423 <1> shl cx, 1 424 <1> shl cx, 1 ; how much to relocate first, 425 <1> ; << 3 == convert paragraphs to words 426 <1> %else 427 00000201 BB0010 <1> mov bx, 1000h 428 <1> %if BOOTRELOC1 > 1000h 429 00000204 B90080 <1> mov cx, 8000h 430 00000207 B88009 <1> mov ax, BOOTRELOC1 - 1000h 431 <1> %else 432 <1> mov cx, BOOTRELOC1 << 3 433 <1> xor ax, ax 434 <1> %endif 435 <1> %endif 436 0000020A CB <1> retf ; jump to relocator 437 <1> 438 0000020B 00 <1> align 2, db 0 439 <1> .word_relocated: 440 0000020C [1102] <1> dw .relocated 441 <1> 442 <1> ; ds:si -> first chunk of to be relocated data 443 <1> ; es:di -> first chunk of relocation destination 444 <1> ; cx = number of words in first chunk 445 <1> .relocator: 446 0000020E F3A5 <1> rep movsw 447 00000210 CB <1> retf ; jump to relocated cs : .relocated 448 <1> 449 <1> .relocated: 450 <1> @@: 451 00000211 8CC2 <1> mov dx, es 452 00000213 01DA <1> add dx, bx 453 00000215 8EC2 <1> mov es, dx ; next segment 454 <1> 455 00000217 8CDA <1> mov dx, ds 456 00000219 01DA <1> add dx, bx 457 0000021B 8EDA <1> mov ds, dx ; next segment 458 <1> 459 0000021D 29D8 <1> sub ax, bx ; = how much to relocate after this round 460 0000021F B90080 <1> mov cx, 1000h << 3 ; in case another full 64 KiB to relocate 461 00000222 730B <1> jae @F ; another full 64 KiB to relocate --> 462 00000224 01D8 <1> add ax, bx ; restore 463 00000226 D1E0 <1> shl ax, 1 464 00000228 D1E0 <1> shl ax, 1 465 0000022A D1E0 <1> shl ax, 1 ; convert paragraphs to words 466 0000022C 91 <1> xchg cx, ax ; cx = that many words 467 0000022D 31C0 <1> xor ax, ax ; no more to relocate after this round 468 <1> 469 <1> @@: 470 0000022F 31F6 <1> xor si, si 471 00000231 31FF <1> xor di, di 472 00000233 F3A5 <1> rep movsw ; relocate next chunk 473 00000235 85C0 <1> test ax, ax ; another round needed? 474 00000237 75D8 <1> jnz @BB ; yes --> 475 <1> 476 00000239 8CC8 <1> mov ax, cs 477 0000023B 8ED0 <1> mov ss, ax ; relocate the stack 478 <1> ; The stack frame variables have been relocated here 479 <1> ; along with the INIT segment data. 480 <1> 481 0000023D 8B46FE <1> mov ax, word [bp + ?relocatedparas] 482 00000240 2946F6 <1> sub word [bp + ?data], ax 483 00000243 721A <1> jc .error_internal 484 00000245 2946F4 <1> sub word [bp + ?code], ax 485 00000248 7215 <1> jc .error_internal 486 <1> 487 0000024A 8B4EF4 <1> mov cx, word [bp + ?code] 488 0000024D 81C1840C <1> add cx, paras(ldebug_code_size) 489 00000251 3B4EFA <1> cmp cx, word [bp + ?targetstart] 490 <1> ; does code end below-or-equal target ? 491 00000254 760E <1> jbe .done_relocation ; yes --> 492 <1> 493 <1> .error_out_of_memory: 494 00000256 BA[C90C] <1> mov dx, imsg.boot_error_out_of_memory 495 <1> .putsz_error: 496 00000259 E8CB0C <1> call init_putsz_cs_bootldr 497 0000025C E90B02 <1> jmp init_booterror.soft 498 <1> 499 <1> .error_internal: 500 0000025F BA[DA0C] <1> mov dx, imsg.boot_error_internal 501 00000262 EBF5 <1> jmp .putsz_error 502 <1> 503 <1> 504 <1> .done_relocation: 505 <1> .no_relocation: 506 00000264 8CC8 <1> mov ax, cs 507 00000266 8ED0 <1> mov ss, ax ; relocate the stack 508 <1> ; The stack frame variables have been relocated here 509 <1> ; along with the INIT segment data. 510 <1> 511 00000268 2EC606[6F04]A8 <1> mov byte [cs:init_booterror.patch_switch_stack], __TEST_IMM8 512 <1> ; SMC in section INIT 513 <1> 514 <1> d4 call init_d4message 515 <1> d4 asciz "Relocated enough",13,10 516 <1> 517 <1> 518 0000026E CD12 <1> int 12h 519 00000270 B106 <1> mov cl, 6 520 00000272 D3E0 <1> shl ax, cl 521 <1> 522 00000274 50 <1> push ax 523 00000275 1E <1> push ds 524 00000276 31F6 <1> xor si, si 525 00000278 92 <1> xchg dx, ax 526 00000279 8EDE <1> mov ds, si 527 0000027B C536BC00 <1> lds si, [4 * 2Fh] 528 0000027F 83C603 <1> add si, 3 529 00000282 AC <1> lodsb 530 00000283 3C52 <1> cmp al, 'R' 531 00000285 750F <1> jne .no_rpl 532 00000287 AC <1> lodsb 533 00000288 3C50 <1> cmp al, 'P' 534 0000028A 750A <1> jne .no_rpl 535 0000028C AC <1> lodsb 536 0000028D 3C4C <1> cmp al, 'L' 537 0000028F 7505 <1> jne .no_rpl 538 00000291 B8064A <1> mov ax, 4A06h 539 00000294 CD2F <1> int 2Fh 540 <1> .no_rpl: 541 00000296 92 <1> xchg ax, dx 542 00000297 1F <1> pop ds 543 00000298 5A <1> pop dx 544 <1> 545 00000299 39D0 <1> cmp ax, dx 546 0000029B 7405 <1> je .no_error_rpl 547 <1> ; in case RPL is present, error out (for now) 548 <1> 549 <1> ; notes for +RPL installation: 550 <1> ; 1. Allocate enough memory for our MCB + an PSP + our image + the last and the RPL MCB 551 <1> ; 2. Create the RPL's MCB + a last MCB 552 <1> ; 3. Relocate, initialise PSP 553 <1> ; 4. Hook Int2F as RPLOADER to report DOS our new size 554 <1> 555 0000029D BA[4F0C] <1> mov dx, imsg.rpl_detected 556 000002A0 EBB7 <1> jmp .putsz_error 557 <1> 558 <1> .no_error_rpl: 559 <1> d4 call init_d4message 560 <1> d4 asciz "Loader past RPL detection",13,10 561 <1> 562 000002A2 8B5EF8 <1> mov bx, word [bp + ?memtop] 563 000002A5 39C3 <1> cmp bx, ax 564 000002A7 7405 <1> je @F 565 <1> 566 000002A9 BA[760C] <1> mov dx, imsg.mismatch_detected 567 000002AC EBAB <1> jmp .putsz_error 568 <1> 569 <1> @@: ; bx => behind usable memory 570 <1> %if 0 571 <1> mov ah, 0C1h 572 <1> stc 573 <1> int 15h ; BIOS, do you have an EBDA? 574 <1> mov ax, es 575 <1> jnc .ebda ; segment in ax --> 576 <1> ; I don't believe you, let's check 577 <1> %endif ; Enabling this would enable the BIOS to return an EBDA even if it isn't 578 <1> ; noted at 40h:0Eh, which would be useless because we have to relocate it. 579 <1> 580 000002AE 31D2 <1> xor dx, dx ; initialise dx to zero if no EBDA 581 000002B0 B84000 <1> mov ax, 40h 582 000002B3 8EC0 <1> mov es, ax 583 000002B5 26A10E00 <1> mov ax, word [ es:0Eh ] ; EBDA segment (unless zero) or LPT4 base I/O address (200h..3FCh) 584 000002B9 3D0004 <1> cmp ax, 400h 585 000002BC 7223 <1> jb .noebda ; --> 586 <1> .ebda: 587 <1> d4 call init_d4message 588 <1> d4 asciz "EBDA detected",13,10 589 <1> 590 000002BE 2EFE06[6C08] <1> inc byte [cs:init_boot_ebdaflag] 591 000002C3 39D8 <1> cmp ax, bx 592 <1> ;jb init_booterror.soft ; uhh, the EBDA is inside our memory? 593 <1> ;ja init_booterror.soft ; EBDA higher than top of memory. This is just as unexpected. 594 000002C5 7405 <1> je @F 595 000002C7 BA[AA0C] <1> mov dx, imsg.boot_ebda_unexpected 596 000002CA EB8D <1> jmp .putsz_error 597 <1> 598 <1> @@: 599 000002CC 8ED8 <1> mov ds, ax 600 000002CE 31D2 <1> xor dx, dx 601 000002D0 8A160000 <1> mov dl, byte [ 0 ] ; EBDA size in KiB 602 000002D4 B106 <1> mov cl, 6 603 000002D6 D3E2 <1> shl dx, cl ; *64, to paragraphs 604 000002D8 2E8916[6608] <1> mov word [cs:init_boot_ebdasize], dx 605 000002DD 2EA3[6808] <1> mov word [cs:init_boot_ebdasource], ax 606 <1> d4 jmp @F 607 <1> .noebda: 608 <1> d4 call init_d4message 609 <1> d4 asciz "No EBDA detected",13,10 610 <1> @@: 611 <1> 612 <1> 613 000002E1 8B4EF8 <1> mov cx, word [bp + ?memtop] 614 000002E4 2E030E[6608] <1> add cx, [cs:init_boot_ebdasize] 615 000002E9 81E9C61C <1> sub cx, paras(INITSECTIONOFFSET + datastack_size + auxbuff_size + historysegment_size) 616 <1> ; cx = paragraph of pseudo-PSP if here 617 000002ED 49 <1> dec cx ; => paragraph of image ident 618 000002EE 83E1C0 <1> and cx, ~ (paras(1024) - 1) ; round down to kibibyte boundary 619 000002F1 41 <1> inc cx ; => paragraph of pseudo-PSP if here 620 <1> 621 000002F2 89CB <1> mov bx, cx 622 000002F4 89DA <1> mov dx, bx 623 000002F6 81C3C518 <1> add bx, paras(AUXTARGET1) ; => auxbuff target if here 624 000002FA 81C2410C <1> add dx, paras(CODETARGET1) ; => code target if here 625 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 626 000002FE 89D8 <1> mov ax, bx 627 00000300 050102 <1> add ax, paras(auxbuff_size) 628 <1> %if AUXTARGET1_equ <= CODETARGET1_equ 629 <1> %error Unexpected layout 630 <1> %endif 631 <1> %endif 632 00000303 E8EFFD <1> call init_check_auxbuff 633 00000306 743E <1> jz @F 634 <1> 635 <1> d4 call init_d4message 636 <1> d4 asciz "First layout rejected",13,10 637 <1> 638 00000308 89CB <1> mov bx, cx ; attempt same target again 639 0000030A 89DA <1> mov dx, bx 640 0000030C 81C3410C <1> add bx, paras(AUXTARGET2) ; => auxbuff target if here 641 00000310 81C2420E <1> add dx, paras(CODETARGET2) ; => code target if here 642 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 643 <1> %if (paras(AUXTARGET1_equ) + paras(auxbuff_size_equ)) != (paras(CODETARGET2_equ) + paras(ldebug_code_size_equ)) 645 <1> %error Unexpected layout 646 <1> %endif 647 <1> %endif 648 00000314 E8DEFD <1> call init_check_auxbuff 649 00000317 742D <1> jz @F 650 <1> 651 <1> d4 call init_d4message 652 <1> d4 asciz "Second layout rejected",13,10 653 <1> 654 <1> ; If both prior attempts failed, we allocate 655 <1> ; an additional 8 KiB and move the buffer to 656 <1> ; that. This should always succeed. 657 00000319 8B4EF8 <1> mov cx, word [bp + ?memtop] 658 0000031C 2E030E[6608] <1> add cx, [cs:init_boot_ebdasize] 659 00000321 81E9C71E <1> sub cx, paras(INITSECTIONOFFSET + datastack_size + auxbuff_size*2 + historysegment_size) 660 <1> ; cx = paragraph of pseudo-PSP if here 661 00000325 49 <1> dec cx ; => paragraph of image ident 662 00000326 83E1C0 <1> and cx, ~ (paras(1024) - 1) ; round down to kibibyte boundary 663 00000329 41 <1> inc cx ; => paragraph of pseudo-PSP if here 664 <1> 665 0000032A 89CB <1> mov bx, cx 666 0000032C 89DA <1> mov dx, bx 667 0000032E 81C3C518 <1> add bx, paras(AUXTARGET1) ; => auxbuff target if here 668 <1> ; Note that we use AUXTARGET1 here, not AUXTARGET3, because 669 <1> ; we move where the debugger starts rather than where it ends. 670 00000332 81C2410C <1> add dx, paras(CODETARGET1) ; => code target if here 671 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 672 00000336 89D8 <1> mov ax, bx 673 00000338 050102 <1> add ax, paras(auxbuff_size) 674 <1> %endif 675 0000033B E8B7FD <1> call init_check_auxbuff 676 0000033E 7406 <1> jz @F 677 <1> 678 <1> ; Because this shouldn't happen, this is 679 <1> ; considered an internal error. 680 00000340 BA[A608] <1> mov dx, imsg.early_reloc_fail 681 00000343 E913FF <1> jmp .putsz_error 682 <1> 683 <1> 684 <1> ; cx => data_entry target 685 <1> ; dx => code target 686 <1> ; bx => auxbuff target 687 <1> ; ax => history segment 688 <1> @@: 689 <1> d4 call init_d4message 690 <1> d4 asciz "Layout found" 691 <1> d4 call init_d4dumpregs 692 <1> d4 call init_d4message 693 <1> d4 asciz 13,10 694 <1> 695 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 696 00000346 50 <1> push ax 697 <1> %endif 698 00000347 894EFC <1> mov word [bp + ?target], cx 699 0000034A 52 <1> push dx 700 0000034B 2E803E[6C08]00 <1> cmp byte [cs:init_boot_ebdaflag], 0 701 00000351 742E <1> jz .reloc_memtop_no_ebda 702 00000353 49 <1> dec cx 703 00000354 2E2B0E[6608] <1> sub cx, word [cs:init_boot_ebdasize] 704 00000359 2EA1[6808] <1> mov ax, word [cs:init_boot_ebdasource] 705 0000035D 89CA <1> mov dx, cx 706 0000035F 2E890E[6A08] <1> mov word [cs:init_boot_ebdadest], cx 707 00000364 2E8B0E[6608] <1> mov cx, word [cs:init_boot_ebdasize] 708 00000369 E8080B <1> call init_movp 709 0000036C 014EF8 <1> add word [bp + ?memtop], cx 710 0000036F 2E800E[6C08]02 <1> or byte [cs:init_boot_ebdaflag], 2 711 00000375 B84000 <1> mov ax, 40h 712 00000378 8EC0 <1> mov es, ax 713 0000037A 2689160E00 <1> mov word [es:0Eh], dx ; relocate EBDA 714 <1> 715 <1> d4 call init_d4message 716 <1> d4 asciz "EBDA relocated",13,10 717 <1> 718 0000037F EB02 <1> jmp @F 719 <1> 720 <1> .reloc_memtop_no_ebda: 721 00000381 89CA <1> mov dx, cx 722 <1> @@: 723 00000383 B106 <1> mov cl, 6 724 00000385 D3EA <1> shr dx, cl 725 00000387 B84000 <1> mov ax, 40h 726 0000038A 8EC0 <1> mov es, ax 727 0000038C 2E8916[6208] <1> mov word [ cs:init_boot_new_memsizekib ], dx 728 00000391 2687161300 <1> xchg word [es:13h], dx 729 00000396 2E8916[6408] <1> mov word [ cs:init_boot_old_memsizekib ], dx 730 0000039B 5A <1> pop dx 731 <1> d4 call init_d4message 732 <1> d4 asciz "Memory top relocated",13,10 733 <1> 734 0000039C 8B4EFC <1> mov cx, word [bp + ?target] 735 0000039F 8ED9 <1> mov ds, cx 736 000003A1 8B7EF8 <1> mov di, word [bp + ?memtop] ; => memory top 737 000003A4 81EF4002 <1> sub di, paras(1024+8192) 738 000003A8 8EC7 <1> mov es, di 739 000003AA 39CF <1> cmp di, cx ; max padding starts below target PSP ? 740 000003AC 7209 <1> jb @F ; yes, do not initialise padding 741 000003AE 31FF <1> xor di, di ; -> padding 742 000003B0 B90012 <1> mov cx, words(1024+8192) 743 000003B3 31C0 <1> xor ax, ax 744 000003B5 F3AB <1> rep stosw ; initialise padding 745 <1> @@: 746 <1> 747 000003B7 8B46F4 <1> mov ax, word [bp + ?code] ; => code source 748 <1> ; dx => code target 749 000003BA B9840C <1> mov cx, ldebug_code_size_p ; = size 750 000003BD E8B40A <1> call init_movp ; relocate code to target 751 <1> d4 call init_d4message 752 <1> d4 asciz "Code segment relocated",13,10 753 <1> 754 000003C0 52 <1> push dx ; (code segment) 755 000003C1 8B46F6 <1> mov ax, word [bp + ?data] ; => data_entry source 756 000003C4 8CDA <1> mov dx, ds 757 000003C6 83C210 <1> add dx, paras(100h) ; => data_entry target 758 000003C9 B9730B <1> mov cx, paras(ldebug_data_entry_size + asmtable1_size + asmtable2_size) 759 000003CC E8A50A <1> call init_movp ; relocate data_entry to target 760 000003CF 8F06[0001] <1> pop word [code_seg] ; initialise code reference 761 <1> d4 call init_d4message 762 <1> d4 asciz "Data segment relocated",13,10 763 <1> 764 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 765 000003D3 58 <1> pop ax 766 000003D4 A3[3C0B] <1> mov word [history.segorsel + soaSegSel], ax 767 <1> %if _PM 768 <1> mov word [history.segorsel + soaSegment], ax 769 <1> %endif 770 000003D7 8EC0 <1> mov es, ax 771 000003D9 31FF <1> xor di, di 772 000003DB B90010 <1> mov cx, historysegment_size >> 1 773 000003DE 31C0 <1> xor ax, ax 774 000003E0 F3AB <1> rep stosw 775 <1> %endif 776 <1> 777 000003E2 89D8 <1> mov ax, bx 778 000003E4 A3[2A0A] <1> mov word [auxbuff_segorsel + soaSegSel], ax 779 <1> %if _PM 780 <1> mov word [auxbuff_segorsel + soaSegment], ax 781 <1> ; initialise auxbuff references 782 <1> %endif 783 000003E7 8EC0 <1> mov es, ax 784 000003E9 31FF <1> xor di, di 785 000003EB B90810 <1> mov cx, _AUXBUFFSIZE >> 1 786 000003EE 31C0 <1> xor ax, ax 787 000003F0 F3AB <1> rep stosw ; initialise auxbuff 788 <1> d4 call init_d4message 789 <1> d4 asciz "auxbuff initialised",13,10 790 <1> 791 000003F2 1E <1> push ds 792 000003F3 07 <1> pop es 793 000003F4 31FF <1> xor di, di 794 000003F6 B98000 <1> mov cx, words(100h) 795 000003F9 F3AB <1> rep stosw ; initialise pseudo-PSP 796 <1> 797 <1> init_boot_imageident: 798 000003FB 8CD8 <1> mov ax, ds 799 000003FD 48 <1> dec ax 800 000003FE 8EC0 <1> mov es, ax ; => paragraph for imageident 801 00000400 31FF <1> xor di, di ; -> imageident target 802 00000402 8B5EF8 <1> mov bx, word [bp + ?memtop] 803 00000405 29C3 <1> sub bx, ax ; = how many paragraphs do we use ? 804 <1> 805 00000407 0E <1> push cs 806 00000408 1F <1> pop ds 807 00000409 891E[4808] <1> mov word [imageident.size], bx ; set image ident size 808 <1> 809 0000040D BE[4008] <1> mov si, imageident 810 00000410 56 <1> push si 811 00000411 B90800 <1> mov cx, 8 812 00000414 31D2 <1> xor dx, dx 813 <1> .loop: 814 00000416 AD <1> lodsw 815 00000417 01C2 <1> add dx, ax 816 00000419 E2FB <1> loop .loop 817 0000041B 5E <1> pop si 818 <1> 819 0000041C F7DA <1> neg dx 820 0000041E 8916[4608] <1> mov word [imageident.check], dx ; set image ident checksum 821 <1> 822 00000422 B108 <1> mov cl, 8 823 00000424 F3A5 <1> rep movsw ; write image ident paragraph 824 <1> 825 00000426 8B46FC <1> mov ax, word [bp + ?target] 826 <1> 827 <1> lleave ctx ; dropping this frame for stack switch 828 <1> 829 00000429 FA <1> cli 830 0000042A 8ED8 <1> mov ds, ax 831 0000042C 8ED0 <1> mov ss, ax 832 0000042E BC[E00B] <1> mov sp, stack_end ; switch stacks 833 00000431 FB <1> sti 834 <1> 835 00000432 2EFF36[6408] <1> push word [cs:init_boot_old_memsizekib] 836 00000437 8F06[648F] <1> pop word [boot_old_memsizekib] 837 0000043B 2EFF36[6208] <1> push word [cs:init_boot_new_memsizekib] 838 00000440 8F06[628F] <1> pop word [boot_new_memsizekib] 839 00000444 2EA0[6C08] <1> mov al, byte [cs:init_boot_ebdaflag] 840 00000448 2401 <1> and al, 1 841 0000044A A2[668F] <1> mov byte [boot_ebdaflag], al 842 <1> 843 0000044D 800E[C500]40 <1> setopt [internalflags], nodosloaded 844 00000452 8026[C400]0F <1> clropt [internalflags], notstdinput|inputfile|notstdoutput|outputfile 845 00000457 C606[2C0B]00 <1> mov byte [notatty], 0 ; it _is_ a tty 846 0000045C 800E[CE00]20 <1> setopt [internalflags3], dif3_gotint19 847 <1> 848 00000461 BA[A308] <1> mov dx, imsg.crlf 849 00000464 E89E0A <1> call init_putsz_cs 850 <1> 851 <1> d4 call init_d4message 852 <1> d4 asciz "New boot_initcode done",13,10 853 <1> 854 00000467 E9040B <1> jmp boot_old_initcode 855 <1> 856 <1> 857 <1> init_booterror: 858 <1> .soft: 859 0000046A 31C0 <1> xor ax, ax 860 0000046C A9 <1> db __TEST_IMM16 ; (skip mov) 861 <1> .hard: 862 0000046D B001 <1> mov al, 1 863 <1> 864 <1> ;d4 call init_d4pocketdosmemdump 865 <1> d4 call init_d4dumpregs 866 <1> 867 <1> .patch_switch_stack: 868 0000046F EB09 <1> jmp strict short .no_switch_stack 869 <1> 870 00000471 8CCB <1> mov bx, cs 871 00000473 FA <1> cli 872 00000474 8ED3 <1> mov ss, bx 873 00000476 BC9018 <1> mov sp, init_size + BOOTINITSTACK_SIZE 874 00000479 FB <1> sti 875 <1> 876 <1> .no_switch_stack: 877 0000047A 50 <1> push ax 878 <1> 879 0000047B B84000 <1> mov ax, 40h 880 0000047E 8EC0 <1> mov es, ax 881 <1> 882 00000480 2EF606[6C08]02 <1> test byte [cs:init_boot_ebdaflag], 2 883 00000486 7416 <1> jz @F 884 <1> 885 00000488 2E8B16[6808] <1> mov dx, [cs:init_boot_ebdasource] 886 0000048D 2EA1[6A08] <1> mov ax, [cs:init_boot_ebdadest] 887 00000491 2E8B0E[6608] <1> mov cx, [cs:init_boot_ebdasize] 888 00000496 E8DB09 <1> call init_movp 889 <1> 890 00000499 2689160E00 <1> mov word [es:0Eh], dx 891 <1> @@: 892 <1> 893 0000049E 2E8B16[6408] <1> mov dx, [cs:init_boot_old_memsizekib] 894 000004A3 85D2 <1> test dx, dx 895 000004A5 7405 <1> jz @F 896 000004A7 2689161300 <1> mov word [es:13h], dx 897 <1> @@: 898 <1> 899 000004AC BA[080D] <1> mov dx, imsg.booterror 900 000004AF E8750A <1> call init_putsz_cs_bootldr 901 000004B2 E84B0A <1> call init_getc_bootldr 902 000004B5 58 <1> pop ax 903 000004B6 85C0 <1> test ax, ax 904 000004B8 7502 <1> jnz @F 905 000004BA CD19 <1> int 19h 906 <1> @@: 907 000004BC EA0000FFFF <1> jmp 0FFFFh:0 908 <1> %endif ; _BOOTLDR 909 <1> 910 <1> %if _DEVICE 911 <1> ; Our entrypoint transfers control to us with these registers: 912 <1> ; INP: ss:sp -> bx, fl, ds, ax, far return address to DOS 913 <1> ; ds:100h -> loaded payload 914 <1> device_initcode: 915 000004C1 FC <1> cld 916 <1> 917 000004C2 830E[0000]FF <1> or word [device_header.next], -1 918 <1> ; ! this uses offset 100h in the adjusted ds 919 <1> 920 000004C7 5B <1> pop bx 921 000004C8 06 <1> push es 922 000004C9 53 <1> push bx 923 000004CA 51 <1> push cx 924 000004CB 52 <1> push dx 925 000004CC 56 <1> push si 926 000004CD 57 <1> push di 927 <1> 928 000004CE 268B4710 <1> mov ax, word [es:bx + 0Eh + 2] ; => behind available memory 929 000004D2 8CDA <1> mov dx, ds 930 000004D4 83C210 <1> add dx, 10h ; => our memory 931 000004D7 29D0 <1> sub ax, dx 932 000004D9 721E <1> jc .memorybad 933 000004DB 31D2 <1> xor dx, dx ; dx:ax = amount available paragraphs 934 000004DD B90400 <1> mov cx, 4 935 <1> @@: 936 000004E0 D1E0 <1> shl ax, 1 937 000004E2 D1D2 <1> rcl dx, 1 938 000004E4 E2FA <1> loop @B ; dx:ax = amount available bytes 939 <1> 940 000004E6 2603470E <1> add ax, word [es:bx + 0Eh] 941 000004EA 83D200 <1> adc dx, 0 ; dx:ax = amount available bytes 942 <1> 943 000004ED 24F0 <1> and al, ~15 ; (round down) 944 <1> 945 000004EF 83FA02 <1> cmp dx, DEVICEINITSIZE >> 16 946 000004F2 7503 <1> jne @F 947 000004F4 3D8003 <1> cmp ax, DEVICEINITSIZE & 0FFFFh 948 <1> @@: 949 000004F7 7333 <1> jae .memorygood 950 <1> 951 <1> .memorybad: 952 000004F9 BA[6D08] <1> mov dx, imsg.early_mem_fail 953 000004FC E8060A <1> call init_putsz_cs 954 <1> 955 000004FF B80030 <1> mov ax, 3000h 956 00000502 CD21 <1> int 21h 957 00000504 3C05 <1> cmp al, 5 958 00000506 7306 <1> jae @F 959 00000508 BA[E808] <1> mov dx, imsg.dos_below_5 960 <1> .earlyfail: 961 0000050B E8F709 <1> call init_putsz_cs 962 <1> @@: 963 <1> 964 0000050E 5F <1> pop di 965 0000050F 5E <1> pop si 966 00000510 5A <1> pop dx 967 00000511 59 <1> pop cx 968 00000512 5B <1> pop bx 969 00000513 07 <1> pop es 970 <1> 971 00000514 8CD8 <1> mov ax, ds 972 00000516 83C010 <1> add ax, paras(100h) 973 00000519 26C747030581 <1> mov word [es:bx + 3], 8105h ; error, done, code: bad structure length 974 0000051F 2683670E00 <1> and word [es:bx + 0Eh], 0 975 00000524 26894710 <1> mov word [es:bx + 0Eh + 2], ax ; -> behind memory in use 976 <1> 977 00000528 9D <1> popf 978 00000529 1F <1> pop ds 979 0000052A 58 <1> pop ax 980 0000052B CB <1> retf 981 <1> 982 <1> .memorygood: 983 0000052C 8CD8 <1> mov ax, ds 984 0000052E 050718 <1> add ax, paras(INITSECTIONOFFSET) 985 00000531 8CDA <1> mov dx, ds 986 00000533 81C2DC1E <1> add dx, paras(DEVICEINITTARGET) 987 00000537 B96C01 <1> mov cx, init_size_p + deviceshim_size_p 988 0000053A E83709 <1> call init_movp 989 <1> 990 0000053D 52 <1> push dx 991 0000053E E8B3FB <1> call init_retf 992 <1> 993 00000541 8CDB <1> mov bx, ds 994 00000543 83C314 <1> add bx, paras(DEVICEADJUST) 995 00000546 89DA <1> mov dx, bx 996 00000548 81C3C518 <1> add bx, paras(AUXTARGET1) 997 0000054C 81C2410C <1> add dx, paras(CODETARGET1) 998 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 999 00000550 89D8 <1> mov ax, bx 1000 00000552 050102 <1> add ax, paras(auxbuff_size) 1001 <1> %endif 1002 00000555 89D1 <1> mov cx, dx 1003 00000557 E89BFB <1> call init_check_auxbuff 1004 0000055A 7436 <1> jz @F 1005 <1> 1006 0000055C 8CDB <1> mov bx, ds 1007 0000055E 83C314 <1> add bx, paras(DEVICEADJUST) 1008 00000561 89DA <1> mov dx, bx 1009 00000563 81C3410C <1> add bx, paras(AUXTARGET2) 1010 00000567 81C2420E <1> add dx, paras(CODETARGET2) 1011 0000056B E887FB <1> call init_check_auxbuff 1012 0000056E 7422 <1> jz @F 1013 <1> 1014 <1> ; If both prior attempts failed, we allocate 1015 <1> ; an additional 8 KiB and move the buffer to 1016 <1> ; that. This should always succeed. 1017 00000570 2EC706[6008]C71E <1> mov word [cs:memsize], paras(AUXTARGET3 + auxbuff_size + historysegment_size) 1020 <1> ; enlarge the final memory block size 1021 <1> 1022 00000577 8CDB <1> mov bx, ds 1023 00000579 83C314 <1> add bx, paras(DEVICEADJUST) 1024 0000057C 81C3C61A <1> add bx, paras(AUXTARGET3) 1025 00000580 89CA <1> mov dx, cx 1026 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 1027 00000582 89D8 <1> mov ax, bx 1028 00000584 050102 <1> add ax, paras(auxbuff_size) 1029 <1> %endif 1030 00000587 E86BFB <1> call init_check_auxbuff 1031 0000058A 7406 <1> jz @F 1032 <1> 1033 <1> ; Because this shouldn't happen, this is 1034 <1> ; considered an internal error. 1035 0000058C BA[A608] <1> mov dx, imsg.early_reloc_fail 1036 0000058F E979FF <1> jmp .earlyfail 1037 <1> 1038 <1> @@: 1039 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 1040 00000592 50 <1> push ax 1041 <1> %endif 1042 00000593 8CD8 <1> mov ax, ds 1043 00000595 05830B <1> add ax, paras(CODESECTIONOFFSET) 1044 00000598 B9840C <1> mov cx, ldebug_code_size_p 1045 0000059B E8D608 <1> call init_movp 1046 <1> 1047 0000059E 8916[0001] <1> mov word [code_seg], dx ; initialise code segment reference 1048 <1> 1049 000005A2 8CD8 <1> mov ax, ds 1050 000005A4 83C010 <1> add ax, 10h 1051 000005A7 89C2 <1> mov dx, ax 1052 000005A9 83C214 <1> add dx, paras(deviceshim_size + 110h) 1053 000005AC B9730B <1> mov cx, paras(DATAENTRYTABLESIZE) 1054 000005AF E8C208 <1> call init_movp 1055 <1> 1056 000005B2 8CC8 <1> mov ax, cs 1057 000005B4 056901 <1> add ax, init_size_p 1058 000005B7 8CDA <1> mov dx, ds 1059 000005B9 83C210 <1> add dx, paras(100h) 1060 000005BC B90300 <1> mov cx, deviceshim_size_p 1061 000005BF E8B208 <1> call init_movp 1062 <1> 1063 000005C2 8CDA <1> mov dx, ds 1064 000005C4 83C213 <1> add dx, paras(100h) + deviceshim_size_p 1065 000005C7 8EC2 <1> mov es, dx 1066 000005C9 1E <1> push ds 1067 000005CA 83EA04 <1> sub dx, deviceshim_size_p + 1 1068 000005CD 8EDA <1> mov ds, dx 1069 000005CF 31C0 <1> xor ax, ax 1070 000005D1 31FF <1> xor di, di 1071 000005D3 B90400 <1> mov cx, 4 1072 000005D6 F3AB <1> rep stosw 1073 000005D8 BE0800 <1> mov si, 8 1074 000005DB B104 <1> mov cl, 4 1075 000005DD F3A5 <1> rep movsw 1076 000005DF 1F <1> pop ds 1077 <1> 1078 000005E0 8CDA <1> mov dx, ds 1079 000005E2 83C214 <1> add dx, paras(DEVICEADJUST) 1080 000005E5 8EDA <1> mov ds, dx 1081 <1> 1082 000005E7 53 <1> push bx 1083 000005E8 B451 <1> mov ah, 51h 1084 000005EA CD21 <1> int 21h 1085 000005EC 891E[DE0A] <1> mov word [pspdbe], bx 1086 000005F0 5B <1> pop bx 1087 <1> 1088 000005F1 8EC2 <1> mov es, dx 1089 000005F3 B98000 <1> mov cx, words(256) 1090 000005F6 31FF <1> xor di, di 1091 000005F8 31C0 <1> xor ax, ax 1092 000005FA F3AB <1> rep stosw ; clear buffer for PSP + command line tail 1093 <1> 1094 <1> ; PSP creation moved to later, after command line parsing 1095 <1> 1096 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 1097 000005FC 58 <1> pop ax 1098 000005FD A3[3C0B] <1> mov word [history.segorsel + soaSegSel], ax 1099 <1> %if _PM 1100 <1> mov word [history.segorsel + soaSegment], ax 1101 <1> %endif 1102 00000600 8EC0 <1> mov es, ax 1103 00000602 31FF <1> xor di, di 1104 00000604 B90010 <1> mov cx, historysegment_size >> 1 1105 00000607 31C0 <1> xor ax, ax 1106 00000609 F3AB <1> rep stosw 1107 <1> %endif 1108 <1> 1109 0000060B 89D8 <1> mov ax, bx 1110 <1> 1111 0000060D A3[2A0A] <1> mov word [auxbuff_segorsel + soaSegSel], ax 1112 <1> %if _PM 1113 <1> mov word [auxbuff_segorsel + soaSegment], ax 1114 <1> ; initialise auxbuff references 1115 <1> %endif 1116 00000610 8EC0 <1> mov es, ax 1117 00000612 31FF <1> xor di, di 1118 00000614 B90810 <1> mov cx, _AUXBUFFSIZE >> 1 1119 00000617 31C0 <1> xor ax, ax 1120 00000619 F3AB <1> rep stosw ; initialise auxbuff 1121 <1> 1122 0000061B 8CD8 <1> mov ax, ds ; => PSP 1123 0000061D 83E804 <1> sub ax, deviceshim_size_p + paras(10h) 1124 00000620 A3[100C] <1> mov word [device_header_address + 2], ax 1125 <1> 1126 00000623 8CD8 <1> mov ax, ds ; => PSP 1127 00000625 2E8B1E[6008] <1> mov bx, word [cs:memsize] 1128 <1> ; = amount paragraphs for PSP + DATA ENTRY + TABLE 1129 <1> ; + DATA STACK + CODE + AUXBUFF + HISTORY 1130 0000062A 01D8 <1> add ax, bx ; => placeholder for trailing container 1131 0000062C 83C305 <1> add bx, deviceshim_size_p + paras(10h) + paras(10h) 1132 <1> ; (layout is deviceshim, MCB placeholder, debugger segments, 1133 <1> ; placeholder for trailing container MCB) 1134 <1> ; = amount paragraphs expected in MCB 1135 0000062F 891E[0C0C] <1> mov word [device_mcb_paragraphs], bx 1136 <1> 1137 00000633 8EC0 <1> mov es, ax 1138 00000635 31FF <1> xor di, di ; -> buffer for trailing container MCB 1139 00000637 B90800 <1> mov cx, words(10h) ; = amount words 1140 0000063A 1E <1> push ds 1141 0000063B 0E <1> push cs 1142 0000063C 1F <1> pop ds 1143 0000063D BE[5008] <1> mov si, init_container_signature ; -> init string 1144 00000640 F3A5 <1> rep movsw 1145 00000642 1F <1> pop ds 1146 00000643 40 <1> inc ax ; => behind memory used for device 1147 <1> 1148 00000644 8F06[780C] <1> pop word [reg_edi] 1149 00000648 8F06[740C] <1> pop word [reg_esi] 1150 0000064C 8F06[680C] <1> pop word [reg_edx] 1151 00000650 8F06[640C] <1> pop word [reg_ecx] 1152 00000654 892E[700C] <1> mov word [reg_ebp], bp 1153 00000658 5B <1> pop bx 1154 00000659 07 <1> pop es 1155 0000065A 891E[600C] <1> mov word [reg_ebx], bx 1156 0000065E 8C06[800C] <1> mov word [reg_es], es 1157 <1> 1158 00000662 26C747030001 <1> mov word [es:bx + 3], 100h ; no error, done 1159 00000668 2683670E00 <1> and word [es:bx + 0Eh], 0 1160 0000066D 26894710 <1> mov word [es:bx + 0Eh + 2], ax ; -> behind memory in use 1161 <1> 1162 00000671 8F06[980C] <1> pop word [reg_efl] 1163 00000675 8F06[7C0C] <1> pop word [reg_ds] 1164 00000679 8F06[5C0C] <1> pop word [reg_eax] 1165 0000067D 8C16[840C] <1> mov word [reg_ss], ss 1166 00000681 8926[6C0C] <1> mov word [reg_esp], sp 1167 <1> 1168 00000685 8C1E[880C] <1> mov word [reg_cs], ds 1169 00000689 C706[940C][B497] <1> mov word [reg_eip], entry_retf 1170 <1> 1171 <1> .cmdline: 1172 0000068F 1E <1> push ds 1173 00000690 26C57712 <1> lds si, [es:bx + 12h] ; ds:si -> device command line 1174 00000694 07 <1> pop es 1175 00000695 BF8100 <1> mov di, 81h ; es:di -> PSP command line tail 1176 <1> 1177 <1> ; Writing MS-DOS Device Drivers, second edition, page 349 1178 <1> ; specifies the following as to the command line termination: 1179 <1> ; "Note that the DEVICE= command string is terminated by an 1180 <1> ; Ah when there are no arguments. When there are arguments, 1181 <1> ; the string is terminated with the following sequence: 1182 <1> ; 0h, Dh, Ah." 1183 <1> 1184 <1> ; First skip past name. 1185 <1> @@: 1186 00000698 AC <1> lodsb 1187 00000699 3C20 <1> cmp al, 32 ; blank ? 1188 0000069B 7412 <1> je @F 1189 0000069D 3C09 <1> cmp al, 9 1190 0000069F 740E <1> je @F ; yes, got past executable filename --> 1191 000006A1 3C00 <1> cmp al, 0 1192 000006A3 7446 <1> je .cmdline_end 1193 000006A5 3C0D <1> cmp al, 13 1194 000006A7 7442 <1> je .cmdline_end 1195 000006A9 3C0A <1> cmp al, 10 1196 000006AB 743E <1> je .cmdline_end ; if empty tail --> 1197 000006AD EBE9 <1> jmp @B 1198 <1> @@: 1199 000006AF 81FFFF00 <1> cmp di, 0FFh ; can store and still have space for CR ? 1200 000006B3 7430 <1> je .cmdline_end_truncate ; no --> 1201 000006B5 AA <1> stosb ; store it 1202 000006B6 3C00 <1> cmp al, 0 ; EOL ? 1203 000006B8 7431 <1> je .cmdline_end 1204 000006BA 3C0D <1> cmp al, 13 1205 000006BC 742D <1> je .cmdline_end 1206 000006BE 3C0A <1> cmp al, 10 1207 000006C0 7429 <1> je .cmdline_end ; yes --> 1208 000006C2 AC <1> lodsb 1209 000006C3 3C21 <1> cmp al, '!' ; escape for small letters ? 1210 000006C5 75E8 <1> jne @B ; no --> 1211 000006C7 AC <1> lodsb 1212 000006C8 3C00 <1> cmp al, 0 1213 000006CA 7414 <1> je .cmdline_end_escaped 1214 000006CC 3C0D <1> cmp al, 13 1215 000006CE 7410 <1> je .cmdline_end_escaped 1216 000006D0 3C0A <1> cmp al, 10 1217 000006D2 740C <1> je .cmdline_end_escaped 1218 <1> ; cmp al, '!' ; (automatically supported) 1219 000006D4 3C41 <1> cmp al, 'A' ; is it a capital letter ? 1220 000006D6 72D7 <1> jb @B 1221 000006D8 3C5A <1> cmp al, 'Z' 1222 000006DA 77D3 <1> ja @B 1223 000006DC 3420 <1> xor al, 'a' ^ 'A' ; get the small letter 1224 000006DE EBCF <1> jmp @B 1225 <1> 1226 <1> .cmdline_end_escaped: 1227 000006E0 BA[1109] <1> mov dx, imsg.device_end_escaped 1228 000006E3 EB03 <1> jmp @F 1229 <1> 1230 <1> .cmdline_end_truncate: 1231 000006E5 BA[5409] <1> mov dx, imsg.device_end_truncate 1232 <1> @@: 1233 000006E8 E81A08 <1> call init_putsz_cs 1234 <1> .cmdline_end: 1235 000006EB B00D <1> mov al, 13 1236 000006ED AA <1> stosb ; store CR 1237 000006EE 97 <1> xchg ax, di 1238 000006EF 8CC3 <1> mov bx, es 1239 000006F1 8EDB <1> mov ds, bx 1240 000006F3 2C82 <1> sub al, 82h ; if -> 82h (CR at 81h). get 0 1241 000006F5 A28000 <1> mov byte [80h], al ; store length 1242 <1> 1243 000006F8 FA <1> cli 1244 000006F9 8ED3 <1> mov ss, bx 1245 000006FB BC[E00B] <1> mov sp, stack_end 1246 000006FE FB <1> sti 1247 <1> 1248 000006FF 800E[C600]40 <1> setopt [internalflags], tsrmode 1249 00000704 8026[C600]7F <1> clropt [internalflags], attachedterm 1250 00000709 800E[DA00]40 <1> setopt [internalflags6], dif6_device_mode 1251 0000070E E96E08 <1> jmp old_initcode 1252 <1> 1253 <1> 1254 <1> init_device_error_late: 1255 00000711 F606[C500]80 <1> testopt [internalflags], has386 1256 00000716 7431 <1> jz .16 1257 <1> 1258 <1> subcpu 386 1259 00000718 66A1[5C0C] <1> mov eax, [reg_eax] 1260 0000071C 668B1E[600C] <1> mov ebx, [reg_ebx] 1261 00000721 668B0E[640C] <1> mov ecx, [reg_ecx] 1262 00000726 668B16[680C] <1> mov edx, [reg_edx] 1263 0000072B 668B36[740C] <1> mov esi, [reg_esi] 1264 00000730 668B3E[780C] <1> mov edi, [reg_edi] 1265 00000735 668B2E[700C] <1> mov ebp, [reg_ebp] 1266 0000073A 66FF36[980C] <1> push dword [reg_efl] 1267 0000073F 669D <1> popfd 1268 00000741 8E26[8C0C] <1> mov fs, [reg_fs] 1269 00000745 8E2E[900C] <1> mov gs, [reg_gs] 1270 <1> subcpureset 1271 <1> 1272 <1> .16: 1273 <1> ; ax done last 1274 00000749 8B1E[600C] <1> mov bx, [reg_ebx] 1275 0000074D 8B0E[640C] <1> mov cx, [reg_ecx] 1276 00000751 8B16[680C] <1> mov dx, [reg_edx] 1277 00000755 8B36[740C] <1> mov si, [reg_esi] 1278 00000759 8B3E[780C] <1> mov di, [reg_edi] 1279 0000075D 8B2E[700C] <1> mov bp, [reg_ebp] 1280 00000761 FF36[980C] <1> push word [reg_efl] 1281 00000765 9D <1> popf 1282 00000766 8E06[800C] <1> mov es, [reg_es] 1283 0000076A 8E16[840C] <1> mov ss, [reg_ss] 1284 0000076E 8B26[6C0C] <1> mov sp, [reg_esp] 1285 00000772 FF36[5C0C] <1> push word [reg_eax] 1286 00000776 8CD8 <1> mov ax, ds 1287 00000778 8E1E[7C0C] <1> mov ds, [reg_ds] 1288 <1> 1289 0000077C 83E804 <1> sub ax, paras(deviceshim_size + 10h) 1290 0000077F 26C747030381 <1> mov word [es:bx + 3], 8103h ; error, done, code: unknown command 1291 00000785 2683670E00 <1> and word [es:bx + 0Eh], 0 1292 0000078A 26894710 <1> mov word [es:bx + 0Eh + 2], ax ; -> behind memory in use 1293 0000078E 58 <1> pop ax 1294 0000078F CB <1> retf 1295 <1> %endif 1296 <1> 1297 <1> 1298 <1> %if _DEBUG4 || _DEBUG5 1299 <1> %define _DEB_ASM_PREFIX init_ 1300 <1> %include "deb.asm" 1301 <1> %endif 1302 <1> 1303 <1> 1304 <1> %macro __writepatchtable2 0-*.nolist 1305 <1> %if %0 & 1 1306 <1> %fatal Expected even number of arguments 1307 <1> %endif 1308 <1> %rep %0 >> 1 1309 <1> %1 %2 1310 <1> %rotate 2 1311 <1> %endrep 1312 <1> %endmacro 1313 <1> 1314 <1> %macro __patchtable2_entry 0.nolist 1315 <1> ; only if this isn't the first (pseudo-)entry 1316 <1> %if %$lastcount != 0 1317 <1> %assign %$runscount %[%$runscount]+1 1318 <1> ; if the offset from %$previous is less than 255 1319 <1> %if (%$last-%$previous) < 255 1320 <1> %assign %$$method2tablesize %$$method2tablesize+1 1321 <1> ; then write a single byte (number of bytes not to patch between) 1322 <1> %xdefine %$$method2list %$$method2list,db,%$last-%$previous 1323 <1> %else 1324 <1> ; otherwise write a 255 ("reposition") and write the 16-bit address afterwards 1325 <1> %assign %$$method2tablesize %$$method2tablesize+3 1326 <1> %xdefine %$$method2list %$$method2list,db,255,dw,%$last 1327 <1> %assign %$reposcount %[%$reposcount]+1 1328 <1> %endif 1329 <1> %if %$lastcount == 1 1330 <1> %assign %$onecount %[%$onecount]+1 1331 <1> %endif 1332 <1> %assign %$$method2tablesize %$$method2tablesize+1 1333 <1> ; and write the number of bytes to be patched 1334 <1> %xdefine %$$method2list %$$method2list,db,%$lastcount 1335 <1> ; define %$previous for the next entry: it points to the next non-patched byte 1336 <1> %define %$previous (%[%$last]+%[%$lastcount]) 1337 <1> %endif 1338 <1> %endmacro 1339 <1> 1340 <1> %macro writepatchtable 2-*.nolist 1341 <1> 1342 <1> numdef %{1}_FORCE_METHOD, 0 1343 <1> %push 1344 <1> ; Determine length of simple table: 1345 <1> %assign %$method1tablesize (%0 - 2)*2 1346 <1> 1347 <1> %if !_%{1}_FORCE_METHOD || _%{1}_FORCE_METHOD == 2 1348 <1> ; Determine length of complicated table: 1349 <1> %assign %$method2tablesize 0 1350 <1> %define %$method2list db,"" 1351 <1> %push 1352 <1> %if _WPT_LABELS 1353 <1> %define %$previous code_start ; if list contains labels 1354 <1> %else 1355 <1> %define %$previous 0 1356 <1> %endif 1357 <1> %define %$last %[%$previous] 1358 <1> %assign %$lastcount 0 1359 <1> %assign %$onecount 0 1360 <1> %assign %$reposcount 0 1361 <1> %assign %$bytescount %0 - 2 1362 <1> %assign %$runscount 0 1363 <1> %rotate 1 1364 <1> %rep %0 - 2 1365 <1> %rotate 1 1366 <1> ;if it continues the previous patch and not too long and this isn't the first 1367 <1> %if ((%$last+%$lastcount) == %1) && (%$lastcount < 255) && (%$lastcount != 0) 1368 <1> ; then do not write an entry, just increase the patch's size 1369 <1> %assign %$lastcount %[%$lastcount]+1 1370 <1> %else 1371 <1> ; otherwise write the last entry 1372 <1> __patchtable2_entry 1373 <1> ; define new %$last to this parameter, %$lastcount to one 1374 <1> %define %$last %1 1375 <1> %assign %$lastcount 1 1376 <1> %endif 1377 <1> %endrep 1378 <1> __patchtable2_entry 1379 <1> 1380 <1> ; at the end, there's a patch with offset 0, size 0 1381 <1> %assign %$$method2tablesize %$$method2tablesize+2 1382 <1> %xdefine %$$method2list %$$method2list,db,0,db,0 1383 <1> 1384 <1> %assign %$$onecount %$onecount 1385 <1> %assign %$$reposcount %$reposcount 1386 <1> %assign %$$bytescount %$bytescount 1387 <1> %assign %$$runscount %$runscount 1388 <1> %pop 1389 <1> %rotate 1 1390 <1> %endif 1391 <1> 1392 <1> %if _%{1}_FORCE_METHOD == 2 1393 <1> %define __%{1}_method 2 1394 <1> %elif _%{1}_FORCE_METHOD == 1 1395 <1> %define __%{1}_method 1 1396 <1> %else 1397 <1> %if _%{1}_FORCE_METHOD 1398 <1> %fatal Invalid forced method selected: _%{1}_FORCE_METHOD 1399 <1> %endif 1400 <1> %if %$method1tablesize > (%$method2tablesize+20) 1401 <1> %define __%{1}_method 2 1402 <1> %else 1403 <1> %define __%{1}_method 1 1404 <1> %endif 1405 <1> %endif 1406 <1> 1407 <1> 1408 <1> %1: 1409 <1> %if __%{1}_method == 2 1410 <1> __writepatchtable2 %$method2list 1411 <1> endarea %1 1412 <1> %assign %$size %1_size 1413 <1> %warning %1: %$size bytes (Method 2) 1414 <1> %warning 1B=%$onecount repo=%$reposcount run=%$runscount byte=%$bytescount 1415 <1> %else 1416 <1> %rotate 1 1417 <1> %rep %0 - 2 1418 <1> %rotate 1 1419 <1> dw %1 1420 <1> %endrep 1421 <1> %rotate 1 1422 <1> endarea %1 1423 <1> %assign %$size %1_size 1424 <1> %warning %1: %$size bytes (Method 1) 1425 <1> %endif 1426 <1> %pop 1427 <1> %endmacro 1428 <1> 1429 <1> align 2, db 0 ; align on word boundary 1430 <1> ; Table of patches that are to be set NOP if not running on a 386. 1431 00000790 020104040201010101- <1> writepatchtable patch_no386_table, PATCH_NO386_TABLE 1431 00000799 04FFCF030104040201- <1> 1431 000007A2 01010104FF5B1E04FF- <1> 1431 000007AB 272210FF1627011201- <1> 1431 000007B4 17011D010101020107- <1> 1431 000007BD 010205BC01C70AFF31- <1> 1431 000007C6 3F023A010401040116- <1> 1431 000007CF 0609024E01FFC34701- <1> 1431 000007D8 FF374901040104011A- <1> 1431 000007E1 01140BC00203010301- <1> 1431 000007EA 030203010301030203- <1> 1431 000007F3 010301030203010301- <1> 1431 000007FC FFC9560B140BFFBE86- <1> 1431 00000805 04FF029C03FF48A002- <1> 1431 0000080E FF6FA3029701051EFF- <1> 1431 00000817 01C8010000 <1> 1431 ****************** <1> warning: patch_no386_table: 140 (Method 2) [-w+user] 1431 ****************** <1> warning: 1B=33 repo=13 run=56 byte=176 [-w+user] 1432 <1> %undef PATCH_NO386_TABLE 1433 <1> 1434 <1> align 2, db 0 1435 <1> ; Table of patches that are to be set NOP if running on a 386. 1436 0000081C FFEB3902FF90460E4D- <1> writepatchtable patch_386_table, PATCH_386_TABLE 1436 00000825 0EFF8B4907FF09A404- <1> 1436 0000082E FF00C8010000 <1> 1436 ****************** <1> warning: patch_386_table: 24 (Method 2) [-w+user] 1436 ****************** <1> warning: 1B=1 repo=5 run=6 byte=42 [-w+user] 1437 <1> %undef PATCH_386_TABLE 1438 <1> 1439 <1> %unmacro __writepatchtable2 0-*.nolist 1440 <1> %unmacro __patchtable2_entry 0.nolist 1441 <1> %unmacro writepatchtable 2-*.nolist 1442 <1> 1443 <1> 1444 <1> %if _BOOTLDR 1445 00000834 00 <1> align 16, db 0 1446 <1> ; Image identification 1447 <1> ; First dword: signature 1448 <1> ; Next word: version, two ASCII digits 1449 <1> ; Next word: checksum. adding up all words of the paragraph gives zero 1450 <1> ; Next word: size of image (including this paragraph) 1451 <1> ; Three words reserved, zero. 1452 <1> imageident: 1453 00000840 4E4445423030 <1> db "NDEB00" 1454 00000846 0000 <1> .check: dw 0 1455 00000848 0000 <1> .size: dw 0 1456 0000084A 0000 <1> times 3 dw 0 1457 <1> %endif 1458 <1> %if _DEVICE 1459 <1> align 16, db 0 1460 <1> init_container_signature: 1461 00000850 464F525F53445F434F- <1> fill 16, 0, db "FOR_SD_CONTAINER" 1461 00000859 4E5441494E4552 <1> 1462 <1> %endif 1463 <1> align 2, db 0 1464 00000860 C61C <1> memsize: dw paras(CODETARGET2 + ldebug_code_size + historysegment_size) 1467 <1> ; same as paras(AUXTARGET1 + auxbuff_size + historysegment_size) 1468 <1> 1469 <1> %if _BOOTLDR 1470 00000862 0000 <1> init_boot_new_memsizekib: dw 0 1471 00000864 0000 <1> init_boot_old_memsizekib: dw 0 1472 <1> 1473 00000866 0000 <1> init_boot_ebdasize: dw 0 1474 00000868 0000 <1> init_boot_ebdasource: dw 0 1475 0000086A 0000 <1> init_boot_ebdadest: dw 0 1476 0000086C 00 <1> init_boot_ebdaflag: db 0 1477 <1> %endif 1478 <1> 1479 <1> 1480 <1> imsg: 1481 <1> .early_mem_fail: 1482 0000086D 436F6E64746E6C2E20- <1> db _PROGNAME,": Failed to allocate memory!" 1482 00000876 44656275676761626C- <1> 1482 0000087F 65206C44656275673A- <1> 1482 00000888 204661696C65642074- <1> 1482 00000891 6F20616C6C6F636174- <1> 1482 0000089A 65206D656D6F727921 <1> 1483 <1> .crlf: 1484 000008A3 0D0A00 <1> asciz 13,10 1485 <1> .early_reloc_fail: 1486 000008A6 436F6E64746E6C2E20- <1> asciz _PROGNAME,": Failed to relocate, internal error!",13,10 1486 000008AF 44656275676761626C- <1> 1486 000008B8 65206C44656275673A- <1> 1486 000008C1 204661696C65642074- <1> 1486 000008CA 6F2072656C6F636174- <1> 1486 000008D3 652C20696E7465726E- <1> 1486 000008DC 616C206572726F7221- <1> 1486 000008E5 0D0A00 <1> 1487 <1> %if _DEVICE 1488 <1> .dos_below_5: 1489 000008E8 204E6F74653A20444F- <1> asciz " Note: DOS must be at least version 5.",13,10 1489 000008F1 53206D757374206265- <1> 1489 000008FA 206174206C65617374- <1> 1489 00000903 2076657273696F6E20- <1> 1489 0000090C 352E0D0A00 <1> 1490 <1> .device_end_escaped: 1491 00000911 436F6E64746E6C2E20- <1> asciz _PROGNAME,": Error, got escaped command line end!",13,10 1491 0000091A 44656275676761626C- <1> 1491 00000923 65206C44656275673A- <1> 1491 0000092C 204572726F722C2067- <1> 1491 00000935 6F7420657363617065- <1> 1491 0000093E 6420636F6D6D616E64- <1> 1491 00000947 206C696E6520656E64- <1> 1491 00000950 210D0A00 <1> 1492 <1> .device_end_truncate: 1493 00000954 436F6E64746E6C2E20- <1> asciz _PROGNAME,": Error, truncating too long command line!",13,10 1493 0000095D 44656275676761626C- <1> 1493 00000966 65206C44656275673A- <1> 1493 0000096F 204572726F722C2074- <1> 1493 00000978 72756E636174696E67- <1> 1493 00000981 20746F6F206C6F6E67- <1> 1493 0000098A 20636F6D6D616E6420- <1> 1493 00000993 6C696E65210D0A00 <1> 1494 <1> %endif 1495 <1> .help.defaultfilename: 1496 0000099B 434445425547 <1> db _FILENAME 1497 <1> .help.defaultfilename.length equ $ - .help.defaultfilename 1498 <1> .help.1: 1499 000009A1 436F6E64746E6C2E20- <1> db _PROGNAME,_VERSION,", debugger.",13,10 1499 000009AA 44656275676761626C- <1> 1499 000009B3 65206C446562756720- <1> 1499 000009BC 28323032322D30382D- <1> 1499 000009C5 3035292C2064656275- <1> 1499 000009CE 676765722E0D0A <1> 1500 000009D5 0D0A <1> db 13,10 1501 000009D7 55736167653A20 <1> db "Usage: " 1502 000009DE 00 <1> asciz 1503 <1> .help.2: 1504 000009DF 5B2E434F4D5D205B2F- <1> db "[.COM] [/C=commands] [[drive:][path]progname.ext [parameters]]",13,10 1504 000009E8 433D636F6D6D616E64- <1> 1504 000009F1 735D205B5B64726976- <1> 1504 000009FA 653A5D5B706174685D- <1> 1504 00000A03 70726F676E616D652E- <1> 1504 00000A0C 657874205B70617261- <1> 1504 00000A15 6D65746572735D5D0D- <1> 1504 00000A1E 0A <1> 1505 00000A1F 0D0A <1> db 13,10 1506 00000A21 20202F433D636F6D6D- <1> db " /C=commands",9,9, "semicolon-separated list of commands (quote spaces)",13,10 1506 00000A2A 616E6473090973656D- <1> 1506 00000A33 69636F6C6F6E2D7365- <1> 1506 00000A3C 70617261746564206C- <1> 1506 00000A45 697374206F6620636F- <1> 1506 00000A4E 6D6D616E6473202871- <1> 1506 00000A57 756F74652073706163- <1> 1506 00000A60 6573290D0A <1> 1507 00000A65 20202F420909097275- <1> db " /B",9,9,9, "run a breakpoint within initialisation",13,10 1507 00000A6E 6E206120627265616B- <1> 1507 00000A77 706F696E7420776974- <1> 1507 00000A80 68696E20696E697469- <1> 1507 00000A89 616C69736174696F6E- <1> 1507 00000A92 0D0A <1> 1508 <1> %if _VXCHG 1509 00000A94 20202F565B2B7C2D5D- <1> db " /V[+|-]",9,9, "enable/disable video screen swapping",13,10 1509 00000A9D 0909656E61626C652F- <1> 1509 00000AA6 64697361626C652076- <1> 1509 00000AAF 6964656F2073637265- <1> 1509 00000AB8 656E20737761707069- <1> 1509 00000AC1 6E670D0A <1> 1510 <1> %endif 1511 <1> %if _DEBUG && _DEBUG_COND 1512 00000AC5 20202F445B2B7C2D5D- <1> db " /D[+|-]",9,9, "enable/disable debuggable mode",13,10 1512 00000ACE 0909656E61626C652F- <1> 1512 00000AD7 64697361626C652064- <1> 1512 00000AE0 656275676761626C65- <1> 1512 00000AE9 206D6F64650D0A <1> 1513 <1> %endif 1514 00000AF0 202070726F676E616D- <1> db " progname.ext",9,9,"(executable) file to debug or examine",13,10 1514 00000AF9 652E65787409092865- <1> 1514 00000B02 786563757461626C65- <1> 1514 00000B0B 292066696C6520746F- <1> 1514 00000B14 206465627567206F72- <1> 1514 00000B1D 206578616D696E650D- <1> 1514 00000B26 0A <1> 1515 00000B27 2020706172616D6574- <1> db " parameters",9,9, "parameters given to program",13,10 1515 00000B30 657273090970617261- <1> 1515 00000B39 6D6574657273206769- <1> 1515 00000B42 76656E20746F207072- <1> 1515 00000B4B 6F6772616D0D0A <1> 1516 00000B52 0D0A <1> db 13,10 1517 00000B54 466F722061206C6973- <1> db "For a list of debugging commands, run " 1517 00000B5D 74206F662064656275- <1> 1517 00000B66 6767696E6720636F6D- <1> 1517 00000B6F 6D616E64732C207275- <1> 1517 00000B78 6E20 <1> 1518 00000B7A 00 <1> asciz 1519 <1> .help.3: 1520 00000B7B 20616E642074797065- <1> db " and type ? at the prompt.",13,10 1520 00000B84 203F20617420746865- <1> 1520 00000B8D 2070726F6D70742E0D- <1> 1520 00000B96 0A <1> 1521 00000B97 00 <1> asciz 1522 <1> %if _ONLY386 1523 <1> .no386: ascizline "Error: This ",_PROGNAME," build requires a 386 CPU or higher." 1524 <1> %elif _ONLYNON386 1525 <1> .386: asciiline "Warning: This ",_PROGNAME," build is ignorant of 386 CPU specifics." 1526 <1> ascizline 9," It does not allow access to the available 386-specific registers!" 1527 <1> %endif 1528 <1> 1529 <1> %if _SYMBOLIC 1530 <1> .switch_s_garbage: 1531 <1> asciz "Ignoring garbage at end of /S switch!",13,10 1532 <1> %endif 1533 <1> .invalidswitch: 1534 00000B98 496E76616C69642073- <1> db "Invalid switch - " 1534 00000BA1 7769746368202D20 <1> 1535 <1> .invalidswitch_a: 1536 00000BA9 780D0A00 <1> asciz "x",13,10 1537 <1> .switch_c_error: 1538 00000BAD 537769746368202F43- <1> asciz "Switch /C invalid content",13,10 1538 00000BB6 20696E76616C696420- <1> 1538 00000BBF 636F6E74656E740D0A- <1> 1538 00000BC8 00 <1> 1539 <1> %if _VXCHG 1540 <1> .switch_v_error: 1541 00000BC9 537769746368202F56- <1> asciz "Switch /V invalid content",13,10 1541 00000BD2 20696E76616C696420- <1> 1541 00000BDB 636F6E74656E740D0A- <1> 1541 00000BE4 00 <1> 1542 <1> %endif 1543 <1> %if _DEBUG && _DEBUG_COND 1544 <1> .switch_d_error: 1545 00000BE5 537769746368202F44- <1> asciz "Switch /D invalid content",13,10 1545 00000BEE 20696E76616C696420- <1> 1545 00000BF7 636F6E74656E740D0A- <1> 1545 00000C00 00 <1> 1546 <1> %endif 1547 <1> %if _BOOTLDR 1548 <1> .default_cmdline: 1549 <1> db _BOOTSCRIPTPREFIX 1550 00000C01 406966206578697374- <1> db "@if exists y ldp/",_BOOTSCRIPTNAME," :",_BOOTSCRIPTLABEL 1550 00000C0A 732079206C64702F4C- <1> 1550 00000C13 4344454255472E534C- <1> 1550 00000C1C 44203A626F6F747374- <1> 1550 00000C25 6172747570 <1> 1551 00000C2A 207468656E2079206C- <1> db " then y ldp/",_BOOTSCRIPTNAME," :",_BOOTSCRIPTLABEL 1551 00000C33 64702F4C4344454255- <1> 1551 00000C3C 472E534C44203A626F- <1> 1551 00000C45 6F7473746172747570 <1> 1552 00000C4E 00 <1> asciz 1553 <1> .rpl_detected: 1554 00000C4F 52504C206465746563- <1> asciz "RPL detected! Currently unsupported.",13,10 1554 00000C58 746564212043757272- <1> 1554 00000C61 656E746C7920756E73- <1> 1554 00000C6A 7570706F727465642E- <1> 1554 00000C73 0D0A00 <1> 1555 <1> .mismatch_detected: 1556 00000C76 4D69736D6174636820- <1> asciz "Mismatch in memory size detected! Internal error!",13,10 1556 00000C7F 696E206D656D6F7279- <1> 1556 00000C88 2073697A6520646574- <1> 1556 00000C91 65637465642120496E- <1> 1556 00000C9A 7465726E616C206572- <1> 1556 00000CA3 726F72210D0A00 <1> 1557 <1> .boot_ebda_unexpected: 1558 00000CAA 454244412061742075- <1> asciz "EBDA at unexpected position.",13,10 1558 00000CB3 6E6578706563746564- <1> 1558 00000CBC 20706F736974696F6E- <1> 1558 00000CC5 2E0D0A00 <1> 1559 <1> .boot_error_out_of_memory: 1560 00000CC9 4F7574206F66206D65- <1> asciz "Out of memory!",13,10 1560 00000CD2 6D6F7279210D0A00 <1> 1561 <1> .boot_error_internal: 1562 00000CDA 496E7465726E616C20- <1> asciz "Internal error while relocating load image!",13,10 1562 00000CE3 6572726F7220776869- <1> 1562 00000CEC 6C652072656C6F6361- <1> 1562 00000CF5 74696E67206C6F6164- <1> 1562 00000CFE 20696D616765210D0A- <1> 1562 00000D07 00 <1> 1563 <1> .booterror: 1564 00000D08 0D0A436F6E64746E6C- <1> asciz 13,10,_PROGNAME," boot error. Press any key to reboot.",13,10 1564 00000D11 2E2044656275676761- <1> 1564 00000D1A 626C65206C44656275- <1> 1564 00000D23 6720626F6F74206572- <1> 1564 00000D2C 726F722E2050726573- <1> 1564 00000D35 7320616E79206B6579- <1> 1564 00000D3E 20746F207265626F6F- <1> 1564 00000D47 742E0D0A00 <1> 1565 <1> %endif 1566 <1> %if _DOSEMU 1567 00000D4C 30322F32352F3933 <1> .dosemudate: db "02/25/93" 1568 <1> %endif 1569 <1> %if _VDD 1570 00000D54 44454258585644442E- <1> .vdd: asciz "DEBXXVDD.DLL" 1570 00000D5D 444C4C00 <1> 1571 00000D61 446973706174636800 <1> .dispatch: asciz "Dispatch" 1572 00000D6A 496E697400 <1> .init: asciz "Init" 1573 00000D6F 4D4F555345202020 <1> .mouse: db "MOUSE",32,32,32 ; Looks like a device name 1574 00000D77 416E64792057617473- <1> .andy: db "Andy Watson" ; I don't know him and why he's inside the NTVDM mouse driver 1574 00000D80 6F6E <1> 1575 <1> endarea .andy 1576 00000D82 57696E646F7773204E- <1> .ntdos: db "Windows NT MS-DOS subsystem Mouse Driver" ; Int33.004D mouse driver copyright string (not ASCIZ) 1576 00000D8B 54204D532D444F5320- <1> 1576 00000D94 73756273797374656D- <1> 1576 00000D9D 204D6F757365204472- <1> 1576 00000DA6 69766572 <1> 1577 <1> endarea .ntdos 1578 <1> 1579 <1> ; INP: - 1580 <1> ; OUT: CY if not NTVDM 1581 <1> ; NC if NTVDM 1582 <1> ; ds = es = cs 1583 <1> ; CHG: ax, bx, cx, dx, di, si, bp, es, ds 1584 <1> isnt: 1585 00000DAA B80258 <1> mov ax, 5802h ; Get UMB link state 1586 00000DAD CD21 <1> int 21h 1587 00000DAF 30E4 <1> xor ah, ah 1588 00000DB1 50 <1> push ax ; Save UMB link state 1589 00000DB2 B80358 <1> mov ax, 5803h ; Set UMB link state: 1590 00000DB5 BB0100 <1> mov bx, 1 ; Add UMBs to memory chain 1591 00000DB8 CD21 <1> int 21h 1592 00000DBA B452 <1> mov ah, 52h 1593 00000DBC BBFFFF <1> mov bx, -1 1594 00000DBF CD21 <1> int 21h ; Get list of lists 1595 00000DC1 43 <1> inc bx ; 0FFFFh ? 1596 00000DC2 7503E98600 <1> jz .notnt ; invalid --> 1597 00000DC7 268B47FD <1> mov ax, word [es:bx-3] ; First MCB 1598 00000DCB 0E <1> push cs 1599 00000DCC 07 <1> pop es ; reset es 1600 <1> .loop: 1601 00000DCD 8ED8 <1> mov ds, ax ; ds = MCB 1602 00000DCF 40 <1> inc ax ; Now segment of memory block itself 1603 00000DD0 31D2 <1> xor dx, dx 1604 00000DD2 31DB <1> xor bx, bx 1605 00000DD4 803F5A <1> cmp byte [bx], 'Z' ; End of MCB chain? 1606 00000DD7 7503 <1> jne .notlast 1607 00000DD9 42 <1> inc dx 1608 00000DDA EB05 <1> jmp short .notchain 1609 <1> .notlast: 1610 00000DDC 803F4D <1> cmp byte [bx], 'M' ; Valid MCB chain? 1611 00000DDF 756C <1> jne .error 1612 <1> .notchain: 1613 00000DE1 8B4F03 <1> mov cx, [bx+3] ; MCB size in paragraphs 1614 <1> ; ax = current memory block 1615 <1> ; cx = size of current memory block in paragraphs 1616 <1> ; dx = flag whether this is the last MCB 1617 <1> ; ds = current MCB (before memory block) 1618 00000DE4 837F0108 <1> cmp word [bx+1], 8 ; MCB owner DOS? 1619 00000DE8 755D <1> jne .notfound_1 1620 00000DEA 817F085344 <1> cmp word [bx+8], "SD" ; MCB name "SD"? 1621 00000DEF 7556 <1> jne .notfound_1 1622 <1> .loopsub: 1623 00000DF1 8ED8 <1> mov ds, ax ; SD sub-segment inside memory block 1624 00000DF3 40 <1> inc ax 1625 00000DF4 49 <1> dec cx 1626 00000DF5 8B6F03 <1> mov bp, word [bx+3] ; Paragraphs 'til end of SD sub-segment 1627 <1> ; ax = current SD sub-segment 1628 <1> ; cx = paragraphs from SD sub-segment start (ax) to current memory block end 1629 <1> ; ds = current SD sub-MCB (like MCB, but for SD sub-segment) 1630 <1> ; bp = current SD sub-segment size in paragraphs 1631 00000DF8 39E9 <1> cmp cx, bp 1632 00000DFA 724B <1> jb .notfound_1 ; Goes beyond memory block, invalid --> 1633 00000DFC 803F51 <1> cmp byte [bx], 'Q' ; NTVDM type 51h sub-segment ? 1634 00000DFF 753C <1> jne .notfound_2 ; no --> 1635 00000E01 BE0800 <1> mov si, 8 ; Offset of device name (if SD device driver sub-segment) 1636 00000E04 BF[6F0D] <1> mov di, imsg.mouse 1637 00000E07 51 <1> push cx 1638 00000E08 89F1 <1> mov cx, si ; length of name 1639 00000E0A F3A6 <1> repe cmpsb ; blank-padded device name "MOUSE" ? 1640 00000E0C 59 <1> pop cx 1641 00000E0D 752E <1> jne .notfound_2 ; Device name doesn't match, try next SD sub-segment 1642 00000E0F 8CD8 <1> mov ax, ds 1643 00000E11 40 <1> inc ax 1644 00000E12 8ED8 <1> mov ds, ax ; Segment of SD sub-segment 1645 <1> ; ds = current SD sub-segment 1646 00000E14 89E8 <1> mov ax, bp ; Leave paragraph value in bp 1647 00000E16 A900F0 <1> test ax, 0F000h ; Would *16 cause an overflow? 1648 00000E19 7520 <1> jnz .notfound_3 ; Then too large --> 1649 00000E1B 51 <1> push cx 1650 00000E1C B104 <1> mov cl, 4 1651 00000E1E D3E0 <1> shl ax, cl ; *16 1652 00000E20 59 <1> pop cx 1653 <1> ; ax = current SD sub-segment size in byte 1654 <1> .andy: 1655 00000E21 BF[770D] <1> mov di, imsg.andy 1656 00000E24 51 <1> push cx 1657 00000E25 B90B00 <1> mov cx, imsg.andy_size 1658 00000E28 E82E00 <1> call findstring ; String "Andy Watson"? 1659 00000E2B 59 <1> pop cx 1660 00000E2C 720D <1> jc .notfound_3 1661 <1> .ntdos: 1662 00000E2E BF[820D] <1> mov di, imsg.ntdos 1663 00000E31 51 <1> push cx 1664 00000E32 B92800 <1> mov cx, imsg.ntdos_size 1665 00000E35 E82100 <1> call findstring ; String "Windows NT MS-DOS subsystem Mouse Driver"? 1666 00000E38 59 <1> pop cx 1667 00000E39 7313 <1> jnc .found ; (NC) 1668 <1> .notfound_3: 1669 00000E3B 8CD8 <1> mov ax, ds 1670 <1> .notfound_2: 1671 00000E3D 39E9 <1> cmp cx, bp 1672 00000E3F 7406 <1> je .notfound_1 ; End of SD memory block, get next MCB 1673 00000E41 01E8 <1> add ax, bp ; Address next SD sub-MCB 1674 00000E43 29E9 <1> sub cx, bp 1675 00000E45 EBAA <1> jmp short .loopsub ; Try next SD sub-segment 1676 <1> .notfound_1: 1677 00000E47 01C8 <1> add ax, cx ; Address next MCB 1678 00000E49 85D2 <1> test dx, dx ; Non-zero if 'Z' MCB 1679 00000E4B 7480 <1> jz .loop ; If not at end of MCB chain, try next 1680 <1> ; jmp short .notnt ; Otherwise, not found 1681 <1> .error: 1682 <1> .notnt: 1683 00000E4D F9 <1> stc 1684 <1> .found: 1685 00000E4E 0E <1> push cs 1686 00000E4F 1F <1> pop ds ; restore ds 1687 <1> 1688 00000E50 5B <1> pop bx ; saved UMB link state 1689 00000E51 B80358 <1> mov ax, 5803h 1690 00000E54 9C <1> pushf 1691 00000E55 CD21 <1> int 21h ; Set UMB link state 1692 00000E57 9D <1> popf 1693 00000E58 C3 <1> retn 1694 <1> 1695 <1> findstring: 1696 00000E59 31F6 <1> xor si, si 1697 <1> .loop: 1698 00000E5B 56 <1> push si 1699 00000E5C 01CE <1> add si, cx 1700 00000E5E 7203 <1> jc .notfound_c 1701 00000E60 4E <1> dec si ; The largest offset we need for this compare 1702 00000E61 39F0 <1> cmp ax, si 1703 <1> .notfound_c: 1704 00000E63 5E <1> pop si 1705 00000E64 720D <1> jb .return ; Not found if at top of memory block --> 1706 00000E66 57 <1> push di 1707 00000E67 56 <1> push si 1708 00000E68 51 <1> push cx 1709 00000E69 F3A6 <1> repe cmpsb ; String somewhere inside program? 1710 00000E6B 59 <1> pop cx 1711 00000E6C 5E <1> pop si 1712 00000E6D 5F <1> pop di 1713 00000E6E 7403 <1> je .return ; Yes, proceed --> (if ZR, NC) 1714 00000E70 46 <1> inc si ; Increase pointer by one 1715 00000E71 EBE8 <1> jmp short .loop ; Try next address 1716 <1> .return: 1717 00000E73 C3 <1> retn 1718 <1> %endif 1719 <1> 1720 <1> 1721 <1> ; Move paragraphs 1722 <1> ; 1723 <1> ; INP: ax:0-> source 1724 <1> ; dx:0-> destination 1725 <1> ; cx = number of paragraphs 1726 <1> ; CHG: - 1727 <1> ; Note: Doesn't work correctly on HMA; doesn't always wrap to LMA either. 1728 <1> ; Do not provide a wrapped/HMA source or destination! 1729 <1> init_movp: 1730 00000E74 51 <1> push cx 1731 00000E75 1E <1> push ds 1732 00000E76 56 <1> push si 1733 00000E77 06 <1> push es 1734 00000E78 57 <1> push di 1735 <1> 1736 00000E79 39D0 <1> cmp ax, dx ; source above destination ? 1737 00000E7B 770A <1> ja .up ; yes, move up (forwards) --> 1738 00000E7D 747B <1> je .return ; same, no need to move --> 1739 00000E7F 50 <1> push ax 1740 00000E80 01C8 <1> add ax, cx ; (expected not to carry) 1741 00000E82 39D0 <1> cmp ax, dx ; end of source is above destination ? 1742 00000E84 58 <1> pop ax 1743 00000E85 7730 <1> ja .down ; yes, move from top down --> 1744 <1> ; Here, the end of source is below-or-equal the destination, 1745 <1> ; so they do not overlap. In this case we prefer moving up. 1746 <1> 1747 <1> .up: 1748 00000E87 50 <1> push ax 1749 00000E88 52 <1> push dx 1750 <1> .uploop: 1751 00000E89 8ED8 <1> mov ds, ax 1752 00000E8B 8EC2 <1> mov es, dx 1753 00000E8D 31FF <1> xor di, di 1754 00000E8F 31F6 <1> xor si, si ; -> start of segment 1755 00000E91 81E90010 <1> sub cx, 1000h ; 64 KiB left ? 1756 00000E95 7610 <1> jbe .uplast ; no --> 1757 00000E97 51 <1> push cx 1758 00000E98 B90080 <1> mov cx, 10000h /2 1759 00000E9B F3A5 <1> rep movsw ; move 64 KiB 1760 00000E9D 59 <1> pop cx 1761 00000E9E 050010 <1> add ax, 1000h 1762 00000EA1 81C20010 <1> add dx, 1000h ; -> next segment 1763 00000EA5 EBE2 <1> jmp short .uploop ; proceed for more --> 1764 <1> .uplast: 1765 00000EA7 81C10010 <1> add cx, 1000h ; restore counter 1766 00000EAB D1E1 <1> shl cx, 1 1767 00000EAD D1E1 <1> shl cx, 1 1768 00000EAF D1E1 <1> shl cx, 1 ; *8, paragraphs to words 1769 00000EB1 F3A5 <1> rep movsw ; move last part 1770 00000EB3 5A <1> pop dx 1771 00000EB4 58 <1> pop ax 1772 00000EB5 EB43 <1> jmp short .return 1773 <1> 1774 <1> .down: 1775 00000EB7 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND as below 1776 <1> .dnloop: 1777 00000EB8 81E90010 <1> sub cx, 1000h ; 64 KiB left ? 1778 00000EBC 761A <1> jbe .dnlast ; no --> 1779 00000EBE 50 <1> push ax 1780 00000EBF 52 <1> push dx 1781 00000EC0 01C8 <1> add ax, cx 1782 00000EC2 01CA <1> add dx, cx 1783 00000EC4 8ED8 <1> mov ds, ax ; -> 64 KiB not yet moved 1784 00000EC6 8EC2 <1> mov es, dx 1785 00000EC8 5A <1> pop dx 1786 00000EC9 58 <1> pop ax 1787 00000ECA BFFEFF <1> mov di, -2 1788 00000ECD 89FE <1> mov si, di ; moved from last word down 1789 00000ECF 51 <1> push cx 1790 00000ED0 B90080 <1> mov cx, 10000h /2 1791 00000ED3 F3A5 <1> rep movsw ; move 64 KiB 1792 00000ED5 59 <1> pop cx 1793 00000ED6 EBE0 <1> jmp short .dnloop ; proceed for more --> 1794 <1> .dnlast: 1795 00000ED8 81C10010 <1> add cx, 1000h ; restore counter 1796 00000EDC D1E1 <1> shl cx, 1 1797 00000EDE D1E1 <1> shl cx, 1 1798 00000EE0 D1E1 <1> shl cx, 1 ; *8, paragraphs to words 1799 00000EE2 89CF <1> mov di, cx 1800 00000EE4 4F <1> dec di 1801 00000EE5 D1E7 <1> shl di, 1 ; words to offset, -> last word 1802 00000EE7 89FE <1> mov si, di 1803 00000EE9 8ED8 <1> mov ds, ax 1804 00000EEB 8EC2 <1> mov es, dx ; first segment correct 1805 <1> 1806 <1> 1807 <1> numdef AMD_ERRATUM_109_WORKAROUND, 1 1808 <1> %if 0 1809 <1> 1810 <1> Jack R. Ellis pointed out this erratum: 1811 <1> 1812 <1> Quoting from https://www.amd.com/system/files/TechDocs/25759.pdf page 69: 1813 <1> 1814 <1> 109 Certain Reverse REP MOVS May Produce Unpredictable Behavior 1815 <1> 1816 <1> Description 1817 <1> 1818 <1> In certain situations a REP MOVS instruction may lead to 1819 <1> incorrect results. An incorrect address size, data size 1820 <1> or source operand segment may be used or a succeeding 1821 <1> instruction may be skipped. This may occur under the 1822 <1> following conditions: 1823 <1> 1824 <1> * EFLAGS.DF=1 (the string is being moved in the reverse direction). 1825 <1> 1826 <1> * The number of items being moved (RCX) is between 1 and 20. 1827 <1> 1828 <1> * The REP MOVS instruction is preceded by some microcoded instruction 1829 <1> that has not completely retired by the time the REP MOVS begins 1830 <1> execution. The set of such instructions includes BOUND, CLI, LDS, 1831 <1> LES, LFS, LGS, LSS, IDIV, and most microcoded x87 instructions. 1832 <1> 1833 <1> Potential Effect on System 1834 <1> 1835 <1> Incorrect results may be produced or the system may hang. 1836 <1> 1837 <1> Suggested Workaround 1838 <1> 1839 <1> Contact your AMD representative for information on a BIOS update. 1840 <1> 1841 <1> %endif 1842 <1> 1843 <1> %if _AMD_ERRATUM_109_WORKAROUND 1844 00000EED E308 <1> jcxz @FF 1845 00000EEF 83F914 <1> cmp cx, 20 1846 00000EF2 7703 <1> ja @FF 1847 <1> @@: 1848 00000EF4 A5 <1> movsw 1849 00000EF5 E2FD <1> loop @B 1850 <1> @@: 1851 <1> %endif 1852 00000EF7 F3A5 <1> rep movsw ; move first part 1853 00000EF9 FC <1> cld 1854 <1> .return: 1855 00000EFA 5F <1> pop di 1856 00000EFB 07 <1> pop es 1857 00000EFC 5E <1> pop si 1858 00000EFD 1F <1> pop ds 1859 00000EFE 59 <1> pop cx 1860 00000EFF C3 <1> retn 1861 <1> 1862 <1> 1863 <1> %if _BOOTLDR 1864 <1> ; only called for boot-loaded mode 1865 <1> init_getc_bootldr: 1866 00000F00 31C0 <1> xor ax, ax 1867 00000F02 CD16 <1> int 16h 1868 00000F04 C3 <1> retn 1869 <1> %endif 1870 <1> 1871 <1> init_putsz_cs: 1872 00000F05 50 <1> push ax 1873 00000F06 53 <1> push bx 1874 00000F07 51 <1> push cx 1875 00000F08 52 <1> push dx 1876 00000F09 1E <1> push ds 1877 00000F0A 06 <1> push es 1878 00000F0B 57 <1> push di 1879 00000F0C 0E <1> push cs 1880 00000F0D 07 <1> pop es 1881 00000F0E 0E <1> push cs 1882 00000F0F 1F <1> pop ds 1883 00000F10 89D7 <1> mov di, dx ; es:di-> string 1884 00000F12 30C0 <1> xor al, al 1885 00000F14 B9FFFF <1> mov cx, -1 1886 00000F17 F2AE <1> repne scasb ; search zero 1887 00000F19 F7D1 <1> not cx 1888 00000F1B 49 <1> dec cx ; cx = length of message 1889 00000F1C 5F <1> pop di 1890 00000F1D E82900 <1> call init_puts_ds 1891 00000F20 07 <1> pop es 1892 00000F21 1F <1> pop ds 1893 00000F22 5A <1> pop dx 1894 00000F23 59 <1> pop cx 1895 00000F24 5B <1> pop bx 1896 00000F25 58 <1> pop ax 1897 00000F26 C3 <1> retn 1898 <1> 1899 <1> %if _BOOTLDR 1900 <1> init_putsz_cs_bootldr: 1901 00000F27 50 <1> push ax 1902 00000F28 53 <1> push bx 1903 00000F29 51 <1> push cx 1904 00000F2A 52 <1> push dx 1905 00000F2B 1E <1> push ds 1906 00000F2C 06 <1> push es 1907 00000F2D 57 <1> push di 1908 00000F2E 0E <1> push cs 1909 00000F2F 07 <1> pop es 1910 00000F30 0E <1> push cs 1911 00000F31 1F <1> pop ds 1912 00000F32 89D7 <1> mov di, dx ; es:di-> string 1913 00000F34 30C0 <1> xor al, al 1914 00000F36 B9FFFF <1> mov cx, -1 1915 00000F39 F2AE <1> repne scasb ; search zero 1916 00000F3B F7D1 <1> not cx 1917 00000F3D 49 <1> dec cx ; cx = length of message 1918 00000F3E 5F <1> pop di 1919 00000F3F E80F00 <1> call init_puts_ds_bootldr 1920 00000F42 07 <1> pop es 1921 00000F43 1F <1> pop ds 1922 00000F44 5A <1> pop dx 1923 00000F45 59 <1> pop cx 1924 00000F46 5B <1> pop bx 1925 00000F47 58 <1> pop ax 1926 00000F48 C3 <1> retn 1927 <1> %endif 1928 <1> 1929 <1> init_puts_ds: 1930 <1> %if _BOOTLDR 1931 00000F49 36F606[C500]40 <1> testopt [ss:internalflags], nodosloaded 1932 00000F4F 7413 <1> jz @F 1933 <1> 1934 <1> init_puts_ds_bootldr: 1935 00000F51 56 <1> push si 1936 00000F52 55 <1> push bp 1937 00000F53 89D6 <1> mov si, dx 1938 00000F55 E30A <1> jcxz .return 1939 <1> .loop: 1940 00000F57 AC <1> lodsb 1941 00000F58 BB0700 <1> mov bx, 0007 1942 00000F5B B40E <1> mov ah, 0Eh 1943 00000F5D CD10 <1> int 10h 1944 00000F5F E2F6 <1> loop .loop 1945 <1> .return: 1946 00000F61 5D <1> pop bp 1947 00000F62 5E <1> pop si 1948 00000F63 C3 <1> retn 1949 <1> 1950 <1> @@: 1951 <1> %endif 1952 00000F64 BB0100 <1> mov bx, 1 ; standard output 1953 00000F67 B440 <1> mov ah, 40h ; write to file 1954 00000F69 E302 <1> jcxz @F 1955 00000F6B CD21 <1> int 21h 1956 <1> @@: 1957 00000F6D C3 <1> retn 1958 <1> 1959 <1> 1960 <1> 1961 <1> %if _BOOTLDR 1962 <1> ; Initial entry when boot loading. 1963 <1> 1964 <1> ; ds = ss = debugger data segment 1965 <1> ; (ds - 1) = image ident prefix paragraph 1966 <1> boot_old_initcode: 1967 00000F6E FC <1> cld 1968 <1> 1969 <1> d4 call init_d4message 1970 <1> d4 asciz "In boot loader; press any key",13,10 1971 <1> d4 call init_d4pauseforkey 1972 <1> 1973 00000F6F C706[460C]8000 <1> mov word [execblk.cmdline], 80h 1974 00000F75 C60681000D <1> mov byte [81h], 0Dh 1975 00000F7A C606[D40B]01 <1> mov byte [fileext], EXT_OTHER ; empty file name and command line as per N 1976 <1> %endif ; _BOOTLDR 1977 <1> 1978 <1> old_initcode: 1979 00000F7F FC <1> cld 1980 <1> d0bp 1981 00000F80 8CD8 <1> mov ax, ds 1982 00000F82 A3[480C] <1> mov word [execblk.cmdline + 2], ax 1983 00000F85 A3[4C0C] <1> mov word [execblk.fcb1 + 2], ax 1984 00000F88 A3[500C] <1> mov word [execblk.fcb2 + 2], ax ; set up parameter block for exec command 1985 00000F8B A3[E00A] <1> mov word [pspdbg], ax 1986 <1> 1987 00000F8E 1E <1> push ds 1988 00000F8F B84000 <1> mov ax, 40h 1989 00000F92 8ED8 <1> mov ds, ax 1990 00000F94 A18200 <1> mov ax, word [82h] ; end of circular keypress buffer 1991 00000F97 8B168000 <1> mov dx, word [80h] ; start of circular buffer 1992 00000F9B 85C0 <1> test ax, ax 1993 00000F9D 7431 <1> jz .forcekeybuffer 1994 00000F9F 85D2 <1> test dx, dx 1995 00000FA1 742D <1> jz .forcekeybuffer 1996 00000FA3 89C3 <1> mov bx, ax 1997 00000FA5 29D3 <1> sub bx, dx ; cmp end, start 1998 00000FA7 7627 <1> jbe .forcekeybuffer ; below or equal is invalid --> 1999 00000FA9 F6C301 <1> test bl, 1 ; even amount of bytes ? 2000 00000FAC 7522 <1> jnz .forcekeybuffer ; no, invalid --> 2001 00000FAE 8B1E1A00 <1> mov bx, word [1Ah] ; current head of circular buffer 2002 00000FB2 39C3 <1> cmp bx, ax 2003 00000FB4 731A <1> jae .forcekeybuffer 2004 00000FB6 29D3 <1> sub bx, dx 2005 00000FB8 7216 <1> jb .forcekeybuffer 2006 00000FBA F6C301 <1> test bl, 1 2007 00000FBD 7511 <1> jnz .forcekeybuffer ; invalid --> 2008 00000FBF 8B1E1C00 <1> mov bx, word [1Ch] ; current tail of circular buffer 2009 00000FC3 39C3 <1> cmp bx, ax 2010 00000FC5 7309 <1> jae .forcekeybuffer 2011 00000FC7 29D3 <1> sub bx, dx 2012 00000FC9 7205 <1> jb .forcekeybuffer 2013 00000FCB F6C301 <1> test bl, 1 2014 00000FCE 740E <1> jz @F ; valid --> 2015 <1> .forcekeybuffer: 2016 00000FD0 1F <1> pop ds 2017 00000FD1 C706[F40B]3E00 <1> mov word [io_end_buffer], 3Eh 2018 00000FD7 C706[F20B]1E00 <1> mov word [io_start_buffer], 1Eh 2019 00000FDD A8 <1> db __TEST_IMM8 ; (skip pop) 2020 <1> @@: 2021 00000FDE 1F <1> pop ds 2022 <1> 2023 <1> %if _BOOTLDR 2024 00000FDF F606[C500]40 <1> testopt [internalflags], nodosloaded 2025 00000FE4 7403 <1> jz .checkio 2026 <1> d4 call init_d4message 2027 <1> d4 asciz "Common initialisation, determining processor type now",13,10 2028 00000FE6 E9A700 <1> jmp .determineprocessor 2029 <1> .checkio: 2030 <1> %endif 2031 <1> ; Check for console input vs. input from a file or other device. 2032 <1> ; This has to be done early because MS-DOS seems to switch CON 2033 <1> ; to cooked I/O mode only then. 2034 00000FE9 B80044 <1> mov ax, 4400h ; IOCTL get device information 2035 00000FEC 31DB <1> xor bx, bx ; StdIn 2036 00000FEE B283 <1> mov dl, 83h ; default if 21.4400 fails 2037 00000FF0 CD21 <1> int 21h 2038 00000FF2 F6C280 <1> test dl, 80h 2039 00000FF5 7414 <1> jz .inputfile 2040 00000FF7 8026[C400]DF <1> clropt [internalflags], inputfile 2041 00000FFC F6C203 <1> test dl, 3 2042 00000FFF 740A <1> jz .inputdevice ; if not the console input 2043 00001001 8026[C400]EF <1> clropt [internalflags], notstdinput 2044 00001006 C606[2C0B]00 <1> mov byte [notatty], 0 ; it _is_ a tty 2045 <1> .inputdevice: 2046 <1> .inputfile: 2047 0000100B B80044 <1> mov ax, 4400h ; IOCTL get device information 2048 0000100E 43 <1> inc bx ; StdOut 2049 0000100F B283 <1> mov dl, 83h ; default if 21.4400 fails 2050 00001011 CD21 <1> int 21h 2051 00001013 F6C280 <1> test dl, 80h 2052 00001016 740F <1> jz .outputfile 2053 00001018 8026[C400]7F <1> clropt [internalflags], outputfile 2054 0000101D F6C203 <1> test dl, 3 2055 00001020 7405 <1> jz .outputdevice ; if not the console output 2056 00001022 8026[C400]BF <1> clropt [internalflags], notstdoutput 2057 <1> .outputdevice: 2058 <1> .outputfile: 2059 <1> 2060 <1> ; Check DOS version 2061 <1> %if _VDD 2062 00001027 1E <1> push ds 2063 00001028 0E <1> push cs 2064 00001029 1F <1> pop ds 2065 0000102A 0E <1> push cs 2066 0000102B 07 <1> pop es 2067 0000102C E87BFD <1> call isnt ; NTVDM ? 2068 0000102F 1F <1> pop ds 2069 00001030 7205 <1> jc .isnotnt ; no --> 2070 00001032 800E[C600]02 <1> setopt [internalflags], runningnt 2071 <1> .isnotnt: 2072 <1> %endif 2073 <1> 2074 00001037 B80030 <1> mov ax, 3000h ; check DOS version 2075 0000103A CD21 <1> int 21h 2076 0000103C 86C4 <1> xchg al, ah 2077 0000103E 3D1F03 <1> cmp ax, ver(3,31) ; MS-DOS version > 3.30 ? 2078 00001041 7205 <1> jb .notoldpacket ; no --> 2079 00001043 800E[C400]01 <1> setopt [internalflags], oldpacket ; assume Int25/Int26 packet method available 2080 <1> .notoldpacket: 2081 00001048 50 <1> push ax 2082 00001049 31DB <1> xor bx, bx ; preset to invalid value 2083 0000104B B80633 <1> mov ax, 3306h 2084 0000104E CD21 <1> int 21h 2085 00001050 84C0 <1> test al, al ; invalid, DOS 1.x error --> 2086 00001052 7402 <1> jz .213306invalid 2087 00001054 3CFF <1> cmp al, -1 ; invalid 2088 <1> .213306invalid: 2089 00001056 58 <1> pop ax 2090 00001057 7407 <1> je .useoldver 2091 00001059 85DB <1> test bx, bx ; 0.0 ? 2092 0000105B 7403 <1> jz .useoldver ; assume invalid --> 2093 0000105D 93 <1> xchg ax, bx ; get version to ax 2094 0000105E 86C4 <1> xchg al, ah ; strange Microsoft version format 2095 <1> .useoldver: 2096 00001060 3D0107 <1> cmp ax, ver(7,01) ; MS-DOS version > 7.00 ? 2097 00001063 7205 <1> jb .notnewpacket ; no --> 2098 00001065 800E[C400]03 <1> setopt [internalflags], newpacket| oldpacket ; assume both packet methods available 2099 <1> .notnewpacket: 2100 <1> %if _VDD 2101 0000106A F606[C600]02 <1> testopt [internalflags], runningnt 2102 0000106F 741F <1> jz .novdd 2103 00001071 1E <1> push ds 2104 00001072 0E <1> push cs 2105 00001073 1F <1> pop ds 2106 00001074 0E <1> push cs 2107 00001075 07 <1> pop es 2108 00001076 BE[540D] <1> mov si, imsg.vdd ; ds:si-> ASCIZ VDD filename 2109 00001079 BB[610D] <1> mov bx, imsg.dispatch ; ds:bx-> ASCIZ dispatching entry 2110 0000107C BF[6A0D] <1> mov di, imsg.init ; es:di-> ASCIZ init entry 2111 0000107F F8 <1> clc ; ! 2112 00001080 C4C4580090 <1> RegisterModule ; register VDD 2113 00001085 1F <1> pop ds 2114 00001086 7208 <1> jc .novdd ; error ? --> 2115 00001088 A3[EC0A] <1> mov word [hVdd], ax 2116 0000108B 800E[C400]05 <1> setopt [internalflags], ntpacket| oldpacket ; assume old packet method also available 2117 <1> .novdd: 2118 <1> %endif 2119 <1> .determineprocessor: 2120 <1> d4 call init_d4message 2121 <1> d4 asciz "Determining processor type",13,10 2122 <1> 2123 00001090 B92101 <1> mov cx, 0121h 2124 00001093 D2E5 <1> shl ch, cl 2125 00001095 7510 <1> jnz .found_186_plus ; normal 186 masks shift count with 31 --> 2126 <1> 2127 <1> ; The NEC V20/V30 processors do support the 186 extensions 2128 <1> ; to the instruction set but do not mask the shift count. 2129 <1> ; Therefore, specifically detect them here. Based on the 2130 <1> ; text in http://www.textfiles.com/hamradio/v20_bug.txt 2131 00001097 89E0 <1> mov ax, sp 2132 00001099 B90100 <1> mov cx, 1 ; = 1 if on actual 8088/8086 2133 0000109C 51 <1> push cx 2134 0000109D 49 <1> dec cx ; = 0 if on NEC V20/V30 2135 0000109E 8FC1 <1> db 8Fh, 0C1h ; pop r/m16 with cx as operand 2136 <1> ; (reportedly a nop on the NECs) 2137 000010A0 89C4 <1> mov sp, ax ; reset stack to known state 2138 000010A2 E303 <1> jcxz .found_186_plus ; if it was a nop --> 2139 000010A4 E9EB00 <1> jmp .cpudone ; is an actual 8088/8086 --> 2140 <1> 2141 <1> .found_186_plus: 2142 <1> d4 call init_d4message 2143 <1> d4 asciz "Found 186+ processor",13,10 2144 000010A7 FE06[0E0B] <1> inc byte [ machine ] ; 1 2145 000010AB 54 <1> push sp 2146 000010AC 58 <1> pop ax 2147 000010AD 39E0 <1> cmp ax, sp 2148 000010AF 7403E9DE00 <1> jne .cpudone ; 80186 pushes the adjusted value of sp --> 2149 <1> 2150 <1> d4 call init_d4message 2151 <1> d4 asciz "Found 286+ processor",13,10 2152 <1> ; Determine the processor type. This is adapted from code in the 2153 <1> ; Pentium Family User's Manual, Volume 3: Architecture and 2154 <1> ; Programming Manual, Intel Corp., 1994, Chapter 5. That code contains 2155 <1> ; the following comment: 2156 <1> ; 2157 <1> ; This program has been developed by Intel Corporation. 2158 <1> ; Software developers have Intel's permission to incorporate 2159 <1> ; this source code into your software royalty free. 2160 <1> ; 2161 <1> ; Intel 286 CPU check. 2162 <1> ; Bits 12-15 of the flags register are always clear on the 2163 <1> ; 286 processor in real-address mode. 2164 <1> ; Bits 12-15 of the FLAGS register are always set on the 2165 <1> ; 8086 and 186 processor. 2166 000010B4 FE06[0E0B] <1> inc byte [ machine ] ; 2 2167 000010B8 9C <1> pushf ; save IF 2168 000010B9 9C <1> pushf ; get original flags into ax 2169 000010BA 58 <1> pop ax 2170 000010BB 0D00F0 <1> or ax, 0F000h ; try to set bits 12-15 2171 000010BE 25FFFD <1> and ax, ~0200h ; clear IF 2172 000010C1 50 <1> push ax ; save new flags value on stack 2173 000010C2 9D <1> popf ; replace current flags value; DI 2174 000010C3 9C <1> pushf ; get new flags 2175 000010C4 58 <1> pop ax ; store new flags in ax 2176 000010C5 9D <1> popf ; restore IF (in 86 Mode) 2177 000010C6 A900F0 <1> test ax, 0F000h ; if bits 12-15 clear, CPU = 80286 2178 000010C9 7503E9C400 <1> jz .cpudone ; if 80286 --> 2179 <1> 2180 <1> d4 call init_d4message 2181 <1> d4 asciz "Found 386+ processor",13,10 2182 <1> ; Intel 386 CPU check. 2183 <1> ; The AC bit, bit #18, is a new bit introduced in the EFLAGS 2184 <1> ; register on the Intel486 DX cpu to generate alignment faults. 2185 <1> ; This bit cannot be set on the Intel386 CPU. 2186 <1> ; 2187 <1> ; It is now safe to use 32-bit opcode/operands. 2188 <1> subcpu 386 2189 000010CE 800E[C500]80 <1> setopt [internalflags], has386 2190 000010D3 FE06[0E0B] <1> inc byte [ machine ] ; 3 2191 <1> 2192 <1> %if _DEVICE 2193 000010D7 F606[DA00]40 <1> testopt [internalflags6], dif6_device_mode 2194 000010DC 7440 <1> jz @F 2195 <1> 2196 000010DE 8C26[8C0C] <1> mov word [reg_fs], fs 2197 000010E2 8C2E[900C] <1> mov word [reg_gs], gs 2198 <1> %macro set_gpr_h 1 2199 <1> push e %+ %1 2200 <1> pop %1 2201 <1> pop word [reg_e %+ %1 + 2] 2202 <1> %endmacro 2203 <1> set_gpr_h ax 2199 000010E6 6650 <2> push e %+ %1 2200 000010E8 58 <2> pop %1 2201 000010E9 8F06[5E0C] <2> pop word [reg_e %+ %1 + 2] 2204 <1> set_gpr_h bx 2199 000010ED 6653 <2> push e %+ %1 2200 000010EF 5B <2> pop %1 2201 000010F0 8F06[620C] <2> pop word [reg_e %+ %1 + 2] 2205 <1> set_gpr_h cx 2199 000010F4 6651 <2> push e %+ %1 2200 000010F6 59 <2> pop %1 2201 000010F7 8F06[660C] <2> pop word [reg_e %+ %1 + 2] 2206 <1> set_gpr_h dx 2199 000010FB 6652 <2> push e %+ %1 2200 000010FD 5A <2> pop %1 2201 000010FE 8F06[6A0C] <2> pop word [reg_e %+ %1 + 2] 2207 <1> set_gpr_h bp 2199 00001102 6655 <2> push e %+ %1 2200 00001104 5D <2> pop %1 2201 00001105 8F06[720C] <2> pop word [reg_e %+ %1 + 2] 2208 <1> set_gpr_h si 2199 00001109 6656 <2> push e %+ %1 2200 0000110B 5E <2> pop %1 2201 0000110C 8F06[760C] <2> pop word [reg_e %+ %1 + 2] 2209 <1> set_gpr_h di 2199 00001110 6657 <2> push e %+ %1 2200 00001112 5F <2> pop %1 2201 00001113 8F06[7A0C] <2> pop word [reg_e %+ %1 + 2] 2210 <1> ; esph and eiph remain zero 2211 00001117 669C <1> pushfd 2212 00001119 9D <1> popfw 2213 0000111A 8F06[9A0C] <1> pop word [reg_efl + 2] 2214 <1> %endif 2215 <1> @@: 2216 <1> 2217 0000111E 89E3 <1> mov bx, sp ; save current stack pointer to align 2218 00001120 83E4FC <1> and sp, ~3 ; align stack to avoid AC fault 2219 00001123 669C <1> pushfd ; push original EFLAGS 2220 00001125 6658 <1> pop eax ; get original EFLAGS 2221 00001127 6689C1 <1> mov ecx, eax ; save original EFLAGS in ECX (including IF) 2222 <1> 2223 0000112A 663500000400 <1> xor eax, 40000h ; flip AC bit in EFLAGS 2224 00001130 25FFFD <1> and ax, ~0200h ; clear IF 2225 00001133 6650 <1> push eax ; put new EFLAGS value on stack 2226 00001135 669D <1> popfd ; replace EFLAGS value; DI 2227 00001137 669C <1> pushfd ; get new EFLAGS 2228 00001139 6658 <1> pop eax ; store new EFLAGS value in EAX 2229 0000113B 89C8 <1> mov ax, cx ; ignore low bits (including IF) 2230 0000113D 6639C8 <1> cmp eax, ecx 2231 00001140 741A <1> je .cpudone_stack_eax_equals_ecx ; if 80386 --> 2232 <1> 2233 <1> d4 call init_d4message 2234 <1> d4 asciz "Found 486+ processor",13,10 2235 <1> ; Intel486 DX CPU, Intel487 SX NDP, and Intel486 SX CPU check. 2236 <1> ; Checking for ability to set/clear ID flag (bit 21) in EFLAGS 2237 <1> ; which indicates the presence of a processor with the ability 2238 <1> ; to use the CPUID instruction. 2239 00001142 FE06[0E0B] <1> inc byte [ machine ] ; 4 2240 00001146 6689C8 <1> mov eax, ecx ; get original EFLAGS 2241 00001149 663500002000 <1> xor eax, 200000h ; flip ID bit in EFLAGS 2242 0000114F 25FFFD <1> and ax, ~0200h ; clear IF 2243 00001152 6650 <1> push eax ; save new EFLAGS value on stack 2244 00001154 669D <1> popfd ; replace current EFLAGS value; DI 2245 00001156 669C <1> pushfd ; get new EFLAGS 2246 00001158 6658 <1> pop eax ; store new EFLAGS in EAX 2247 0000115A 89C8 <1> mov ax, cx ; ignore low bits (including IF) 2248 <1> 2249 <1> .cpudone_stack_eax_equals_ecx: 2250 0000115C 6651 <1> push ecx 2251 0000115E 669D <1> popfd ; restore AC,ID bits and IF in EFLAGS (86 Mode) 2252 00001160 89DC <1> mov sp, bx ; restore sp 2253 <1> 2254 00001162 6639C8 <1> cmp eax, ecx ; check if it's changed 2255 00001165 742B <1> je .cpudone ; if it's a 486 (can't toggle ID bit) --> 2256 <1> 2257 <1> d4 call init_d4message 2258 <1> d4 asciz "Found processor with CPUID support",13,10 2259 <1> ; Execute CPUID instruction. 2260 <1> subcpu 486 ; NASM (at least 2.10rc1) handles cpuid itself as a 2261 <1> ; 586+ instruction, but we know better. So this 2262 <1> ; part is declared for 486 compatibility, and only 2263 <1> ; the cpuid instructions are emitted with 586 2264 <1> ; compatibility to appease NASM. 2265 <1> %if 0 2266 <1> d4 call init_d4message 2267 <1> d4 asciz "CPUID will NOT be executed, to work around official DOSBox releases",13,10 2268 <1> d4 jmp .cpudone 2269 <1> %endif 2270 00001167 6631C0 <1> xor eax, eax ; set up input for CPUID instruction 2271 <1> d4 call init_d4message 2272 <1> d4 asciz "Executing CPUID 0",13,10 2273 <1> [cpu 586] 2274 0000116A 0FA2 <1> cpuid 2275 <1> __CPU__ 2276 <1> d4 call init_d4message 2277 <1> d4 asciz "CPUID 0 executed",13,10 2278 0000116C 6683F801 <1> cmp eax, byte 1 2279 00001170 7220 <1> jb .cpudone ; if 1 is not a valid input value for CPUID 2280 00001172 6631C0 <1> xor eax, eax ; otherwise, run CPUID with eax = 1 2281 00001175 6640 <1> inc eax 2282 <1> d4 call init_d4message 2283 <1> d4 asciz "Executing CPUID 1",13,10 2284 <1> [cpu 586] 2285 00001177 0FA2 <1> cpuid 2286 <1> __CPU__ 2287 <1> d4 call init_d4message 2288 <1> d4 asciz "CPUID 1 executed",13,10 2289 <1> %if _MMXSUPP 2290 00001179 66F7C200008000 <1> test edx, 80_0000h 2291 00001180 0F9506[120B] <1> setnz byte [has_mmx] 2292 <1> %endif 2293 <1> 2294 00001185 88E0 <1> mov al, ah 2295 00001187 240F <1> and al, 0Fh ; bits 8..11 are the model number 2296 00001189 3C06 <1> cmp al, 6 2297 0000118B 7202 <1> jb .below686 ; if < 6 2298 0000118D B006 <1> mov al, 6 ; if >= 6, set it to 6 2299 <1> .below686: 2300 0000118F A2[0E0B] <1> mov byte [ machine ], al; save machine type (486, 586, 686+) 2301 <1> 2302 <1> .cpudone: 2303 <1> subcpureset ; subcpu 486 2304 <1> subcpureset ; subcpu 386 2305 <1> d4 call init_d4message 2306 <1> d4 asciz "Determining floating-point unit",13,10 2307 <1> 2308 <1> ; Next determine the type of FPU in a system and set the mach_87 2309 <1> ; variable with the appropriate value. All registers are used by 2310 <1> ; this code; none are preserved. 2311 <1> ; 2312 <1> ; Coprocessor check. 2313 <1> ; The algorithm is to determine whether the floating-point 2314 <1> ; status and control words can be written to. If not, no 2315 <1> ; coprocessor exists. If the status and control words can be 2316 <1> ; written to, the correct coprocessor is then determined 2317 <1> ; depending on the processor ID. The Intel 386 CPU can 2318 <1> ; work with either an Intel 287 NDP or an Intel 387 NDP. 2319 <1> ; The infinity of the coprocessor must be checked 2320 <1> ; to determine the correct coprocessor ID. 2321 00001192 A0[0E0B] <1> mov al, byte [ machine ] 2322 00001195 A2[100B] <1> mov byte [ mach_87 ], al ; by default, set mach_87 to machine 2323 00001198 FE06[0F0B] <1> inc byte [ has_87 ] 2324 0000119C C606[110B]0C <1> mov byte [encodedmach87], 0Ch 2325 000011A1 3C05 <1> cmp al, 5 ; a Pentium or above always will have a FPU 2326 000011A3 7350 <1> jae .fpudone 2327 000011A5 FE0E[0F0B] <1> dec byte [ has_87 ] ; assume no FPU 2328 000011A9 C606[110B]C0 <1> mov byte [encodedmach87], 0C0h 2329 <1> 2330 000011AE DBE3 <1> fninit ; reset FPU 2331 000011B0 B0FF <1> mov al, -1 ; initialise with a non-zero value 2332 000011B2 50 <1> push ax 2333 000011B3 89E3 <1> mov bx, sp 2334 000011B5 36DD3F <1> fnstsw word [ss:bx] ; save FP status word 2335 000011B8 58 <1> pop ax ; retrieve it 2336 000011B9 84C0 <1> test al, al 2337 000011BB 7538 <1> jnz .fpudone ; if no FPU present 2338 <1> 2339 <1> ; al = 0 here 2340 000011BD 50 <1> push ax 2341 000011BE 36D93F <1> fnstcw word [ss:bx] ; save FP control word 2342 000011C1 58 <1> pop ax ; retrieve it 2343 000011C2 253F10 <1> and ax, 103Fh ; see if selected parts look OK 2344 000011C5 83F83F <1> cmp ax, byte 3Fh 2345 000011C8 752B <1> jne .fpudone ; if no FPU present 2346 000011CA FE06[0F0B] <1> inc byte [ has_87 ] ; there's an FPU 2347 000011CE C606[110B]0C <1> mov byte [encodedmach87], 0Ch 2348 <1> 2349 <1> ; If we're using a 386, check for 287 vs. 387 by checking whether 2350 <1> ; +infinity = -infinity. 2351 000011D3 803E[0E0B]03 <1> cmp byte [ machine ], 3 2352 000011D8 751B <1> jne .fpudone ; if not a 386 2353 <1> [cpu 386] 2354 000011DA D9E8 <1> fld1 ; must use default control from FNINIT 2355 000011DC D9EE <1> fldz ; form infinity 2356 000011DE DEF9 <1> fdivp ST1 ; 1 / 0 = infinity 2357 000011E0 D9C0 <1> fld ST0 2358 000011E2 D9E0 <1> fchs ; form negative infinity 2359 000011E4 DED9 <1> fcompp ; see if they are the same and remove them 2360 000011E6 9BDFE0 <1> fstsw ax 2361 000011E9 9E <1> sahf ; look at status from FCOMPP 2362 000011EA 7509 <1> jne .fpudone ; if they are different, then it's a 387 2363 000011EC FE0E[100B] <1> dec byte [ mach_87 ] ; otherwise, it's a 287 2364 000011F0 C606[110B]C2 <1> mov byte [encodedmach87], 0C2h 2365 <1> __CPU__ 2366 <1> .fpudone: 2367 <1> 2368 <1> %if _ONLY386 2369 <1> testopt [internalflags], has386 2370 <1> jnz @F ; okay --> 2371 <1> %if _BOOTLDR 2372 <1> testopt [internalflags], nodosloaded 2373 <1> lahf ; remember status 2374 <1> %endif 2375 <1> mov dx, imsg.no386 2376 <1> call init_putsz_cs ; display the error 2377 <1> %if _BOOTLDR 2378 <1> sahf 2379 <1> jnz init_booterror.soft ; abort for loader --> 2380 <1> %endif 2381 <1> %if _DEVICE 2382 <1> testopt [internalflags6], dif6_device_mode 2383 <1> jnz init_device_error_late 2384 <1> %endif 2385 <1> mov ax, 4C01h 2386 <1> int 21h ; abort our process 2387 <1> 2388 <1> @@: 2389 <1> %elif _ONLYNON386 2390 <1> testopt [internalflags], has386 2391 <1> jz @F ; okay --> 2392 <1> mov dx, imsg.386 2393 <1> call init_putsz_cs ; display the warning 2394 <1> @@: 2395 <1> %endif 2396 <1> 2397 <1> ; Determine which patch table to use, then patch 2398 <1> ; out either the 386+ or non-386 code as appropriate. 2399 000011F5 8E06[0001] <1> mov es, [code_seg] 2400 000011F9 BE[1C08] <1> mov si, patch_386_table ; table of patches to set for 386+ 2401 <1> %if __patch_386_table_method == 1 2402 <1> mov cx, patch_386_table_size_w 2403 <1> %endif 2404 000011FC F606[C500]80 <1> testopt [internalflags], has386 2405 <1> %if __patch_386_table_method == 1 2406 <1> jnz .patch1 ; set these patches (CPU is 386+) --> 2407 <1> %else 2408 00001201 750F <1> jnz .patch2 ; set these patches (CPU is 386+) --> 2409 <1> %endif 2410 <1> %ifn _ONLYNON386 2411 00001203 26C606[633F]3E <1> mov byte [es:..@patch_no386_ds], 3Eh ; write a ds prefix 2412 00001209 26C606[883F]CF <1> mov byte [es:..@patch_no386_iret], 0CFh ; write an iret instruction 2413 <1> %if _PM && _CATCHPMINT214C 2414 <1> mov byte [es:..@patch_no386_ds_2], 3Eh 2415 <1> mov byte [es:..@patch_no386_ds_3], 3Eh 2416 <1> mov byte [ss:..@patch_no386_nop_DATA_ENTRY], 90h 2417 <1> ; write a nop (note the segment!) 2418 <1> %endif 2419 <1> %if _PM 2420 <1> mov byte [es:..@patch_no386_ds_4], 3Eh 2421 <1> mov byte [es:..@patch_no386_ds_5], 3Eh ; write some more ds prefixes 2422 <1> %endif 2423 <1> %endif 2424 0000120F BE[9007] <1> mov si, patch_no386_table ; table of patches to set for 16-bit CPU 2425 <1> %if __patch_no386_table_method == 1 2426 <1> mov cx, patch_no386_table_size_w 2427 <1> %if __patch_386_table_method == 2 2428 <1> jmp short .patch1 ; skip .patch2 code --> 2429 <1> %endif 2430 <1> %endif 2431 <1> 2432 <1> ; Complicated table patch code. 2433 <1> %if __patch_no386_table_method == 2 || __patch_386_table_method == 2 2434 <1> .patch2: 2435 00001212 BF[0000] <1> mov di, code_start ; initialise offset 2436 00001215 31C0 <1> xor ax, ax ; initialise ah 2437 <1> .looppatch2: 2438 00001217 2EAC <1> cs lodsb 2439 00001219 01C7 <1> add di, ax ; skip number of bytes to skip 2440 0000121B 3CFF <1> cmp al, 255 ; really repositioning? 2441 0000121D 7504 <1> jne .l2patch ; no --> 2442 0000121F 97 <1> xchg ax, di ; (to preserve ah) 2443 00001220 2EAD <1> cs lodsw ; ax = new address 2444 00001222 97 <1> xchg ax, di ; di = new address 2445 <1> .l2patch: 2446 00001223 2EAC <1> cs lodsb 2447 00001225 89C1 <1> mov cx, ax ; cx = number of bytes to patch 2448 00001227 E306 <1> jcxz .patchesdone ; end of table --> 2449 00001229 B090 <1> mov al, 90h ; patch to NOP 2450 0000122B F3AA <1> rep stosb ; patch as many bytes as specified 2451 0000122D EBE8 <1> jmp short .looppatch2 2452 <1> %endif 2453 <1> 2454 <1> ; Simple table patch code. 2455 <1> %if __patch_386_table_method == 1 || __patch_no386_table_method == 1 2456 <1> .patch1: 2457 <1> jcxz .patchesdone 2458 <1> .looppatch1: 2459 <1> cs lodsw ; load address of patch 2460 <1> xchg bx, ax ; (set bx = ax, CHG ax) 2461 <1> mov byte [es:bx], 90h ; patch 2462 <1> loop .looppatch1 2463 <1> %endif 2464 <1> .patchesdone: 2465 <1> 2466 <1> 2467 <1> %if _DEVICE 2468 <1> ; This must be done after CPU detection 2469 <1> ; because we want to get the high parts 2470 <1> ; of the registers only initialised here. 2471 0000122F 1E <1> push ds 2472 00001230 07 <1> pop es 2473 00001231 BE[5C0C] <1> mov si, regs 2474 00001234 BF[DC0C] <1> mov di, device_quittable_regs 2475 00001237 B92000 <1> mov cx, words(regs.size) 2476 0000123A F3A5 <1> rep movsw 2477 <1> %endif 2478 <1> 2479 <1> 2480 <1> ; Check for dosemu. This is done for the boot loaded instance 2481 <1> ; too, as we might be running as DOS inside dosemu. 2482 <1> %if _DOSEMU 2483 0000123C B800F0 <1> mov ax, 0F000h 2484 0000123F 8EC0 <1> mov es, ax 2485 00001241 1E <1> push ds 2486 00001242 0E <1> push cs 2487 00001243 1F <1> pop ds ; avoid "repe cs cmpsw" (8086 bug) 2488 00001244 BFF5FF <1> mov di, 0FFF5h 2489 00001247 BE[4C0D] <1> mov si, imsg.dosemudate 2490 0000124A B90400 <1> mov cx, 4 2491 0000124D F3A7 <1> repe cmpsw ; running in DosEmu? 2492 0000124F 1F <1> pop ds 2493 00001250 7505 <1> jne .dosemuchecked 2494 00001252 800E[C700]01 <1> setopt [internalflags], runningdosemu 2495 <1> .dosemuchecked: 2496 <1> %endif 2497 <1> 2498 00001257 1E <1> push ds 2499 00001258 07 <1> pop es ; => lDEBUG_DATA_ENTRY 2500 <1> 2501 00001259 BF[0000] <1> mov di, line_in 2502 0000125C B0FF <1> mov al, 255 2503 0000125E AA <1> stosb 2504 0000125F B000 <1> mov al, 0 2505 00001261 AA <1> stosb 2506 00001262 B00D <1> mov al, 13 2507 00001264 AA <1> stosb ; overwrite line_in beginning 2508 <1> 2509 00001265 BC[E00B] <1> mov sp, stack_end ; stack pointer (paragraph aligned) 2510 00001268 C706[CC0A][DE0B] <1> mov word [ savesp ], stack_end-2; save new SP minus two (for the word we'll push) 2511 0000126E BF[0101] <1> mov di, ..@init_first 2512 00001271 B9DF08 <1> mov cx, ..@init_behind - ..@init_first 2513 00001274 31C0 <1> xor ax, ax 2514 00001276 F3AA <1> rep stosb ; initialise breakpoint lists, line_out 2515 <1> %if 1 2516 <1> %if ..@init_behind != stack 2517 <1> mov di, stack 2518 <1> %endif 2519 00001278 B90002 <1> mov cx, stack_end - stack 2520 0000127B B05E <1> mov al, 5Eh 2521 0000127D F3AA <1> rep stosb ; initialise the stack 2522 <1> %endif 2523 <1> 2524 0000127F C606[AD07]30 <1> mov byte [ trim_overflow ], '0' ; initialise line_out so the trimputs loop doesn't overflow 2525 00001284 C706[B608]4226 <1> mov word [line_out_overflow], 2642h 2526 <1> 2527 <1> 2528 <1> %if _DEBUG && _DEBUG_COND && _DEBUG_COND_DEFAULT_ON 2529 0000128A 800E[D900]01 <1> setopt [internalflags6], dif6_debug_mode 2530 0000128F 800E[A900]01 <1> setopt [options6], opt6_debug_mode 2531 00001294 800E[C100]01 <1> setopt [startoptions6], opt6_debug_mode 2532 <1> %endif 2533 <1> 2534 <1> 2535 <1> %if _BOOTLDR 2536 00001299 F606[C500]40 <1> testopt [internalflags], nodosloaded 2537 0000129E 7442 <1> jz initdos 2538 <1> d4 call init_d4message 2539 <1> d4 asciz "386-related patches applied, boot initialisation proceeding",13,10 2540 <1> 2541 <1> 2542 <1> %if CATCHINTAMOUNT 2543 <1> ; Set up interrupt vectors. 2544 000012A0 B90600 <1> mov cx, inttab_number 2545 000012A3 BE[280C] <1> mov si, inttab 2546 <1> .bootintloop: 2547 <1> 2548 <1> ; assumes ss = lDEBUG_DATA_ENTRY 2549 000012A6 36AC <1> ss lodsb 2550 000012A8 31DB <1> xor bx, bx 2551 000012AA 8EDB <1> mov ds, bx 2552 000012AC 88C3 <1> mov bl, al 2553 000012AE 01DB <1> add bx, bx 2554 000012B0 01DB <1> add bx, bx 2555 000012B2 FF7702 <1> push word [ bx+2 ] 2556 000012B5 FF37 <1> push word [ bx ] ; get vector 2557 000012B7 97 <1> xchg ax, di 2558 000012B8 36AD <1> ss lodsw ; get address of IISP header 2559 000012BA 97 <1> xchg ax, di 2560 000012BB 368F4502 <1> pop word [ ss:di + ieNext ] 2561 000012BF 368F4504 <1> pop word [ ss:di + ieNext + 2 ] 2562 <1> ; store it 2563 <1> %if _DEBUG && !_DEBUG_COND 2564 <1> ; vectors are set only when debuggee runs 2565 <1> %else 2566 <1> %if _DEBUG 2567 000012C3 36F606[D900]01 <1> testopt [ss:internalflags6], dif6_debug_mode 2568 000012C9 7505 <1> jnz @F 2569 <1> %endif 2570 000012CB 8C5702 <1> mov word [ bx+2 ], ss 2571 000012CE 893F <1> mov word [ bx ], di ; set interrupt vector 2572 <1> @@: 2573 <1> %endif 2574 000012D0 E2D4 <1> loop .bootintloop 2575 <1> %endif 2576 <1> 2577 <1> 2578 000012D2 16 <1> push ss 2579 000012D3 1F <1> pop ds 2580 000012D4 16 <1> push ss 2581 000012D5 07 <1> pop es 2582 <1> 2583 <1> d4 call init_d4message 2584 <1> d4 asciz "Jumping to final boot initialisation code",13,10 2585 000012D6 FF36[0001] <1> push word [code_seg] 2586 000012DA 2EFF36[E012] <1> push word [cs:.word_initcont.boot_entry] 2587 000012DF CB <1> retf 2588 <1> 2589 <1> align 2, db 0 2590 <1> .word_initcont.boot_entry: 2591 000012E0 [25C8] <1> dw initcont.boot_entry 2592 <1> %endif 2593 <1> 2594 <1> initdos: 2595 <1> %if _MCB || _INT 2596 000012E2 B80258 <1> mov ax, 5802h 2597 000012E5 CD21 <1> int 21h 2598 000012E7 30E4 <1> xor ah, ah ; some "DOS" only return al 2599 000012E9 50 <1> push ax ; save UMB link 2600 <1> 2601 <1> getfirstmcb: 2602 000012EA B452 <1> mov ah, 52h ; get list of lists 2603 000012EC CD21 <1> int 21h 2604 000012EE 268B47FE <1> mov ax, word [ es:bx-2 ]; start of MCBs 2605 000012F2 A3[020B] <1> mov word [firstmcb], ax 2606 <1> 2607 <1> getfirstumcb: 2608 <1> ; We try to get the first UMCB for gateout 2609 <1> ; for now. To harden our code it should 2610 <1> ; not be assumed that the address is of 2611 <1> ; a valid MCB. However, it is fine to 2612 <1> ; compare an actual MCB address with it. 2613 <1> %if _GUARD_86M_INT2F 2614 000012F5 06 <1> push es 2615 000012F6 31C0 <1> xor ax, ax 2616 000012F8 8EC0 <1> mov es, ax ; (only used in 86 Mode) 2617 000012FA 26A1BC00 <1> mov ax, [es:2Fh * 4] 2618 000012FE 83F8FF <1> cmp ax, -1 2619 00001301 7405 <1> je @F ; --> (ZR) 2620 00001303 260B06BE00 <1> or ax, [es:2Fh * 4 + 2] 2621 <1> @@: 2622 00001308 07 <1> pop es 2623 00001309 7414 <1> jz .determine 2624 <1> %endif 2625 0000130B B86112 <1> mov ax, 1261h ; PTS-DOS: Get first UMCB 2626 0000130E F9 <1> stc 2627 0000130F CD2F <1> int 2Fh 2628 00001311 720C <1> jc .determine ; not supported --> 2629 00001313 40 <1> inc ax 2630 00001314 83F802 <1> cmp ax, byte 2 ; -1, 0, 1 ? 2631 00001317 7606 <1> jbe .determine ; not supported (or none) --> 2632 00001319 48 <1> dec ax 2633 0000131A A3[040B] <1> mov word [ firstumcb ], ax ; set UMB 2634 0000131D EB4F <1> jmp short .got ; got it --> 2635 <1> 2636 <1> .determine: 2637 0000131F B80358 <1> mov ax, 5803h 2638 00001322 31DB <1> xor bx, bx 2639 00001324 CD21 <1> int 21h ; disable UMB link, leave only LMA chain 2640 00001326 7244 <1> jc .none ; that isn't supported either --> 2641 <1> 2642 00001328 A1[020B] <1> mov ax, word [firstmcb] 2643 0000132B 1E <1> push ds 2644 0000132C 89C2 <1> mov dx, ax ; first MCB 2645 0000132E 31DB <1> xor bx, bx ; use offsets from bx, not addresses 2646 <1> .looplmb: 2647 00001330 8ED8 <1> mov ds, ax 2648 00001332 40 <1> inc ax 2649 00001333 034703 <1> add ax, word [ bx + 3 ] ; next MCB's address 2650 00001336 803F4D <1> cmp byte [ bx ], 'M' 2651 00001339 74F5 <1> je .looplmb ; not last --> 2652 0000133B 803F5A <1> cmp byte [ bx ], 'Z' 2653 0000133E 752D <1> jne .none_pop_ds ; corrupted --> 2654 00001340 92 <1> xchg ax, dx ; dx = what we assume to be the first UMA chain MCB 2655 <1> ; ax = first MCB 2656 <1> 2657 00001341 50 <1> push ax 2658 00001342 43 <1> inc bx ; = 1 2659 00001343 B80358 <1> mov ax, 5803h 2660 00001346 CD21 <1> int 21h ; enable UMB link, include UMA chain 2661 00001348 58 <1> pop ax 2662 00001349 7221 <1> jc .none ; so we can disable it but not enable? --> 2663 <1> 2664 0000134B 4B <1> dec bx ; = 0 2665 0000134C 31C9 <1> xor cx, cx ; flag if assumed first UMCB found 2666 <1> .loopumb: 2667 0000134E 39D0 <1> cmp ax, dx 2668 00001350 7501 <1> jne .notlastlmb 2669 00001352 41 <1> inc cx ; there it is 2670 <1> .notlastlmb: 2671 00001353 8ED8 <1> mov ds, ax 2672 00001355 803F4D <1> cmp byte [ bx ], 'M' 2673 00001358 7506 <1> jne .islastumb? ; last or corrupted --> 2674 0000135A 40 <1> inc ax 2675 0000135B 034703 <1> add ax, word [ bx + 3 ] 2676 0000135E EBEE <1> jmp short .loopumb ; process next --> 2677 <1> .islastumb?: 2678 00001360 803F5A <1> cmp byte [ bx ], 'Z' 2679 00001363 1F <1> pop ds 2680 00001364 7506 <1> jne .none ; corrupted --> 2681 00001366 E304 <1> jcxz .none ; didn't find that UMCB --> 2682 <1> ; The MCB at dx which was behind the one that contained the 'Z' 2683 <1> ; signature when we disabled the UMB link is now a valid MCB in 2684 <1> ; the MCB chain after we enabled the UMB link. All previous MCBs 2685 <1> ; are now 'M'. 2686 00001368 8916[040B] <1> mov word [ firstumcb ], dx 2687 <1> .none: 2688 0000136C A8 <1> db __TEST_IMM8 ; (skip pop) 2689 <1> .none_pop_ds: 2690 0000136D 1F <1> pop ds 2691 <1> .got: 2692 0000136E 5B <1> pop bx 2693 0000136F B80358 <1> mov ax, 5803h 2694 00001372 CD21 <1> int 21h ; restore UMB link 2695 <1> %endif 2696 <1> 2697 00001374 B434 <1> mov ah, 34h 2698 00001376 CD21 <1> int 21h 2699 00001378 891E[060B] <1> mov word [pInDOS + so16aOffset], bx 2700 0000137C 8C06[080B] <1> mov word [pInDOS + so16aSegSel], es 2701 <1> %if _PM 2702 <1> mov word [pInDOS + so16aSegment], es 2703 <1> %endif 2704 <1> 2705 <1> ; get address of DOS swappable DATA area 2706 <1> ; to be used to get/set PSP and thus avoid DOS calls 2707 <1> ; will not work for DOS < 3 2708 <1> %if _USESDA 2709 00001380 1E <1> push ds 2710 00001381 B8065D <1> mov ax, 5D06h 2711 00001384 F9 <1> stc ; initialise to CY 2712 00001385 CD21 <1> int 21h 2713 00001387 8CD8 <1> mov ax, ds 2714 00001389 1F <1> pop ds 2715 0000138A 7215 <1> jc .noSDA ; if CY returned, not supported --> 2716 0000138C 8EC0 <1> mov es, ax ; es:si -> SDA 2717 <1> %if _DEVICE 2718 0000138E 50 <1> push ax 2719 0000138F B451 <1> mov ah, 51h 2720 00001391 CD21 <1> int 21h ; bx = current PSP 2721 00001393 58 <1> pop ax 2722 <1> %else 2723 <1> mov bx, ds ; bx = our PSP (= current PSP in app mode) 2724 <1> %endif 2725 00001394 26395C10 <1> cmp word [es:si + 10h], bx ; does this seem like the current PSP field ? 2726 00001398 7507 <1> jne .noSDA ; no --> 2727 0000139A 8936[0A0B] <1> mov word [pSDA + so16aOffset], si 2728 0000139E A3[0C0B] <1> mov word [pSDA + so16aSegSel], ax 2729 <1> %if _PM 2730 <1> mov word [pSDA + so16aSegment], ax 2731 <1> %endif 2732 <1> .noSDA: 2733 <1> %endif 2734 <1> 2735 000013A1 B83135 <1> mov ax, 3531h 2736 000013A4 CD21 <1> int 21h 2737 000013A6 8CC3 <1> mov bx, es 2738 <1> %if _USESDA 2739 000013A8 3B1E[0C0B] <1> cmp bx, word [pSDA + so16aSegSel] 2740 000013AC 750B <1> jne @F 2741 <1> %endif 2742 000013AE 3B1E[080B] <1> cmp bx, word [pInDOS + so16aSegSel] 2743 000013B2 7505 <1> jne @F 2744 <1> 2745 000013B4 800E[CB00]20 <1> setopt [internalflags2], dif2_int31_segment 2746 <1> @@: 2747 <1> 2748 <1> 2749 <1> commandline: 2750 000013B9 16 <1> push ss 2751 000013BA 07 <1> pop es 2752 <1> 2753 <1> ; Interpret switches and erase them from the command line. 2754 000013BB B80037 <1> mov ax, 3700h ; get switch character 2755 000013BE B22F <1> mov dl, '/' ; preset with default value 2756 000013C0 CD21 <1> int 21h 2757 000013C2 8816[2D0B] <1> mov byte [ switchar ], dl 2758 000013C6 80FA2F <1> cmp dl, '/' 2759 000013C9 7504 <1> jne .notslash 2760 000013CB 8816[2E0B] <1> mov byte [ swch1 ], dl 2761 <1> .notslash: 2762 000013CF BE8100 <1> mov si, DTA+1 2763 <1> .blankloop: 2764 000013D2 AC <1> lodsb 2765 000013D3 3C20 <1> cmp al, 32 2766 000013D5 74FB <1> je .blankloop 2767 000013D7 3C09 <1> cmp al, 9 2768 000013D9 74F7 <1> je .blankloop 2769 <1> 2770 <1> ; Process the /? switch (or the [switchar]? switch). 2771 <1> ; If switchar != / and /? occurs, make sure nothing follows. 2772 000013DB 38D0 <1> cmp al, dl 2773 000013DD 7503E9D500 <1> je .switch ; if switch character --> 2774 000013E2 3C2F <1> cmp al, '/' 2775 000013E4 7403E9EE01 <1> jne .noswitches ; if not the help switch --> 2776 000013E9 8A04 <1> mov al, byte [ si ] 2777 000013EB 3C3F <1> cmp al, '?' 2778 000013ED 7403E9E501 <1> jne .noswitches ; if not /? 2779 000013F2 8A4401 <1> mov al, byte [ si+1 ] 2780 000013F5 3C20 <1> cmp al, 32 2781 000013F7 740B <1> je .help ; if nothing after /? 2782 000013F9 3C09 <1> cmp al, 9 2783 000013FB 7407 <1> je .help ; ditto 2784 000013FD 3C0D <1> cmp al, 13 2785 000013FF 7403E9D301 <1> jne .noswitches ; if something after /? --> 2786 <1> 2787 <1> ; Print a help message 2788 <1> .help: 2789 00001404 1E <1> push ds 2790 <1> %if _DEVICE 2791 00001405 F606[DA00]40 <1> testopt [internalflags6], dif6_device_mode 2792 0000140A 742A <1> jz .help_not_device 2793 <1> 2794 <1> ; We modify the device command line here. 2795 <1> ; Is that wise? Seems to work though. 2796 0000140C 8B36[600C] <1> mov si, word [reg_ebx] 2797 00001410 8E1E[800C] <1> mov ds, word [reg_es] 2798 00001414 C57412 <1> lds si, [si + 12h] 2799 00001417 56 <1> push si 2800 <1> @@: 2801 00001418 AC <1> lodsb 2802 00001419 3C20 <1> cmp al, 32 2803 0000141B 7412 <1> je @F 2804 0000141D 3C09 <1> cmp al, 9 2805 0000141F 740E <1> je @F 2806 00001421 3C00 <1> cmp al, 0 2807 00001423 740A <1> je @F 2808 00001425 3C0D <1> cmp al, 13 2809 00001427 7406 <1> je @F 2810 00001429 3C0A <1> cmp al, 10 2811 0000142B 7402 <1> je @F 2812 0000142D EBE9 <1> jmp @B 2813 <1> 2814 <1> @@: 2815 0000142F C644FF00 <1> mov byte [si - 1], 0 2816 00001433 5E <1> pop si 2817 00001434 EB1B <1> jmp .help_common 2818 <1> 2819 <1> .help_not_device: 2820 <1> %endif 2821 00001436 A12C00 <1> mov ax, word [2Ch] ; => environment 2822 00001439 85C0 <1> test ax, ax 2823 0000143B 7470 <1> jz .help.no_name 2824 0000143D 8ED8 <1> mov ds, ax 2825 0000143F 31F6 <1> xor si, si 2826 <1> @@: 2827 00001441 AC <1> lodsb 2828 00001442 84C0 <1> test al, al 2829 00001444 75FB <1> jnz @B 2830 00001446 AC <1> lodsb 2831 00001447 84C0 <1> test al, al 2832 00001449 75F6 <1> jnz @B 2833 0000144B AD <1> lodsw 2834 0000144C 83F801 <1> cmp ax, 1 2835 0000144F 755C <1> jne .help.no_name 2836 <1> .help_common: 2837 <1> @@: 2838 00001451 89F3 <1> mov bx, si 2839 <1> @@: 2840 00001453 AC <1> lodsb 2841 00001454 3C61 <1> cmp al, 'a' 2842 00001456 7208 <1> jb @F 2843 00001458 3C7A <1> cmp al, 'z' 2844 0000145A 7704 <1> ja @F 2845 0000145C 806CFF20 <1> sub byte [si - 1], 'a' - 'A' 2846 <1> @@: 2847 00001460 3C5C <1> cmp al, '\' 2848 00001462 74ED <1> je @BBB 2849 00001464 3C2F <1> cmp al, '/' 2850 00001466 74E9 <1> je @BBB 2851 00001468 84C0 <1> test al, al 2852 0000146A 75E7 <1> jnz @BB 2853 <1> 2854 0000146C 89F1 <1> mov cx, si 2855 0000146E 49 <1> dec cx 2856 0000146F 29D9 <1> sub cx, bx 2857 <1> 2858 <1> @@: 2859 00001471 4E <1> dec si 2860 00001472 39DE <1> cmp si, bx 2861 00001474 7209 <1> jb @F 2862 00001476 803C2E <1> cmp byte [si], '.' 2863 00001479 75F6 <1> jne @B 2864 <1> 2865 0000147B 89F1 <1> mov cx, si 2866 0000147D 29D9 <1> sub cx, bx 2867 <1> @@: 2868 0000147F E32C <1> jcxz .help.no_name 2869 <1> @@: 2870 00001481 BA[A109] <1> mov dx, imsg.help.1 ; command-line help message 2871 00001484 E87EFA <1> call init_putsz_cs 2872 00001487 53 <1> push bx 2873 00001488 89DA <1> mov dx, bx 2874 0000148A E8BCFA <1> call init_puts_ds 2875 0000148D BA[DF09] <1> mov dx, imsg.help.2 2876 00001490 E872FA <1> call init_putsz_cs 2877 00001493 5A <1> pop dx 2878 00001494 E8B2FA <1> call init_puts_ds 2879 00001497 BA[7B0B] <1> mov dx, imsg.help.3 2880 0000149A E868FA <1> call init_putsz_cs 2881 0000149D 1F <1> pop ds 2882 <1> %if _DEVICE 2883 0000149E F606[DA00]40 <1> testopt [internalflags6], dif6_device_mode 2884 000014A3 7403E969F2 <1> jnz init_device_error_late 2885 <1> %endif 2886 000014A8 B8004C <1> mov ax, 4C00h 2887 000014AB CD21 <1> int 21h ; done 2888 <1> 2889 <1> .help.no_name: 2890 000014AD 0E <1> push cs 2891 000014AE 1F <1> pop ds 2892 000014AF BB[9B09] <1> mov bx, imsg.help.defaultfilename 2893 000014B2 B90600 <1> mov cx, imsg.help.defaultfilename.length 2894 000014B5 EBCA <1> jmp @B 2895 <1> 2896 <1> 2897 <1> ; Do the (proper) switches. 2898 000014B7 AC <1> .switch:lodsb 2899 000014B8 3C3F <1> cmp al,'?' 2900 000014BA 7503E945FF <1> je .help ; if -? 2901 000014BF 3C63 <1> cmp al, 'c' 2902 000014C1 7447 <1> je .switch_c 2903 000014C3 3C43 <1> cmp al, 'C' 2904 000014C5 7443 <1> je .switch_c 2905 000014C7 3C62 <1> cmp al, 'b' 2906 000014C9 7503E99B00 <1> je .switch_b 2907 000014CE 3C42 <1> cmp al, 'B' 2908 000014D0 7503E99400 <1> je .switch_b 2909 <1> %if _VXCHG 2910 000014D5 3C76 <1> cmp al, 'v' 2911 000014D7 7503E99600 <1> je .switch_v 2912 000014DC 3C56 <1> cmp al, 'V' 2913 000014DE 7503E98F00 <1> je .switch_v 2914 <1> %endif 2915 <1> 2916 <1> %if _SYMBOLIC 2917 <1> cmp al, 's' 2918 <1> je .switch_s 2919 <1> cmp al, 'S' 2920 <1> je .switch_s 2921 <1> %endif 2922 <1> 2923 <1> %if _DEBUG && _DEBUG_COND 2924 000014E3 3C64 <1> cmp al, 'd' 2925 000014E5 7503E9B600 <1> je .switch_d 2926 000014EA 3C44 <1> cmp al, 'D' 2927 000014EC 7503E9AF00 <1> je .switch_d 2928 <1> %endif 2929 <1> 2930 <1> ; Other switches may go here. 2931 000014F1 2EA2[A90B] <1> mov [ cs:imsg.invalidswitch_a ], al 2932 000014F5 BA[980B] <1> mov dx, imsg.invalidswitch ; Invalid switch 2933 <1> ..@init_cmdline_error: 2934 000014F8 E80AFA <1> call init_putsz_cs ; print string 2935 <1> %if _DEVICE 2936 000014FB F606[DA00]40 <1> testopt [internalflags6], dif6_device_mode 2937 00001500 7403E90CF2 <1> jnz init_device_error_late 2938 <1> %endif 2939 00001505 B8014C <1> mov ax, 4C01h ; Quit and return error status 2940 00001508 CD21 <1> int 21h 2941 <1> 2942 <1> .switch_c: 2943 <1> @@: 2944 0000150A AC <1> lodsb 2945 0000150B 3C3D <1> cmp al, '=' 2946 0000150D 74FB <1> je @B 2947 0000150F 3C3A <1> cmp al, ':' 2948 00001511 74F7 <1> je @B 2949 <1> 2950 00001513 BF[1001] <1> mov di, cmdline_buffer 2951 00001516 B400 <1> mov ah, 0 ; initialise to 0 = unquoted 2952 00001518 A9 <1> db __TEST_IMM16 2953 <1> .switch_c_loop: 2954 00001519 AA <1> stosb 2955 <1> .switch_c_quoted: 2956 0000151A AC <1> lodsb 2957 <1> 2958 0000151B 3C0D <1> cmp al, 13 2959 0000151D 743A <1> je .switch_c_eol 2960 0000151F 38E0 <1> cmp al, ah ; close quote mark ? 2961 00001521 7508 <1> jne @F ; no --> 2962 00001523 3C00 <1> cmp al, 0 2963 00001525 7432 <1> je .switch_c_eol 2964 00001527 B400 <1> mov ah, 0 ; continue unquoted 2965 00001529 EBEF <1> jmp .switch_c_quoted ; and load next character --> 2966 <1> 2967 <1> @@: 2968 0000152B 84E4 <1> test ah, ah ; currently quoted ? 2969 0000152D 7514 <1> jnz .switch_c_not_blank ; yes --> 2970 <1> 2971 0000152F 3C22 <1> cmp al, '"' ; open quote mark ? 2972 00001531 7404 <1> je @F 2973 00001533 3C27 <1> cmp al, "'" 2974 00001535 7504 <1> jne @FF ; no --> 2975 <1> @@: 2976 00001537 88C4 <1> mov ah, al ; remember quoted state 2977 00001539 EBDF <1> jmp .switch_c_quoted ; and load next character --> 2978 <1> 2979 <1> @@: 2980 0000153B 3C20 <1> cmp al, 32 ; blank while unquoted ? 2981 0000153D 741E <1> je .unquoted_blank 2982 0000153F 3C09 <1> cmp al, 9 2983 00001541 741A <1> je .unquoted_blank ; yes --> 2984 <1> .switch_c_not_blank: 2985 00001543 3C3B <1> cmp al, ';' ; unescaped semicolon ? 2986 00001545 7504 <1> jne .switch_c_not_semicolon 2987 00001547 B00D <1> mov al, 13 ; yes, replace by CR 2988 00001549 EBCE <1> jmp .switch_c_loop 2989 <1> 2990 <1> .switch_c_not_semicolon: 2991 0000154B 3C5C <1> cmp al, '\' ; escape ? 2992 0000154D 75CA <1> jne .switch_c_loop ; no, store literal --> 2993 0000154F AC <1> lodsb ; load escaped character 2994 <1> ; (may be backslash, semicolon, quote) 2995 00001550 3C0D <1> cmp al, 13 ; guard against EOL 2996 00001552 75C5 <1> jne .switch_c_loop 2997 <1> .switch_c_error: 2998 00001554 BA[AD0B] <1> mov dx, imsg.switch_c_error 2999 00001557 EB9F <1> jmp ..@init_cmdline_error 3000 <1> 3001 <1> .switch_c_eol: 3002 00001559 84E4 <1> test ah, ah ; in quoted state ? 3003 0000155B 75F7 <1> jnz .switch_c_error ; yes, error --> 3004 <1> .unquoted_blank: 3005 0000155D B000 <1> mov al, 0 3006 0000155F AA <1> stosb ; terminate command line buffer 3007 00001560 800E[CD00]01 <1> setopt [internalflags3], dif3_input_cmdline 3008 00001565 4E <1> dec si 3009 00001566 E969FE <1> jmp .blankloop 3010 <1> 3011 <1> 3012 <1> .switch_b: 3013 00001569 2EC606[D715]CC <1> mov byte [cs:.breakpoint], 0CCh ; SMC in section init, set point 3014 0000156F E960FE <1> jmp .blankloop 3015 <1> 3016 <1> 3017 <1> %if _VXCHG 3018 <1> .switch_v: 3019 00001572 AC <1> lodsb 3020 00001573 BB0100 <1> mov bx, opt6_vv_mode 3021 00001576 4E <1> dec si 3022 00001577 3C20 <1> cmp al, 32 3023 00001579 7419 <1> je @F 3024 0000157B 3C09 <1> cmp al, 9 3025 0000157D 7415 <1> je @F 3026 0000157F 3C0D <1> cmp al, 13 3027 00001581 7411 <1> je @F 3028 00001583 46 <1> inc si 3029 00001584 3C2B <1> cmp al, '+' 3030 00001586 740C <1> je @F 3031 00001588 31DB <1> xor bx, bx 3032 0000158A 3C2D <1> cmp al, '-' 3033 0000158C 7406 <1> je @F 3034 <1> .switch_v_error: 3035 0000158E BA[C90B] <1> mov dx, imsg.switch_v_error 3036 00001591 E964FF <1> jmp ..@init_cmdline_error 3037 <1> @@: 3038 00001594 8026[A800]FE <1> clropt [options6], opt6_vv_mode 3039 00001599 091E[A800] <1> or word [options6], bx 3040 0000159D E932FE <1> jmp .blankloop 3041 <1> %endif 3042 <1> 3043 <1> %if _DEBUG && _DEBUG_COND 3044 <1> .switch_d: 3045 000015A0 AC <1> lodsb 3046 000015A1 BB0001 <1> mov bx, dif6_debug_mode 3047 000015A4 4E <1> dec si 3048 000015A5 3C20 <1> cmp al, 32 3049 000015A7 7419 <1> je @F 3050 000015A9 3C09 <1> cmp al, 9 3051 000015AB 7415 <1> je @F 3052 000015AD 3C0D <1> cmp al, 13 3053 000015AF 7411 <1> je @F 3054 000015B1 46 <1> inc si 3055 000015B2 3C2B <1> cmp al, '+' 3056 000015B4 740C <1> je @F 3057 000015B6 31DB <1> xor bx, bx 3058 000015B8 3C2D <1> cmp al, '-' 3059 000015BA 7406 <1> je @F 3060 <1> .switch_d_error: 3061 000015BC BA[E50B] <1> mov dx, imsg.switch_d_error 3062 000015BF E936FF <1> jmp ..@init_cmdline_error 3063 <1> @@: 3064 000015C2 8026[D900]FE <1> clropt [internalflags6], dif6_debug_mode 3065 000015C7 8026[A900]FE <1> clropt [options6], opt6_debug_mode 3066 000015CC 091E[D800] <1> or word [internalflags6], bx 3067 000015D0 091E[A800] <1> or word [options6], bx 3068 <1> %if dif6_debug_mode != opt6_debug_mode 3069 <1> %error Mismatch of flag and option 3070 <1> %endif 3071 000015D4 E9FBFD <1> jmp .blankloop 3072 <1> %endif 3073 <1> 3074 <1> %if _SYMBOLIC 3075 <1> .switch_s: 3076 <1> mov dx, si 3077 <1> @@: 3078 <1> lodsb 3079 <1> cmp al, 32 3080 <1> ja @B 3081 <1> dec si ; -> blank or terminator 3082 <1> push ax 3083 <1> push si 3084 <1> mov byte [si], 13 ; put in a CR for good measure 3085 <1> mov si, dx 3086 <1> 3087 <1> push word [errret] 3088 <1> push word [throwret] 3089 <1> push word [throwsp] 3090 <1> 3091 <1> push cs 3092 <1> call .jump 3093 <1> 3094 <1> pop word [throwsp] 3095 <1> pop word [throwret] ; restore throw destination 3096 <1> pop word [errret] 3097 <1> pop si 3098 <1> pop ax 3099 <1> mov byte [si], al ; restore if it wasn't CR 3100 <1> ; si -> next character to process 3101 <1> test dx, dx 3102 <1> jz @F 3103 <1> 3104 <1> cmp dx, si 3105 <1> je @F 3106 <1> 3107 <1> mov dx, imsg.switch_s_garbage 3108 <1> call init_putsz_cs 3109 <1> 3110 <1> @@: 3111 <1> jmp .blankloop 3112 <1> 3113 <1> 3114 <1> .jump: 3115 <1> mov word [errret], ..@switch_s_catch 3116 <1> mov word [throwret], ..@switch_s_catch 3117 <1> mov word [throwsp], sp 3118 <1> 3119 <1> push word [code_seg] 3120 <1> push word [cs:..@word_switch_s_cont] 3121 <1> retf 3122 <1> 3123 <1> 3124 <1> usesection lDEBUG_CODE 3125 <1> ..@switch_s_cont: 3126 <1> call zz_save_strat 3127 <1> call zz_switch_s 3128 <1> dec si 3129 <1> mov dx, si 3130 <1> retf 3131 <1> 3132 <1> ..@switch_s_catch: 3133 <1> mov sp, word [throwsp] ; restore stack 3134 <1> ; (needed here if returned to errret) 3135 <1> mov dx, errcarat 3136 <1> call putsz 3137 <1> xor dx, dx 3138 <1> retf 3139 <1> %endif 3140 <1> 3141 <1> 3142 <1> usesection INIT 3143 <1> .noswitches: 3144 <1> .breakpoint: 3145 000015D7 90 <1> nop ; SMC in section init 3146 <1> ; Feed the remaining command line to the 'n' command. 3147 000015D8 4E <1> dec si 3148 000015D9 56 <1> push si 3149 <1> 3150 <1> 3151 <1> %if CATCHINTAMOUNT 3152 <1> ; Set up interrupt vectors. 3153 000015DA B90600 <1> mov cx, inttab_number 3154 000015DD BE[280C] <1> mov si, inttab 3155 <1> .intloop: 3156 000015E0 AC <1> lodsb 3157 000015E1 B435 <1> mov ah, 35h 3158 000015E3 CD21 <1> int 21h ; get vector 3159 000015E5 97 <1> xchg ax, di 3160 000015E6 AD <1> lodsw 3161 000015E7 97 <1> xchg ax, di 3162 000015E8 895D02 <1> mov word [ di + ieNext ], bx 3163 000015EB 8C4504 <1> mov word [ di + ieNext + 2 ], es 3164 <1> ; store it 3165 <1> %if _DEBUG && !_DEBUG_COND 3166 <1> ; vectors are set only when debuggee runs 3167 <1> %else 3168 <1> %if _DEBUG 3169 000015EE F606[D900]01 <1> testopt [internalflags6], dif6_debug_mode 3170 000015F3 7506 <1> jnz @F 3171 <1> %endif 3172 000015F5 89FA <1> mov dx, di 3173 000015F7 B425 <1> mov ah, 25h ; set interrupt vector 3174 000015F9 CD21 <1> int 21h ; ds => lDEBUG_DATA_ENTRY 3175 <1> @@: 3176 <1> %endif 3177 000015FB E2E3 <1> loop .intloop 3178 <1> %endif 3179 <1> 3180 <1> 3181 <1> ; Disabled this. hook2F (debug.asm) now detects this condition. 3182 <1> %if _PM && 0 3183 <1> ; Windows 9x and DosEmu are among those hosts which handle some 3184 <1> ; V86 Ints internally without first calling the interrupt chain. 3185 <1> ; This causes various sorts of troubles and incompatibilities; 3186 <1> ; in our case, hooking interrupt 2Fh would not intercept calls 3187 <1> ; made to the DPMI interface because the host sees them first. 3188 <1> %if _WIN9XSUPP 3189 <1> %if _GUARD_86M_INT2F 3190 <1> push es 3191 <1> xor ax, ax 3192 <1> mov es, ax ; (only used in 86 Mode) 3193 <1> mov ax, [es:2Fh * 4] 3194 <1> cmp ax, -1 3195 <1> je @F ; --> (ZR) 3196 <1> or ax, [es:2Fh * 4 + 2] 3197 <1> @@: 3198 <1> pop es 3199 <1> jz @F 3200 <1> %endif 3201 <1> mov ax, 1600h ; running in a Win9x DOS box? 3202 <1> int 2Fh 3203 <1> cmp al, 4 3204 <1> jge .no2Fhook ; this is intentionally a signed comparison! 3205 <1> @@: 3206 <1> %endif 3207 <1> %if _DOSEMU 3208 <1> testopt [internalflags], runningdosemu 3209 <1> jnz .no2Fhook 3210 <1> %endif 3211 <1> %if _WIN9XSUPP || _DOSEMU 3212 <1> jmp short .dpmihostchecked 3213 <1> .no2Fhook: 3214 <1> setopt [internalflags], nohook2F 3215 <1> .dpmihostchecked: 3216 <1> %endif 3217 <1> %endif 3218 000015FD 1E <1> push ds 3219 000015FE 07 <1> pop es 3220 <1> 3221 <1> set_parent_pra: 3222 <1> ; Save, then modify termination address and parent PSP. 3223 <1> %if _DEVICE 3224 000015FF F606[DA00]40 <1> testopt [internalflags6], dif6_device_mode 3225 00001604 7534 <1> jnz .device 3226 <1> %endif 3227 00001606 BE0A00 <1> mov si, TPIV 3228 00001609 BF[FC0A] <1> mov di, psp22 3229 0000160C A5 <1> movsw 3230 0000160D A5 <1> movsw ; save Int22 3231 0000160E BA[5C82] <1> mov dx, debug22 3232 00001611 8954FC <1> mov word [ si-4 ], dx 3233 00001614 8C5CFE <1> mov word [ si-2 ], ds ; set pspInt22 (required) 3234 00001617 BE1600 <1> mov si, 16h 3235 0000161A A5 <1> movsw ; save parent 3236 0000161B 8C5CFE <1> mov word [ si-2 ], ds ; set pspParent 3237 0000161E B82225 <1> mov ax, 2522h ; set Int22 3238 00001621 CD21 <1> int 21h ; (not really required) 3239 <1> 3240 <1> ; shrink to required resident size 3241 00001623 1E <1> push ds 3242 00001624 07 <1> pop es 3243 00001625 B44A <1> mov ah, 4Ah 3244 00001627 2E8B1E[6008] <1> mov bx, word [cs:memsize] 3245 <1> 3246 0000162C FF36[0001] <1> push word [code_seg] 3247 00001630 2EFF36[3616] <1> push word [cs:.word_initcont] 3248 00001635 CB <1> retf 3249 <1> 3250 <1> align 2, db 0 3251 <1> .word_initcont: 3252 00001636 [14C8] <1> dw initcont 3253 <1> %if _SYMBOLIC 3254 <1> ..@word_switch_s_cont: 3255 <1> dw ..@switch_s_cont 3256 <1> %endif 3257 <1> 3258 <1> %if _DEVICE 3259 <1> align 2, db 0 3260 <1> .word_initcont.device: 3261 00001638 [16C8] <1> dw initcont.device 3262 <1> 3263 <1> .device: 3264 0000163A BE8000 <1> mov si, 80h ; -> command line tail 3265 0000163D 89F1 <1> mov cx, si ; = 128 3266 0000163F 29CC <1> sub sp, cx ; -> buffer on stack 3267 00001641 89E7 <1> mov di, sp 3268 00001643 F3A4 <1> rep movsb ; preserve it 3269 <1> 3270 00001645 8CDA <1> mov dx, ds 3271 00001647 B455 <1> mov ah, 55h 3272 00001649 F8 <1> clc 3273 0000164A CD21 <1> int 21h ; create child PSP 3274 <1> 3275 0000164C BE0E00 <1> mov si, TPIV + 4 3276 0000164F BA[5C82] <1> mov dx, debug22 3277 00001652 8954FC <1> mov word [ si-4 ], dx 3278 00001655 8C5CFE <1> mov word [ si-2 ], ds ; set pspInt22 (required) 3279 <1> %if _DEVICE_SET_2324 3280 00001658 C704[4790] <1> mov word [ si ], devint23 3281 0000165C 8C5C02 <1> mov word [ si + 2 ], ds ; set pspInt23 3282 0000165F C74404[4990] <1> mov word [ si + 4 ], devint24 3283 00001664 8C5C06 <1> mov word [ si + 6 ], ds ; set pspInt24 3284 <1> %endif 3285 00001667 BE1800 <1> mov si, 16h + 2 3286 0000166A 8C5CFE <1> mov word [ si-2 ], ds ; set pspParent 3287 <1> ; mov ax, 2522h ; set Int22 3288 <1> ; int 21h ; (not really required) 3289 <1> 3290 0000166D 31C0 <1> xor ax, ax 3291 0000166F A32C00 <1> mov word [2Ch], ax ; set environment to none 3292 <1> 3293 00001672 89E6 <1> mov si, sp ; -> buffer on stack 3294 00001674 BF8000 <1> mov di, 80h ; -> command line tail buffer in PSP 3295 00001677 89F8 <1> mov ax, di ; = 128 3296 00001679 89F9 <1> mov cx, di ; = 128 3297 0000167B F3A4 <1> rep movsb ; 3298 0000167D 01C4 <1> add sp, ax ; discard buffer 3299 <1> 3300 0000167F FF36[0001] <1> push word [code_seg] 3301 00001683 2EFF36[3816] <1> push word [cs:.word_initcont.device] 3302 00001688 CB <1> retf 3303 <1> %endif 3304 <1> 3305 <1> 3306 <1> 3307 <1> usesection lDEBUG_CODE 3308 <1> initcont: 3309 0000C814 CD21 <1> int 21h ; resize to required 3310 <1> ; jc ... ; (expected to work since it had to be larger. also we hooked ints) 3311 <1> 3312 <1> .device: 3313 <1> %if _VXCHG 3314 0000C816 E828D2 <1> call vv_set 3315 <1> %endif 3316 <1> 3317 0000C819 1E <1> push ds 3318 0000C81A 07 <1> pop es 3319 0000C81B E8F2D2 <1> call getint2324 ; init run2324 to avoid using or displaying NUL vectors 3320 <1> 3321 0000C81E 1E <1> push ds 3322 0000C81F 07 <1> pop es 3323 0000C820 5E <1> pop si 3324 0000C821 AC <1> lodsb 3325 0000C822 E888C2 <1> call nn ; process the rest of the command line 3326 <1> 3327 <1> .boot_entry: 3328 0000C825 1E <1> push ds 3329 0000C826 07 <1> pop es ; => lDEBUG_DATA_ENTRY 3330 <1> 3331 0000C827 BE[0000] <1> mov si, cmd3 3332 <1> %if _BOOTLDR 3333 0000C82A F606[C500]40 <1> testopt [internalflags], nodosloaded 3334 0000C82F 7402 <1> jz @F 3335 0000C831 FFE6 <1> jmp si ; directly jump to cmd3 of the installed image 3336 <1> @@: 3337 <1> %endif 3338 0000C833 56 <1> push si 3339 0000C834 E999BF <1> jmp ll3 ; load a program if one has been given at the command line 6331 6332 usesection INIT 6333 00001689 00 align 16, db 0 6334 init_size equ $-section.INIT.vstart 6335 endarea init, 1 6336 6337 6338 usesection lDEBUG_CODE 6339 0000C837 00 align 16, db 0 6340 ldebug_code_size equ $-section.lDEBUG_CODE.vstart 6341 endarea ldebug_code, 1 6342 6343 6344 auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 6345 endarea auxbuff, 1 6346 6347 6348 pspsegment_size: equ 100h+ldebug_data_entry_size +asmtable1_size+asmtable2_size +datastack_size 6351 endarea pspsegment, 1 ; size of PSP and image when installed 6352 6353 6354 numdef SHOWASMTABLESIZE, _DEFAULTSHOWSIZE 6355 %if _SHOWASMTABLESIZE 6356 %assign ASMTABLESIZE asmtable1_size + asmtable2_size 6357 %warning asmtables hold ASMTABLESIZE bytes 6358 %endif 6359 6360 6361 %assign __INITSIZE init_size 6362 %if __INITSIZE > (64 * 1024) 6363 %error init segment too large (%[__INITSIZE]) 6364 %endif 6365 6366 numdef SHOWINITSIZE, _DEFAULTSHOWSIZE 6367 %if _SHOWINITSIZE 6368 %warning init segment holds __INITSIZE bytes 6369 %endif 6370 6371 6372 %assign __CODESIZE ldebug_code_size 6373 %if __CODESIZE > (64 * 1024) 6374 %error code segment too large (%[__CODESIZE]) 6375 %endif 6376 6377 numdef SHOWCODESIZE, _DEFAULTSHOWSIZE 6378 %if _SHOWCODESIZE 6379 %warning code segment holds __CODESIZE bytes 6380 %endif 6381 6382 6383 %assign __PSPSEGMENTSIZE pspsegment_size 6384 %if __PSPSEGMENTSIZE > (64 * 1024) 6385 %error resident size of PSP segment too large (%[__PSPSEGMENTSIZE]) 6386 %endif 6387 6388 numdef SHOWPSPSIZE, _DEFAULTSHOWSIZE 6389 %if _SHOWPSPSIZE 6390 %warning PSP segment holds __PSPSEGMENTSIZE bytes 6391 %endif 6392 6393 %if CODE_INSURE_COUNT 6394 %warning code_insure_low_byte_not_0CCh needed CODE_INSURE_COUNT times 6395 %endif