Table des matières

MSDOS - Interrupt List 31h-40h

INT 31 - overwritten by CP/M jump instruction in INT 30

———-310000—————————–

INT 31 P - DPMI 0.9+ - ALLOCATE LDT DESCRIPTORS

AX = 0000h
CX = number of descriptors to allocate

Return: CF clear if successful

    AX = base selector
CF set on error
    AX = error code (DPMI 1.0+)
	0000h-7FFFh DOS error passed through by DPMI
	8001h unsupported function
	8002h object in wrong state for function
	8003h system integrity would be endangered
	8004h deadlock detected
	8005h pending serialization request cancelled
	8010h out of DPMI internal resources
	8011h descriptor unavailable
	8012h linear memory unavailable
	8013h physical memory unavailable
	8014h backing store unavailable
	8015h callback unavailable
	8016h handle unavailable
	8017h maximum lock count exceeded
	8018h shared memory already serialized exclusively by another
	8019h shared memory already serialized shared by another client
	8021h invalid value for numeric or flag parameter
	8022h invalid segment selector
	8023h invalid handle
	8024h invalid callback
	8025h invalid linear address
	8026h request not supported by hardware

Notes: DPMI is the DOS Protected-Mode Interface

the base and limit of the returned descriptors will be 0, and the type
  will be "data"
add the value returned by INT 31/AX=0003h to move to subsequent
  descriptors if multiple descriptors were allocated
not supported by MS Windows 3.0 in Standard mode

SeeAlso: AX=0001h,AX=000Dh ———-310001—————————– INT 31 P - DPMI 0.9+ - FREE LDT DESCRIPTOR

AX = 0001h
BX = selector to free

Return: CF clear if successful

CF set on error
    AX = error code (DPMI 1.0+) (8022h) (see AX=0000h)

Notes: only one descriptor is freed per call

the program's initial CS, DS, and SS descriptors may be freed
(DPMI 1.0+) any segment registers containing the freed selector are
  set to 0000h
not supported by MS Windows 3.0 in Standard mode

SeeAlso: AX=0000h,AX=000Ah,AX=000Dh ———-310002—————————– INT 31 P - DPMI 0.9+ - SEGMENT TO DESCRIPTOR

AX = 0002h
BX = real mode segment

Return: CF clear if successful

    AX = selector corresponding to real mode segment (64K limit)
CF set on error
    AX = error code (DPMI 1.0+) (8011h) (see AX=0000h)

Notes: multiple calls for the same real mode segment return the same selector

the returned descriptor can never be modified or freed
not supported by MS Windows 3.0 in Standard mode

———-310003—————————– INT 31 P - DPMI 0.9+ - GET NEXT SELECTOR INCREMENT VALUE

AX = 0003h

Return: CF clear

    AX = value to add to get next sequential selector

Notes: the increment will be a power of two

not supported by MS Windows 3.0 in Standard mode

SeeAlso: AX=0000h ———-310004—————————– INT 31 P - DPMI 0.9+ - LOCK SELECTOR

AX = 0004h
BX = selector to lock (prevent paging)

Return: ??? Note: although marked as reserved in versions 0.9 and 1.0 of the DPMI

  specification, this function is called by MS Windows TASKMAN,
  PROGMAN, and KERNEL

SeeAlso: AX=0005h,AX=0600h ———-310005—————————– INT 31 P - DPMI 0.9+ - UNLOCK SELECTOR

AX = 0005h
BX = selector to unlock (permit paging)

Return: ??? Note: although marked as reserved in versions 0.9 and 1.0 of the DPMI

  specification, this function is called by MS Windows TASKMAN,
  PROGMAN, and KERNEL

SeeAlso: AX=0004h,AX=0601h ———-310006—————————– INT 31 P - DPMI 0.9+ - GET SEGMENT BASE ADDRESS

AX = 0006h
BX = selector

Return: CF clear if successful

    CX:DX = linear base address of segment
CF set on error
    AX = error code (DPMI 1.0+) (8022h) (see AX=0000h)

Note: not supported by MS Windows 3.0 in Standard mode SeeAlso: AX=0007h ———-310007—————————– INT 31 P - DPMI 0.9+ - SET SEGMENT BASE ADDRESS

AX = 0007h
BX = selector
CX:DX = linear base address

Return: CF clear if successful

CF set on error
    AX = error code (DPMI 1.0+) (8022h,8025h) (see AX=0000h)

Notes: only modify descriptors allocated with INT 31/AX=0000h

only the low 24 bits of the address will be used by 16-bit DPMI
  implementations even on a 386 or higher
DPMI 1.0+ automatically reloads any segment registers containing the
  selector being modified
not supported by MS Windows 3.0 in Standard mode

SeeAlso: AX=0006h,AX=0008h,AX=0009h,AX=000Ch,INT 21/AH=E9h“OS/286” ———-310008—————————– INT 31 P - DPMI 0.9+ - SET SEGMENT LIMIT

AX = 0008h
BX = selector
CX:DX = segment limit

Return: CF clear if successful

CF set on error
    AX = error code (DPMI 1.0+) (8021h,8022h,8025h) (see AX=0000h)

Notes: CX must be zero for 16-bit DPMI implementations

limits greater than 1MB must be page aligned (low 12 bits set)
only modify descriptors allocated with INT 31/AX=0000h
DPMI 1.0+ automatically reloads any segment registers containing the
  selector being modified
not supported by MS Windows 3.0 in Standard mode

SeeAlso: AX=0007h,AX=0009h,AX=000Ch,INT 21/AH=E9h“OS/286” ———-310009—————————– INT 31 P - DPMI 0.9+ - SET DESCRIPTOR ACCESS RIGHTS

AX = 0009h
BX = selector
CL = access rights/type byte
CH = 80386 extended rights/type byte (32-bit DPMI implementations only)

Return: CF clear if successful

CF set on error
    AX = error code (DPMI 1.0+) (8021h,8022h,8025h) (see AX=0000h)

Notes: if the Present bit is clear, CL bits 0-3 may have any value

DPMI 1.0+ automatically reloads any segment registers containing the
  selector being modified
not supported by MS Windows 3.0 in Standard mode

SeeAlso: AX=0007h,AX=0008h,AX=000Ch,INT 21/AX=2514h ———-31000A—————————– INT 31 P - DPMI 0.9+ - CREATE ALIAS DESCRIPTOR

AX = 000Ah
BX = selector

Return: CF clear if successful

    AX = new data selector
CF set on error
    AX = error code (DPMI 1.0+) (8011h,8022h) (see AX=0000h)

Notes: fails if selector in BX is not a code segment or is invalid

use INT 31/AX=0001h to free new selector
future changes to the original selector will not be reflected in the
  returned alias selector
not supported by MS Windows 3.0 in Standard mode

SeeAlso: AX=0001h ———-31000B—————————– INT 31 P - DPMI 0.9+ - GET DESCRIPTOR

AX = 000Bh
BX = LDT selector
ES:(E)DI -> 8-byte buffer for copy of descriptor

Return: CF clear if successful

    buffer filled
CF set on error
    AX = error code (DPMI 1.0+) (8022h) (see AX=0000h)

Notes: 16-bit programs use ES:DI as pointer, 32-bit must use ES:EDI

not supported by MS Windows 3.0 in Standard mode

SeeAlso: AX=000Ch ———-31000C—————————– INT 31 P - DPMI 0.9+ - SET DESCRIPTOR

AX = 000Ch
BX = LDT selector
ES:(E)DI -> 8-byte buffer containing descriptor

Return: CF clear if successful

CF set on error
    AX = error code (DPMI 1.0+) (8021h,8022h,8025h) (see AX=0000h)

Notes: 16-bit programs use ES:DI as pointer, 32-bit must use ES:EDI

only modify descriptors allocated with INT 31/AX=0000h
DPMI 1.0+ automatically reloads any segment registers containing the
  selector being modified
not supported by MS Windows 3.0 in Standard mode

SeeAlso: AX=000Bh ———-31000D—————————– INT 31 P - DPMI 0.9+ - ALLOCATE SPECIFIC LDT DESCRIPTOR

AX = 000Dh
BX = LDT selector

Return: CF clear if successful

    descriptor allocated
CF set on error
    AX = error code (DPMI 1.0+) (8011h,8022h) (see AX=0000h)

Notes: free descriptor with INT 31/AX=0001h

the first 16 descriptors (04h-7Ch) are reserved for this function, but
  some may already be in use by other applications under DPMI 0.9;
  DPMI 1.0 guarantees 16 descriptors per client
not supported by MS Windows 3.0 in Standard mode

SeeAlso: AX=0000h,AX=0001h ———-31000E—————————– INT 31 P - DPMI 1.0+ - GET MULTIPLE DESCRIPTORS

AX = 000Eh
CX = number of descriptors to copy
ES:(E)DI -> descriptor buffer (see below)

Return: CF clear if successful

    descriptors copied
CF set on error
    AX = error code (8022h) (see AX=0000h)
    CX = number of descriptors successfully copied

Notes: 16-bit programs use ES:DI as pointer, 32-bit must use ES:EDI

if the function fails, the first CX descriptors are valid; the
  remainder are not modified

SeeAlso: AX=000Bh,AX=000Fh

Format of descriptor buffer entry (one per descriptor to get): Offset Size Description 00h WORD selector (set by client) 02h QWORD descriptor (set by host) ———-31000F—————————– INT 31 P - DPMI 1.0+ - SET MULTIPLE DESCRIPTORS

AX = 000Fh
CX = number of descriptors to copy
ES:(E)DI -> descriptor buffer (see below)

Return: CF clear if successful

    descriptors copied
CF set on error
    AX = error code (8021h,8022h,8025h) (see AX=0000h)
    CX = number of descriptors successfully copied

Notes: 16-bit programs use ES:DI as pointer, 32-bit must use ES:EDI

if the function fails, the first CX descriptors are valid; the
  remainder are not modified
DPMI 1.0+ automatically reloads any segment registers containing a
  selector being modified

SeeAlso: AX=000Ch,AX=000Eh

Format of descriptor buffer entry (one per descriptor to set): Offset Size Description 00h WORD selector 02h QWORD descriptor ———-310100—————————– INT 31 P - DPMI 0.9+ - ALLOCATE DOS MEMORY BLOCK

AX = 0100h
BX = number of paragraphs to allocate

Return: CF clear if successful

    AX = real mode segment of allocated block
    DX = first selector for allocated block
CF set on error
    AX = DOS error code (07h,08h) (see INT 21/AH=59h)
	 (DPMI 1.0+) DPMI error code (8011h) (see AX=0000h)
    BX = size (in paragraphs) of largest available block

Notes: multiple contiguous selectors are allocated for blocks of more than 64K

  if the caller is a 16-bit program
never modify or deallocate returned descriptors
not supported by MS Windows 3.0 in Standard mode

SeeAlso: AX=0101h,AX=0501h ———-310101—————————– INT 31 P - DPMI 0.9+ - FREE DOS MEMORY BLOCK

AX = 0101h
DX = selector of block

Return: CF set if successful

CF set on error
    AX = DOS error code (07h,09h) (see INT 21/AH=59h)

Notes: all descriptors allocated for the block are automatically freed

DPMI 1.0+ automatically zeros any segment registers containing a
  selector freed by this function
not supported by MS Windows 3.0 in Standard mode

SeeAlso: AX=0100h,AX=0102h,AX=0502h ———-310102—————————– INT 31 P - DPMI 0.9+ - RESIZE DOS MEMORY BLOCK

AX = 0102h
BX = new block size in paragraphs
DX = selector of block

Return: CF clear if successful

