56#include "../../memory.h"
62#define XMS_DEVICE_NAME "XMSXXXX0"
183 return (HandleEntry !=
NULL && HandleEntry->
Handle != 0);
189 DWORD CurrentIndex = 0;
196 if (RunSize == 0)
break;
202 CurrentIndex = RunStart + RunSize;
212 DWORD CurrentIndex = 0;
221 if (HandleEntry->
Handle == 0)
240 if (RunSize == 0)
break;
254 if (RunSize == 0)
break;
256 if (RunSize >= HandleEntry->
Size)
271 CurrentIndex = RunStart + RunSize;
281 DWORD CurrentIndex = 0;
294 if (NewSize < HandleEntry->
Size)
305 BlockNumber + HandleEntry->
Size,
310 BlockNumber + HandleEntry->
Size,
326 if (RunSize == 0)
break;
349 CurrentIndex = RunStart + RunSize;
484 if (
getAX() != 0x0001)
507 if (
getAX() != 0x0001)
781 DPRINT1(
"XMS command AH = 0x%02X NOT IMPLEMENTED\n",
getAH());
VOID RegisterBop(BYTE BopCode, EMULATOR_BOP_PROC BopHandler)
#define REAL_TO_PHYS(ptr)
#define SEG_OFF_TO_PTR(seg, off)
_Must_inspect_result_ _In_ USHORT NewSize
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static VOID WINAPI XmsBopProcedure(LPWORD Stack)
static WORD XmsGetLargestFreeBlock(VOID)
static const BYTE EntryProcedure[]
static UCHAR XmsLock(WORD Handle, PDWORD Address)
static UCHAR XmsFree(WORD Handle)
BOOLEAN XmsGetDriverEntry(PDWORD Pointer)
static UCHAR XmsRealloc(WORD Handle, WORD NewSize)
static UCHAR XmsAlloc(WORD Size, PWORD Handle)
static BOOLEAN IsHmaReserved
static PXMS_HANDLE GetXmsHandleRecord(WORD Handle)
static BOOLEAN IsA20Enabled
static LONG A20EnableCount
static RTL_BITMAP AllocBitmap
static VOID XmsLocalEnableA20(VOID)
static ULONG BitmapBuffer[(XMS_BLOCKS+31)/32]
static UCHAR XmsUnlock(WORD Handle)
static XMS_HANDLE HandleTable[XMS_MAX_HANDLES]
static BOOLEAN ValidateXmsHandle(PXMS_HANDLE HandleEntry)
static BOOLEAN CanChangeA20
static VOID XmsLocalDisableA20(VOID)
#define XMS_STATUS_LOCK_OVERFLOW
#define XMS_STATUS_BAD_SRC_HANDLE
#define XMS_STATUS_A20_STILL_ENABLED
#define XMS_STATUS_BAD_SRC_OFFSET
struct _XMS_COPY_DATA * PXMS_COPY_DATA
#define XMS_STATUS_SMALLER_UMB
#define XMS_STATUS_BAD_DEST_HANDLE
#define XMS_STATUS_HMA_IN_USE
#define XMS_STATUS_A20_ERROR
#define XMS_STATUS_INVALID_UMB
#define XMS_STATUS_HMA_MIN_SIZE
#define XMS_STATUS_OUT_OF_UMBS
#define XMS_STATUS_HMA_NOT_ALLOCATED
#define XMS_STATUS_BAD_DEST_OFFSET
#define XMS_STATUS_NOT_IMPLEMENTED
#define XMS_STATUS_INVALID_HANDLE
#define XMS_STATUS_NOT_LOCKED
#define XMS_STATUS_LOCKED
#define XMS_STATUS_OUT_OF_MEMORY
#define XMS_STATUS_SUCCESS
#define XMS_STATUS_OUT_OF_HANDLES
NTSYSAPI void WINAPI RtlInitializeBitMap(PRTL_BITMAP, PULONG, ULONG)
NTSYSAPI BOOLEAN WINAPI RtlAreBitsClear(PCRTL_BITMAP, ULONG, ULONG)
NTSYSAPI void WINAPI RtlClearBits(PRTL_BITMAP, ULONG, ULONG)
NTSYSAPI ULONG WINAPI RtlFindLastBackwardRunClear(PCRTL_BITMAP, ULONG, PULONG)
NTSYSAPI void WINAPI RtlSetBits(PRTL_BITMAP, ULONG, ULONG)
NTSYSAPI ULONG WINAPI RtlFindNextForwardRunClear(PCRTL_BITMAP, ULONG, PULONG)
base of all file and directory entries
VOID DosDeleteDevice(PDOS_DEVICE_NODE DeviceNode)
PDOS_DEVICE_NODE DosCreateDeviceEx(WORD Attributes, PCHAR DeviceName, WORD PrivateDataSize)
#define DEVICE_PRIVATE_AREA(Driver)
#define DOS_DEVATTR_IOCTL
#define DOS_DEVATTR_CHARACTER
BOOLEAN EmulatorGetA20(VOID)
VOID EmulatorSetA20(BOOLEAN Enabled)
#define RtlZeroMemory(Destination, Length)
#define RtlMoveMemory(Destination, Source, Length)
BOOLEAN UmaDescReallocate(IN USHORT Segment, IN OUT PUSHORT Size)
BOOLEAN UmaDescRelease(IN USHORT Segment)
BOOLEAN UmaDescReserve(IN OUT PUSHORT Segment, IN OUT PUSHORT Size)
VOID WINAPI setBX(USHORT)
VOID WINAPI setDX(USHORT)
USHORT WINAPI getBX(VOID)
USHORT WINAPI getDS(VOID)
USHORT WINAPI getSI(VOID)
USHORT WINAPI getDX(VOID)
USHORT WINAPI getAX(VOID)
VOID WINAPI setAX(USHORT)
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_In_ WDFREQUEST _In_ PIO_STACK_LOCATION Stack
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS SourceAddress