[NTVDM]: Implement BOP_DEBUGGER (see: "Undocumented DOS" by Schulman et al., page 267) which allows you to break into a debugger from a 16-bit app (Vampyre, it can be useful for you ;) ).

svn path=/branches/ntvdm/; revision=61282
This commit is contained in:
Hermès Bélusca-Maïto 2013-12-16 23:57:35 +00:00
parent 085fe5e31a
commit 49b672d829

View file

@ -24,6 +24,9 @@ FAST486_STATE EmulatorContext;
static BOOLEAN A20Line = FALSE;
/* BOP Identifiers */
#define BOP_DEBUGGER 0x56 // Break into the debugger from a 16-bit app
/* PRIVATE FUNCTIONS **********************************************************/
VOID WINAPI EmulatorReadMemory(PFAST486_STATE State, ULONG Address, PVOID Buffer, ULONG Size)
@ -91,6 +94,12 @@ UCHAR WINAPI EmulatorIntAcknowledge(PFAST486_STATE State)
return PicGetInterrupt();
}
VOID WINAPI EmulatorDebugBreak(LPWORD Stack)
{
DPRINT1("NTVDM: BOP_DEBUGGER\n");
DebugBreak();
}
/* PUBLIC FUNCTIONS ***********************************************************/
BOOLEAN EmulatorInitialize(VOID)
@ -113,6 +122,9 @@ BOOLEAN EmulatorInitialize(VOID)
/* Enable interrupts */
setIF(1);
/* Register the DebugBreak BOP */
RegisterBop(BOP_DEBUGGER, EmulatorDebugBreak);
return TRUE;
}