CF set on error
    AX = DOS error code (07h,08h,09h) (see INT 21/AH=59h)
	 (DPMI 1.0+) DPMI error code (8011h,8022h) (see AX=0000h)
    BX = maximum block size (in paragraphs) possible

Notes: increasing the size of a block past a 64K boundary will fail if the

  next descriptor in the LDT is already in use
shrinking a block past a 64K boundary will cause some selectors to be
  freed; DPMI 1.0+ automatically zeros any segment registers containing
  a selector freed by this function
not supported by MS Windows 3.0 in Standard mode

SeeAlso: AX=0100h ———-310200—————————– INT 31 P - DPMI 0.9+ - GET REAL MODE INTERRUPT VECTOR

AX = 0200h
BL = interrupt number

Return: CF clear

CX:DX = segment:offset of real mode interrupt handler

Note: the DPMI implementation is required to support all 256 vectors SeeAlso: AX=0201h,AX=0204h,INT 21/AX=2503h ———-310201—————————– INT 31 P - DPMI 0.9+ - SET REAL MODE INTERRUPT VECTOR

AX = 0201h
BL = interrupt number
CX:DX = segment:offset of real mode handler

Return: CF clear Note: all memory that may be touched by a hardware interrupt handler must be

  locked down with INT 31/AX=0600h	

SeeAlso: AX=0200h,AX=0205h,AX=0600h,INT 21/AX=2505h ———-310202—————————– INT 31 P - DPMI 0.9+ - GET PROCESSOR EXCEPTION HANDLER VECTOR

AX = 0202h
BL = exception number (00h-1Fh)

Return: CF clear if successful

    CX:(E)DX = selector:offset of handler
CF set on error
    AX = error code (DPMI 1.0+) (8021h) (see AX=0000h)

Notes: 16-bit programs receive the pointer in CX:DX, 32-bit programs in CX:EDX

DPMI 1.0+ supports this function only for backward compatibility; use
   AX=0210h or AX=0211h instead
not supported by MS Windows 3.0 in Standard mode

SeeAlso: AX=0203h,AX=0210h,AX=0211h,INT 2F/AX=FB42h/BX=0021h ———-310203—————————– INT 31 P - DPMI 0.9+ - SET PROCESSOR EXCEPTION HANDLER VECTOR

AX = 0203h
BL = exception number (00h-1Fh)
CX:(E)DX = selector:offset of handler

Return: CF clear if successful

CF set on error
    AX = error code (DPMI 1.0+) (8021h,8022h) (see AX=0000h)

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,
  and the DPMI host does not transparently handle the exception
the handler may change certain values on the stack frame (see below)
DPMI 1.0+ supports this function only for backward compatibility; use
   AX=0212h or AX=0213h instead
not supported by MS Windows 3.0 in Standard mode

SeeAlso: AX=0202h,AX=0212h,AX=0213h,INT 2F/AX=FB42h/BX=0022h

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) ———-310204—————————– INT 31 P - DPMI 0.9+ - GET PROTECTED MODE INTERRUPT VECTOR

AX = 0204h
BL = interrupt number

Return: CF clear

CX:(E)DX = selector:offset of handler

Notes: 16-bit programs use CX:DX, 32-bit programs use CX:EDX

DPMI implementations are required to support all 256 vectors
not supported by MS Windows 3.0 in Standard mode

SeeAlso: AX=0200h,AX=0205h,INT 21/AX=2502h,INT 2F/AX=FB42h/BX=0024h ———-310205—————————– INT 31 P - DPMI 0.9+ - SET PROTECTED MODE INTERRUPT VECTOR

AX = 0205h
BL = interrupt number
CX:(E)DX = selector:offset of handler

Return: CF clear if successful

CF set on error
    AX = error code (DPMI 1.0+) (8022h) (see AX=0000h)

Notes: 16-bit programs use CX:DX, 32-bit programs use CX:EDX

32-bit programs must use a 32-bit interrupt stack frame when chaining
  to the next handler
DPMI implementations are required to support all 256 vectors
hardware interrupts are reflected to the virtual machine's primary
  client, software interrupts to the current client
not supported by MS Windows 3.0 in Standard mode

SeeAlso: AX=0201h,AX=0204h,INT 21/AX=2504h,INT 2F/AX=FB42h/BX=0025h ———-310210—————————– INT 31 P - DPMI 1.0+ - GET PROTECTED MODE EXTENDED PROCESSOR EXCEPTION HANDLER

AX = 0210h
BL = exception number (00h-1Fh)

Return: CF clear if successful

    CX:(EDX) = selector:offset of exception handler
CF set on error
    AX = error code (8021h) (see AX=0000h)

Note: DPMI host reflects exception to current client's handler SeeAlso: AX=0202h,AX=0211h,AX=0212h ———-310211—————————– INT 31 P - DPMI 1.0+ - GET REAL MODE EXTENDED PROCESSOR EXCEPTION HANDLER

AX = 0211h
BL = exception number (00h-1Fh)

Return: CF clear if successful

    CX:(EDX) = selector:offset of exception handler
CF set on error
    AX = error code (8021h) (see AX=0000h)

Notes: returns address of protected-mode handler for real-mode exception

DPMI host performs a switch to protected mode, reflects the exception
  to the virtual machine's primary client, and returns to real mode
  on the handler's completion

SeeAlso: AX=0202h,AX=0210h,AX=0213h ———-310212—————————– INT 31 P - DPMI 1.0+ - SET PROTECTED MODE EXTENDED PROCESSOR EXCEPTION HANDLER

AX = 0212h
BL = exception or fault number (00h-1Fh)
CX:(E)DX = exception handler selector:offset

Return: CF clear if successful

CF set on error
    AX = error code (8021h,8022h) (see AX=0000h)

Note: DPMI host sends exception to current client's handler SeeAlso: AX=0203h,AX=0210h,AX=0213h ———-310213—————————– INT 31 P - DPMI 1.0+ - SET REAL MODE EXTENDED PROCESSOR EXCEPTION HANDLER

AX = 0213h
BL = exception or fault number (00h-1Fh)
CX:(E)DX = exception handler selector:offset

Return: CF clear if successful

CF set on error
    AX = error code (8021h,8022h) (see AX=0000h)

Notes: specifies address of protected-mode handler for real-mode exception

DPMI host performs a switch to protected mode, reflects the exception
  to the virtual machine's primary client, and returns to real mode
  on the handler's completion

SeeAlso: AX=0203h,AX=0211h,AX=0212h ———-310300—————————– INT 31 P - DPMI 0.9+ - SIMULATE REAL MODE INTERRUPT

AX = 0300h
BL = interrupt number
BH = flags
    bit 0: reset the interrupt controller and A20 line (DPMI 0.9)
	   reserved, must be 0 (DPMI 1.0+)
    others must be 0
CX = number of words to copy from protected mode to real mode stack
ES:(E)DI = selector:offset of real mode call structure (see below)

Return: CF clear if successful

    real mode call structure modified (all fields except SS:SP, CS:IP
      filled with return values from real mode interrupt)
CF set on error
    AX = error code (DPMI 1.0+) (8012h,8013h,8014h,8021h)(see AX=0000h)
protected mode stack unchanged

Notes: 16-bit programs use ES:DI as pointer, 32-bit programs use ES:EDI

CS:IP in the real mode call structure is ignored for this call,
  instead, the indicated interrupt vector is used for the address
the flags in the call structure are pushed on the real mode stack to
  form an interrupt stack frame, and the trace and interrupt flags are
  clear on entry to the handler
DPMI will provide a small (30 words) real mode stack if SS:SP is zero
the real mode handler must return with the stack in the same state as
  it was on being called

SeeAlso: AX=0302h,INT 21/AX=2511h,INT 21/AH=E3h“OS/286” SeeAlso: INT 2F/AX=FB42h/BX=000Dh

Format of real mode call structure: Offset Size Description 00h DWORD EDI 04h DWORD ESI 08h DWORD EBP 0Ch DWORD reserved (00h) 10h DWORD EBX 14h DWORD EDX 18h DWORD ECX 1Ch DWORD EAX 20h WORD flags 22h WORD ES 24h WORD DS 26h WORD FS 28h WORD GS 2Ah WORD IP 2Ch WORD CS 2Eh WORD SP 30h WORD SS ———-310301—————————– INT 31 P - DPMI 0.9+ - CALL REAL MODE PROCEDURE WITH FAR RETURN FRAME

AX = 0301h
BH = flags
    bit 0: reset the interrupt controller and A20 line (DPMI 0.9)
	   reserved, must be 0 (DPMI 1.0+)
    others must be 0
CX = number of words to copy from protected mode to real mode stack
ES:DI / ES:EDI = selector:offset of real mode call structure
		(see INT 31/AX=0300h)

Return: CF clear if successful

    real mode call structure modified (all fields except SS:SP, CS:IP
      filled with return values from real mode interrupt)
CF set on error
    AX = error code (DPMI 1.0+) (8012h,8013h,8014h,8021h)(see AX=0000h)
protected mode stack unchanged

Notes: 16-bit programs use ES:DI as pointer, 32-bit programs use ES:EDI

the real mode procedure must exit with a FAR return
DPMI will provide a small (30 words) real mode stack if SS:SP is zero
the real mode handler must return with the stack in the same state as
  it was on being called

SeeAlso: AX=0300h,AX=0302h,INT 21/AX=250Eh,INT 21/AH=E1h“OS/286” ———-310302—————————– INT 31 P - DPMI 0.9+ - CALL REAL MODE PROCEDURE WITH IRET FRAME

AX = 0302h
BH = flags
    bit 0: reset the interrupt controller and A20 line (DPMI 0.9)
	   reserved, must be 0 (DPMI 1.0+)
    others must be 0
CX = number of words to copy from protected mode to real mode stack
ES:DI / ES:EDI = selector:offset of real mode call structure
		(see INT 31/AX=0300h)

Return: CF clear if successful

    real mode call structure modified (all fields except SS:SP, CS:IP
      filled with return values from real mode interrupt)
CF set on error
    AX = error code (DPMI 1.0+) (8012h,8013h,8014h,8021h)(see AX=0000h)
protected mode stack unchanged

Notes: 16-bit programs use ES:DI as pointer, 32-bit programs use ES:EDI

the flags in the call structure are pushed on the real mode stack to
  form an interrupt stack frame, and the trace and interrupt flags are
  clear on entry to the handler
the real mode procedure must exit with an IRET
DPMI will provide a small (30 words) real mode stack if SS:SP is zero
the real mode handler must return with the stack in the same state as
  it was on being called

SeeAlso: AX=0300h ———-310303—————————– INT 31 P - DPMI 0.9+ - ALLOCATE REAL MODE CALLBACK ADDRESS

AX = 0303h
DS:SI / DS:ESI = selector:offset of procedure to call
ES:DI / ES:EDI = selector:offset of real mode call structure
		(see AX=0300h)

Return: CF clear if successful

    CX:DX = segment:offset of real mode call address
CF set on error
    AX = error code (DPMI 1.0+) (8015h) (see AX=0000h)

Notes: the real mode call structure is static, causing reentrancy problems;

  its contents are only valid at the time of a callback
the called procedure must modify the real mode CS:IP before returning
values are returned to real mode by modifying the real mode call struc
DPMI hosts must provide at least 16 callbacks per client

SeeAlso: AX=0304h,AX=0C00h

Values callback procedure is called with:

DS:SI / DS:ESI = selector:offset of real mode SS:SP
ES:DI / ES:EDI = selector:offset of real mode call structure
SS:SP / SS:ESP = locked protected mode API stack
interrupts disabled

Return: (with IRET)

ES:DI / ES:EDI = selector:offset of real mode call structure to restore

