
 1. About JemmDbg

 JemmDbg is a ring 0 debugger for Jemm386/JemmEx. It's actually using DebugR,
 a variant of Debug/X. It can be used to debug JLMs or examine the state of
 the V86-monitor.


 2. Usage
 
 JemmDbg is a JLM and uses JLoad to load itself in the v86-monitor address
 context. Once JemmDbg is loaded and initialized, it will become active when
 an exception in ring 0 is detected. Alternately, one can run tool JDbgBrk,
 which emits a breakpoint instruction in ring 0, thus activating the debugger.


 3. Features & Restrictions

 - JemmDbg will ignore any exception caused in V86-mode, so it cannot be used
   to debug normal DOS software. However, the v86-monitor ( JemmEx/Jemm386 )
   will detect the presence of a kernel debugger and stop with a breakpoint
   if a "true" exception 06/0Ch/0Dh/0Eh happens in v86-mode.

 - JemmDbg does not affect protected-mode software that runs as VCPI client
   ( DOS extenders ). Those install their very own address context and IDT,
   which JemmDbg doesn't try to access or modify.

 - The Jemm386/JemmEx address context consists mostly of "free" address space;
   if the debugger tries to access memory at such addresses, page faults will
   occur. They are reported, but shouldn't do any harm to system integrity.
 
 - JLoad installs a subset of the Win9X ring 0 API, which uses interrupt 20h
   in protected-mode as a sort of dynamic link mechanism. JemmDbg is unaware
   of this API and handles Int 20h like any other software interrupt - that is,
   it might write a breakpoint instruction ( int 3 ) just behind the Int 20h.
   This should cause a GPF, since the Int 20h API expects two words as
   arguments just behind the Int 20h. So if an Int 20h is seen, one has to
   either avoid the T(race) cmd [using G(o)] or set TM 1.

 - JemmDbg uses the mode switching routines of the v86-monitor for its I/O.
   So - unlike WDeb386, for example - it isn't a "standalone" binary. It's
   possible to create a variant that doesn't switch modes for I/O, but rather
   uses a serial connection or direct access to video and keyboard ( see
   Makefile for details ).


 4. License

 JemmDbg is released under the MIT license. See license.txt for details.

 Andreas Grech
