From 6910b58618b53e8d949cf6c450220605613d310c Mon Sep 17 00:00:00 2001 From: Ulf Wohlers Date: Sun, 20 Apr 2003 12:12:43 +0000 Subject: [PATCH] Added XMS_GetSize Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@950 --- src/ints/xms.cpp | 8 ++++++-- src/ints/xms.h | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/ints/xms.cpp b/src/ints/xms.cpp index 0714b209..4f8ffdf8 100644 --- a/src/ints/xms.cpp +++ b/src/ints/xms.cpp @@ -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