———-310304—————————– INT 31 P - DPMI 0.9+ - FREE REAL MODE CALLBACK ADDRESS

AX = 0304h
CX:DX = real mode callback address

Return: CF clear if successful

CF set on error
    AX = error code (DPMI 1.0+) (8024h) (see AX=0000h)

SeeAlso: AX=0303h ———-310305—————————– INT 31 P - DPMI 0.9+ - GET STATE SAVE/RESTORE ADDRESSES

AX = 0305h

Return: CF clear

AX = size in bytes of state buffer
BX:CX = real mode address of procedure to save/restore state
SI:DI / SI:EDI = protected mode procedure to save/restore state

Notes: the buffer size will be zero if it is not necessary to preserve state

16-bit programs should call SI:DI, 32-bit programs should call SI:EDI
this function is only needed if using the raw mode switch service

SeeAlso: AX=0306h

Values to call state-save procedures with:

AL = direction
    00h save state
    01h restore state
ES:DI / ES:EDI -> state buffer

Return: all registers preserved ———-310306—————————– INT 31 P - DPMI 0.9+ - GET RAW MODE SWITCH ADDRESSES

AX = 0306h

Return: CF clear

BX:CX -> procedure to switch from real to protected mode
SI:DI / SI:EDI -> procedure to switch from protected to real mode

Notes: 16-bit programs should jump to SI:DI, 32-bit programs should use SI:EDI

the caller must save and restore the state of the task with AX=0305h
not supported by MS Windows 3.0 in Standard mode

SeeAlso: AX=0305h

Values to JUMP at mode-switch procedures with:

AX = new DS
CX = new ES
DX = new SS
BX / EBX = new SP / ESP
SI = new CS
DI / EDI = new IP / EIP

Notes: BP/EBP is preserved across the call, but AX/EAX, BX/EBX, CX/ECX,

  DX/EDX, SI/ESI, and DI/EDI will be undefined; FS and GS will be 0000h
interrupts will stay disabled during the entire mode switch if they
  are disabled on entry to the mode-switch procedure

———-310400—————————– INT 31 P - DPMI 0.9+ - GET DPMI VERSION

AX = 0400h

Return: CF clear

AH = major version of DPMI spec supported
AL = two-digit minor version of DPMI spec supported
BX = flags
    bit 0: running under an 80386 (32-bit) implementation
    bit 1: processor returns to real mode for reflected interrupts
	   instead of V86 mode
    bit 2: virtual memory supported
    bit 3: reserved (undefined)
    others reserved (zero)
CL = processor type (02h=80286, 03h=80386, 04h=80486)
DH = curr value of virtual master interrupt controller base interrupt
DL = curr value of virtual slave interrupt controller base interrupt

SeeAlso: AX=0401h,INT 21/AX=250Ch ———-310401—————————– INT 31 P - DPMI 1.0+ - GET DPMI CAPABILITIES

AX = 0401h
ES:(E)DI -> 128-byte buffer (see below)

Return: CF clear if successful

    AX = capabilities
	bit 0: paged accessed/dirty supported (see AX=0506h,AX=0507h)
	    1: exceptions restartability supported
	    2: device mapping supported (see AX=0508h)
	    3: conventional memory mapping supported (see AX=0509h)
	    4: demand zero-fill supported
	    5: write-protect client capability supported
	    6: write-protect host capability supported
	    7-15: reserved
    CX = reserved (00h)
    DX = reserved (00h)
    buffer filled
CF set on error (DPMI 0.9 only)

SeeAlso: AX=0400h

Format of buffer: Offset Size Description 00h BYTE host major version number 01h BYTE host minor version number 02h 126 BYTEs ASCIZ host vendor name ———-310500—————————– INT 31 P - DPMI 0.9+ - GET FREE MEMORY INFORMATION

AX = 0500h
ES:DI / ES:EDI -> buffer for memory information (see below)

Return: CF clear Notes: 16-bit programs use ES:DI, 32-bit programs use ES:EDI

this function must be considered advisory because other applications
  may affect the results at any time after the call
fields not supported by the DPMI implementation are filled with
  FFFFFFFFh
DPMI 1.0+ supports this function solely for backward compatibility; use
  AX=050Bh instead

SeeAlso: AX=0501h,AX=0604h

Format of memory information: Offset Size Description 00h DWORD largest available block in bytes 04h DWORD maximum unlocked page allocation 08h DWORD maximum locked page allocation 0Ch DWORD total linear address space in pages 10h DWORD total unlocked pages 14h DWORD free pages 18h DWORD total physical pages 1Ch DWORD free linear address space in pages 20h DWORD size of paging file/partition in pages 24h 12 BYTEs reserved ———-310501—————————– INT 31 P - DPMI 0.9+ - ALLOCATE MEMORY BLOCK

AX = 0501h
BX:CX = size in bytes

Return: CF clear if successful

    BX:CX = linear address of block
    SI:DI = memory block handle for resizing and freeing block
CF set on error
    AX = error code (DPMI 1.0+) (8012h-8014h,8016h,8021h)(see AX=0000h)

Notes: no selectors are allocated

the memory block is allocated unlocked (can be locked with AX=0600h)
allocations are often page granular (see AX=0604h)

SeeAlso: AX=0000h,AX=0100h,AX=0500h,AX=0502h,AX=0503h,AX=0504h,AX=0D00h ———-310502—————————– INT 31 P - DPMI 0.9+ - FREE MEMORY BLOCK

AX = 0502h
SI:DI = handle of memory block

Return: CF clear if successful

CF set on error
    AX = error code (DPMI 1.0+) (8023h) (see AX=0000h)

Note: any selectors allocated for the memory block must also be freed,

  preferably before freeing the memory block

SeeAlso: AX=0001h,AX=0101h,AX=0501h,AX=0D01h ———-310503—————————– INT 31 P - DPMI 0.9+ - RESIZE MEMORY BLOCK

AX = 0503h
BX:CX = new size in bytes (nonzero)
SI:DI = handle of memory block

Return: CF clear if successful

    BX:CX = new linear address
    SI:DI = new handle of memory block
CF set on error
    AX = error code (DPMI 1.0+) (8012h-8014h,8016h,8021h,8023h)
	(see AX=0000h)

Notes: any selectors pointing at the block must be updated

the previous memory block handle becomes invalid
an error is returned if the new size is 0

SeeAlso: AX=0102h,AX=0501h,AX=0505h ———-310504—————————– INT 31 P - DPMI 1.0+ - ALLOCATE LINEAR MEMORY BLOCK

AX = 0504h
EBX = page-aligned linear address of memory block (00000000h if any
	address is acceptable)
ECX = size in bytes (nonzero)
EDX = flags
    bit 0: set to create committed pages instead of uncommitted pages
    bits 1-31: reserved (0)

Return: CF clear if successful

    EBX = linear address of memory block
    ESI = memory block handle
CF set on error
    AX = error code (8001h,8012h-8014h,8016h,8021h,8025h)(see AX=0000h)

Note: only supported by 32-bit DPMI hosts, but may be used by 16-bit clients SeeAlso: AX=0501h,AX=0505h ———-310505—————————– INT 31 P - DPMI 1.0+ - RESIZE LINEAR MEMORY BLOCK

AX = 0505h
ESI = memory block handle
ECX = new size in bytes (nonzero)
EDX = flags
    bit 0: create committed pages rather than uncommitted pages
    bit 1: segment descriptor update required
	ES:EBX -> buffer containing array of WORDs with selectors
	EDI = number of selectors in array
    bits 2-31: reserved (0)

Return: CF clear if successful

    EBX = new linear base address
    ESI = new memory block handle
CF set on error
    AX = error code (8001h,8012h-8014h,8016h,8021h,8023h)(see AX=0000h)

Notes: only supported by 32-bit DPMI hosts, but may be used by 16-bit clients

the old memory block handle becomes invalid
if EDX bit 1 set and the block's base address is changed, DPMI updates
  all descriptors for selectors in the update buffer which fall within
  the memory block

SeeAlso: AX=0503h,AX=0504h ———-310506—————————– INT 31 P - DPMI 1.0+ - GET PAGE ATTRIBUTES

AX = 0506h
ESI = memory block handle
EBX = offset in memory block of first page
ECX = number of pages
ES:EDX -> array of WORDs to hold page attributes (see below)

Return: CF clear if successful

    buffer filled
CF set on error
    AX = error code (8001h,8023h,8025h) (see AX=0000h)

Notes: only supported by 32-bit DPMI hosts, but may be used by 16-bit clients

if EBX is not page-aligned, it will be rounded down

SeeAlso: AX=0504h,AX=0507h,INT 21/AX=251Dh,INT 21/AX=EB00h

Format of page attribute words: bits 0-2 page type

	000 uncommitted
	001 committed
	010 mapped (see AX=0508h,AX=0509h)
	other currently unused

bit 3 page is read/write rather than read-only bit 4 accessed/dirty bits supplied in bits 5 and 6 bit 5 page has been accessed (only valid if bit 4 set) bit 6 page has been written (only valid if bit 4 set) bits 7-15 reserved (0) ———-310507—————————– INT 31 P - DPMI 1.0+ - MODIFY PAGE ATTRIBUTES

AX = 0507h
ESI = memory block handle
EBX = offset in memory block of first page
ECX = number of pages
ES:EDX -> array of WORDs with new page attributes (see AX=0506h)

Return: CF clear if successful

CF set on error
    AX = error code (8001h,8002h,8013h,8014h,8021h,8023h,8025h)
	(see AX=0000h)
    ECX = number of pages which have been set

Notes: only supported by 32-bit DPMI hosts, but may be used by 16-bit clients

if EBX is not page-aligned, it will be rounded down

SeeAlso: AX=0504h,AX=0506h,INT 21/AX=251Eh ———-310508—————————– INT 31 P - DPMI 1.0+ - MAP DEVICE IN MEMORY BLOCK

AX = 0508h
ESI = memory block handle
EBX = page-aligned offset within memory block of page(s) to be mapped
ECX = number of pages to map
EDX = page-aligned physical address of device

Return: CF clear if successful

CF set on error
    AX = error code (8001h,8003h,8023h,8025h) (see AX=0000h)

Notes: only supported by 32-bit DPMI hosts, but may be used by 16-bit clients

support of this function is optional; hosts are also allowed to support
  the function for some devices but not others

SeeAlso: AX=0504h,AX=0509h,AX=0800h,AX=0801h ———-310509—————————– INT 31 P - DPMI 1.0+ - MAP CONVENTIONAL MEMORY IN MEMORY BLOCK

AX = 0509h
ESI = memory block handle
EBX = page-aligned offset within memory block of page(s) to map
ECX = number of pages to map
EDX = page-aligned linear address of conventional (below 1M) memory

Return: CF clear if successful

CF set on error
    AX = error code (8001h,8003h,8023h,8025h) (see AX=0000h)

Notes: only supported by 32-bit DPMI hosts, but may be used by 16-bit clients

support of this function is optional

SeeAlso: AX=0504h,AX=0508h,AX=0801h ———-31050A—————————– INT 31 P - DPMI 1.0+ - GET MEMORY BLOCK SIZE AND BASE

AX = 050AH
SI:DI = memory block handle

Return: CF clear if successful

    SI:DI = size in bytes
    BX:CX = base address
CF set on error
    AX = error code (8023h) (see AX=0000h)

SeeAlso: AX=0501h,AX=0504h ———-31050B—————————– INT 31 P - DPMI 1.0+ - GET MEMORY INFORMATION

AX = 050Bh
ES:(E)DI -> 128-byte buffer for memory information (see below)

Return: CF clear if successful

CF set on error (DPMI 0.9 only)

