[NTVDM]
[reactos.git] / reactos / subsystems / mvdm / ntvdm / dos / dos32krnl / himem.h
1 /*
2 * COPYRIGHT: GPLv2+ - See COPYING in the top level directory
3 * PROJECT: ReactOS Virtual DOS Machine
4 * FILE: himem.h
5 * PURPOSE: DOS XMS Driver
6 * PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
7 */
8
9 /* DEFINITIONS ****************************************************************/
10
11 #define XMS_ADDRESS 0x110000
12 #define XMS_BLOCKS 0x37C0
13 #define XMS_BLOCK_SIZE 1024
14 #define XMS_MAX_HANDLES 16
15
16 #define XMS_STATUS_SUCCESS 0x00
17 #define XMS_STATUS_NOT_IMPLEMENTED 0x80
18 #define XMS_STATUS_A20_ERROR 0x82
19 #define XMS_STATUS_HMA_IN_USE 0x91
20 #define XMS_STATUS_OUT_OF_MEMORY 0xA0
21 #define XMS_STATUS_OUT_OF_HANDLES 0xA1
22 #define XMS_STATUS_INVALID_HANDLE 0xA2
23 #define XMS_STATUS_NOT_LOCKED 0xAA
24 #define XMS_STATUS_LOCKED 0xAB
25 #define XMS_STATUS_LOCK_OVERFLOW 0xAC
26 #define XMS_STATUS_CANNOT_LOCK 0xAD
27
28 typedef struct _XMS_HANDLE
29 {
30 BYTE Handle;
31 BYTE LockCount;
32 WORD Size;
33 DWORD Address;
34 } XMS_HANDLE, *PXMS_HANDLE;
35
36 /* FUNCTIONS ******************************************************************/
37
38 BOOLEAN XmsGetDriverEntry(PDWORD Pointer);
39 VOID XmsInitialize(VOID);
40 VOID XmsCleanup(VOID);