Author: hbelusca
Date: Sun Sep 28 22:35:05 2014
New Revision: 64383
URL: http://svn.reactos.org/svn/reactos?rev=64383&view=rev
Log:
[NTVDM]: Use the 0xCC (int 3) instruction as the memory fill byte.
Modified:
trunk/reactos/subsystems/ntvdm/emulator.c
Modified: trunk/reactos/subsystems/ntvdm/emulator.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/ntvdm/emulator.…
==============================================================================
--- trunk/reactos/subsystems/ntvdm/emulator.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/ntvdm/emulator.c [iso-8859-1] Sun Sep 28 22:35:05 2014
@@ -549,8 +549,12 @@
wprintf(L"FATAL: Failed to allocate VDM memory.\n");
return FALSE;
}
- // For diagnostics purposes!!
- RtlFillMemory(BaseAddress, MAX_ADDRESS, 0xFF);
+ /*
+ * For diagnostics purposes, we fill the memory with INT 0x03 codes
+ * so that if a program wants to execute random code in memory, we can
+ * retrieve the exact CS:IP where the problem happens.
+ */
+ RtlFillMemory(BaseAddress, MAX_ADDRESS, 0xCC);
/* Initialize I/O ports */
/* Initialize RAM */
Author: hbelusca
Date: Sun Sep 28 21:48:46 2014
New Revision: 64381
URL: http://svn.reactos.org/svn/reactos?rev=64381&view=rev
Log:
[NTVDM]: We do not have an Extended BIOS Data Area yet. Make INT 15h, C1h report correctly this fact.
Modified:
trunk/reactos/subsystems/ntvdm/bios/bios32/bios32.c
Modified: trunk/reactos/subsystems/ntvdm/bios/bios32/bios32.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/ntvdm/bios/bios…
==============================================================================
--- trunk/reactos/subsystems/ntvdm/bios/bios32/bios32.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/ntvdm/bios/bios32/bios32.c [iso-8859-1] Sun Sep 28 21:48:46 2014
@@ -240,10 +240,22 @@
break;
}
+ /* Return Extended-Bios Data-Area Segment Address (PS) */
case 0xC1:
+ {
+ // Stack[STACK_FLAGS] &= ~EMULATOR_FLAG_CF;
+ // setES(???);
+
+ /* We do not support EBDA yet */
+ Stack[STACK_FLAGS] |= EMULATOR_FLAG_CF;
+
+ break;
+ }
+
+ /* Pointing Device BIOS Interface (PS) */
case 0xC2:
{
- DPRINT1("INT 15h, AH = 0x%02X must be implemented in order to support vendor mouse drivers\n");
+ DPRINT1("INT 15h, AH = C2h must be implemented in order to support vendor mouse drivers\n");
break;
}