Note: 16-bit programs use ES:DI, 32-bit programs must use ES:EDI SeeAlso: AX=0500h

Format of memory information: Offset Size Description 00h DWORD total allocated bytes of physical memory controlled by host 04h DWORD total allocated bytes of virtual memory controlled by host 08h DWORD total available bytes of virtual memory controlled by host 0Ch DWORD total allocated bytes of virtual memory for curr virtual mach 10h DWORD total available bytes of virtual memory for curr virtual mach 14h DWORD total allocated bytes of virtual memory for current client 18h DWORD total available bytes of virtual memory for current client 1Ch DWORD total locked bytes for current client 20h DWORD maximum locked bytes for current client 24h DWORD highest linear address available to current client 28h DWORD largest available memory block in bytes 2Ch DWORD minimum allocation unit in bytes 30h DWORD allocation alignment unit size in bytes 34h 76 BYTEs reserved (00h) ———-310600—————————– INT 31 P - DPMI 0.9+ - LOCK LINEAR REGION

AX = 0600h
BX:CX = starting linear address
SI:DI = size of region in bytes

Return: CF clear if successful

CF set on error
    none of the memory is locked
    AX = error code (DPMI 1.0+) (8013h,8017h,8025h) (see AX=0000h)

Notes: pages at beginning and end will be locked if the region overlaps them

may be called multiple times for a given page; the DPMI host keeps a
  lock count for each page

SeeAlso: AX=0004h,AX=0601h,INT 21/AX=251Ah,INT 21/AX=EB06h ———-310601—————————– INT 31 P - DPMI 0.9+ - UNLOCK LINEAR REGION

AX = 0601h
BX:CX = starting linear address
SI:DI = size of region in bytes

Return: CF clear if successful

CF set on error
    none of the memory is unlocked
    AX = error code (DPMI 1.0+) (8002h,8025h) (see AX=0000h)

Notes: pages at beginning and end will be unlocked if the region overlaps them

memory whose lock count has not reached zero remains locked

SeeAlso: AX=0005h,AX=0600h,INT 21/AX=251Bh,INT 21/AX=EB07h ———-310602—————————– INT 31 P - DPMI 0.9+ - MARK REAL MODE REGION AS PAGEABLE

AX = 0602h
BX:CX = starting linear address
SI:DI = size of region in bytes

Return: CF clear if successful

CF set on error	
    none of the memory is made pageable
    AX = error code (DPMI 1.0+) (8002h,8025h) (see AX=0000h)

Notes: must relock all unlocked real mode memory before terminating process

  for DPMI 0.9; DPMI 1.0+ automatically relocks real mode memory
pages at beginning and end will be unlocked if the region overlaps them
pageability of real mode pages is binary, not a count

SeeAlso: AX=0600h,AX=0603h ———-310603—————————– INT 31 P - DPMI 0.9+ - RELOCK REAL MODE REGION

AX = 0603h
BX:CX = starting linear address
SI:DI = size of region in bytes

Return: CF clear if successful

CF set on error	
    none of the memory is relocked
    AX = error code (DPMI 1.0+) (8002h,8013h,8025h) (see AX=0000h)

Notes: pages at beginning and end will be relocked if the region overlaps them

pageability of real mode pages is binary, not a count

SeeAlso: AX=0602h ———-310604—————————– INT 31 P - DPMI 0.9+ - GET PAGE SIZE

AX = 0604h

Return: CF clear if successful

    BX:CX = page size in bytes
CF set on error
    AX = error code (DPMI 1.0+)
	8001h unsupported, 16-bit host

———-310700—————————– INT 31 P - DPMI 0.9+ - MARK PAGES AS PAGING CANDIDATES

AX = 0700h
BX:CX = starting linear page number
SI:DI = number of pages to mark as paging candidates

Return: ??? Note: although marked as reserved in versions 0.9 and 1.0 of the DPMI

  specification, this function is called by MS Windows TASKMAN,
  PROGMAN, and KERNEL

SeeAlso: AX=0701h,AX=0702h ———-310701—————————– INT 31 P - DPMI 0.9+ - DISCARD PAGES

AX = 0701h
BX:CX = starting linear page number
SI:DI = number of pages to discard

Return: ??? Note: although marked as reserved in versions 0.9 and 1.0 of the DPMI

  specification, this function is called by MS Windows TASKMAN,
  PROGMAN, and KERNEL

SeeAlso: AX=0700h,AX=0703h ———-310702—————————– INT 31 P - DPMI 0.9+ - MARK PAGE AS DEMAND PAGING CANDIDATE

AX = 0702h
BX:CX = starting linear address
SI:DI = number of bytes to mark as paging candidates

Return: CF clear if successful

CF set on error
    AX = error code (DPMI 1.0+) (8025h) (see AX=0000h)

Notes: this function is advisory, and does not force immediate paging

partial pages will not be discarded

SeeAlso: AX=0700h,AX=0703h ———-310703—————————– INT 31 P - DPMI 0.9+ - DISCARD PAGE CONTENTS

AX = 0703h
BX:CX = starting linear address
SI:DI = number of bytes to mark as discarded

Return: CF clear if successful

CF set on error
    AX = error code (DPMI 1.0+) (8025h) (see AX=0000h)

Notes: this function is advisory, and may be ignored by DPMI implementations

partial pages will not be discarded

SeeAlso: AX=0701h,AX=0702h ———-310800—————————– INT 31 P - DPMI 0.9+ - PHYSICAL ADDRESS MAPPING

AX = 0800h
BX:CX = physical address (should be above 1 MB)
SI:DI = size in bytes

Return: CF clear if successful

    BX:CX = linear address which maps the requested physical memory
CF set on error
    AX = error code (DPMI 1.0+) (8003h,8021h) (see AX=0000h)

Notes: implementations may refuse this call because it can circumvent protects

the caller must build an appropriate selector for the memory
do not use for memory mapped in the first megabyte

SeeAlso: AX=0002h,AX=0508h,AX=0509h,AX=0801h,INT 21/AX=250Ah,INT 21/AX=EB05h ———-310801—————————– INT 31 P - DPMI 1.0+ - FREE PHYSICAL ADDRESS MAPPING

AX = 0801h
BX:CX = linear address returned by AX=0800h

Return: CF clear if successful

CF set on error
    AX = error code (8025h) (see AX=0000h)

Note: should be called at end of access to device mapped with AX=0800h SeeAlso: AX=0508h,AX=0509h,AX=0800h,INT 21/AX=EB03h ———-310900—————————– INT 31 P - DPMI 0.9+ - GET AND DISABLE VIRTUAL INTERRUPT STATE

AX = 0900h

Return: CF clear

virtual interrupts disabled
AL = 00h if previously disabled
   = 01h if previously enabled
AH preserved

Notes: the previous state may be restored simply by executing another INT 31

a CLI instruction may be used if the previous state is unimportant,
  but should be assumed to be very slow due to trapping by the host

SeeAlso: AX=0901h,AX=0902h ———-310901—————————– INT 31 P - DPMI 0.9+ - GET AND ENABLE VIRTUAL INTERRUPT STATE

AX = 0901h

Return: CF clear

virtual interrupts enabled
AL = 00h if previously disabled
   = 01h if previously enabled
AH preserved

Notes: the previous state may be restored simply by executing another INT 31

a STI instruction may be used if the previous state is unimportant,
  but should be assumed to be very slow due to trapping by the host

SeeAlso: AX=0900h,AX=0902h ———-310902—————————– INT 31 P - DPMI 0.9+ - GET VIRTUAL INTERRUPT STATE

AX = 0902h

Return: CF clear

AL = 00h if disabled
   = 01h if enabled

Note: should be used rather than PUSHF because that instruction yields the

  physical interrupt state rather than the per-client virtualized
  interrupt flag

SeeAlso: AX=0900h,AX=0901h ———-310A00—————————– INT 31 P - DPMI 0.9+ - GET VENDOR SPECIFIC API ENTRY POINT

AX = 0A00h
DS:SI / DS:ESI -> case-sensitive ASCIZ vendor name or identifier

Return: CF clear if successful

    ES:DI / ES:EDI -> FAR extended API entry point
    DS, FS, GS, EAX, EBX, ECX, EDX, ESI, EBP destroyed
CF set on error
    AX = error code (DPMI 1.0+) (8001h) (see AX=0000h)

Notes: extended API parameters are vendor-specific

DPMI 1.0+ supports this function solely for backward compatibility; use
  INT 2F/AX=168Ah instead

SeeAlso: INT 2F/AX=168Ah ———-310B00—————————– INT 31 P - DPMI 0.9+ - SET DEBUG WATCHPOINT

AX = 0B00h
BX:CX = linear address
DL = size (1,2,4 bytes)
DH = type (00h execute, 01h write, 02h read/write)

Return: CF clear if successful

    BX = watchpoint handle
CF set on error
    AX = error code (DPMI 1.0+) (8016h,8021h,8025h) (see AX=0000h)

SeeAlso: AX=0212h,AX=0601h ———-310B01—————————– INT 31 P - DPMI 0.9+ - CLEAR DEBUG WATCHPOINT

AX = 0B01h
BX = watchpoint handle

Return: CF clear if successful

CF set on error
    AX = error code (DPMI 1.0+) (8023h) (see AX=0000h)

Note: the watchpoint handle is freed SeeAlso: AX=0B00h ———-310B02—————————– INT 31 P - DPMI 0.9+ - GET STATE OF DEBUG WATCHPOINT

AX = 0B02h
BX = watchpoint handle

Return: CF clear if successful

    AX = status flags
	bit 0: watch point has been executed since AX=0B00h or AX=0B03h
CF set on error
    AX = error code (DPMI 1.0+) (8023h) (see AX=0000h)

SeeAlso: AX=0B00h,AX=0B03h ———-310B03—————————– INT 31 P - DPMI 0.9+ - RESET DEBUG WATCHPOINT

AX = 0B03h
BX = watchpoint handle

Return: CF clear if successful

CF set on error
    AX = error code (DPMI 1.0+) (8023h) (see AX=0000h)

SeeAlso: AX=0B02h ———-310C00—————————– INT 31 P - DPMI 1.0+ - INSTALL RESIDENT HANDLER INIT CALLBACK

AX = 0C00h
ES:(E)DI -> resident service provider structure (see below)

Return: CF clear if successful

CF set on error
    AX = error code (8015h,8021h,8025h) (see AX=0000h)

Note: calling this function declares an intent to provide resident

  protected mode services after terminating with AX=0C01h

SeeAlso: AX=0303h,AX=0C01h

Format of resident service provider structure: Offset Size Description 00h QWORD descriptor for 16-bit data segment 08h QWORD descriptor for 16-bit code segment (zeros if not supported) 10h WORD offset of 16-bit callback procedure 12h 2 BYTEs reserved 14h QWORD descriptor for 32-bit data segment 1Ch QWORD descriptor for 32-bit code segment (zeros if not supported) 24h DWORD offset of 32-bit callback procedure ———-310C01—————————– INT 31 P - DPMI 1.0+ - TERMINATE AND STAY RESIDENT

AX = 0C01h
BL = return code
DX = number of paragraphs of DOS memory to reserve (0 or >= 6)

Return: never Notes: should only be used if the program will only provide services to

  other DPMI programs
any protected mode memory remains allocated to the program unless
  explicitly freed before this call
must first call AX=0C00h or program will simply be terminated

SeeAlso: AX=0C00h,INT 21/AH=31h ———-310D00—————————– INT 31 P - DPMI 1.0+ - ALLOCATE SHARED MEMORY

AX = 0D00h
ES:(E)DI -> shared memory allocation request structure (see below)

Return: CF clear if successful

    request structure updated
