DOS/32 Advanced DOS Extender - Programmer's Reference

2.20 - DPMI function 0203h - Set Processor Exception Handler Vector

Sets the address of a handler for a CPU exception or fault, allowing a protected mode application to intercept processor exceptions (such as segment not present faults) that are not handled by the DPMI host and would otherwise generate a fatal error.


In: AX = 0203h
BL = exception/fault number (00-1Fh)
CX:EDX = selector:offset of exception handler

if successful:
CF clear

if failed:
CF set
AX = error code

8021h - invalid value (BL not in range 00-1Fh)
8022h - invalid selector


a) The value passed in CX should be a valid protected mode code (executable) selector, not a real mode segment address.

b) Every exception is first examined by the DPMI host. If the host does not handle the exception, it reflects the exception to the first handler in the protected mode exception handler chain.

c) DOS/32 Advanced DPMI supports only first 16 exceptions. Calls to this function with value in BL greater than 0Fh, but less than 1Fh, will return without performing any action.

d) DOS/32 Advanced DPMI does not handle exception 0Ch (Stack Fault).

e) DOS/32 Advanced DPMI will install exceptions 08-0Fh in an internal buffer, not in IDT, when PIC master is mapped on these interrupts (INTs 08-0Fh).


Copyright Supernar Systems, Ltd. 1996-2005
All Rights Reserved.