Replying to a message of Jan Wagemakers to Darryl Gregorash:
JW>>> Because the following has worked with only MSDOS Himem.sys
JW>>> loaded. /* mov ax,0 mov ds,ax ;DS = mov
JW>>> word ptr [ds:0b8142h],8403h
DG>> Out of idle curiosity, what happens if you try this without
DG>> himem.sys loaded?
JW> The computer locks up. The only thing you can do is pressing
JW> the reset-button ;-)
Hardly surprising; that offset into the segment is more than 64K. The only
Intel CPU that would wrap the offset back around to 0 and start over is the
8086/88. On any other Intel CPU, such an instruction, when in "real" mode,
will generate a trap D, ie. a segment boundary violation. This stuff is all
in Ralf Brown's interrupt list.
As I suggested before, Himem.sys probably has a trap D interrupt handler
which detects the violation, determines what caused it (there is only one
thing which can cause it in "real" mode), then kicks the CPU into native mode
to perform the mem operation, before returning to "real" mode and the code
which generated the segmentation fault.
--- FleetStreet 1.21 NR
---------------
* Origin: BIG BANG Burger Bar: Regina SK Canada (1:140/86)
|