CF set on error
    AX = error code (8012h,8013h,8014h,8016h,8021h) (see AX=0000h)

Note: first 16 bytes of memory block will be initialized to zeros on the

  first allocation

SeeAlso: AX=0501h,AX=0D01h,AX=0D02h

Format of shared memory allocation request structure: Offset Size Description 00h DWORD requested length of shared memory block in bytes 04h DWORD (return) allocated length of block 08h DWORD (return) shared memory handle 0Ch DWORD (return) linear address of memory block 10h 6 BYTEs selector:offset32 of ASCIZ name for memory block

	(name max 128 bytes)

16h 2 BYTEs reserved 18h 4 BYTEs reserved (00h) ———-310D01—————————– INT 31 P - DPMI 1.0+ - FREE SHARED MEMORY

AX = 0D01h
SI:DI = shared memory block handle

Return: CF clear if successful

CF set on error
    AX = error code (8023h) (see AX=0000h)

Notes: handle becomes invalid after this call

DPMI maintains separate global and virtual machine use counts for each
  shared memory block; when the global use counts reaches zero, the
  block is finally destroyed

SeeAlso: AX=0502h,AX=0D00h ———-310D02—————————– INT 31 P - DPMI 1.0+ - SERIALIZE SHARED MEMORY

AX = 0D02h
SI:DI = shared memory block handle
DX = flags
    bit 0: return immediately rather than suspending if serialization
		unavailable
	1: shared rather than exclusive serialization
	2-15: reserved (0)

Return: CF clear if successful

CF set on error
    AX = error code (8004h,8005h,8017h-8019h,8023h) (see AX=0000h)

Notes: an exclusive serialization blocks any other serialization attempts for

  the same block by another virtual machine; a shared serialization
  blocks attempts at exclusive serialization by another virtual machine
hosts are not required to detect deadlock
a client's interrupt handler can cancel a serialization call which
  caused it to block by calling AX=0D03h

SeeAlso: AX=0D00h,AX=0D03h ———-310D03—————————– INT 31 P - DPMI 1.0+ - FREE SERIALIZATION ON SHARED MEMORY

AX = 0D03h
SI:DI = shared memory block handle
DX = flags
    bit 0: release shared serialization rather than exclusive serialztn
    bit 1: free pending serialization
    bits 2-15: reserved (0)

Return: CF clear if successful

CF set on error
    AX = error code (8002h,8023h) (see AX=0000h)

SeeAlso: AX=0D00h,AX=0D02h ———-310E00—————————– INT 31 P - DPMI 1.0+ - GET COPROCESSOR STATUS

AX = 0E00h

Return: CF clear

AX = coprocessor status
    bit 0: numeric coprocessor enabled for current client
    bit 1: client is emulating coprocessor
    bit 2: numeric coprocessor is present
    bit 3: host is emulating coprocessor instructions
    bits 4-7: coprocessor type
	0000 none
	0010 80287
	0011 80387
	0100 80486 with numeric coprocessor
	other reserved
    bits 8-15: not used

Note: supported by 386MAX v6.01, which otherwise only supports DPMI 0.9 SeeAlso: AX=0E01h ———-310E01—————————– INT 31 P - DPMI 1.0+ - SET EMULATION

AX = 0E01h
BX = coprocessor flag bits
    bit 0: enable numeric coprocessor for current client
    bit 1: client will emulate coprocessor
    bits 2-15: not used

Return: CF clear if successful

CF set on error
    AX = error code (8026h) (see AX=0000h)

Note: supported by 386MAX v6.01, which otherwise only supports DPMI 0.9 SeeAlso: AX=0E00h ———-32——————————— INT 32 - VIRUS - reportedly used by “Tiny” Viruses SeeAlso: INT 60“VIRUS” ———-330000—————————– INT 33 - MS MOUSE - RESET DRIVER AND READ STATUS

AX = 0000h

Return: AX = status

    0000h hardware/driver not installed
    FFFFh hardware/driver installed
BX = number of buttons
    0000h other than two
    0002h two buttons (many drivers)
    0003h Mouse Systems/Logitech three-button mouse
    FFFFh two buttons

Notes: to use mouse on a Hercules-compatible monographics card in graphics

  mode, you must first set 0040h:0049h to 6 for page 0 or 5 for page 1,
  and then call this function.  Logitech drivers v5.01 and v6.00
  reportedly do not correctly use Hercules graphics in dual-monitor
  systems, while version 4.10 does.
the Logitech mouse driver contains the signature string "LOGITECH" 
  three bytes past the interrupt handler; many of the Logitech mouse
  utilities check for this signature.

SeeAlso: AX=0021h,INT 62/AX=007Ah,INT 74 ———-330001—————————– INT 33 - MS MOUSE - SHOW MOUSE CURSOR

AX = 0001h

SeeAlso: AX=0002h,INT 16/AX=FFFEh,INT 62/AX=007Bh ———-330002—————————– INT 33 - MS MOUSE - HIDE MOUSE CURSOR

AX = 0002h

Note: multiple calls to hide the cursor will require multiple calls to

  function 01h to unhide it.

SeeAlso: AX=0001h,AX=0010h,INT 16/AX=FFFFh,INT 62/AX=007Bh ———-330003—————————– INT 33 - MS MOUSE - RETURN POSITION AND BUTTON STATUS

AX = 0003h

Return: BX = button status

   bit 0  left button pressed if 1
   bit 1  right button pressed if 1
   bit 2  middle button pressed if 1 (Mouse Systems/Logitech mouse)
CX = column
DX = row

SeeAlso: AX=0004h,AX=000Bh,INT 2F/AX=D000h“ZWmous” ———-330004—————————– INT 33 - MS MOUSE - POSITION MOUSE CURSOR

AX = 0004h
CX = column
DX = row

Note: the row and column are truncated to the next lower multiple of the cell

  size; however, some versions of the Microsoft documentation
  incorrectly state that the coordinates are rounded

SeeAlso: AX=0003h,INT 62/AX=0081h ———-330005—————————– INT 33 - MS MOUSE - RETURN BUTTON PRESS DATA

AX = 0005h
BX = button
    0000h left
    0001h right
    0002h middle (Mouse Systems/Logitech mouse)

Return: AX = button states

    bit 0 left button pressed if 1
    bit 1 right button pressed if 1
    bit 2 middle button pressed if 1 (Mouse Systems/Logitech mouse)
BX = number of times specified button has been pressed since last call
CX = column at time specified button was last pressed
DX = row at time specified button was last pressed

SeeAlso: AX=0006h,INT 62/AX=007Ch ———-330006—————————– INT 33 - MS MOUSE - RETURN BUTTON RELEASE DATA

AX = 0006h
BX = button
    0000h left
    0001h right
    0002h middle (Mouse Systems/Logitech mouse)

Return: AX = button states

    bit 0 left button pressed if 1
    bit 1 right button pressed if 1
    bit 2 middle button pressed if 1 (Mouse Systems/Logitech mouse)
BX = number of times specified button has been released since last call
CX = column at time specified button was last released
DX = row at time specified button was last released

SeeAlso: AX=0005h,INT 62/AX=007Ch ———-330007—————————– INT 33 - MS MOUSE - DEFINE HORIZONTAL CURSOR RANGE

AX = 0007h
CX = minimum column
DX = maximum column

SeeAlso: AX=0008h,AX=0010h,INT 62/AX=0080h ———-330008—————————– INT 33 - MS MOUSE - DEFINE VERTICAL CURSOR RANGE

AX = 0008h
CX = minimum row
DX = maximum row

SeeAlso: AX=0007h,AX=0010h,INT 62/AX=0080h ———-330009—————————– INT 33 - MS MOUSE - DEFINE GRAPHICS CURSOR

AX = 0009h
BX = column of cursor hot spot in bitmap (-16 to 16)
CX = row of cursor hot spot (-16 to 16)
ES:DX -> bitmap
	16 words screen mask
	16 words cursor mask
	    each word defines the sixteen pixels of a row, low bit
	    rightmost

SeeAlso: AX=000Ah,AX=0012h,INT 62/AX=007Fh ———-33000A—————————– INT 33 - MS MOUSE - DEFINE TEXT CURSOR

AX = 000Ah
BX = hardware/software text cursor
    0000h software
	CX = screen mask
	DX = cursor mask
    0001h hardware
	CX = start scan line
	DX = end scan line

Note: when the software cursor is selected, the char/attribute data at the

  current screen position is ANDed with the screen mask and then XORed
  with the cursor mask

SeeAlso: AX=0009h,INT 62/AX=007Eh ———-33000B—————————– INT 33 - MS MOUSE - READ MOTION COUNTERS

AX = 000Bh

Return: CX = number of mickeys mouse moved horizontally since last call

DX = number of mickeys mouse moved vertically

Notes: a mickey is the smallest increment the mouse can sense

positive values indicate down/right

SeeAlso: AX=0003h,AX=001Bh ———-33000C—————————– INT 33 - MS MOUSE - DEFINE INTERRUPT SUBROUTINE PARAMETERS

AX = 000Ch
CX = call mask
     bit 0 call if mouse moves
     bit 1 call if left button pressed
     bit 2 call if left button released
     bit 3 call if right button pressed
     bit 4 call if right button released
     bit 5 call if middle button pressed (Mouse Systems/Logitech mouse)
     bit 6 call if middle button released (Mouse Sys/Logitech mouse)
ES:DX -> FAR routine

Notes: when the subroutine is called, it is passed the following values:

  AX = condition mask (same bit assignments as call mask)
  BX = button state
  CX = cursor column
  DX = cursor row
  SI = horizontal mickey count
  DI = vertical mickey count
some versions of the Microsoft documentation incorrectly state that CX
  bit 0 means call if mouse cursor moves, and swap the meanings of SI
  and DI

SeeAlso: AX=0018h ———-33000D—————————– INT 33 - MS MOUSE - LIGHT PEN EMULATION ON

AX = 000Dh

SeeAlso: AX=000Eh ———-33000E—————————– INT 33 - MS MOUSE - LIGHT PEN EMULATION OFF

AX = 000Eh

SeeAlso: AX=000Dh ———-33000F—————————– INT 33 - MS MOUSE - DEFINE MICKEY/PIXEL RATIO

AX = 000Fh
CX = number of mickeys per 8 pixels horizontally (default 8)
DX = number of mickeys per 8 pixels vertically (default 16)

SeeAlso: AX=0013h,AX=001Ah,INT 62/AX=0082h ———-330010—————————– INT 33 - MS MOUSE - DEFINE SCREEN REGION FOR UPDATING

AX = 0010h
CX,DX = X,Y coordinates of upper left corner
SI,DI = X,Y coordinates of lower right corner

Note: mouse cursor is hidden in the specified region, and needs to be

  explicitly turned on again

SeeAlso: AX=0001h,AX=0002h,AX=0007h,AX=0010h“Genius MOUSE” ———-330010—————————– INT 33 - Genius MOUSE - DEFINE SCREEN REGION FOR UPDATING

AX = 0010h
ES:DX -> update region list (see below)

Notes: mouse cursor is hidden in the specified region, and needs to be

  explicitly turned on again
this version of the call is described in an August 1988 version of the
  Genius Mouse programmer's reference; it has presumably been changed
  to conform to the Microsoft version shown above

SeeAlso: AX=0001h,AX=0002h,AX=0007h,AX=0010h“MS MOUSE”

Format of update region list: Offset Size Description 00h WORD left-most column 02h WORD top-most row 04h WORD right-most column 06h WORD bottom-most row ———-330012—————————– INT 33 - MS MOUSE - SET LARGE GRAPHICS CURSOR BLOCK

AX = 0012h
BH = cursor width in words
CH = rows in cursor
BL = horizontal hot spot (-16 to 16)
CL = vertical hot spot (-16 to 16)
ES:DX -> bit map of screen and cursor maps

Return: AX = FFFFh if successful SeeAlso: AX=0009h ———-330013—————————– INT 33 - MS MOUSE - DEFINE DOUBLE-SPEED THRESHOLD

AX = 0013h
DX = threshold speed in mickeys/second, 0000h = default of 64/second

Note: if speed exceeds threshold, the cursor's on-screen motion is doubled SeeAlso: AX=000Fh,AX=001Bh,AX=002Ch ———-330014—————————– INT 33 - MS MOUSE - EXCHANGE INTERRUPT SUBROUTINES

AX = 0014h
CX = call mask (see AX=000Ch)
ES:DX -> FAR routine 

Return: CX = call mask of previous interrupt routine

ES:DX = FAR address of previous interrupt routine

SeeAlso: AX=0018h ———-330015—————————– INT 33 - MS MOUSE - RETURN DRIVER STORAGE REQUIREMENTS

AX = 0015h

Return: BX = size of buffer needed to store driver state SeeAlso: AX=0016h,AX=0017h,AX=0042h ———-330016—————————– INT 33 - MS MOUSE - SAVE DRIVER STATE

AX = 0016h
BX = size of buffer (see AX=0015h)
ES:DX -> buffer for driver state

Note: although not documented, many drivers appear to require BX on input SeeAlso: AX=0015h,AX=0017h ———-330017—————————– INT 33 - MS MOUSE - RESTORE DRIVER STATE

AX = 0017h
BX = size of buffer (see AX=0015h)
ES:DX -> buffer containing saved state

Notes: although not documented, many drivers appear to require BX on input

some mouse drivers range-check the values in the saved state based on
  the current video mode; thus, the video mode should be restored
  before the mouse driver's state is restored

SeeAlso: AX=0015h,AX=0016h ———-330018—————————– INT 33 - MS MOUSE - SET ALTERNATE MOUSE USER HANDLER

AX = 0018h
CX = call mask
     bit 0 call if alt key pressed during event
     bit 1 call if ctrl key pressed during event
     bit 2 call if shift button pressed during event
     bit 3 call if right button released
     bit 4 call if right button pressed
     bit 5 call if left button released
     bit 6 call if left button pressed
     bit 7 call if mouse moves
ES:DX = address of FAR routine

Return: AX = 0018h if successful

   = FFFFh on error

Notes: when the subroutine is called, it is passed the following values:

  AX = condition mask (same bit assignments as call mask)
  BX = button state
  CX = cursor column
  DX = cursor row
  DI = horizontal mickey count
  SI = vertical mickey count
up to three handlers can be defined by separate calls to this function

SeeAlso: AX=0014h,AX=0019h ———-330019—————————– INT 33 - MS MOUSE - RETURN USER ALTERNATE INTERRUPT VECTOR

AX = 0019h
CX = call mask

Return: BX:DX = user interrupt vector

CX = call mask (0 if not found)

Note: attempts to find a user event handler (defined by function 18h)

  whose call mask matches CX

SeeAlso: AX=0018h ———-33001A—————————– INT 33 - MS MOUSE - SET MOUSE SENSITIVITY

AX = 001Ah
BX = horizontal speed \
CX = vertical speed   / (see AX=000Fh)
DX = double speed threshold (see AX=0013h)

SeeAlso: AX=0013h,AX=001Bh,INT 62/AX=0082h ———-33001B—————————– INT 33 - MS MOUSE - RETURN MOUSE SENSITIVITY

AX = 001Bh

Return: BX = horizontal speed

CX = vertical speed
DX = double speed threshold

SeeAlso: AX=000Bh,AX=001Ah ———-33001C—————————– INT 33 - MS MOUSE - SET INTERRUPT RATE

AX = 001Ch
BX = rate
    00h no interrupts allowed
    01h 30 per second
    02h 50 per second
    03h 100 per second
    04h 200 per second

Notes: only available on InPort mouse

values greater than 4 may cause unpredictable driver behavior

———-33001D—————————– INT 33 - MS MOUSE - DEFINE DISPLAY PAGE NUMBER

AX = 001Dh
BX = display page number

Note: the cursor will be displayed on the specified page SeeAlso: AX=001Eh ———-33001E—————————– INT 33 - MS MOUSE - RETURN DISPLAY PAGE NUMBER

AX = 001Eh

Return: BX = display page number SeeAlso: AX=001Dh ———-33001F—————————– INT 33 - MS MOUSE - DISABLE MOUSE DRIVER

AX = 001Fh

Return: AX = 001Fh unsuccessful

     FFFFh successful
ES:BX = vector for INT 33h before mouse driver was first installed

Note: restores vectors for Int 10h and Int 71h (8086) or Int 74h (286/386)

if you restore Int 33h to ES:BX, driver will be completely disabled

SeeAlso: AX=0020h ———-330020—————————– INT 33 - MS MOUSE - ENABLE MOUSE DRIVER

AX = 0020h

Return: AX = 0020h unsuccessful (or driver not installed)

     FFFFh successful

Note: restores vectors for Int 10h and Int 71h (8086) or Int 74h (286/386)

  which were removed by function 1Fh

SeeAlso: AX=001Fh ———-330021—————————– INT 33 - MS MOUSE - SOFTWARE RESET

AX = 0021h

Return: AX = FFFFh if mouse driver installed

     0021h if mouse driver not installed
BX = 2 if mouse driver is installed

Note: identical to funtion 00h, but does not reset the mouse SeeAlso: AX=0000h ———-330022—————————– INT 33 - MS MOUSE - SET LANGUAGE FOR MESSAGES

AX = 0022h
BX = language
    00h English
    01h French
    02h Dutch
    03h German
    04h Swedish
    05h Finnish
    06h Spanish
    07h Portugese
    08h Italian

Note: only available on international versions of the driver, US versions

  ignore this call

SeeAlso: AX=0023h ———-330023—————————– INT 33 - MS MOUSE - GET LANGUAGE FOR MESSAGES

AX = 0023h

Return: BX = language (see AX=0022h) Note: the US version of the driver always returns zero SeeAlso: AX=0022h ———-330024—————————– INT 33 - MS MOUSE v7.00+ - GET SOFTWARE VERSION AND MOUSE TYPE

AX = 0024h

Return: AX = FFFFh on error

otherwise,
    BH = major version
    BL = minor version
    CH = type (1=bus, 2=serial, 3=InPort, 4=PS/2, 5=HP)
    CL = interrupt (0=PS/2, 2=IRQ2, 3=IRQ3,...,7=IRQ7)

SeeAlso: AX=004Dh ———-330025—————————– INT 33 - MS MOUSE v8.10+ - GET ???

AX = 0025h

Return: AL = ???

BX = ???
CX = ???
DX = ???

———-330026—————————– INT 33 - MS MOUSE v8.10+ - GET ???

AX = 0026h

Return: BX = ???

CX = ???
DX = ???

Note: called by the newest Microsoft applications ———-330027—————————– INT 33 - MS MOUSE v8.10+ - GET ???

AX = 0027h

Return: AX = ???

BX = ???
CX = horizontal mickeys moved since last call
DX = vertical mickeys moved since last call

———-330028—————————– INT 33 - MS MOUSE v8.10+ - ???

AX = 0028h
CX = ???
    0000h reset to default???
    other
    	DX = ???
	Return: CL = 00h

———-330029—————————– INT 33 - MS MOUSE v8.10+ - GET SUPPORTED VIDEO MODES???

AX = 0029h
CX = last video mode???
    0000h get first
    other get next supported mode after mode CX

Return: CX = first/next video mode

ES:DX = 0000h:0000h

———-33002A—————————– INT 33 - MS MOUSE v8.10+ - GET ???

AX = 002Ah

Return: AX = ???

BX = ???
CX = ???
DX = ???

———-33002B—————————– INT 33 - MS MOUSE v8.10+ - SET ACCELERATION PROFILES

AX = 002Bh
BX = active acceleration profile (0001h-0004h or FFFFh for current)
ES:SI -> buffer containing acceleration profile data (see below)

Return: ??? SeeAlso: AX=002Ch“v8.10”,AX=002Dh,AX=0033h

Format of acceleration profile data: Offset Size Description 00h BYTE length of acceleration profile 1 01h BYTE length of acceleration profile 2 02h BYTE length of acceleration profile 3 03h BYTE length of acceleration profile 4 04h 32 BYTEs threshold speeds for acceleration profile 1 24h 32 BYTEs threshold speeds for acceleration profile 2 44h 32 BYTEs threshold speeds for acceleration profile 3 64h 32 BYTEs threshold speeds for acceleration profile 4 84h 32 BYTEs speedup factor for acceleration profile 1

	(10h = 1.0, 14h = 1.25, 20h = 2.0, etc)

A4h 32 BYTEs speedup factor for acceleration profile 2

	(10h = 1.0, 14h = 1.25, 20h = 2.0, etc)

C4h 32 BYTEs speedup factor for acceleration profile 3

	(10h = 1.0, 14h = 1.25, 20h = 2.0, etc)

E4h 32 BYTEs speedup factor for acceleration profile 4

	(10h = 1.0, 14h = 1.25, 20h = 2.0, etc)

104h 16 BYTEs name of acceleration profile 1 (blank-padded) 114h 16 BYTEs name of acceleration profile 2 (blank-padded) 124h 16 BYTEs name of acceleration profile 3 (blank-padded) 134h 16 BYTEs name of acceleration profile 4 (blank-padded) Note: unused bytes in the threshold speed fields are filled with 7Fh and

  unused bytes in the speedup factor fields are filled with 10h

———-33002C—————————– INT 33 - MS MOUSE v??? - SET ACCELERATION PROFILES

AX = 002Ch
ES:DX -> name of file containing profiles

Note: see MOUSEPRO.FIL for an example set of acceleration profiles SeeAlso: AX=0013h,AX=002Dh,AX=002Eh ———-33002C—————————– INT 33 - MS MOUSE v8.10+ - GET ACCELERATION PROFILES

AX = 002Ch

Return: AX = 0000h

BX = currently-active acceleration profile
ES:SI -> acceleration profile data (see AX=002Bh)

SeeAlso: AX=002Bh,AX=0033h ———-33002D—————————– INT 33 - MS MOUSE v8.10+ - SELECT ACCELERATION PROFILE

AX = 002Dh
BX = acceleration level (0001h to 0004h or FFFFh for current)

Return: AX = status

    0000h successful
    	ES:SI -> 16-byte blank-padded name of acceleration profile
    FFFEh invalid acceleration level
    	ES:SI destroyed
BX = active acceleration level

SeeAlso: AX=0013h,AX=002Bh,AX=002Ch,AX=002Eh ———-33002E—————————– INT 33 - MS MOUSE v8.10+ - SET ACCELERATION PROFILE NAMES

AX = 002Eh
BL = flag (if nonzero, fill ES:SI buffer with default names on return)
ES:SI -> 64-byte buffer for profile names (16 bytes per name)

Return: AX = 0000h

ES:SI buffer filled with default names if BL nonzero on entry

Note: not supported by Logitech driver v6.10 SeeAlso: AX=002Ch,AX=002Dh,AX=012Eh,AX=022Eh ———-33002F—————————– INT 33 - MS MOUSE v8.10+ - ???

AX = 002Fh
???

Return: ??? Note: invoked by mouse driver v8.20 on being called with INT 2F/AX=530Bh SeeAlso: INT 2F/AH=53h ———-330030—————————– INT 33 - MS MOUSE v8.10+ - ???

AX = 0030h
CX = ???
    0000h ???
    other ???

Return: ??? ———-330031—————————– INT 33 - MS MOUSE v8.10+ - GET ???

AX = 0031h

Return: AX = ???

BX = ???
CX = ???
DX = ???

———-330032—————————– INT 33 - MS MOUSE v8.10+ - GET ???

AX = 0032h

Return: AX = ??? (FFFFh)

BX = ??? (0000h)
CX = ??? (E000h)
DX = ??? (0000h)

———-330033—————————– INT 33 - MS MOUSE v8.10+ - GET ACCELERATION PROFILE DATA

AX = 0033h
CX = size of buffer
    0000h get required buffer size
        Return: AX = 0000h
		CX = required size (0154h for Logitech v6.10, 0159h
			for MS v8.10-8.20)
    other
    	ES:DX -> buffer of CX bytes
	Return: AX = 0000h
		ES:DX buffer filled (see below)

SeeAlso: AX=002Bh

Format of data buffer: Offset Size Description 00h 16 BYTEs ??? 10h 324 BYTEs acceleration profile data (see AX=002Bh) 154h 5 BYTEs ??? (Microsoft driver, but not Logitech) ———-330034—————————– INT 33 - MS MOUSE v8.10+ - GET INITIALIZATION FILE

AX = 0034h

Return: ES:DX → ASCIZ initialization (.INI) file name ———-330035—————————– INT 33 - MS MOUSE v8.10+ - LCD SCREEN LARGE POINTER SUPPORT

AX = 0035h
BX = function
    FFFFh get current settings
    	Return: AX = 0000h
		BH = style (see below)
		BL = size (see below)
		CH = threshold
		CL = active flag (00h disabled, 01h enabled)
		DX = delay
    other
    	BH = style (00h normal, 01h reverse, 02h transparent)
	BL = size (00h small "1", 01h medium "1.5", 02h large "2")
	CH = threshold (00h-64h)
	CL = active flag (00h disable size change, 01h enable)
	DX = delay (0000h-0064h)
	Return: AX = 0000h

Note: not supported by Logitech driver v6.10 ———-330042—————————– INT 33 - PCMOUSE - GET MSMOUSE STORAGE REQUIREMENTS

AX = 0042h

Return: AX = FFFFh successful

	BX = buffer size in bytes for functions 50h and 52h
   = 0000h MSMOUSE not installed
   = 0042h functions 42h, 50h, and 52h not supported

SeeAlso: AX=0015h,AX=0050h,AX=0052h ———-330043—————————– INT 33 - Mouse Systems MOUSE DRIVER v7.01 - CONFIGURE MOUSE???

AX = 0043h
CX:BX -> ??? buffer (see below)
DL = ???

Return: ??? Note: also calls routines for INT 33/AX=0053h and INT 33/AX=004Fh

Format of buffer: Offset Size Description 00h WORD I/O port address 02h BYTE ??? 03h BYTE interrupt number 04h BYTE interrupt mask for interrupt controller 05h 5 BYTEs ??? ———-330044CXCDEF———————– INT 33 - Mouse Systems MOUSE DRIVER v7.01 - TOGGLE ???

AX = 0044h
CX = CDEFh

Return: AX = new state of ??? SeeAlso: AX=0045h ———-330045CXCDEF———————– INT 33 - Mouse Systems MOUSE DRIVER v7.01 - TOGGLE ???

AX = 0045h
CX = CDEFh

Return: AX = new state of ??? SeeAlso: AX=0044h ———-330047—————————– INT 33 - Mouse Systems MOUSE DRIVER v7.01 - SET BUTTON ASSIGNMENTS???

AX = 0047h
ES:BX -> button assignments (3 bytes, combinations of "L", "M", "R")

Return: ??? SeeAlso: AX=0067h ———-330048BXCDEF———————– INT 33 - Mouse Systems MOUSE DRIVER v7.01 - GET ???

AX = 0048h
BX = CDEFh

Return: CX = ???

BH = ???
BL = ??? (if 50h, driver is using PS/2 pointing device BIOS interface)

——————————————— INT 33 - Z-NIX MOUSE DRIVER v7.04d - INSTALLATION CHECK

AX = 004Bh

Return: ES:DI → signature/description string if installed Note: the signature string in v7.04d is

  "Z-NIX;BUS,AUX,Serial 3-byte and 5-byte Mouse Driver;ZMOUSE;v7.04d"

———-33004CBXCDEF———————– INT 33 - Mouse Systems MOUSE DRIVER v7.01 - SET ??? FLAG

AX = 004Ch
BX = CDEFh

SeeAlso: AX=006Ch ———-33004D—————————– INT 33 - MS MOUSE, LOGITECH - RETURN POINTER TO COPYRIGHT STRING

AX = 004Dh

