Author: hbelusca Date: Mon Dec 16 23:57:35 2013 New Revision: 61282
URL: http://svn.reactos.org/svn/reactos?rev=61282&view=rev Log: [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 ;) ).
Modified: branches/ntvdm/subsystems/ntvdm/emulator.c
Modified: branches/ntvdm/subsystems/ntvdm/emulator.c URL: http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/emulator.... ============================================================================== --- branches/ntvdm/subsystems/ntvdm/emulator.c [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/emulator.c [iso-8859-1] Mon Dec 16 23:57:35 2013 @@ -23,6 +23,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 **********************************************************/
@@ -91,6 +94,12 @@ return PicGetInterrupt(); }
+VOID WINAPI EmulatorDebugBreak(LPWORD Stack) +{ + DPRINT1("NTVDM: BOP_DEBUGGER\n"); + DebugBreak(); +} + /* PUBLIC FUNCTIONS ***********************************************************/
BOOLEAN EmulatorInitialize(VOID) @@ -112,6 +121,9 @@
/* Enable interrupts */ setIF(1); + + /* Register the DebugBreak BOP */ + RegisterBop(BOP_DEBUGGER, EmulatorDebugBreak);
return TRUE; }