1
0
Fork 0

Added XMS_GetSize

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@950
This commit is contained in:
Ulf Wohlers 2003-04-20 12:12:43 +00:00
parent bb30f7f309
commit 6910b58618
2 changed files with 9 additions and 2 deletions

View file

@ -344,6 +344,9 @@ Bitu XMS_ResizeMemory(Bitu handle, Bitu newSize)
return 0;
};
// Return size of xms mem in mb
static Bitu xms_size = 0;
Bitu XMS_GetSize(void) { return xms_size; };
static bool multiplex_xms(void) {
switch (reg_ax) {
@ -449,10 +452,11 @@ void XMS_Init(Section* sec) {
Bitu size=section->Get_int("xmssize");
if (!size) return;
if (size>C_MEM_MAX_SIZE-1) size=C_MEM_MAX_SIZE-1;
DOS_AddMultiplexHandler(multiplex_xms);
xms_size = size;
/* DOS_AddMultiplexHandler(multiplex_xms);
call_xms=CALLBACK_Allocate();
CALLBACK_Setup(call_xms,&XMS_Handler,CB_RETF);
xms_callback=CALLBACK_RealPointer(call_xms);
xms_callback=CALLBACK_RealPointer(call_xms);*/
/* Setup the handler table */
Bitu i;
for (i=0;i<XMS_HANDLES;i++) {

View file

@ -19,6 +19,9 @@
#ifndef __XMS_H__
#define __XMS_H__
// Return size of xms mem in mb
Bitu XMS_GetSize (void);
Bitu XMS_QueryFreeMemory (Bit16u& largestFree, Bit16u& totalFree);
Bitu XMS_AllocateMemory (Bitu size, Bit16u& handle);
Bitu XMS_FreeMemory (Bitu handle);