Author: aandrejevic
Date: Mon Nov 11 04:00:10 2013
New Revision: 60938
URL:
http://svn.reactos.org/svn/reactos?rev=60938&view=rev
Log:
[NTVDM]
Implement the miscellaneous BIOS system service (INT 15h) handler.
Implement INT 15h, AH = 88h, "Get Extended Memory Size".
Modified:
branches/ntvdm/subsystems/ntvdm/bios.c
branches/ntvdm/subsystems/ntvdm/bios.h
Modified: branches/ntvdm/subsystems/ntvdm/bios.c
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/bios.c?r…
==============================================================================
--- branches/ntvdm/subsystems/ntvdm/bios.c [iso-8859-1] (original)
+++ branches/ntvdm/subsystems/ntvdm/bios.c [iso-8859-1] Mon Nov 11 04:00:10 2013
@@ -481,6 +481,7 @@
RegisterInt32(BIOS_VIDEO_INTERRUPT , BiosVideoService );
RegisterInt32(BIOS_EQUIPMENT_INTERRUPT, BiosEquipmentService );
RegisterInt32(BIOS_MEMORY_SIZE , BiosGetMemorySize );
+ RegisterInt32(BIOS_MISC_INTERRUPT , BiosMiscService );
RegisterInt32(BIOS_KBD_INTERRUPT , BiosKeyboardService );
RegisterInt32(BIOS_TIME_INTERRUPT , BiosTimeService );
RegisterInt32(BIOS_SYS_TIMER_INTERRUPT, BiosSystemTimerInterrupt);
@@ -1174,6 +1175,30 @@
{
/* Return the conventional memory size in kB, typically 640 kB */
setAX(Bda->MemorySize);
+}
+
+VOID WINAPI BiosMiscService(LPWORD Stack)
+{
+ switch (getAH())
+ {
+ /* Get Extended Memory Size */
+ case 0x88:
+ {
+ /* Return the number of KB of RAM after 1 MB */
+ setAX((MAX_ADDRESS - 0x100000) / 1024);
+
+ /* Clear CF */
+ Stack[STACK_FLAGS] &= ~EMULATOR_FLAG_CF;
+
+ break;
+ }
+
+ default:
+ {
+ DPRINT1("BIOS Function INT 15h, AH = 0x%02X NOT IMPLEMENTED\n",
+ getAH());
+ }
+ }
}
VOID WINAPI BiosKeyboardService(LPWORD Stack)
Modified: branches/ntvdm/subsystems/ntvdm/bios.h
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/bios.h?r…
==============================================================================
--- branches/ntvdm/subsystems/ntvdm/bios.h [iso-8859-1] (original)
+++ branches/ntvdm/subsystems/ntvdm/bios.h [iso-8859-1] Mon Nov 11 04:00:10 2013
@@ -27,6 +27,7 @@
#define BIOS_VIDEO_INTERRUPT 0x10
#define BIOS_EQUIPMENT_INTERRUPT 0x11
#define BIOS_MEMORY_SIZE 0x12
+#define BIOS_MISC_INTERRUPT 0x15
#define BIOS_KBD_INTERRUPT 0x16
#define BIOS_TIME_INTERRUPT 0x1A
#define BIOS_SYS_TIMER_INTERRUPT 0x1C
@@ -171,6 +172,7 @@
VOID WINAPI BiosVideoService(LPWORD Stack);
VOID WINAPI BiosEquipmentService(LPWORD Stack);
VOID WINAPI BiosGetMemorySize(LPWORD Stack);
+VOID WINAPI BiosMiscService(LPWORD Stack);
VOID WINAPI BiosKeyboardService(LPWORD Stack);
VOID WINAPI BiosTimeService(LPWORD Stack);
VOID WINAPI BiosSystemTimerInterrupt(LPWORD Stack);