-
Notifications
You must be signed in to change notification settings - Fork 1
/
xmsapi.h
64 lines (51 loc) · 1.21 KB
/
xmsapi.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef __XMSAPI_H_
#define __XMSAPI_H_
#define XMM_TAG 0x01020304
typedef struct _xms_handle
{
unsigned long TAG; // XMM TAG
unsigned long addr; // LINEAR ADDRESS on 32bit
unsigned long size; // size in bytes
unsigned int Flags;
unsigned int LockCount;
} far* HANDLE;
extern int xms_errno; // latest XMS error
/** XMSReady return XMS driver status => 0 ok. 1 error */
int XMSReady();
// declared in xmm386.asm
extern "C" void switch32();
/** XMM_Control entry routine */
void XMM_Control();
typedef enum xms_error
{
ERR_NOERROR = 0x00,
ERR_NOTIMPLEMENTED = 0x80,
ERR_VDISKFOUND = 0x81,
ERR_A20 = 0x82,
ERR_GENERAL = 0x8e,
ERR_UNRECOVERABLE = 0x8f,
ERR_HMANOTEXIST = 0x90,
ERR_HMAINUSE = 0x91,
ERR_HMAMINSIZE = 0x92,
ERR_HMANOTALLOCED = 0x93,
ERR_OUTOFMEMORY = 0xa0,
ERR_OUTOFHANDLES = 0xa1,
ERR_INVALIDHANDLE = 0xa2,
ERR_SHINVALID = 0xa3,
ERR_SOINVALID = 0xa4,
ERR_DHINVALID = 0xa5,
ERR_DOINVALID = 0xa6,
ERR_LENINVALID = 0xa7,
ERR_OVERLAP = 0xa8,
ERR_PARITY = 0xa9,
ERR_EMBUNLOCKED = 0xaa,
ERR_EMBLOCKED = 0xab,
ERR_LOCKOVERFLOW = 0xac,
ERR_LOCKFAIL = 0xad,
ERR_UMBSIZETOOBIG = 0xb0,
ERR_NOUMBS = 0xb1,
ERR_INVALIDUMB = 0xb2
};
#define XMS_VERSION 0x0200
#define HIMEM_VERSION 0x0203
#endif