Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Ralf Brown's Interrupt List (Part 1,2) - int 31 - dpmi 0.9 api - protected mode - set processor exception handler vector http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
INT 31 - DPMI 0.9 API - protected mode - SET PROCESSOR EXCEPTION HANDLER VECTOR
        AX = 0203h
        BL = exception number (00h-1Fh)
        CX:DX / CX:EDX = selector:offset of handler
Return: CF set on error
        CF clear if successful
Notes:  32-bit programs must supply an offset in EDX and use a 32-bit interrupt
          stack frame on chaining to the next exception handler
        the handler should return using a FAR return
        all fault stack frames contain an error code, but it is only valid for
          exceptions 08h and 0Ah-0Eh
        handlers will only be called if the exception occurs in protected mode
        the handler may change certain values on the stack frame (see below)
SeeAlso: AX=0202h

Format of stack frame for 16-bit programs: (offset from SS:SP)
Offset  Size    Description
 00h    DWORD   return CS:IP (do not change)
 04h    WORD    error code
 06h    DWORD   CS:IP of exception
 0Ah    WORD    flags
 0Ch    DWORD   SS:SP

Format of stack frame for 32-bit programs: (offset from SS:ESP)
Offset  Size    Description
 00h    DWORD   return EIP (do not change)
 04h    WORD    return CS selector (do not change)
 06h    WORD    reserved (do not change)
 08h    DWORD   error code
 0Ch    DWORD   EIP of exception
 10h    WORD    CS selector of exception
 12h    WORD    reserved (do not change)
 14h    DWORD   EFLAGS
 18h    DWORD   ESP
 1Ch    WORD    SS
 1Eh    WORD    reserved (do not change)

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson