;===========================================================================
; File: PCDPMI.INC
; Project: MUNGA
; Contents: PC DPMI equates (TASM)
;---------------------------------------------------------------------------
;   Date    Who  Modification
; --------  ---  -----------------------------------------------------------
; 01/04/95  CPB  Initial coding
;---------------------------------------------------------------------------
; Copyright (C) 1994, Virtual World Entertainment, Inc.
; All Rights reserved worldwide
; This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL
;===========================================================================

DPMIrealModeRegs STRUC
		  realEDI         dd      ?
		  realESI         dd      ?
		  realEBP         dd      ?
		  realUnused      dd      0               ;reserved, should be zero
		  realEBX         dd      ?
		  realEDX         dd      ?
		  realECX         dd      ?
		  realEAX         dd      ?
		  realStatus      dw      ?
		  realES          dw      ?
		  realDS          dw      ?
		  realFS          dw      0               ;reserved, should be zero
		  realGS          dw      0               ;reserved, should be zero
		  realIP          dw      0               ;reserved, should be zero
		  realCS          dw      0               ;reserved, should be zero
		  realSP          dw      ?
		  realSS          dw      ?
DPMIrealModeRegs ENDS

DPMI_GET_CPU_MODE MACRO         ;returns ax=0 if protected mode
		  mov     ax,1686h
		  int     2Fh
ENDM

DPMI_ALLOCATE_LDT MACRO
			mov	ax,0000h
			int	31h
ENDM

DPMI_FREE_LDT MACRO
			mov	ax,0001h
			int	31h
ENDM

DPMI_MAP_SEG_TO_DESC MACRO
			mov	ax,0002h
			int	31h
ENDM

DPMI_GET_SELECT_INC MACRO
			mov	ax,0003h
			int	31h
ENDM

DPMI_GET_SEGMENT_BASE MACRO
			mov ax,0006h
			int	31h
ENDM

DPMI_SET_SEGMENT_BASE MACRO
			mov	ax,0007h
			int	31h
ENDM

DPMI_SET_SEGMENT_LIMIT MACRO
			mov	ax,0008h
			int	31h
ENDM

DPMI_SET_DESC_RIGHTS MACRO
			mov	ax,0009h
			int	31h
ENDM

DPMI_CREATE_ALIAS_DESC MACRO
			mov	ax,000Ah
			int	31h
ENDM

DPMI_GET_DESC MACRO
			mov	ax,000Bh
			int	31h
ENDM

DPMI_SET_DESC MACRO
			mov	ax,000Ch
			int	31h
ENDM

DPMI_GET_REAL_VECTOR MACRO
			mov	ax,0200h
			int	31h
ENDM

DPMI_SET_REAL_VECTOR MACRO
			mov	ax,0201h
			int	31h
ENDM

DPMI_GET_EXCEPT_VECTOR MACRO
			mov	ax,0202h
			int	31h
ENDM

DPMI_SET_EXCEPT_VECTOR MACRO
			mov	ax,0203h
			int	31h
ENDM

DPMI_GET_PROT_VECTOR MACRO
			mov	ax,0204h
			int	31h
ENDM

DPMI_SET_PROT_VECTOR MACRO
			mov	ax,0205h
			int	31h
ENDM

DPMI_SIMULATE_REAL_INT MACRO
			mov	ax,0300h
			int	31h
ENDM

DPMI_CALL_REAL_FAR MACRO
			mov	ax,0301h
			int	31h
ENDM

DPMI_CALL_REAL_IRET MACRO
			mov	ax,0302h
			int	31h
ENDM

DPMI_ALLOC_REAL_CALLBK MACRO
			mov	ax,0303h
			int	31h
ENDM

DPMI_FREE_REAL_CALLBK MACRO
			mov	ax,0304h
			int	31h
ENDM

DPMI_GET_STATE_SRADDR MACRO
			mov	ax,0305h
			int	31h
ENDM

DPMI_GET_RAW_MODE_SW MACRO
			mov	ax,0306h
			int	31h
ENDM

DPMI_GET_DPMI_VERSION MACRO
			mov	ax,0400h
			int	31h
ENDM

DPMI_BAD_VERSION	equ	0400h

DPMI_DISABLE_INT MACRO
			mov	ax,0900h
			int	31h
ENDM

DPMI_ENABLE_INT MACRO
			mov	ax,0901h
			int	31h
ENDM

DPMI_DISABLE_SAVE_INT MACRO
			mov	ax,0900h
			int	31h
			push	ax
ENDM
DPMI_RESTORE_PREV_INT MACRO
			pop	ax
			int	31h
ENDM

DPMI_INT_STATE MACRO
			mov	ax,0902h
			int	31h
ENDM