Return: ES:DI → copyright message “Copyright 1983 Microsoft *” Note: also supported by Kraft mouse driver SeeAlso: AX=0024h,AX=006Dh ———-33004F—————————– INT 33 - Mouse Systems MOUSE DRIVER v7.01 - ENABLE MOUSE AX = 004Fh Return: nothing SeeAlso: AX=0043h,AX=0053h ———-330050—————————– INT 33 - PCMOUSE - SAVE MSMOUSE STATE AX = 0050h BX = buffer size (ignored by some driver versions) ES:DX → buffer Return: AX = FFFFh if successful Note: the buffer must be large enough to hold the entire state, or following data will be overwritten by state data in versions which ignore BX; use INT 33/AX=0042h to get the required size SeeAlso: AX=0042h,AX=0052h ———-330052—————————– INT 33 - PCMOUSE - RESTORE MSMOUSE STATE AX = 0052h BX = buffer size (ignored by some driver versions) ES:DX → buffer Return: AX = FFFFh if successful SeeAlso: AX=0050h ———-330053—————————– INT 33 - Mouse Systems MOUSE DRIVER v7.01 - DISABLE MOUSE AX = 0053h Return: nothing SeeAlso: AX=0043h,AX=004Fh ———-330054CXCDEF———————– INT 33 - Mouse Systems MOUSE DRIVER v7.01 - ??? AX = 0054h CX = CDEFh BX = ??? (NOP if ⇐ 0000h) Return: ??? ———-330055—————————– INT 33 - Kraft Mouse - GET ??? AX = 0055h Return: CX = ??? DX = ??? ES = ??? ———-330058—————————– INT 33 - Mouse Systems MOUSE DRIVER v7.01 - ??? AX = 0058h Return: AX = CS of driver CX:BX → ??? DX = ??? ———-33005A—————————– INT 33 - Mouse Systems MOUSE DRIVER v7.01 - ??? AX = 005Ah CX = number of WORDs to copy (max 0014h, but not range-checked) DX:SI → buffer containing ??? (CX words) DX:BX → buffer containing ??? (9*14h words, only first CX of each 14h used) ??? Return: CF clear ??? ———-330061BXCDEF———————– INT 33 - Mouse Systems MOUSE DRIVER v7.01 - ??? AX = 0061h BX = CDEFh Return: CX = ??? ———-330067—————————– INT 33 - Mouse Systems MOUSE DRIVER v7.01 - GET MOUSE BUTTONS??? AX = 0067h Return: BL = number of buttons??? SeeAlso: AX=0047h ———-33006CBXCDEF———————– INT 33 - Mouse Systems MOUSE DRIVER v7.01 - ??? AX = 006Ch BX = CDEFh SeeAlso: AX=004Ch ———-33006D—————————– INT 33 - MS MOUSE, Logitech - GET VERSION STRING AX = 006Dh Return: ES:DI → Microsoft version number of resident driver Note: also supported by Mouse Systems and Kraft mouse drivers SeeAlso: AX=004Dh,AX=266Ch ———-330070BXABCD———————– INT 33 - Mouse Systems MOUSE DRIVER - POPUP.COM - INSTALLATION CHECK AX = 0070h BX = ABCDh Return: AX = ABCDh if installed BX:CX → data structure (see below) Notes: the v7.01 POPUP.COM and menu drivers also check for the signature CDh ABh BAh DCh at offset -2Ch from the interrupt handler if POPUP is not loaded, the returned data structure contains the proper signature at offset 00h, but not at offset 08h Format of data structure: Offset Size Description 00h WORD signature ABCDh 02h DWORD pointer to info structure??? 06h 2 BYTEs ??? 08h WORD signature ABCDh Format of info structure: Offset Size Description 00h WORD driver version 02h 8 BYTEs ??? 0Ah WORD segment of ??? ??? ———-330072BXABCD———————– INT 33 - Mouse Systems MOUSE DRIVER v7.01 - ??? AX = 0072h BX = ABCDh Return: ??? ———-330073BXCDEF———————– INT 33 - Mouse Systems MOUSE DRIVER v7.01 - GET BUTTON ASSIGNMENTS??? AX = 0073h BX = CDEFh ES:DX → buffer for button assignments??? (3 bytes of data) Return: CX = number of buttons??? Note: the default return buffer is “LMR” SeeAlso: AX=0067h ———-33012E—————————– INT 33 - MS MOUSE v8.10+ - ??? AX = 012Eh BL = ??? Return: AX = 0000h Note: not supported by Logitech driver v6.10 SeeAlso: AX=002Eh,AX=022Eh ———-33022E—————————– INT 33 - MS MOUSE v8.10+ - ??? AX = 022Eh BL = ??? Return: AX = 0000h Note: not supported by Logitech driver v6.10 SeeAlso: AX=002Eh,AX=012Eh ———-33136C—————————– INT 33 - LOGITECH MOUSE v6.10+ - ??? AX = 136Ch BX = ??? Return: AX = ??? BX = ??? ———-33146C—————————– INT 33 - LOGITECH MOUSE v6.10+ - GET/SET ??? AX = 146Ch BL = function 00h set ??? BH = new value (zero/nonzero to clear/set) else get ??? Return: ??? ———-33156C—————————– INT 33 - LOGITECH MOUSE v6.10+ - GET SIGNATURE AND VERSION STRINGS AX = 156Ch Return: ES:DI → signature “LOGITECH MOUSE DRIVER” ES:SI → version string, terminated with CRLF ———-33166C—————————– INT 33 - LOGITECH MOUSE v6.10+ - ??? AX = 166Ch BL = ??? 00h ??? 01h ??? other ??? BH = new value of ??? Return: AX = FFFFh ———-33176C—————————– INT 33 - LOGITECH MOUSE v6.10+ - ??? AX = 176Ch ??? Return: ??? ———-33186C—————————– INT 33 - LOGITECH MOUSE v6.10+ - ??? AX = 186Ch ??? Return: ??? ———-33196C—————————– INT 33 - LOGITECH MOUSE v6.10+ - ??? AX = 196Ch ??? Return: ??? ———-331A6C—————————– INT 33 - LOGITECH MOUSE v6.10+ - GET ??? AX = 1A6Ch Return: AX = FFFFh BX = ??? CX = ??? SeeAlso: AX=1B6Ch ———-331B6C—————————– INT 33 - LOGITECH MOUSE v6.10+ - SET ??? AX = 1B6Ch BX = new value for ??? (0000h-0003h) Return: AX = FFFFh SeeAlso: AX=1A6Ch ———-331C6C—————————– INT 33 - LOGITECH MOUSE v6.10+ - ??? AX = 1C6Ch BX = ??? <42h ??? =42h ??? >42h ??? ES:DI → ??? Return: AX = ??? ———-331D6C—————————– INT 33 - LOGITECH MOUSE - GET COMPASS PARAMETER AX = 1D6Ch Return: BX = direction (0=north, 1=south, 2=east, 3=west) SeeAlso: AX=1E6Ch ———-331E6C—————————– INT 33 - LOGITECH MOUSE - SET COMPASS PARAMETER AX = 1E6Ch BX = direction (0=north, 1=south, 2=east, 3=west) SeeAlso: AX=1D6Ch ———-331F6C—————————– INT 33 - LOGITECH MOUSE - GET BALLISTICS INFORMATION AX = 1F6Ch Return: BX = 0=off, 1=on CX = 1=low, 2=high SeeAlso: AX=002Ch,AX=236Ch ———-33206C—————————– INT 33 - LOGITECH MOUSE - SET LEFT OR RIGHT PARAMETER AX = 206Ch BX = parameter (00h = right, FFh = left) SeeAlso: AX=216Ch ———-33216C—————————– INT 33 - LOGITECH MOUSE - GET LEFT OR RIGHT PARAMETER AX = 216Ch Return: BX = parameter (00h = right, FFh = left) SeeAlso: AX=206Ch ———-33226C—————————– INT 33 - LOGITECH MOUSE - REMOVE DRIVER FROM MEMORY AX = 226Ch Note: this only frees memory; does not restore hooked interrupts ———-33236C—————————– INT 33 - LOGITECH MOUSE - SET BALLISTICS INFORMATION AX = 236Ch BX = 0=off, 1=on CX = 1=low, 2=high SeeAlso: AX=002Ch,AX=1F6Ch ———-33246C—————————– INT 33 - LOGITECH MOUSE - GET PARAMETERS AND RESET SERIAL MOUSE AX = 246Ch ES:DX → parameter table buffer (see below) Return: AX = FFFFh if driver installed for serial mouse SeeAlso: AX=0000h,AX=256Ch Format of parameter table: Offset Size Description 00h WORD baud rate divided by 100 (serial mouse only) 02h WORD emulation (serial mouse only) 04h WORD report rate (serial mouse only) 06h WORD firmware revision (serial mouse only) 08h WORD 0 (serial mouse only) 0Ah WORD port (serial mouse only) 0Ch WORD physical buttons 0Eh WORD logical buttons ———-33256CBX00h ———————– INT 33 - LOGITECH MOUSE - SET PARAMETERS AX = 256Ch BX = 00h set baud rate (serial mouse only) CX = rate (0=1200, 1=2400, 2=4800, 3=9600) = 01h set emulation (serial mouse only) CX = emulation 0 = 5 byte packed binary 1 = 3 byte packed binary 2 = hexadecimal 3 = relative bit pad 4 = not supported 5 = MM Series 6 = not supported 7 = Microsoft = 02h set report rate (serial mouse only) CX = rate (0=10, 1=20, 2=35, 3=50, 4=70, 5=100, 6=150) = 03h set port (serial mouse only) CX = port (1, 2) = 04h set mouse logical buttons CX = buttons (2, 3) Return: AX = FFFFh if driver installed for serial mouse SeeAlso: AX=246Ch,AX=276Ch ———-33266C—————————– INT 33 - LOGITECH MOUSE - GET VERSION??? AX = 266Ch Return: BX = 'SS' CH = '4' major version number CL = '1' minor version number SeeAlso: AX=006Dh ———-33276C—————————– INT 33 - LOGITECH MOUSE - ??? Tries MMSeries, Baud 2400 AX = 276Ch SeeAlso: AX=256Ch ———-333000—————————– INT 33 - Smooth Mouse Driver, PrecisePoint - INSTALLATION CHECK AX = 3000h Return: AX = FFFFh if installed BX = version number (BH = major, BL = minor) Program: SMD is a programmer's library by Andy Hakim which provides a graphics-style mouse cursor in text mode. PrecisePoint is an SMD-based TSR which replaces the block mouse cursor in text applications. SeeAlso: AX=0000h,AX=3001h,AX=3003h ———-333001—————————– INT 33 - Smooth Mouse Driver, PrecisePoint - ENABLE SMOOTH MOUSE AX = 3001h Return: AX = status (0000h = disabled, 0001h = enabled) Note: SMD remains disabled if running under Desqview or in graphics mode SeeAlso: AX=0001h,AX=0002h,AX=3002h ———-333001—————————– INT 33 - Smooth Mouse Driver, PrecisePoint - DISABLE SMOOTH MOUSE AX = 3002h Return: AX = status (0000h = disabled, 0001h = enabled) SeeAlso: AX=0001h,AX=0002h,AX=3000h,AX=3001h ———-333003—————————– INT 33 - Smooth Mouse Driver, PrecisePoint - GET INFORMATION AX = 3003h BL = data structure selector 00h Primary Bitmap (used for 25 line mode) 01h Secondary Bitmap (used for 43/50 line modes) 02h Sacrifice Character Map 03h Program Information Return: ES:DI → selected data structure SeeAlso: AX=3000h Format of Primary/Secondary Bitmap [SMD_BITMAP_STRUCT] Offset Size Description 00h BYTE vertical size of bitmap (00h - 10h) 01h BYTE horizontal size of bitmap (00h - 10h) 02h BYTE vertical hotspot position (00h - 10h) 03h BYTE horizontal hotspot position (00h - 10h) 04h 16 WORDs cursor bitmap data 14h 16 WORDs screen bitmap data Format of Sacrifice Character Map [SMD_SMAP_STRUCT] Offset Size Description 00h BYTE bytes are character values (00h-FFh) used in place of the 01h BYTE actual character for the corresponding position on the screen 02h BYTE +————–+ occupied by part or all of the mouse 03h BYTE | 0h | 1h | 2h | cursor 04h BYTE |—-+—-+—-| 05h BYTE | 3h | 4h | 5h | 06h BYTE |—-+—-+—-| 07h BYTE | 6h | 7h | 8h | 08h BYTE +————–+ Format of Program Information [SMD_INFO_STRUCT] Offset Size Description 00h WORD segment of old interrupt 33h handler 02h WORD offset of old interrupt 33h handler 04h WORD PSP of SMD 06h BYTE ENABLE/DISABLE manual setting status 07h BYTE ENABLE/DISABLE internal usage status ———-333004—————————– INT 33 - Smooth Mouse Driver, PrecisePoint - RESERVED FUTURE EXPANSION AX = 3004 SeeAlso: AX=3000h ———-333005—————————– INT 33 - Smooth Mouse Driver, PrecisePoint - RESERVED FUTURE EXPANSION AX = 3005 SeeAlso: AX=3000h ———-334F00—————————– INT 33 - LOGITECH MOUSE v6.10+ - GET ??? AX = 4F00h Return: AX = 004Fh if supported BX = ??? ES:DI → ??? SeeAlso: AX=4F01h ———-334F01—————————– INT 33 - LOGITECH MOUSE v6.10+ - ??? AX = 4F01h ES = ??? Return: AX = 004Fh if supported ES:DI → ??? SeeAlso: AX=4F00h ———-34——————————— INT 34 - FLOATING POINT EMULATION - OPCODE D8h Note: the floating-point emulators in Borland and Microsoft languages and Lahey FORTRAN use this interrupt SeeAlso: INT 35,INT 3E ———-35——————————— INT 35 - FLOATING POINT EMULATION - OPCODE D9h Note: the floating-point emulators in Borland and Microsoft languages and Lahey FORTRAN use this interrupt SeeAlso: INT 34,INT 36 ———-36——————————— INT 36 - FLOATING POINT EMULATION - OPCODE DAh Note: the floating-point emulators in Borland and Microsoft languages and Lahey FORTRAN use this interrupt SeeAlso: INT 35,INT 37 ———-37——————————— INT 37 - FLOATING POINT EMULATION - OPCODE DBh Note: the floating-point emulators in Borland and Microsoft languages and Lahey FORTRAN use this interrupt SeeAlso: INT 36,INT 38 ———-38——————————— INT 38 - FLOATING POINT EMULATION - OPCODE DCh Note: the floating-point emulators in Borland and Microsoft languages and Lahey FORTRAN use this interrupt SeeAlso: INT 37,INT 39 ———-39——————————— INT 39 - FLOATING POINT EMULATION - OPCODE DDh Note: the floating-point emulators in Borland and Microsoft languages and Lahey FORTRAN use this interrupt SeeAlso: INT 38,INT 3A ———-3A——————————— INT 3A - FLOATING POINT EMULATION - OPCODE DEh Note: the floating-point emulators in Borland and Microsoft languages and Lahey FORTRAN use this interrupt SeeAlso: INT 39,INT 3B ———-3B——————————— INT 3B - FLOATING POINT EMULATION - OPCODE DFh Note: the floating-point emulators in Borland and Microsoft languages and Lahey FORTRAN use this interrupt SeeAlso: INT 3A,INT 3C ———-3C——————————— INT 3C - FLOATING POINT EMULATION - INSTRUCTIONS WITH SEGMENT OVERRIDE Notes: the floating-point emulators in Borland and Microsoft languages and Lahey FORTRAN use this interrupt the generated code is CD 3C xy mm …. where xy is a modified ESC instruction and mm is the modR/M byte. The xy byte appears to be encoded as s s 0 1 1 x x x or s s 0 0 0 x x x where “ss” specifies the segment override: 00 → DS: 01 → SS: 10 → CS: 11 → ES: SeeAlso: INT 3B,INT 3D ———-3D——————————— INT 3D - FLOATING POINT EMULATION - STANDALONE FWAIT Note: the floating-point emulators in Borland and Microsoft languages use this interrupt SeeAlso: INT 3C,INT 3E ———-3E——————————— INT 3E - FLOATING POINT EMULATION - Borland LANGUAGES “SHORTCUT” CALL Note: the two bytes following the INT 3E instruction are the subcode and a NOP (90h), except for subcodes DCh and DEh, where the second byte is a register count (01h-08h) SeeAlso: INT 3D Subcode Function DCh load 8086 stack with 8087 registers; overwrites the 10*N bytes at the top of the stack prior to the INT 3E with the 8087 register contents DEh load 8087 registers from top of 8086 stack; ST0 is furthest from top of 8086 stack E0h round TOS and R1 to single precision, compare, pop twice returns AX=8087 status word, FLAGS=8087 condition bits E2h round TOS and R1 to double precision, compare, pop twice returns AX=8087 status word, FLAGS=8087 condition bits Note: buggy in TPas5.5, because it sets the 8087 precision control field to the undocumented value 01h; this results in actually rounding to single precision E4h compare TOS/R1 with two POP's returns FLAGS=8087 condition bits E6h compare TOS/R1 with POP returns FLAGS=8087 condition bits E8h FTST (check TOS value) returns FLAGS=8087 condition bits EAh FXAM (check TOS value) returns AX=8087 status word ECh sine(ST0) EEh cosine(ST0) F0h tangent(ST0) F2h arctangent(ST0) F4h ST0 = ln(ST0) F6h ST0 = log2(ST0) F8h ST0 = log10(ST0) FAh ST0 = eST0 FCh ST0 = 2ST0 FEh ST0 = 10ST0 ———-3F——————————— INT 3F - Overlay manager interrupt (Microsoft LINK.EXE, Borland TLINK VROOMM) Note: INT 3F is the default, and may be overridden while linking SeeAlso: INT FE“OVERLAY” ———-3F——————————— INT 3F - Microsoft Dynamic Link Library manager SeeAlso: INT 21/AH=4Bh


Interrupt List, part 6 of 7 This compilation is Copyright © 1989,1990,1991,1992 Ralf Brown ———-40——————————— INT 40 - DISKETTE - ROM BIOS DISKETTE HANDLER RELOCATED BY HARD DISK BIOS SeeAlso: INT 13,INT 63 ———-40——————————— INT 40 - Z100 - Master 8259 - Parity error or S100 error SeeAlso: INT 41“Z100”,INT FF“Z100”