diff -u --recursive --new-file dosemu0.52//.depend dosemu0.53//.depend
--- dosemu0.52//.depend	Thu Jun 16 21:22:19 1994
+++ dosemu0.53//.depend	Sun Jun 26 23:21:40 1994
@@ -1,30 +1,30 @@
 bios_emm.o : bios_emm.c emu.h machcompat.h cpu.h 
 cmos.o : cmos.c emu.h machcompat.h cpu.h cmos.h disks.h 
-cpu.o : cpu.c config.h memory.h cpu.h termio.h emu.h machcompat.h /usr/src/dosemu0.52/include/port.h \
-  /usr/src/dosemu0.52/include/video.h dpmi/dpmi.h 
+cpu.o : cpu.c config.h memory.h cpu.h termio.h emu.h machcompat.h /home/src/dosemu0.60/include/port.h \
+  /home/src/dosemu0.60/include/video.h dpmi/dpmi.h 
 disks.o : disks.c emu.h machcompat.h cpu.h disks.h 
 dos.o : dos.c config.h 
 dosconfig.o : dosconfig.c 
-dosio.o : dosio.c memory.h emu.h machcompat.h cpu.h termio.h dosio.h /usr/src/dosemu0.52/include/mouse.h \
-  /usr/src/dosemu0.52/include/video.h 
+dosio.o : dosio.c memory.h emu.h machcompat.h cpu.h termio.h dosio.h /home/src/dosemu0.60/include/mouse.h \
+  /home/src/dosemu0.60/include/video.h 
 dyndeb.o : dyndeb.c emu.h machcompat.h cpu.h 
-emu.o : emu.c config.h memory.h emu.h machcompat.h cpu.h /usr/src/dosemu0.52/include/bios.h \
-  termio.h /usr/src/dosemu0.52/include/video.h timers.h cmos.h /usr/src/dosemu0.52/include/mouse.h \
-  dosio.h disks.h xms.h dpmi/dpmi.h /usr/src/dosemu0.52/include/ipx.h /usr/src/dosemu0.52/include/../cpu.h \
-  serial.h /usr/src/dosemu0.52/include/keymaps.h int10.h int.h 
+emu.o : emu.c config.h memory.h emu.h machcompat.h cpu.h /home/src/dosemu0.60/include/bios.h \
+  termio.h /home/src/dosemu0.60/include/video.h timers.h cmos.h /home/src/dosemu0.60/include/mouse.h \
+  dosio.h disks.h xms.h dpmi/dpmi.h /home/src/dosemu0.60/include/ipx.h /home/src/dosemu0.60/include/../cpu.h \
+  serial.h /home/src/dosemu0.60/include/keymaps.h int10.h int.h 
 keymaps.o : keymaps.c config.h 
 lpt.o : lpt.c emu.h machcompat.h cpu.h dosio.h lpt.h 
 mfs.o : mfs.c mfs.h emu.h machcompat.h cpu.h config.h memory.h 
 mutex.o : mutex.c config.h emu.h machcompat.h cpu.h mutex.h 
 prnt.o : prnt.c 
-serial.o : serial.c config.h cpu.h emu.h machcompat.h dosio.h serial.h /usr/src/dosemu0.52/include/mouse.h 
-sigsegv.o : sigsegv.c emu.h machcompat.h cpu.h /usr/src/dosemu0.52/include/bios.h \
-  /usr/src/dosemu0.52/include/mouse.h serial.h xms.h timers.h cmos.h memory.h \
-  termio.h config.h /usr/src/dosemu0.52/include/port.h /usr/src/dosemu0.52/include/ipx.h \
-  /usr/src/dosemu0.52/include/../cpu.h /usr/src/dosemu0.52/include/video.h dpmi/dpmi.h \
+serial.o : serial.c config.h cpu.h emu.h machcompat.h dosio.h serial.h /home/src/dosemu0.60/include/mouse.h 
+sigsegv.o : sigsegv.c emu.h machcompat.h cpu.h /home/src/dosemu0.60/include/bios.h \
+  /home/src/dosemu0.60/include/mouse.h serial.h xms.h timers.h cmos.h memory.h \
+  termio.h config.h /home/src/dosemu0.60/include/port.h /home/src/dosemu0.60/include/ipx.h \
+  /home/src/dosemu0.60/include/../cpu.h /home/src/dosemu0.60/include/video.h dpmi/dpmi.h \
   ports.h 
-termio.o : termio.c config.h memory.h emu.h machcompat.h cpu.h termio.h /usr/src/dosemu0.52/include/video.h \
-  /usr/src/dosemu0.52/include/mouse.h dosio.h /usr/src/dosemu0.52/include/keymaps.h 
+termio.o : termio.c config.h memory.h emu.h machcompat.h cpu.h termio.h /home/src/dosemu0.60/include/video.h \
+  /home/src/dosemu0.60/include/mouse.h dosio.h /home/src/dosemu0.60/include/keymaps.h 
 timers.o : timers.c emu.h machcompat.h cpu.h timers.h 
 xms.o : xms.c emu.h machcompat.h cpu.h config.h memory.h xms.h dosio.h 
 bios.o : bios.S
diff -u --recursive --new-file dosemu0.52//.todo.jes dosemu0.53//.todo.jes
--- dosemu0.52//.todo.jes	Thu Jun 16 21:22:19 1994
+++ dosemu0.53//.todo.jes	Sun Jun 26 23:21:40 1994
@@ -10,7 +10,7 @@
 Network
 	-	Want to connect to network existing already in Linux.
 		Be able to support both TCP/IP and IPX/SPX protocols.
-		Almost there thanks to Jason & Tim.
+		Almost there thanks to Jason & Tim & Rob.
 Keyboard
 	-	Clean it up. Get EDIT.COM(Qbasic.exe) to highlight
 		properly.
@@ -19,4 +19,4 @@
 DPMI
 	-	Although forgotten awhile back due to kernel limitations,
 		should be reconsidered because of WINE reworking the
-		memory allocation algorithm.
+		memory allocation algorithm. Lutz is the man in charge.
diff -u --recursive --new-file dosemu0.52//ChangeLog dosemu0.53//ChangeLog
--- dosemu0.52//ChangeLog	Thu Jun 16 21:22:18 1994
+++ dosemu0.53//ChangeLog	Sun Jun 26 23:21:40 1994
@@ -1,3 +1,18 @@
+Fri Jun 24 1994 JES
+
+	- Markks console cursor patches, and more speed increses to
+	  serial stuff.
+	- Small change to mfs.c to correct wrong return codes for
+	  findfirst. Seems t speed up directory searches, but may
+	  just be my imagination :-).
+	- Messed around with SIGILL a bit to try and track down reported
+	  problem starting DOSEMU for some that causes SIGILL with 
+	  instr of 2e:f7 (cs:div?). No solution yet.
+	- Hacked ./init/parse.c a bit to exchange_uids when running
+	  overide config files. Now /etc/dosemu.conf always runs, then
+ 	  overrides can be speced in optional config files.
+	  Doesn't work yet :-(
+
 Tue Jun 14 1994 JES
 
 	- Next set of patches from Markkk. Major overhaul started
diff -u --recursive --new-file dosemu0.52//Makefile dosemu0.53//Makefile
--- dosemu0.52//Makefile	Thu Jun 16 21:22:18 1994
+++ dosemu0.53//Makefile	Sun Jun 26 23:21:40 1994
@@ -1,8 +1,8 @@
 # Makefile for Linux DOS emulator
 #
-# $Date: 1994/06/17 00:13:32 $
-# $Source: /usr/src/dosemu0.52/RCS/Makefile,v $
-# $Revision: 2.8 $
+# $Date: 1994/06/27 02:15:58 $
+# $Source: /home/src/dosemu0.60/RCS/Makefile,v $
+# $Revision: 2.9 $
 # $State: Exp $
 #
 
@@ -28,9 +28,9 @@
 #endif
 
 # dosemu version
-EMUVER  =   0.52
-VERNUM  =   0x52
-PATCHL  =   0
+EMUVER  =   0.53
+VERNUM  =   0x53
+PATCHL  =   1
 
 # DON'T CHANGE THIS: this makes libdosemu start high enough to be safe. 
 # should be okay at...0x20000000 for .5 GB mark.
diff -u --recursive --new-file dosemu0.52//clients/ncurses.c dosemu0.53//clients/ncurses.c
--- dosemu0.52//clients/ncurses.c	Thu Jun 16 21:22:37 1994
+++ dosemu0.53//clients/ncurses.c	Sun Jun 26 23:22:10 1994
@@ -15,7 +15,7 @@
  * DANG_BEGIN_CHANGELOG
  *
  * $Date: 1994/06/14 22:01:48 $
- * $Source: /usr/src/dosemu0.52/clients/RCS/ncurses.c,v $
+ * $Source: /home/src/dosemu0.60/clients/RCS/ncurses.c,v $
  * $Revision: 2.2 $
  * $State: Exp $
  *
diff -u --recursive --new-file dosemu0.52//clients/ncurses.h dosemu0.53//clients/ncurses.h
--- dosemu0.52//clients/ncurses.h	Thu Jun 16 21:22:37 1994
+++ dosemu0.53//clients/ncurses.h	Sun Jun 26 23:22:10 1994
@@ -2,7 +2,7 @@
 
 /* 
  * $Date: 1994/06/16 23:04:51 $
- * $Source: /usr/src/dosemu0.52/clients/RCS/ncurses.h,v $
+ * $Source: /home/src/dosemu0.60/clients/RCS/ncurses.h,v $
  * $Revision: 2.2 $
  * $State: Exp $
  *
diff -u --recursive --new-file dosemu0.52//cmos.c dosemu0.53//cmos.c
--- dosemu0.52//cmos.c	Thu Jun 16 21:22:16 1994
+++ dosemu0.53//cmos.c	Sun Jun 26 23:21:40 1994
@@ -2,7 +2,7 @@
  *   by Robert Sanders, gt8134b@prism.gatech.edu
  *
  * $Date: 1994/06/12 23:15:37 $
- * $Source: /usr/src/dosemu0.52/RCS/cmos.c,v $
+ * $Source: /home/src/dosemu0.60/RCS/cmos.c,v $
  * $Revision: 2.1 $
  * $State: Exp $
  */
@@ -77,7 +77,7 @@
   /* information flags...my CMOS returns this */
   SET_CMOS(CMOS_INFO, 0xe1);
 
-  warn("CMOS initialized: \n$Header: /usr/src/dosemu0.52/RCS/cmos.c,v 2.1 1994/06/12 23:15:37 root Exp root $\n");
+  warn("CMOS initialized: \n$Header: /home/src/dosemu0.60/RCS/cmos.c,v 2.1 1994/06/12 23:15:37 root Exp root $\n");
 }
 
 int
diff -u --recursive --new-file dosemu0.52//cmos.h dosemu0.53//cmos.h
--- dosemu0.52//cmos.h	Thu Jun 16 21:22:17 1994
+++ dosemu0.53//cmos.h	Sun Jun 26 23:21:40 1994
@@ -2,7 +2,7 @@
  *   by Robert Sanders, gt8134b@prism.gatech.edu
  *
  * $Date: 1994/06/12 23:15:37 $
- * $Source: /usr/src/dosemu0.52/RCS/cmos.h,v $
+ * $Source: /home/src/dosemu0.60/RCS/cmos.h,v $
  * $Revision: 2.1 $
  * $State: Exp $
  */
diff -u --recursive --new-file dosemu0.52//commands/exitemu.S dosemu0.53//commands/exitemu.S
--- dosemu0.52//commands/exitemu.S	Thu Jun 16 21:22:32 1994
+++ dosemu0.53//commands/exitemu.S	Sun Jun 26 23:22:07 1994
@@ -2,7 +2,7 @@
 ! Robert Sanders, gt8134b@prism.gatech.edu
 !
 ! $Date: 1994/06/12 23:16:59 $
-! $Source: /usr/src/dosemu0.52/commands/RCS/exitemu.S,v $
+! $Source: /home/src/dosemu0.60/commands/RCS/exitemu.S,v $
 ! $Revision: 2.1 $
 ! $State: Exp $
 
diff -u --recursive --new-file dosemu0.52//commands/vgaoff.S dosemu0.53//commands/vgaoff.S
--- dosemu0.52//commands/vgaoff.S	Thu Jun 16 21:22:32 1994
+++ dosemu0.53//commands/vgaoff.S	Sun Jun 26 23:22:07 1994
@@ -2,7 +2,7 @@
 ! Robert Sanders, gt8134b@prism.gatech.edu
 !
 ! $Date: 1994/06/12 23:16:59 $
-! $Source: /usr/src/dosemu0.52/commands/RCS/vgaoff.S,v $
+! $Source: /home/src/dosemu0.60/commands/RCS/vgaoff.S,v $
 ! $Revision: 2.1 $
 ! $State: Exp $
 !
diff -u --recursive --new-file dosemu0.52//commands/vgaon.S dosemu0.53//commands/vgaon.S
--- dosemu0.52//commands/vgaon.S	Thu Jun 16 21:22:32 1994
+++ dosemu0.53//commands/vgaon.S	Sun Jun 26 23:22:07 1994
@@ -2,7 +2,7 @@
 ! Robert Sanders, gt8134b@prism.gatech.edu
 !
 ! $Date: 1994/06/12 23:16:59 $
-! $Source: /usr/src/dosemu0.52/commands/RCS/vgaon.S,v $
+! $Source: /home/src/dosemu0.60/commands/RCS/vgaon.S,v $
 ! $Revision: 2.1 $
 ! $State: Exp $
 !
diff -u --recursive --new-file dosemu0.52//cpu.c dosemu0.53//cpu.c
--- dosemu0.52//cpu.c	Thu Jun 16 21:22:17 1994
+++ dosemu0.53//cpu.c	Sun Jun 26 23:21:40 1994
@@ -3,12 +3,18 @@
  * taken over by:
  *          Robert Sanders, gt8134b@prism.gatech.edu
  *
- * $Date: 1994/06/12 23:15:37 $
- * $Source: /usr/src/dosemu0.52/RCS/cpu.c,v $
- * $Revision: 2.1 $
+ * $Date: 1994/06/27 02:15:58 $
+ * $Source: /home/src/dosemu0.60/RCS/cpu.c,v $
+ * $Revision: 2.3 $
  * $State: Exp $
  *
  * $Log: cpu.c,v $
+ * Revision 2.3  1994/06/27  02:15:58  root
+ * Prep for pre53
+ *
+ * Revision 2.2  1994/06/24  14:51:06  root
+ * Markks's patches plus.
+ *
  * Revision 2.1  1994/06/12  23:15:37  root
  * Wrapping up prior to release of DOSEMU0.52.
  *
@@ -343,138 +349,6 @@
 {
   do_int(intno);
   return 1;
-}
-
-void
-sigill(int sig, struct sigcontext_struct context)
-{
-  unsigned char *csp;
-  int i, dee;
-
-#ifdef DPMI
-  if (in_dpmi && !in_vm86)
-    return dpmi_sigill(&context);
-#endif /* DPMI */
-
-  csp = SEG_ADR((unsigned char *), cs, ip);
-
-  if (!in_vm86)			/* test VM bit */
-    error("ERROR: NON-VM86 illegal insn!\n");
-
-  in_vm86 = 0;
-
-  error("SIGILL %d received\n", sig);
-  show_regs();
-
-  /* Some db commands start with 2e (use cs segment) and thus is accounted
-   for here */
-
-  if (csp[0] == 0x2e) {
-    csp++;
-    LWORD(eip)++;
-  }
-  if (csp[0] == 0xf0) {
-    dbug_printf("ERROR: LOCK prefix not permitted!\n");
-    LWORD(eip)++;
-    return;
-  }
-
-  /* look at this with Checkit...the new code just sits in a loop */
-#define OLD_MATH_CODE
-#ifdef OLD_MATH_CODE
-  i = (csp[0] << 8) + csp[1];	/* swapped */
-  if ((i & 0xf800) != 0xd800) {	/* not FPU insn */
-    error("ERROR: not an FPU instruction, real illegal opcode!\n");
-#if 0
-    do_int(0x6);		/* Coprocessor error */
-#else
-    fatalerr = 4;
-#endif
-    return;
-  }
-
-  /* I don't know what this code does. -Robert */
-  switch (i & 0xc0) {
-  case 0x00:
-    if ((i & 0x7) == 0x6) {
-      dee = *(short *) (csp + 2);
-      REG(eip) += 4;
-    }
-    else {
-      REG(eip) += 2;
-      dee = 0;
-    }
-    break;
-  case 0x40:
-    dee = (signed) csp[2];
-    REG(eip) += 3;
-    break;
-  case 0x80:
-    dee = *(short *) (csp + 2);
-    REG(eip) += 4;
-    break;
-  default:
-    REG(eip) += 2;
-    dee = 0;
-  }
-
-  warn("MATH: emulation %x d=%x\n", i, dee);
-
-#else /* this is the new, stupid MATH-EMU code. it doesn't work. */
-
-  if ((*csp >= 0xd8) && (*csp <= 0xdf)) {	/* the FPU insn prefix bytes */
-    error("MATH: math emulation for (first 2 bytes) %02x %02x...\n",
-	  *csp, *(csp + 1));
-
-    /* this is the coprocessor-not-available int. to use this, you
-       * should compile your kernel with FPU-emu support in, and you
-       * should install a DOS-based FPU emulator within dosemu.
-       * this is untested, and I CAN'T test it, as I have a 486.
-       */
-    do_int(7);
-  }
-#endif
-}
-
-void
-sigfpe(int sig)
-{
-  if (!in_vm86)
-    error("ERROR: NON-VM86 SIGFPE insn!\n");
-
-  in_vm86 = 0;
-
-  error("SIGFPE %d received\n", sig);
-  show_regs();
-  if (REG(eflags) & VIF) {
-    LWORD(eip) -= 1;
-    do_int(0);
-  }
-  else
-    error("ERROR: FPE happened but interrupts disabled\n");
-}
-
-void
-sigtrap(int sig, struct sigcontext_struct context)
-{
-  struct sigcontext_struct *scp = &context;
-
-#if 0
-#ifdef DPMI
-  if (in_dpmi && !in_vm86)
-    return dpmi_sigtrap(scp);
-#endif /* DPMI */
-#endif
-
-  if (!in_vm86)
-    error("ERROR: NON-VM86 SIGTRAP insn!\n");
-
-  in_vm86 = 0;
-
-  if (_trapno == 3)
-    return (void) do_int(3);
-
-  do_int(1);
 }
 
 struct port_struct {
diff -u --recursive --new-file dosemu0.52//cpu.h dosemu0.53//cpu.h
--- dosemu0.52//cpu.h	Thu Jun 16 21:22:17 1994
+++ dosemu0.53//cpu.h	Sun Jun 26 23:21:40 1994
@@ -1,9 +1,9 @@
 /* cpu.h, for the Linux DOS emulator
  *    Copyright (C) 1993 Robert Sanders, gt8134b@prism.gatech.edu
  *
- * $Date: 1994/06/12 23:15:37 $
- * $Source: /usr/src/dosemu0.52/RCS/cpu.h,v $
- * $Revision: 2.1 $
+ * $Date: 1994/06/27 02:15:58 $
+ * $Source: /home/src/dosemu0.60/RCS/cpu.h,v $
+ * $Revision: 2.3 $
  * $State: Exp $
  */
 
@@ -173,10 +173,7 @@
 #define _eflags (scp->eflags)
 #define _ss     (scp->ss)
 
-void sigtrap(int, struct sigcontext_struct);
-void sigill(int, struct sigcontext_struct);
-void sigfpe(int);
-void sigsegv(int, struct sigcontext_struct);
+void dosemu_fault(int, struct sigcontext_struct);
 
 void show_regs(void), show_ints(int, int);
 __inline__ int do_hard_int(int), do_soft_int(int);
diff -u --recursive --new-file dosemu0.52//disks.c dosemu0.53//disks.c
--- dosemu0.52//disks.c	Thu Jun 16 21:22:16 1994
+++ dosemu0.53//disks.c	Sun Jun 26 23:21:40 1994
@@ -2,7 +2,7 @@
  * Extensions by Robert Sanders, 1992-93
  *
  * $Date: 1994/06/17 00:13:32 $
- * $Source: /usr/src/dosemu0.52/RCS/disks.c,v $
+ * $Source: /home/src/dosemu0.60/RCS/disks.c,v $
  * $Revision: 2.2 $
  * $State: Exp $
  *
diff -u --recursive --new-file dosemu0.52//doc/DANG dosemu0.53//doc/DANG
--- dosemu0.52//doc/DANG	Thu Jun 16 21:22:33 1994
+++ dosemu0.53//doc/DANG	Sun Jun 26 23:22:07 1994
@@ -1,6 +1,6 @@
   The DOSEMU Alterer Novices Guide DANG
   Alistair MacDonald, am20@unix.york.ac.uk
-  For DOSEMU v0.52 pl
+  For DOSEMU v0.52 pl0
 
   This Document is the DOSEMU Alterer Novices Guide. It is known as the
   DANG.
@@ -117,9 +117,41 @@
 
   3.1.1.  Functions in dpmi/dpmi.c
 
-  We appear to have no information on the functions in dpmi/dpmi.c.
+  These are the functions defined in dpmi/dpmi.c.
 
 
+  3.1.1.1.  void
+
+  void dpmi_fault(struct sigcontext_struct);
+
+
+  o  This is the brain of DPMI. All CPU exceptions are first
+
+  o  reflected (from the signal handlers) to this code.
+
+
+  o
+
+  o  Exception from nonpriveleged instructions INT XX, STI, CLI, HLT
+
+  o  and from WINDOWS 3.1 are handled here.
+
+  o
+
+  o  If installed one, the DPMI client exception handler is called
+     first.
+
+  o  If not installed, exceptions 0, 1, 2, 3, 4, 5 and 7 are reflected
+
+  o  to real mode. All other exceptions are terminating the client
+
+  o  (and may be dosemu too :-)).
+
+  o
+
+
+
+
   3.1.2.  Remarks in dpmi/dpmi.c
 
   Apparently, no-one has anything interesting to say about dpmi/dpmi.c.
@@ -162,6 +194,8 @@
 
 
 
+
+
   4.1.1.  Functions in video/video.c
 
   We appear to have no information on the functions in video/video.c.
@@ -225,6 +259,9 @@
   Apparently, there are no new ideas for bios_emm.c.
 
 
+
+
+
   5.2.	emu.c Information
 
   This is where we call of the initialisation code. Everything not
@@ -328,6 +365,7 @@
   function key in it's own right.
 
 
+
   5.5.1.  Functions in keymaps.c
 
   We appear to have no information on the functions in keymaps.c.
@@ -355,6 +393,7 @@
   because they may be useful for searching, as they are (at least at the
   moment) reasonably unique.
 
+
   DANG_BEGIN_MODULE / DANG_END_MODULE This will bracket a description of
   the file (normally at the start).
 
@@ -375,6 +414,33 @@
 
   DANG_BEGIN_CHANGELOG / DANG_END_CHANGELOG Changelogs - very useful for
   bug fixing, and avvailable for use with DPR (or that's the theory)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 
diff -u --recursive --new-file dosemu0.52//doc/Makefile dosemu0.53//doc/Makefile
--- dosemu0.52//doc/Makefile	Thu Jun 16 21:22:33 1994
+++ dosemu0.53//doc/Makefile	Sun Jun 26 23:22:07 1994
@@ -32,3 +32,5 @@
 dist: dosemu.texinfo dosemu.info dos.1 DPR DANG EMUsuccess.txt
 	install -d $(DISTPATH)/doc
 	install -m 0644 Makefile dosemu.texinfo dosemu.info dos.1 announce$(EMUVER) DPR DANG EMUsuccess.txt $(DISTPATH)/doc
+	install -d $(DISTPATH)/html
+	install -m 0644 html/* $(DISTPATH)/html
diff -u --recursive --new-file dosemu0.52//doc/announce0.52 dosemu0.53//doc/announce0.52
--- dosemu0.52//doc/announce0.52	Thu Jun 16 21:22:33 1994
+++ dosemu0.53//doc/announce0.52
@@ -1,80 +0,0 @@
-Here comes the great, new, faster, improved DOSEMU....Version 0.52!  
-
-    DOSEMU is a Linux specific application that allows Linux to run many
-DOS based programs. It requires a bootable DOS disk and Linux 1.1.12+
-(with SYSV IPC support compiled in).  It will work with older 1.0.8+ 
-kernels after recompiling your kernel with kernel patches included
-with the DOSEMU package.
-
-    This release could not have gotten out the door without the work of
-the our relentless development team and friends, currently consisting
-of at least:
-
-Corey Sweeney, Jason Gorden, Tim Bird, Rob Jenneson, Jon Tombs,
-Aaron, Alan Hourihane, Ronnie, Karl Kiniger, Michael Deisher, 
-Daniel R. Barrlow, Scott Buchholz, Christoph Niemann, Mark Rejhon,
-Theadore Tso, Lutz Molgedey, Larry Stephen, Derek Fawcus, Jochen Hein,
-Alistair MacDonald, Linus Torvalds, Alan Cox, Bob Amstadt, 
-Alessandro Rubini and possibly myself from time to time.
-
-    Definitely still consider this ALPHA software, and as such please
-beware it is not yet fully functional, or always smooth sailing.
-
-Very soon, (As of June 16) it should be locatable at:
-  tsx-11.mit.edu:/pub/linux/ALPHA/dosemu/dosemu0.52.tgz
-  sunsite.unc.edu:/pub/Linux/system/Emulators/dosemu0.52.tgz
-  dspsun.eas.asu.edu:/pub/dosemu/dosemu0.52.tgz
-
-    Thanks to deisher@enws125.EAS.ASU.EDU (Michael E. Deisher) for dspsun.
-Micheal may also have DOSEMU added to the Debian distribution down the 
-road, now that DOSEMU 0.52 almost conforms to the Debian distribution
-format.
-
-*** NOTE ***
-    There has been many changes since DOSEMU 0.50pl1, so please go to 
-great caution to read the "QuickStart" file included with DOSEMU since 
-the location and format of files (including the configuration file) has 
-changed since the last public DOSEMU release.  One of the noteable
-changes is /etc/dosemu now becomes /var/lib/dosemu.
-
-Updated in this release:
-     -  Major speed improvement (2-5 times faster) compared to DOSEMU 0.50.
-	 Many thanks to Linus for the kernel enhancement, and always helpful
-	 feedback.
-     -  EMS 4.0 support is now near-complete.
-     -  Optional EMS speedup with a kernel patch to map memory in user
-	 space with /proc/self/mem. Thanks Scott for bringing Roberts
-	 code up to date and testing it.
-     -  Support for Novell Netware and other things are now via a
-	built in packet driver at int 0x60. Rob Janssen has been busy.
-     -  Improved foreign keyboard support.
-     -  Improved DPMI support, although far from complete.  Someday, 
-         maybe this fall, programs like Borland C++ or Maple V will work.
-	 Some RSX extender based programs like emtex386 are allready runing.
-     -  Improved serial support for modems.  More flexible with up to 4
-         ports, thanks to mdrejhon@csclub.uwaterloo.ca (Mark Rejhon)
-     -  Mice work a bit better, too, although not all drivers work.
-     -  Busmice support well underway thanks to Alan Hourihane.
-     -  S3 video code updated by niemann@swt.ruhr-uni-bochum.de 
-         (Christoph Niemann)
-     -  Real time clocks will become more accurate in the future, thanks to
-         preparation of new code.  Should make some video games run faster.
-	 Many Thanks to Jochen Hein for his continous efforts to clean up
-	 what the rest of us leave behind.
-     -  Easier Debug reports for you to send :-).
-     -  More updates by Tim Bird to his internal IPX code.
-     -  Major reorganization and cleanup. Way to go Jochen :-)
-     -  Termcap updates are much faster in Xterms now, thanks to Mark Rejhon.
-
-    As always, many, thanks to all who have helped with this release, 
-either by sending in bug reports so we knew something was wrong, by 
-sending in bug fixes (which may not have made it into this release), 
-or by just providing a sounding board for ideas that come up.
-    My apologies for not having answered every letter, and possibly 
-missing some of the important information. If you know something you
-think we should, try to contact me again, PLEASE.
-
-Later,
-JES
-jmaclean@fox.nstn.ns.ca
----
diff -u --recursive --new-file dosemu0.52//doc/announce0.53 dosemu0.53//doc/announce0.53
--- dosemu0.52//doc/announce0.53
+++ dosemu0.53//doc/announce0.53	Sun Jun 26 23:22:07 1994
@@ -0,0 +1,80 @@
+Here comes the great, new, faster, improved DOSEMU....Version 0.52!  
+
+    DOSEMU is a Linux specific application that allows Linux to run many
+DOS based programs. It requires a bootable DOS disk and Linux 1.1.12+
+(with SYSV IPC support compiled in).  It will work with older 1.0.8+ 
+kernels after recompiling your kernel with kernel patches included
+with the DOSEMU package.
+
+    This release could not have gotten out the door without the work of
+the our relentless development team and friends, currently consisting
+of at least:
+
+Corey Sweeney, Jason Gorden, Tim Bird, Rob Jenneson, Jon Tombs,
+Aaron, Alan Hourihane, Ronnie, Karl Kiniger, Michael Deisher, 
+Daniel R. Barrlow, Scott Buchholz, Christoph Niemann, Mark Rejhon,
+Theadore Tso, Lutz Molgedey, Larry Stephen, Derek Fawcus, Jochen Hein,
+Alistair MacDonald, Linus Torvalds, Alan Cox, Bob Amstadt, 
+Alessandro Rubini and possibly myself from time to time.
+
+    Definitely still consider this ALPHA software, and as such please
+beware it is not yet fully functional, or always smooth sailing.
+
+Very soon, (As of June 16) it should be locatable at:
+  tsx-11.mit.edu:/pub/linux/ALPHA/dosemu/dosemu0.52.tgz
+  sunsite.unc.edu:/pub/Linux/system/Emulators/dosemu0.52.tgz
+  dspsun.eas.asu.edu:/pub/dosemu/dosemu0.52.tgz
+
+    Thanks to deisher@enws125.EAS.ASU.EDU (Michael E. Deisher) for dspsun.
+Micheal may also have DOSEMU added to the Debian distribution down the 
+road, now that DOSEMU 0.52 almost conforms to the Debian distribution
+format.
+
+*** NOTE ***
+    There has been many changes since DOSEMU 0.50pl1, so please go to 
+great caution to read the "QuickStart" file included with DOSEMU since 
+the location and format of files (including the configuration file) has 
+changed since the last public DOSEMU release.  One of the noteable
+changes is /etc/dosemu now becomes /var/lib/dosemu.
+
+Updated in this release:
+     -  Major speed improvement (2-5 times faster) compared to DOSEMU 0.50.
+	 Many thanks to Linus for the kernel enhancement, and always helpful
+	 feedback.
+     -  EMS 4.0 support is now near-complete.
+     -  Optional EMS speedup with a kernel patch to map memory in user
+	 space with /proc/self/mem. Thanks Scott for bringing Roberts
+	 code up to date and testing it.
+     -  Support for Novell Netware and other things are now via a
+	built in packet driver at int 0x60. Rob Janssen has been busy.
+     -  Improved foreign keyboard support.
+     -  Improved DPMI support, although far from complete.  Someday, 
+         maybe this fall, programs like Borland C++ or Maple V will work.
+	 Some RSX extender based programs like emtex386 are allready runing.
+     -  Improved serial support for modems.  More flexible with up to 4
+         ports, thanks to mdrejhon@csclub.uwaterloo.ca (Mark Rejhon)
+     -  Mice work a bit better, too, although not all drivers work.
+     -  Busmice support well underway thanks to Alan Hourihane.
+     -  S3 video code updated by niemann@swt.ruhr-uni-bochum.de 
+         (Christoph Niemann)
+     -  Real time clocks will become more accurate in the future, thanks to
+         preparation of new code.  Should make some video games run faster.
+	 Many Thanks to Jochen Hein for his continous efforts to clean up
+	 what the rest of us leave behind.
+     -  Easier Debug reports for you to send :-).
+     -  More updates by Tim Bird to his internal IPX code.
+     -  Major reorganization and cleanup. Way to go Jochen :-)
+     -  Termcap updates are much faster in Xterms now, thanks to Mark Rejhon.
+
+    As always, many, thanks to all who have helped with this release, 
+either by sending in bug reports so we knew something was wrong, by 
+sending in bug fixes (which may not have made it into this release), 
+or by just providing a sounding board for ideas that come up.
+    My apologies for not having answered every letter, and possibly 
+missing some of the important information. If you know something you
+think we should, try to contact me again, PLEASE.
+
+Later,
+JES
+jmaclean@fox.nstn.ns.ca
+---
diff -u --recursive --new-file dosemu0.52//doc/dosemu.texinfo dosemu0.53//doc/dosemu.texinfo
--- dosemu0.52//doc/dosemu.texinfo	Thu Jun 16 21:22:33 1994
+++ dosemu0.53//doc/dosemu.texinfo	Sun Jun 26 23:22:07 1994
@@ -7,7 +7,7 @@
 
 @c $Author: root $
 @c $Date: 1994/06/12 23:17:14 $
-@c $Source: /usr/src/dosemu0.52/doc/RCS/dosemu.texinfo,v $
+@c $Source: /home/src/dosemu0.60/doc/RCS/dosemu.texinfo,v $
 @c $Revision: 2.1 $
 @c $State: Exp $
 
diff -u --recursive --new-file dosemu0.52//dos.c dosemu0.53//dos.c
--- dosemu0.52//dos.c	Thu Jun 16 21:22:16 1994
+++ dosemu0.53//dos.c	Sun Jun 26 23:21:40 1994
@@ -2,7 +2,7 @@
 /* Extensions by Robert Sanders, 1992-93
  *
  * $Date: 1994/06/12 23:15:37 $
- * $Source: /usr/src/dosemu0.52/RCS/dos.c,v $
+ * $Source: /home/src/dosemu0.60/RCS/dos.c,v $
  * $Revision: 2.1 $
  * $State: Exp $
  *
diff -u --recursive --new-file dosemu0.52//dosio.c dosemu0.53//dosio.c
--- dosemu0.52//dosio.c	Thu Jun 16 21:22:17 1994
+++ dosemu0.53//dosio.c	Sun Jun 26 23:21:40 1994
@@ -5,7 +5,7 @@
  * Robert Sanders, started 3/1/93
  *
  * $Date: 1994/06/12 23:15:37 $
- * $Source: /usr/src/dosemu0.52/RCS/dosio.c,v $
+ * $Source: /home/src/dosemu0.60/RCS/dosio.c,v $
  * $Revision: 2.1 $
  * $State: Exp $
  *
diff -u --recursive --new-file dosemu0.52//dpmi/dpmi.c dosemu0.53//dpmi/dpmi.c
--- dosemu0.52//dpmi/dpmi.c	Thu Jun 16 21:22:36 1994
+++ dosemu0.53//dpmi/dpmi.c	Sun Jun 26 23:22:10 1994
@@ -9,12 +9,19 @@
  *
  * First Attempted by James B. MacLean jmaclean@fox.nstn.ns.ca
  *
- * $Date: 1994/06/17 00:14:41 $
- * $Source: /usr/src/dosemu0.52/dpmi/RCS/dpmi.c,v $
- * $Revision: 2.2 $
+ * $Date: 1994/06/27 02:17:03 $
+ * $Source: /home/src/dosemu0.60/dpmi/RCS/dpmi.c,v $
+ * $Revision: 2.4 $
  * $State: Exp $
  *
  * $Log: dpmi.c,v $
+ * Revision 2.4  1994/06/27  02:17:03  root
+ * Prep for pre53
+ *
+ * Revision 2.3  1994/06/24  14:52:04  root
+ * Lutz's patches against DPMI
+ * ,
+ *
  * Revision 2.2  1994/06/17  00:14:41  root
  * Let's wrap it up and call it DOSEMU0.52.
  *
@@ -112,7 +119,7 @@
 SEGDESC Segments[MAX_SELECTORS];
 static char ldt_buffer[LDT_ENTRIES*LDT_ENTRY_SIZE];
 
-static char RCSdpmi[] = "$Header: /usr/src/dosemu0.52/dpmi/RCS/dpmi.c,v 2.2 1994/06/17 00:14:41 root Exp root $";
+static char RCSdpmi[] = "$Header: /home/src/dosemu0.60/dpmi/RCS/dpmi.c,v 2.4 1994/06/27 02:17:03 root Exp root $";
 
 /* Set to 1 when running under DPMI */
 u_char in_dpmi = 0;
@@ -650,9 +657,9 @@
   if (*OUTB_ADD || in_dpmi_dos_int) {
 #endif
     in_vm86 = 1;
-    switch VM86_TYPE(retval = vm86(&vm86s)) {
+    switch VM86_TYPE({retval=vm86(&vm86s); in_vm86=0; retval;}) {
 	case VM86_UNKNOWN:
-		vm86_sigsegv();
+		vm86_GP_fault();
 		break;
 	case VM86_STI:
 		I_printf("Return from vm86() for timeout\n");
@@ -659,7 +666,6 @@
 		REG(eflags) &=~VIP;
 		break;
 	case VM86_INTx:
-		in_vm86 = 0;
 		do_int(VM86_ARG(retval));
 		break;
 	case VM86_SIGNAL:
@@ -666,8 +672,8 @@
 		break;
 	default:
 		error("unknown return value from vm86()=%x,%d-%x\n", VM86_TYPE(retval), VM86_TYPE(retval), VM86_ARG(retval));
+		fatalerr = 4;
     }
-    in_vm86 = 0;
   }
   else {
     dpmi_control();
@@ -809,14 +815,6 @@
   in_sigsegv++;
 }
 
-inline void dpmi_sigill(struct sigcontext_struct *scp)
-{
-  unsigned char *csp2, *ssp2;
-  int i;
-  D_printf("DPMI: sigill\n");
-  DPMI_show_state;
-}
-
 inline void dpmi_sigalrm(struct sigcontext_struct *scp)
 {
   us *ssp;
@@ -833,7 +831,24 @@
   }
 }
 
-inline void dpmi_sigsegv(struct sigcontext_struct *scp)
+/*
+ * DANG_BEGIN_FUNCTION void dpmi_fault(struct sigcontext_struct);
+ *
+ * This is the brain of DPMI. All CPU exceptions are first
+ * reflected (from the signal handlers) to this code.
+ *
+ * Exception from nonpriveleged instructions INT XX, STI, CLI, HLT
+ * and from WINDOWS 3.1 are handled here.
+ *
+ * If installed one, the DPMI client exception handler is called first.
+ * If not installed, exceptions 0, 1, 2, 3, 4, 5 and 7 are reflected
+ * to real mode. All other exceptions are terminating the client
+ * (and may be dosemu too :-)).
+ *
+ * DANG_END_FUNCTION
+ */
+
+void dpmi_fault(struct sigcontext_struct *scp)
 {
   us *ssp;
   unsigned char *csp;
@@ -841,9 +856,11 @@
   int i;
 
 #if 1
-    D_printf("DPMI: Protected Mode SIGSEGV!\n");
-    DPMI_show_state;
+  D_printf("DPMI: CPU Exception!\n");
+  DPMI_show_state;
 #endif /* 1 */
+  
+  if (_trapno == 13) {
     csp = (unsigned char *) SEL_ADR(_cs, _eip);
     ssp = (us *) SEL_ADR(_ss, _esp);
 
@@ -953,7 +970,6 @@
 
       error("DPMI: Unhandled Execption 0x%02x\n", _trapno);
 leavedpmi:
-#if 1
       p_dos_str("DPMI: Unhandled Execption %02lx at %04x:%08lx\n"
       		"Terminating Client\n"
 		"It is likely that dosemu is unstable now and should be rebooted\n",
@@ -965,10 +981,6 @@
       in_dpmi = 0;
       in_dpmi_dos_int = 1;
       do_int(0x21);
-#else
-      leavedos(fatalerr);	/* shouldn't return */
-      _exit(1000);
-#endif
     } /* switch */
     if (in_dpmi_dos_int || int_queue_running) {
       *--ssp = (us) 0;
@@ -978,6 +990,27 @@
       _cs = UCODESEL;
       _eip = (unsigned long) ReturnFrom_dpmi_control;
     }
+    return;
+  } /* _trapno==13 */
+
+  error("DPMI: Unhandled Execption 0x%02x\n", _trapno);
+  p_dos_str("DPMI: Unhandled Execption %02lx at %04x:%08lx\n"
+	    "Terminating Client\n"
+	    "It is likely that dosemu is unstable now and should be rebooted\n",
+	    _trapno, _cs, _eip);
+  REG(eax) = 0x4cff;
+  REG(cs) = DPMI_SEG;
+  REG(eip) = DPMI_OFF + HLT_OFF(DPMI_return_from_dosint);
+  print_ldt();
+  in_dpmi = 0;
+  in_dpmi_dos_int = 1;
+  do_int(0x21);
+  *--ssp = (us) 0;
+  *--ssp = (us) _cs;
+  *(--((unsigned long *) ssp)) = _eip;
+  _esp -= 8;
+  _cs = UCODESEL;
+  _eip = (unsigned long) ReturnFrom_dpmi_control;
 }
 
 inline void dpmi_realmode_hlt(unsigned char * lina)
diff -u --recursive --new-file dosemu0.52//dpmi/dpmi.h dosemu0.53//dpmi/dpmi.h
--- dosemu0.52//dpmi/dpmi.h	Thu Jun 16 21:22:36 1994
+++ dosemu0.53//dpmi/dpmi.h	Sun Jun 26 23:22:10 1994
@@ -19,9 +19,7 @@
 void dpmi_get_entry_point();
 void dpmi_control();
 
-inline void dpmi_sigill(struct sigcontext_struct *);
-inline void dpmi_sigalrm(struct sigcontext_struct *);
-inline void dpmi_sigsegv(struct sigcontext_struct *);
+void dpmi_fault(struct sigcontext_struct *);
 inline void dpmi_realmode_hlt(unsigned char *);
 
 /* this is used like: SEL_ADR(_ss, _esp) */
diff -u --recursive --new-file dosemu0.52//drivers/ems.S dosemu0.53//drivers/ems.S
--- dosemu0.52//drivers/ems.S	Thu Jun 16 21:22:34 1994
+++ dosemu0.53//drivers/ems.S	Sun Jun 26 23:22:08 1994
@@ -45,7 +45,7 @@
 ! copied from emufs.S to make ems.S  -  7/19/93
 !
 ! $Date: 1994/06/12 23:17:24 $
-! $Source: /usr/src/dosemu0.52/drivers/RCS/ems.S,v $
+! $Source: /home/src/dosemu0.60/drivers/RCS/ems.S,v $
 ! $Revision: 2.1 $
 ! $State: Exp $
 !
diff -u --recursive --new-file dosemu0.52//drivers/emufs.S dosemu0.53//drivers/emufs.S
--- dosemu0.52//drivers/emufs.S	Thu Jun 16 21:22:34 1994
+++ dosemu0.53//drivers/emufs.S	Sun Jun 26 23:22:08 1994
@@ -40,7 +40,7 @@
 ! (I probably broke something, but it seems to work)
 !
 ! $Date: 1994/06/12 23:17:24 $
-! $Source: /usr/src/dosemu0.52/drivers/RCS/emufs.S,v $
+! $Source: /home/src/dosemu0.60/drivers/RCS/emufs.S,v $
 ! $Revision: 2.1 $
 ! $State: Exp $
 !
diff -u --recursive --new-file dosemu0.52//emu.c dosemu0.53//emu.c
--- dosemu0.52//emu.c	Thu Jun 16 21:22:16 1994
+++ dosemu0.53//emu.c	Sun Jun 26 23:21:40 1994
@@ -12,12 +12,18 @@
  * DANG_END_MODULE
  *
  * DANG_BEGIN_CHANGELOG
- * $Date: 1994/06/17 00:13:32 $
- * $Source: /usr/src/dosemu0.52/RCS/emu.c,v $
- * $Revision: 2.5 $
+ * $Date: 1994/06/27 02:15:58 $
+ * $Source: /home/src/dosemu0.60/RCS/emu.c,v $
+ * $Revision: 2.7 $
  * $State: Exp $
  *
  * $Log: emu.c,v $
+ * Revision 2.7  1994/06/27  02:15:58  root
+ * Prep for pre53
+ *
+ * Revision 2.6  1994/06/24  14:51:06  root
+ * Markks's patches plus.
+ *
  * Revision 2.5  1994/06/17  00:13:32  root
  * Let's wrap it up and call it DOSEMU0.52.
  *
@@ -435,12 +441,11 @@
 extern struct pit pit;
 
 extern inline void disk_open(struct disk *);
-extern inline void vm86_sigsegv();
+extern inline void vm86_GP_fault();
+extern int cursor_row;
+extern int cursor_col;
 
-char *segv_stack[4096];
-char *alrm_stack[4096];
-char *ill_stack[4096];
-char *trap_stack[4096];
+char *cstack[16384];
 
 int int_queue_running = 0;
 inline void int_queue_run();
@@ -649,9 +654,9 @@
    * be in here.
    */
     in_vm86 = 1;
-    switch VM86_TYPE(retval = vm86(&vm86s)) {
+    switch VM86_TYPE({retval=vm86(&vm86s); in_vm86=0; retval;}) {
 	case VM86_UNKNOWN:
-		vm86_sigsegv();
+		vm86_GP_fault();
 		break;
 	case VM86_STI:
 		I_printf("Return from vm86() for timeout\n");
@@ -658,7 +663,6 @@
 		REG(eflags) &= ~(VIP);
 		break;
 	case VM86_INTx:
-		in_vm86 = 0;
 		do_int(VM86_ARG(retval));
 		break;
 	case VM86_SIGNAL:
@@ -665,8 +669,8 @@
 		break;
 	default:
 		error("unknown return value from vm86()=%x,%d-%x\n", VM86_TYPE(retval), VM86_TYPE(retval), VM86_ARG(retval));
+		fatalerr = 4;
     }
-    in_vm86 = 0;
 
   /* this is here because ioctl() is non-reentrant, and signal handlers
    * may have to use ioctl().  This results in a possible (probable) time
@@ -1049,6 +1053,8 @@
   static int partials = 0;
   static u_char timals = 0;
   static int anychanges = 0;
+  static int old_row = -1;
+  static int old_col = -1;
 
   if (inalrm || in_sighandler) {
     error("ERROR: Reentering SIGALRM! alrm=%d, in_sig=%d\n", inalrm, in_sighandler);
@@ -1073,13 +1079,22 @@
    * This increases the DOSEMU-to-termcap update efficiency greatly.
    * The countdown counter is currently at a value of 2.
    */
-  if (!config.console_video && !running) {
-    running = -1;
-    anychanges = restore_screen();
-    running = anychanges ? 2 : 0;
-  }
-  else if (running > 0) {
-    running--;
+  if (!config.graphics) {
+    if (!config.console_video) {
+      if (!running) {
+        running = -1;
+        anychanges = restore_screen();
+        running = anychanges ? 2 : 0;
+      }
+      else if (running > 0) {
+        running--;
+      }
+    }
+    else if ((old_row != cursor_row) || (old_col != cursor_col)) {
+      poscur(cursor_col, cursor_row);
+      old_col = cursor_col;
+      old_row = cursor_row;
+    }
   }
 
 #if 0
@@ -1575,7 +1590,7 @@
   while ((c = getopt(argc, argv, "ABC:cF:kM:D:P:VNtsgx:Km234e:")) != EOF)
     if (c == 'F')
       confname = optarg;
-  parse_config(confname);
+  parse_config(NULL);
 
   if (config.exitearly)
     leavedos(0);
@@ -1768,12 +1783,12 @@
 					sigaddset(&sa.sa_mask, SIG_TIME); \
 					sigaction(sig, &sa, NULL);
 
-#define DPMISETSIG(sig, fun, stack) \
+#define NEWSETSIG(sig, fun) \
 			sa.sa_handler = (__sighandler_t) fun; \
 			/* Point to the top of the stack, minus 4 just in case, and make \
 			   just in case, and make it aligned  */ \
 			sa.sa_restorer = \
-			(void (*)()) (((unsigned int)(stack) + sizeof(stack) - 4) & ~3); \
+			(void (*)()) (((unsigned int)(cstack) + sizeof(cstack) - 4) & ~3); \
 			sa.sa_flags = SA_RESTART; \
 			sigemptyset(&sa.sa_mask); \
 			sigaddset(&sa.sa_mask, SIG_TIME); \
@@ -1781,16 +1796,19 @@
 
   /* init signal handlers */
 
-  DPMISETSIG(SIGILL, sigill, ill_stack);
-  DPMISETSIG(SIG_TIME, sigalrm, alrm_stack);
-  SETSIG(SIGFPE, sigfpe);
-  DPMISETSIG(SIGTRAP, sigtrap, trap_stack);
+  NEWSETSIG(SIGILL, dosemu_fault);
+  NEWSETSIG(SIG_TIME, sigalrm);
+  NEWSETSIG(SIGFPE, dosemu_fault);
+  NEWSETSIG(SIGTRAP, dosemu_fault);
+  NEWSETSIG(SIGBUS, dosemu_fault);
 
   SETSIG(SIGHUP, leavedos);	/* for "graceful" shutdown */
   SETSIG(SIGTERM, leavedos);
   SETSIG(SIGKILL, leavedos);
   SETSIG(SIGQUIT, sigquit);
+/*
   SETSIG(SIGUNUSED, timint);
+*/
 
   /* do time stuff - necessary for initial time setting */
   {
@@ -1815,7 +1833,7 @@
   scrbuf = (u_char *)malloc(CO * LI * 2);
   v_printf("SCREEN saves at: %p of %d size\n", scrbuf, CO * LI * 2);
 
-  DPMISETSIG(SIGSEGV, sigsegv, segv_stack);
+  NEWSETSIG(SIGSEGV, dosemu_fault);
   hardware_init();
   if (config.vga)
     vga_initialize();
@@ -2018,7 +2036,7 @@
 
 void
  usage(void) {
-  fprintf(stdout, "$Header: /usr/src/dosemu0.52/RCS/emu.c,v 2.5 1994/06/17 00:13:32 root Exp root $\n");
+  fprintf(stdout, "$Header: /home/src/dosemu0.60/RCS/emu.c,v 2.7 1994/06/27 02:15:58 root Exp root $\n");
   fprintf(stdout, "usage: dos [-ABCckbVNtsgxKm234e] [-D flags] [-M SIZE] [-P FILE] [ -F File ] 2> dosdbg\n");
   fprintf(stdout, "    -A boot from first defined floppy disk (A)\n");
   fprintf(stdout, "    -B boot from second defined floppy disk (B) (#)\n");
@@ -2235,7 +2253,7 @@
     }
 
   case 5:			/* show banner */
-    p_dos_str("\n\nLinux DOS emulator " VERSTR "pl" PATCHSTR " $Date: 1994/06/17 00:13:32 $\n");
+    p_dos_str("\n\nLinux DOS emulator " VERSTR "pl" PATCHSTR " $Date: 1994/06/27 02:15:58 $\n");
     p_dos_str("Last configured at %s\n", CONFIG_TIME);
     p_dos_str("on %s\n", CONFIG_HOST);
     /* p_dos_str("Formerly maintained by Robert Sanders, gt8134b@prism.gatech.edu\n\n"); */
diff -u --recursive --new-file dosemu0.52//emu.h dosemu0.53//emu.h
--- dosemu0.52//emu.h	Thu Jun 16 21:22:17 1994
+++ dosemu0.53//emu.h	Sun Jun 26 23:21:40 1994
@@ -3,12 +3,15 @@
 #define EMU_H
 /* Extensions by Robert Sanders, 1992-93
  *
- * $Date: 1994/06/14 21:34:25 $
- * $Source: /usr/src/dosemu0.52/RCS/emu.h,v $
- * $Revision: 2.2 $
+ * $Date: 1994/06/24 14:51:06 $
+ * $Source: /home/src/dosemu0.60/RCS/emu.h,v $
+ * $Revision: 2.3 $
  * $State: Exp $
  *
  * $Log: emu.h,v $
+ * Revision 2.3  1994/06/24  14:51:06  root
+ * Markks's patches plus.
+ *
  * Revision 2.2  1994/06/14  21:34:25  root
  * Second series of termcap patches.
  *
@@ -198,6 +201,8 @@
 
 extern int li, co, li2, co2;	/* lines, columns */
 extern int scanseq;
+extern int cursor_row;
+extern int cursor_col;
 
 /* #define CO	80
    #define LI	25 */
diff -u --recursive --new-file dosemu0.52//html/$$-1.html dosemu0.53//html/$$-1.html
--- dosemu0.52//html/$$-1.html
+++ dosemu0.53//html/$$-1.html	Sun Jun 26 23:22:07 1994
@@ -0,0 +1,28 @@
+<title>Introduction</title>
+<h1>1 <a name="s1"> Introduction </h1>
+<p> <a href="$$.html#toc1"> Contents of this section</a></p>
+
+<p>This document is the preliminary draft of a manual to help
+people understand the inner workings of dosemu.  It is the goal of
+this document to create new dosemu hackers.  This concept was inspired
+by the linux kernel hackers guide.</p>
+<p>This Guide was concieved and originally written by " Corey Sweeney" 
+&lt; corey@amiganet.chi.il.us&gt; . It has been completely revised. It is now
+generated automatically directly from the source code. Special thanks to
+" James B. MacLean"  &lt; jmaclean@fox.nstn.ns.ca&gt;  for supplying the original
+information. (It was mostly ripped out of a mail message.) " Jochen Hein" 
+has made many useful comments &amp;  suggestions.</p>
+<p>At the end if this document is a section detailing how this guide is put 
+together. This may help you when trying to locate the relevant pieces of
+code. If you add new code, it would be useful if the relevant markers 
+are added where appropriate.</p>
+<p>This file is a collective effort. If you don't like one of the
+explanations, or want to add anything, please send me something!</p>
+<p></p>
+<p></p>
+<p></p>
+<p></p>
+<p><a href="$$-2.html"> Next </a> Chapter, <a href="$$.html"> Previous </a> Chapter</p><p>Table of contents of <a href="$$.html#toc1">this chapter</a>,
+ General <a href="$$.html#toc">table of contents</a></p>
+<p><a href="$$.html"> Top </a> of the document,
+ <a href="#0"> Beginning of this Chapter</a></p>
\ No newline at end of file
diff -u --recursive --new-file dosemu0.52//html/$$-2.html dosemu0.53//html/$$-2.html
--- dosemu0.52//html/$$-2.html
+++ dosemu0.53//html/$$-2.html	Sun Jun 26 23:22:08 1994
@@ -0,0 +1,59 @@
+<title>The Clients group of Modules</title>
+<h1>2 <a name="s2"> The Clients group of Modules </h1>
+<p> <a href="$$.html#toc2"> Contents of this section</a></p>
+
+<p>One of the long term aims of the DOSEMU development team is to provide
+a client-server based system. This will allow people to add different 
+display systems in more simply. Those in current development are detailed
+in this section.</p>
+<p></p>
+<p></p>
+<h2>2.1 <A Name="ss2.1"> clients/ncurses.c Information </h2>
+
+<p>This is James' client based around NCURSES. It (un-)succesfully
+demonstrates the procedure for making initial connections to the
+server.</p>
+<p></p>
+<p></p>
+<h3> Functions in clients/ncurses.c </h3>
+
+<p>These are the functions defined in clients/ncurses.c.</p>
+<p></p>
+<h3> main </h3>
+
+<p>main</p>
+<p>
+<ul>
+<li> argc - Number of Command Line arguments.</li>
+<li> argv - Command Line arguments - as an array of char*'s</li>
+</ul>
+</p>
+<p>This function does all of the work associated with this client. It
+grabs the shared memory used to hold the current Video data and makes some
+comments about its current screen.</p>
+<p></p>
+<p></p>
+<p></p>
+<p></p>
+<h3> Remarks in clients/ncurses.c </h3>
+
+<p>Some of the functions are undocumented. These are the trivial ones.</p>
+<p></p>
+<p>-----</p>
+<p>You must be mad if you want to get involved in all of this Shared memory
+stuff .... 8-)</p>
+<p></p>
+<p></p>
+<h3> Items for Fixing in clients/ncurses.c </h3>
+
+<p>Apparently, nothing needs fixing in clients/ncurses.c.</p>
+<p></p>
+<h3> New Ideas for clients/ncurses.c </h3>
+
+<p>Apparently, there are no new ideas for clients/ncurses.c.</p>
+<p></p>
+
+<p><a href="$$-3.html"> Next </a> Chapter, <a href="$$-1.html"> Previous </a> Chapter</p><p>Table of contents of <a href="$$.html#toc2">this chapter</a>,
+ General <a href="$$.html#toc">table of contents</a></p>
+<p><a href="$$.html"> Top </a> of the document,
+ <a href="#0"> Beginning of this Chapter</a></p>
\ No newline at end of file
diff -u --recursive --new-file dosemu0.52//html/$$-3.html dosemu0.53//html/$$-3.html
--- dosemu0.52//html/$$-3.html
+++ dosemu0.53//html/$$-3.html	Sun Jun 26 23:22:08 1994
@@ -0,0 +1,66 @@
+<title>The DPMI group of Modules</title>
+<h1>3 <a name="s3"> The DPMI group of Modules </h1>
+<p> <a href="$$.html#toc3"> Contents of this section</a></p>
+
+<p>DPMI is Lutz's Baby. It's a really important part of the Emulator as far
+as we are concerned, since it will allow us to run so many more programs
+and, most importantly, bcc. This is the one thing that the WINE developers
+want that we haven't been able to give them.</p>
+<p>If you think you can help .... " Away you Go!"  (Sorry to those non-UK folks ...
+Thats a reference to a UK kids sports programme from my youth ... anyway ...
+enough of this banter. You'll be wanting to know that this is all about 
+DPMI ...)</p>
+<p></p>
+<p></p>
+<h2>3.1 <A Name="ss3.1"> dpmi/dpmi.c Information </h2>
+
+<p>dpmi.c</p>
+<p>DOS Protected Mode Interface allows DOS programs to run in the
+protected mode of <F>2345..</F>86 processors</p>
+<p></p>
+<p></p>
+<h3> Functions in dpmi/dpmi.c </h3>
+
+<p>These are the functions defined in dpmi/dpmi.c.</p>
+<p></p>
+<h3> void </h3>
+
+<p>void dpmi_fault(struct sigcontext_struct);</p>
+<p>
+<ul>
+<li> This is the brain of DPMI. All CPU exceptions are first</li>
+<li> reflected (from the signal handlers) to this code.</li>
+<li></li>
+<li> Exception from nonpriveleged instructions INT XX, STI, CLI, HLT</li>
+<li> and from WINDOWS 3.1 are handled here.</li>
+<li></li>
+<li> If installed one, the DPMI client exception handler is called first.</li>
+<li> If not installed, exceptions 0, 1, 2, 3, 4, 5 and 7 are reflected</li>
+<li> to real mode. All other exceptions are terminating the client</li>
+<li> (and may be dosemu too :-)).</li>
+<li></li>
+</ul>
+</p>
+<p></p>
+<p></p>
+<p></p>
+<h3> Remarks in dpmi/dpmi.c </h3>
+
+<p>Apparently, no-one has anything interesting to say about dpmi/dpmi.c.</p>
+<p></p>
+<h3> Items for Fixing in dpmi/dpmi.c </h3>
+
+<p>Apparently, nothing needs fixing in dpmi/dpmi.c.</p>
+<p></p>
+<h3> New Ideas for dpmi/dpmi.c </h3>
+
+<p>Simulate Local Descriptor Table for MS-Windows 3.1
+must be read only, so if krnl386.exe/krnl286.exe
+try to write to this table, we will bomb into sigsegv()
+and and emulate direct ldt access</p>
+<p></p>
+
+<p><a href="$$-4.html"> Next </a> Chapter, <a href="$$-2.html"> Previous </a> Chapter</p><p>Table of contents of <a href="$$.html#toc3">this chapter</a>,
+ General <a href="$$.html#toc">table of contents</a></p>
+<p><a href="$$.html"> Top </a> of the document,
+ <a href="#0"> Beginning of this Chapter</a></p>
\ No newline at end of file
diff -u --recursive --new-file dosemu0.52//html/$$-4.html dosemu0.53//html/$$-4.html
--- dosemu0.52//html/$$-4.html
+++ dosemu0.53//html/$$-4.html	Sun Jun 26 23:22:08 1994
@@ -0,0 +1,45 @@
+<title>The Video group of Modules</title>
+<h1>4 <a name="s4"> The Video group of Modules </h1>
+<p> <a href="$$.html#toc4"> Contents of this section</a></p>
+
+<p>All of the Video handling code is in the " video"  subdirectory.</p>
+<p>There is one file for each video card or chipset and the master file. To
+Add a new card, it needs a set of save &amp;  restore routines putting in a file
+here.</p>
+<p></p>
+<p></p>
+<h2>4.1 <A Name="ss4.1"> video/video.c Information </h2>
+
+<p>All of the emulated video interrupts are here (ie int10). In addition,
+all the code to try and properly save &amp;  restore the video state between
+VC's and the attempts to control updates to the VC whilst the user is
+using another. We map between the real screen address and that used by
+DOSEMU here too.</p>
+<p>Attempts to use a cards own bios require the addition of the parameter
+'graphics' to the video statement in " /etc/dosemu.conf" . This will make
+the emulator try to execute the card's initialization routine which is
+normally located at address c000:0003. This can now be changed as an
+option.</p>
+<p></p>
+<p></p>
+<h3> Functions in video/video.c </h3>
+
+<p>We appear to have no information on the functions in video/video.c.</p>
+<p></p>
+<h3> Remarks in video/video.c </h3>
+
+<p>Apparently, no-one has anything interesting to say about video/video.c.</p>
+<p></p>
+<h3> Items for Fixing in video/video.c </h3>
+
+<p>Apparently, nothing needs fixing in video/video.c.</p>
+<p></p>
+<h3> New Ideas for video/video.c </h3>
+
+<p>Apparently, there are no new ideas for video/video.c.</p>
+<p></p>
+
+<p><a href="$$-5.html"> Next </a> Chapter, <a href="$$-3.html"> Previous </a> Chapter</p><p>Table of contents of <a href="$$.html#toc4">this chapter</a>,
+ General <a href="$$.html#toc">table of contents</a></p>
+<p><a href="$$.html"> Top </a> of the document,
+ <a href="#0"> Beginning of this Chapter</a></p>
\ No newline at end of file
diff -u --recursive --new-file dosemu0.52//html/$$-5.html dosemu0.53//html/$$-5.html
--- dosemu0.52//html/$$-5.html
+++ dosemu0.53//html/$$-5.html	Sun Jun 26 23:22:08 1994
@@ -0,0 +1,146 @@
+<title>The Misc group of Modules</title>
+<h1>5 <a name="s5"> The Misc group of Modules </h1>
+<p> <a href="$$.html#toc5"> Contents of this section</a></p>
+
+<p>These are the remaining important files, that do not really fit into another
+group. These should not be dismissed as unimportant - rather, they are often
+amongst the most important.</p>
+<p></p>
+<p></p>
+<h2>5.1 <A Name="ss5.1"> bios_emm.c Information </h2>
+
+<p>This provides the EMM Memory Management for DOSEMU. It was originally part
+of the Mach Dos Emulator. </p>
+<p>Recent work in this area has involved a patch to the Kernel. If this is used
+and the DEFINE MMAP_EMS line used, a faster form of EMS memory support is
+included, using the /proc filesystem.</p>
+<p>In contrast to some of the comments (Yes, _I_ know the adage about that...)
+we appear to be supporting EMS 4.0, not 3.2</p>
+<p></p>
+<p></p>
+<h3> Functions in bios_emm.c </h3>
+
+<p>We appear to have no information on the functions in bios_emm.c.</p>
+<p></p>
+<h3> Remarks in bios_emm.c </h3>
+
+<p>Apparently, no-one has anything interesting to say about bios_emm.c.</p>
+<p></p>
+<h3> Items for Fixing in bios_emm.c </h3>
+
+<p>Apparently, nothing needs fixing in bios_emm.c.</p>
+<p></p>
+<h3> New Ideas for bios_emm.c </h3>
+
+<p>Apparently, there are no new ideas for bios_emm.c.</p>
+<p></p>
+
+<h2>5.2 <A Name="ss5.2"> emu.c Information </h2>
+
+<p>This is where we call of the initialisation code. Everything not covered
+elsewhere is handled here (Such logic !) By this we mean the speakers,
+the standard memory, cassettes etc.</p>
+<p>More than that, I cannot tell you - Things have changed a lot since I
+last got an update ... 8-(</p>
+<p></p>
+<h3> Functions in emu.c </h3>
+
+<p>We appear to have no information on the functions in emu.c.</p>
+<p></p>
+<h3> Remarks in emu.c </h3>
+
+<p>Apparently, no-one has anything interesting to say about emu.c.</p>
+<p></p>
+<h3> Items for Fixing in emu.c </h3>
+
+<p>Apparently, nothing needs fixing in emu.c.</p>
+<p></p>
+<h3> New Ideas for emu.c </h3>
+
+<p>Apparently, there are no new ideas for emu.c.</p>
+<p></p>
+
+<h2>5.3 <A Name="ss5.3"> xms.c Information </h2>
+
+<p>Currently the XMS 3.0 spec is covered in this file. XMS is fairly simple
+as it onbly deals with allocating extended memory and then moving it 
+around in specific calls. This spec also includes the allocation of UMB's,
+so they are also included as part of this file. The amount of xms memory
+returned to DOS programs via the XMS requests, or int15 fnc88 is set in
+" /etc/dosemu.conf"  via the XMS paramter.</p>
+<p></p>
+<p></p>
+<h3> Functions in xms.c </h3>
+
+<p>We appear to have no information on the functions in xms.c.</p>
+<p></p>
+<h3> Remarks in xms.c </h3>
+
+<p>Apparently, no-one has anything interesting to say about xms.c.</p>
+<p></p>
+<h3> Items for Fixing in xms.c </h3>
+
+<p>Apparently, nothing needs fixing in xms.c.</p>
+<p></p>
+<h3> New Ideas for xms.c </h3>
+
+<p>Apparently, there are no new ideas for xms.c.</p>
+<p></p>
+
+<h2>5.4 <A Name="ss5.4"> termio.c Information </h2>
+
+<p>This handles the keyboard.</p>
+<p>Two keyboard modes are handled 'raw' and 'xlate'. 'Raw' works with
+codes as sent out by the kernel and 'xlate' uses plain ASCII as used over
+serial lines. The mapping for different languages &amp;  the two ALT-keys is
+done here, but the definitions are elsewhere. Only the default (US)
+keymap is stored here.</p>
+<p></p>
+<p></p>
+<h3> Functions in termio.c </h3>
+
+<p>We appear to have no information on the functions in termio.c.</p>
+<p></p>
+<h3> Remarks in termio.c </h3>
+
+<p>Apparently, no-one has anything interesting to say about termio.c.</p>
+<p></p>
+<h3> Items for Fixing in termio.c </h3>
+
+<p>Apparently, nothing needs fixing in termio.c.</p>
+<p></p>
+<h3> New Ideas for termio.c </h3>
+
+<p>Apparently, there are no new ideas for termio.c.</p>
+<p></p>
+
+<h2>5.5 <A Name="ss5.5"> keymaps.c Information </h2>
+
+<p>These are definitions, giving which key is related to which scancode in
+raw keyboard mode. Basically, the code of 'x' on a US keyboard may be that
+of a 'Y' on a German keyboard. This way, all types of keyboard can be
+represented under DOSEMU. Also, the right ALT-key is often a function
+key in it's own right.</p>
+<p></p>
+<p></p>
+<h3> Functions in keymaps.c </h3>
+
+<p>We appear to have no information on the functions in keymaps.c.</p>
+<p></p>
+<h3> Remarks in keymaps.c </h3>
+
+<p>Apparently, no-one has anything interesting to say about keymaps.c.</p>
+<p></p>
+<h3> Items for Fixing in keymaps.c </h3>
+
+<p>Apparently, nothing needs fixing in keymaps.c.</p>
+<p></p>
+<h3> New Ideas for keymaps.c </h3>
+
+<p>Apparently, there are no new ideas for keymaps.c.</p>
+<p></p>
+
+<p><a href="$$-6.html"> Next </a> Chapter, <a href="$$-4.html"> Previous </a> Chapter</p><p>Table of contents of <a href="$$.html#toc5">this chapter</a>,
+ General <a href="$$.html#toc">table of contents</a></p>
+<p><a href="$$.html"> Top </a> of the document,
+ <a href="#0"> Beginning of this Chapter</a></p>
\ No newline at end of file
diff -u --recursive --new-file dosemu0.52//html/$$-6.html dosemu0.53//html/$$-6.html
--- dosemu0.52//html/$$-6.html
+++ dosemu0.53//html/$$-6.html	Sun Jun 26 23:22:08 1994
@@ -0,0 +1,36 @@
+<title>And Finally ...</title>
+<h1>6 <a name="s6"> And Finally ... </h1>
+<p> <a href="$$.html#toc6"> Contents of this section</a></p>
+
+<p>The Following items are used to delimit the text used to create this file.
+Whilst it is not necessary to know this, they are included because they may
+be useful for searching, as they are (at least at the moment) reasonably 
+unique.</p>
+<p>DANG_BEGIN_MODULE / DANG_END_MODULE
+This will bracket a description of the file (normally at the
+start).</p>
+<p>DANG_BEGIN_FUNCTION / DANG_END_FUNCTION
+This brackets a description of functions (good this, isn't it!)
+Not every function needs to be described in this way - just the
+major ones.</p>
+<p>DANG_BEGIN_REMARK / DANG_END_REMARK
+This brackets descriptions of obscure items, like data structures
+and architecture.</p>
+<p>DANG_FIXTHIS
+This is a one line item, indicating a an area requiring a fix, or
+redesign.</p>
+<p>DANG_BEGIN_NEWIDEA / DANG_END_NEWIDEA
+New Ideas Start Here! As Ideas are proposed, that get added with 
+their description, so that future generations can laugh at or
+code the ideas ..... These bracket the idea description.</p>
+<p>DANG_BEGIN_CHANGELOG / DANG_END_CHANGELOG
+Changelogs - very useful for bug fixing, and avvailable for use
+with DPR (or that's the theory)</p>
+<p></p>
+<p></p>
+<p></p>
+<p></p>
+<p><a href="$$-7.html"> Next </a> Chapter, <a href="$$-5.html"> Previous </a> Chapter</p><p>Table of contents of <a href="$$.html#toc6">this chapter</a>,
+ General <a href="$$.html#toc">table of contents</a></p>
+<p><a href="$$.html"> Top </a> of the document,
+ <a href="#0"> Beginning of this Chapter</a></p>
\ No newline at end of file
diff -u --recursive --new-file dosemu0.52//html/DANG.html dosemu0.53//html/DANG.html
--- dosemu0.52//html/DANG.html
+++ dosemu0.53//html/DANG.html	Sun Jun 26 23:22:08 1994
@@ -0,0 +1,38 @@
+<title>DANG</title>
+<h1>DANG</h1>
+
+The DOSEMU Alterer Novices Guide
+<h2>Alistair MacDonald, <code>am20@unix.york.ac.uk</code></h2>For DOSEMU v0.52 pl0
+<p><hr><em>This Document is the DOSEMU Alterer Novices Guide. It is known as the DANG.</em><hr></p>
+<p><h2><a name="toc1">1. <a href="$$-1.html">Introduction</a></h2>
+<ul>
+</ul>
+
+<p><h2><a name="toc2">2. <a href="$$-2.html">The Clients group of Modules</a></h2>
+<ul>
+<h4><a href="$$-2.html#ss2.1">2.1 clients/ncurses.c Information</a></h4>
+</ul>
+
+<p><h2><a name="toc3">3. <a href="$$-3.html">The DPMI group of Modules</a></h2>
+<ul>
+<h4><a href="$$-3.html#ss3.1">3.1 dpmi/dpmi.c Information</a></h4>
+</ul>
+
+<p><h2><a name="toc4">4. <a href="$$-4.html">The Video group of Modules</a></h2>
+<ul>
+<h4><a href="$$-4.html#ss4.1">4.1 video/video.c Information</a></h4>
+</ul>
+
+<p><h2><a name="toc5">5. <a href="$$-5.html">The Misc group of Modules</a></h2>
+<ul>
+<h4><a href="$$-5.html#ss5.1">5.1 bios_emm.c Information</a></h4>
+<h4><a href="$$-5.html#ss5.2">5.2 emu.c Information</a></h4>
+<h4><a href="$$-5.html#ss5.3">5.3 xms.c Information</a></h4>
+<h4><a href="$$-5.html#ss5.4">5.4 termio.c Information</a></h4>
+<h4><a href="$$-5.html#ss5.5">5.5 keymaps.c Information</a></h4>
+</ul>
+
+<p><h2><a name="toc6">6. <a href="$$-6.html">And Finally ...</a></h2>
+<ul>
+</ul>
+
diff -u --recursive --new-file dosemu0.52//include/video.h dosemu0.53//include/video.h
--- dosemu0.52//include/video.h	Thu Jun 16 21:22:36 1994
+++ dosemu0.53//include/video.h	Sun Jun 26 23:22:10 1994
@@ -242,6 +242,8 @@
 extern u_char att_d_index;
 extern u_char permissions;
 extern struct screen_stat scr_state;
+extern int cursor_row;
+extern int cursor_col;
 
 #endif 
 /* End of include/video.h */
diff -u --recursive --new-file dosemu0.52//init/parse.c dosemu0.53//init/parse.c
--- dosemu0.52//init/parse.c	Thu Jun 16 21:22:37 1994
+++ dosemu0.53//init/parse.c	Sun Jun 26 23:22:13 1994
@@ -5,12 +5,15 @@
  *
  * The parser is a hand-written state machine.
  *
- * $Date: 1994/06/17 00:14:45 $
- * $Source: /usr/src/dosemu0.52/init/RCS/parse.c,v $
- * $Revision: 2.2 $
+ * $Date: 1994/06/24 14:52:20 $
+ * $Source: /home/src/dosemu0.60/init/RCS/parse.c,v $
+ * $Revision: 2.3 $
  * $State: Exp $
  *
  * $Log: parse.c,v $
+ * Revision 2.3  1994/06/24  14:52:20  root
+ * Messing with parse_config.
+ *
  * Revision 2.2  1994/06/17  00:14:45  root
  * Let's wrap it up and call it DOSEMU0.52.
  *
@@ -146,6 +149,8 @@
 #include "timers.h"
 #include "keymaps.h"
 
+extern int exchange_uids(void);
+
 extern char* strdup(const char *); /* Not defined in string.h :-( */
 
 extern struct config_info config;  /* Configuration information */
@@ -2010,6 +2015,19 @@
 {
   FILE *volatile fd;
 
+  c_hdisks = 0;
+  c_fdisks = 0;
+
+  if (/* !fd && */ !(fd = open_file(CONFIG_FILE))) {
+    die("cannot open standard configuration file!");
+  }
+
+  if (!setjmp(exitpar))
+    parse_file(top_words, fd);
+
+  close_file(fd);
+
+  if (!exchange_uids()) die("Cannot exchange uids\n");
   if (confname)
     fd = open_file(confname);
   else {
@@ -2020,18 +2038,13 @@
     fd = open_file(name);
     free(name);
   }
-
-  if (!fd && !(fd = open_file(CONFIG_FILE))) {
-    die("cannot open configuration files!");
-  }
-
-  c_hdisks = 0;
-  c_fdisks = 0;
+  if (!exchange_uids()) die("Cannot changeback uids\n");
 
   if (!setjmp(exitpar))
     parse_file(top_words, fd);
 
-  close_file(fd);
+  if (fd) close_file(fd);
+
   return 1;
 }
 
diff -u --recursive --new-file dosemu0.52//int.h dosemu0.53//int.h
--- dosemu0.52//int.h	Thu Jun 16 21:22:18 1994
+++ dosemu0.53//int.h	Sun Jun 26 23:21:40 1994
@@ -3,12 +3,18 @@
 #include "ipx.h"
 
 /* 
- * $Date: 1994/06/17 00:13:32 $
- * $Source: /usr/src/dosemu0.52/RCS/int.h,v $
- * $Revision: 2.4 $
+ * $Date: 1994/06/27 02:15:58 $
+ * $Source: /home/src/dosemu0.60/RCS/int.h,v $
+ * $Revision: 2.6 $
  * $State: Exp $
  *
  * $Log: int.h,v $
+ * Revision 2.6  1994/06/27  02:15:58  root
+ * Prep for pre53
+ *
+ * Revision 2.5  1994/06/24  14:51:06  root
+ * Markks's patches plus.
+ *
  * Revision 2.4  1994/06/17  00:13:32  root
  * Let's wrap it up and call it DOSEMU0.52.
  *
@@ -875,9 +881,11 @@
     mouse_int();
     return;
 }
-else
+else {
+    k_printf("Why is this being called?\n");
     goto default_handling;
     break;
+}
 
   case 0x67:			/* EMS */
     goto default_handling;
@@ -948,6 +956,9 @@
     if (!IS_REDIRECTED(i)) {
       g_printf("DEFIVEC: int 0x%02x  SG: 0x%04x  OF: 0x%04x\n",
 	       i, ISEG(i), IOFF(i));
+      if (i == 0x00) {
+	LWORD(eip)+=2;
+      }
       return;
     }
 
diff -u --recursive --new-file dosemu0.52//int10.h dosemu0.53//int10.h
--- dosemu0.52//int10.h	Thu Jun 16 21:22:18 1994
+++ dosemu0.53//int10.h	Sun Jun 26 23:21:40 1994
@@ -2,9 +2,10 @@
  * Handler for int10-requests, moved from video.c and made it inline
  */
 
-extern inline void poscur(int, int);
 extern void Scroll(int, int, int, int, int, int);
 extern void hide_cursor(void);
+extern int cursor_row;
+extern int cursor_col;
 
 __inline__ void int10(void)
 {
@@ -82,9 +83,8 @@
 
     bios_cursor_x_position(screen) = x;
     bios_cursor_y_position(screen) = y;
-
-    if ((screen == bios_current_screen_page) && (config.console_video)) 
-      poscur(x, y);
+    cursor_col = x;
+    cursor_row = y;
     break;
 
   case 0x3:			/* get cursor pos */
@@ -112,10 +112,8 @@
 
       bios_current_screen_page = screen;
       bios_video_memory_address = TEXT_SIZE * screen;
-
-      if (config.console_video) 
-        poscur(bios_cursor_x_position(bios_current_screen_page), 
-               bios_cursor_y_position(bios_current_screen_page));
+      cursor_col = bios_cursor_x_position(bios_current_screen_page);
+      cursor_row = bios_cursor_y_position(bios_current_screen_page);
       break;
     }
 
diff -u --recursive --new-file dosemu0.52//lpt.c dosemu0.53//lpt.c
--- dosemu0.52//lpt.c	Thu Jun 16 21:22:17 1994
+++ dosemu0.53//lpt.c	Sun Jun 26 23:21:40 1994
@@ -1,7 +1,7 @@
 /* for the Linux dos emulator versions 0.49 and newer
  *
  * $Date: 1994/06/12 23:15:37 $
- * $Source: /usr/src/dosemu0.52/RCS/lpt.c,v $
+ * $Source: /home/src/dosemu0.60/RCS/lpt.c,v $
  * $Revision: 2.1 $
  * $State: Exp $
  *
diff -u --recursive --new-file dosemu0.52//machcompat.h dosemu0.53//machcompat.h
--- dosemu0.52//machcompat.h	Thu Jun 16 21:22:18 1994
+++ dosemu0.53//machcompat.h	Sun Jun 26 23:21:40 1994
@@ -24,7 +24,7 @@
  * the rights to redistribute these changes.
  */
 /*
- * File: $Source: /usr/src/dosemu0.52/RCS/machcompat.h,v $
+ * File: $Source: /home/src/dosemu0.60/RCS/machcompat.h,v $
  *
  * Purpose:
  *
diff -u --recursive --new-file dosemu0.52//mfs.c dosemu0.53//mfs.c
--- dosemu0.52//mfs.c	Thu Jun 16 21:22:17 1994
+++ dosemu0.53//mfs.c	Sun Jun 26 23:21:40 1994
@@ -146,6 +146,9 @@
  *
  * HISTORY:
  * $Log: mfs.c,v $
+ * Revision 2.2  1994/06/24  14:51:06  root
+ * Markks's patches plus.
+ *
  * Revision 2.1  1994/06/12  23:15:37  root
  * Wrapping up prior to release of DOSEMU0.52.
  *
@@ -2493,6 +2496,7 @@
   char *filename1;
   char *filename2;
   char *dta;
+  u_char firstfind = 0;
   long s_pos=0;
   u_char attr;
   u_char subfunc;
@@ -3241,6 +3245,7 @@
       strcpy(fpath, "/");
     hlist = match_filename_prune_list(
 				  get_dir(fpath, fname, fext), fname, fext);
+    firstfind = 1;
 
   find_again:
 
@@ -3248,11 +3253,15 @@
     if (hlist == NULL) {
       /* no matches or empty directory */
       Debug0((dbg_fd, "No more matches\n"));
-      SETWORD(&(state->eax), NO_MORE_FILES);
+      if (firstfind)
+        SETWORD(&(state->eax), FILE_NOT_FOUND);
+      else
+        SETWORD(&(state->eax), NO_MORE_FILES);
       hlist = hlist_pop();
       last_find_drive = 0;
       if (hlist == NULL && !hlist_stack_indx)
 	find_in_progress = FALSE;
+      firstfind = 0;
       return (FALSE);
     }
     else {
@@ -3278,14 +3287,15 @@
       sdb_dir_entry(sdb)++;
 #endif
 
-      Debug0((dbg_fd, "'%.8s'.'%.3s'\n",
+      Debug0((dbg_fd, "'%.8s'.'%.3s' hlist=%d\n",
 	      sdb_file_name(sdb),
-	      sdb_file_ext(sdb)));
+	      sdb_file_ext(sdb), hlist_stack_indx));
 
       tmp = hlist->next;
       free(hlist);
       hlist = tmp;
     }
+    firstfind = 0;
     find_in_progress = TRUE;
     return (TRUE);
   case FIND_NEXT:		/* 0x1c */
diff -u --recursive --new-file dosemu0.52//mouse/mouse.c dosemu0.53//mouse/mouse.c
--- dosemu0.52//mouse/mouse.c	Thu Jun 16 21:22:36 1994
+++ dosemu0.53//mouse/mouse.c	Sun Jun 26 23:22:09 1994
@@ -1,12 +1,15 @@
 /* mouse.c for the DOS emulator
  *       Robert Sanders, gt8134b@prism.gatech.edu
  *
- * $Date: 1994/06/17 00:14:37 $
- * $Source: /usr/src/dosemu0.52/mouse/RCS/mouse.c,v $
- * $Revision: 2.3 $
+ * $Date: 1994/06/27 02:16:59 $
+ * $Source: /home/src/dosemu0.60/mouse/RCS/mouse.c,v $
+ * $Revision: 2.4 $
  * $State: Exp $
  *
  * $Log: mouse.c,v $
+ * Revision 2.4  1994/06/27  02:16:59  root
+ * Prep for pre53
+ *
  * Revision 2.3  1994/06/17  00:14:37  root
  * Let's wrap it up and call it DOSEMU0.52.
  *
@@ -737,7 +740,7 @@
   else {
     sptr = &com[config.num_ser];
     if (!(sptr->mouse)) {
-      m_printf("MOUSE: Failed to add serial mouse, no 'mouse' keyword in serial config!\n");
+      m_printf("MOUSE: Failed to add internal serial mouse, no 'mouse' keyword in serial config!\n");
       mice->intdrv = FALSE;
     }
   }
diff -u --recursive --new-file dosemu0.52//mutex.c dosemu0.53//mutex.c
--- dosemu0.52//mutex.c	Thu Jun 16 21:22:17 1994
+++ dosemu0.53//mutex.c	Sun Jun 26 23:21:40 1994
@@ -2,7 +2,7 @@
  *       Robert Sanders, gt8134b@prism.gatech.edu
  *
  * $Date: 1994/06/12 23:15:37 $
- * $Source: /usr/src/dosemu0.52/RCS/mutex.c,v $
+ * $Source: /home/src/dosemu0.60/RCS/mutex.c,v $
  * $Revision: 2.1 $
  * $State: Exp $
  *
diff -u --recursive --new-file dosemu0.52//periph/bootsect.S dosemu0.53//periph/bootsect.S
--- dosemu0.52//periph/bootsect.S	Thu Jun 16 21:22:35 1994
+++ dosemu0.53//periph/bootsect.S	Sun Jun 26 23:22:08 1994
@@ -3,7 +3,7 @@
 !   for dosemu 0.49, 4/1/93
 !
 ! $Date: 1994/06/12 23:17:32 $
-! $Source: /usr/src/dosemu0.52/periph/RCS/bootsect.S,v $
+! $Source: /home/src/dosemu0.60/periph/RCS/bootsect.S,v $
 ! $Revision: 2.1 $
 ! $State: Exp $
 !
diff -u --recursive --new-file dosemu0.52//periph/getrom dosemu0.53//periph/getrom
--- dosemu0.52//periph/getrom	Thu Jun 16 21:22:35 1994
+++ dosemu0.53//periph/getrom	Sun Jun 26 23:22:09 1994
@@ -1,7 +1,7 @@
 # getrom: get VBIOS ROM image from /dev/mem
 #
 # $Date: 1994/06/12 23:17:32 $
-# $Source: /usr/src/dosemu0.52/periph/RCS/getrom,v $
+# $Source: /home/src/dosemu0.60/periph/RCS/getrom,v $
 # $Revision: 2.1 $
 # $State: Exp $
 #
diff -u --recursive --new-file dosemu0.52//periph/hdinfo.c dosemu0.53//periph/hdinfo.c
--- dosemu0.52//periph/hdinfo.c	Thu Jun 16 21:22:35 1994
+++ dosemu0.53//periph/hdinfo.c	Sun Jun 26 23:22:08 1994
@@ -17,7 +17,7 @@
  *   512 bytes earlier).
  *
  * $Date: 1994/06/17 00:14:24 $
- * $Source: /usr/src/dosemu0.52/periph/RCS/hdinfo.c,v $
+ * $Source: /home/src/dosemu0.60/periph/RCS/hdinfo.c,v $
  * $Revision: 2.2 $
  * $State: Exp $
  *
diff -u --recursive --new-file dosemu0.52//periph/mkhdimage.c dosemu0.53//periph/mkhdimage.c
--- dosemu0.52//periph/mkhdimage.c	Thu Jun 16 21:22:35 1994
+++ dosemu0.53//periph/mkhdimage.c	Sun Jun 26 23:22:08 1994
@@ -3,7 +3,7 @@
  * cheesy program to create an hdimage header
  *
  * $Date: 1994/06/17 00:14:24 $
- * $Source: /usr/src/dosemu0.52/periph/RCS/mkhdimage.c,v $
+ * $Source: /home/src/dosemu0.60/periph/RCS/mkhdimage.c,v $
  * $Revision: 2.2 $
  * $State: Exp $
  *
diff -u --recursive --new-file dosemu0.52//periph/mkpartition dosemu0.53//periph/mkpartition
--- dosemu0.52//periph/mkpartition	Thu Jun 16 21:22:35 1994
+++ dosemu0.53//periph/mkpartition	Sun Jun 26 23:22:09 1994
@@ -3,7 +3,7 @@
 #    Robert Sanders, gt8134b@prism.gatech.edu
 #
 # $Date: 1994/06/12 23:17:32 $
-# $Source: /usr/src/dosemu0.52/periph/RCS/mkpartition,v $
+# $Source: /home/src/dosemu0.60/periph/RCS/mkpartition,v $
 # $Revision: 2.1 $
 # $State: Exp $
 #
diff -u --recursive --new-file dosemu0.52//periph/putrom.c dosemu0.53//periph/putrom.c
--- dosemu0.52//periph/putrom.c	Thu Jun 16 21:22:35 1994
+++ dosemu0.53//periph/putrom.c	Sun Jun 26 23:22:08 1994
@@ -1,7 +1,7 @@
 /* putrom.c; put VBIOS ROM image into /dev/mem (should fail except for weird caches!)
  *
  * $Date: 1994/06/17 00:14:24 $
- * $Source: /usr/src/dosemu0.52/periph/RCS/putrom.c,v $
+ * $Source: /home/src/dosemu0.60/periph/RCS/putrom.c,v $
  * $Revision: 2.2 $
  * $State: Exp $
  *
diff -u --recursive --new-file dosemu0.52//ports.h dosemu0.53//ports.h
--- dosemu0.52//ports.h	Thu Jun 16 21:22:18 1994
+++ dosemu0.53//ports.h	Sun Jun 26 23:21:40 1994
@@ -1,12 +1,18 @@
 #define PORTS_H 1
 
 /* 
- * $Date: 1994/06/14 21:34:25 $
- * $Source: /usr/src/dosemu0.52/RCS/ports.h,v $
- * $Revision: 2.3 $
+ * $Date: 1994/06/27 02:15:58 $
+ * $Source: /home/src/dosemu0.60/RCS/ports.h,v $
+ * $Revision: 2.5 $
  * $State: Exp $
  *
  * $Log: ports.h,v $
+ * Revision 2.5  1994/06/27  02:15:58  root
+ * Prep for pre53
+ *
+ * Revision 2.4  1994/06/24  14:51:06  root
+ * Markks's patches plus.
+ *
  * Revision 2.3  1994/06/14  21:34:25  root
  * Second series of termcap patches.
  *
@@ -72,8 +78,9 @@
 extern int fatalerr;
 struct pit pit;
 extern void set_leds(void);
-extern inline void poscur(int, int);
 extern int s3_8514_base;
+extern int cursor_row;
+extern int cursor_col;
 u_short microsoft_port_check = 0;
 
 inline int
@@ -225,13 +232,15 @@
 	    {
 	      hi = (unsigned char)byte;
 	      pos = (hi << 8) | lo;
-	      if (config.console_video) poscur(pos%80, pos/80);
+	      cursor_col = pos%80;
+	      cursor_row = pos/80;
 	    }
 	  else if ( last_byte == 15 )
 	    {
 	      lo = (unsigned char)byte;
 	      pos = (hi << 8) | lo;
-	      if (config.console_video) poscur(pos%80, pos/80);
+	      cursor_col = pos%80;
+	      cursor_row = pos/80;
 	    }
 	}
       last_port = port; last_byte = byte;
@@ -306,7 +315,9 @@
   case 0x41:
   case 0x42:
   case 0x43:
+#if 0
     i_printf("timer outb 0x%02x\n", byte);
+#endif
     if ((port == 0x42) && (lastport == 0x42)) {
       if ((timer_beep == 1) &&
 	  (config.speaker == SPKR_EMULATED)) {
diff -u --recursive --new-file dosemu0.52//serial.c dosemu0.53//serial.c
--- dosemu0.52//serial.c	Thu Jun 16 21:22:17 1994
+++ dosemu0.53//serial.c	Sun Jun 26 23:21:40 1994
@@ -14,7 +14,7 @@
  *
  *
  * $Date: 1994/06/12 23:15:37 $
- * $Source: /usr/src/dosemu0.52/RCS/serial.c,v $
+ * $Source: /home/src/dosemu0.60/RCS/serial.c,v $
  * $Revision: 2.1 $
  * $State: Exp $
  * $Log: serial.c,v $
@@ -577,7 +577,7 @@
 serial_init(void)
 {
   int i;
-  fprintf(stderr, "SERIAL $Header: /usr/src/dosemu0.52/RCS/serial.c,v 2.1 1994/06/12 23:15:37 root Exp root $\n");
+  fprintf(stderr, "SERIAL $Header: /home/src/dosemu0.60/RCS/serial.c,v 2.1 1994/06/12 23:15:37 root Exp root $\n");
   s_printf("SER: Running serial_init, %d serial ports\n", config.num_ser);
 
   /* Clean the BIOS data area at 0040:0000 for serial ports */
diff -u --recursive --new-file dosemu0.52//sigsegv.c dosemu0.53//sigsegv.c
--- dosemu0.52//sigsegv.c	Thu Jun 16 21:22:17 1994
+++ dosemu0.53//sigsegv.c	Sun Jun 26 23:21:40 1994
@@ -1,12 +1,18 @@
 #define SIGSEGV_C 1
 
 /* 
- * $Date: 1994/06/12 23:15:37 $
- * $Source: /usr/src/dosemu0.52/RCS/sigsegv.c,v $
- * $Revision: 2.1 $
+ * $Date: 1994/06/27 02:15:58 $
+ * $Source: /home/src/dosemu0.60/RCS/sigsegv.c,v $
+ * $Revision: 2.3 $
  * $State: Exp $
  *
  * $Log: sigsegv.c,v $
+ * Revision 2.3  1994/06/27  02:15:58  root
+ * Prep for pre53
+ *
+ * Revision 2.2  1994/06/24  14:51:06  root
+ * Markks's patches plus.
+ *
  * Revision 2.1  1994/06/12  23:15:37  root
  * Wrapping up prior to release of DOSEMU0.52.
  *
@@ -125,11 +131,16 @@
 
 extern inline void do_int(int);
 
-/* this is the brain, the privileged instruction handler.
- * see cpu.h for the SIGSTACK definition (new in Linux 0.99pl10)
+/*
+ * DANG_BEGIN_FUNCTION void vm86_GP_fault();
+ *
+ * All from the kernel unhandled general protection faults from V86 mode
+ * are handled here. This are mainly port IO and the HLT instruction.
+ *
+ * DANG_END_FUNCTION
  */
 
-inline void vm86_sigsegv()
+inline void vm86_GP_fault()
 {
 
   unsigned char *csp, *lina;
@@ -157,7 +168,7 @@
   if (in_sigsegv)
     error("ERROR: in_sigsegv=%d!\n", in_sigsegv);
 
-  in_vm86 = 0;
+  /* in_vm86 = 0; */
   in_sigsegv++;
 
   /* In a properly functioning emulator :-), sigsegv's will never come
@@ -183,13 +194,6 @@
 
   switch (*csp) {
 
-  case 0x62:			/* bound */
-    error("ERROR: BOUND instruction");
-    show_regs();
-    LWORD(eip) += 2;		/* check this! */
-    do_int(5);
-    break;
-
   case 0x6c:			/* insb */
   case 0x6d:			/* insw */
   case 0x6e:			/* outsb */
@@ -313,8 +317,17 @@
   in_sighandler = 0;
 }
 
+/*
+ * DANG_BEGIN_FUNCTION void dosemu_fault(int, struct sigcontext_struct);
+ *
+ * All CPU exceptions (except 13=general_protection from V86 mode,
+ * which is directly scaned by the kernel) are handled here.
+ *
+ * DANG_END_FUNCTION
+ */
+
 void 
-sigsegv(int signal, struct sigcontext_struct context)
+dosemu_fault(int signal, struct sigcontext_struct context)
 {
   struct sigcontext_struct *scp = &context;
   unsigned char *csp;
@@ -321,24 +334,40 @@
   int i;
 
   if (in_vm86) {
-#if 0
-    error("VM86 SIGSEGV trapno:0x%02lx\n",_trapno);
-#endif
-
-#if 0
-    if (_trapno == 13)
-      error("Uhhuh trap 13 received - This couldn't be from vm86()\n"
-	    "probably a sigsegv from dosemu code!!!!!!\n");
-#if 1
-    else
-#endif
-#endif
-      return vm86_sigsegv();
+    in_vm86 = 0;
+    switch (_trapno) {
+      case 0x00: /* divide_error */
+		 return (void) do_int(0);
+      case 0x01: /* debug */
+ 		 return (void) do_int(1);
+      case 0x03: /* int3 */
+ 		 return (void) do_int(3);
+      case 0x04: /* overflow */
+ 		 return (void) do_int(4);
+      case 0x05: /* bounds */
+ 		 return (void) do_int(5);
+      case 0x06: /* invalid_op */
+ 		 csp = SEG_ADR((unsigned char *), cs, ip);
+ 		 /* Some db commands start with 2e (use cs segment) and thus is accounted
+ 		    for here */
+ 		 if (csp[0] == 0x2e) {
+ 		   csp++;
+ 		   LWORD(eip)++;
+ 		 }
+ 		 if (csp[0] == 0xf0) {
+ 		   dbug_printf("ERROR: LOCK prefix not permitted!\n");
+ 		   LWORD(eip)++;
+ 		   return;
+ 		 }
+      default:	 error("ERROR: unexpected CPU exceptions 0x%02lx while in vm86()\n",_trapno);
+ 		 show_regs();
+ 		 leavedos(4);
+    }
   }
 
 #ifdef DPMI
   if (in_dpmi)
-    return dpmi_sigsegv(scp);
+    return dpmi_fault(&context);
 #endif
 
   csp = (char *) _eip;
@@ -351,7 +380,7 @@
 #else
   {
 #endif
-    error("ERROR: sigsegv in dosemu code!  trapno=0x%02lx\n"
+    error("ERROR: exception 0x%02lx in dosemu code!\n"
 	  "eip: 0x%08lx  esp: 0x%08lx  eflags: 0x%lx\n"
 	  "cs: 0x%04x  ds: 0x%04x  es: 0x%04x  ss: 0x%04x\n", _trapno,
 	  _eip, _esp, _eflags, _cs, _ds, _es, _ss);
diff -u --recursive --new-file dosemu0.52//termio.c dosemu0.53//termio.c
--- dosemu0.52//termio.c	Thu Jun 16 21:22:16 1994
+++ dosemu0.53//termio.c	Sun Jun 26 23:21:40 1994
@@ -22,7 +22,7 @@
  * Extensions by Robert Sanders, 1992-93
  *
  * $Date: 1994/06/14 22:00:18 $
- * $Source: /usr/src/dosemu0.52/RCS/termio.c,v $
+ * $Source: /home/src/dosemu0.60/RCS/termio.c,v $
  * $Revision: 2.2 $
  * $State: Exp $
  * $Log: termio.c,v $
@@ -556,7 +556,7 @@
   if (config.console_video)
     set_console_video();
 
-  dbug_printf("$Header: /usr/src/dosemu0.52/RCS/termio.c,v 2.2 1994/06/14 22:00:18 root Exp root $\n");
+  dbug_printf("$Header: /home/src/dosemu0.60/RCS/termio.c,v 2.2 1994/06/14 22:00:18 root Exp root $\n");
 
   return 0;
 }
diff -u --recursive --new-file dosemu0.52//termio.h dosemu0.53//termio.h
--- dosemu0.52//termio.h	Thu Jun 16 21:22:17 1994
+++ dosemu0.53//termio.h	Sun Jun 26 23:21:40 1994
@@ -4,7 +4,7 @@
 /* Extensions by Robert Sanders, 1992-93
  *
  * $Date: 1994/06/12 23:15:37 $
- * $Source: /usr/src/dosemu0.52/RCS/termio.h,v $
+ * $Source: /home/src/dosemu0.60/RCS/termio.h,v $
  * $Revision: 2.1 $
  * $State: Exp $
  *
diff -u --recursive --new-file dosemu0.52//timers.c dosemu0.53//timers.c
--- dosemu0.52//timers.c	Thu Jun 16 21:22:17 1994
+++ dosemu0.53//timers.c	Sun Jun 26 23:21:40 1994
@@ -4,7 +4,7 @@
  *     Robert Sanders, gt8134b@prism.gatech.edu
  *
  * $Date: 1994/06/12 23:15:37 $
- * $Source: /usr/src/dosemu0.52/RCS/timers.c,v $
+ * $Source: /home/src/dosemu0.60/RCS/timers.c,v $
  * $Revision: 2.1 $
  * $State: Exp $
  *
diff -u --recursive --new-file dosemu0.52//video/terminal.c dosemu0.53//video/terminal.c
--- dosemu0.52//video/terminal.c	Thu Jun 16 21:22:35 1994
+++ dosemu0.53//video/terminal.c	Sun Jun 26 23:22:09 1994
@@ -74,6 +74,8 @@
 #define CHFLUSH    if (outp - outbuf) { v_write(1, outbuf, outp - outbuf); \
 						outp = outbuf; }
 unsigned char outbuf[OUTBUFSIZE], *outp = outbuf;
+int cursor_row;
+int cursor_col;
 
 void
 v_write(int fd, unsigned char *ch, int len)
@@ -180,29 +182,35 @@
   xpos = bios_cursor_x_position(s);
   ypos = bios_cursor_y_position(s);
 
-  if (ch == '\r') {         /* Carriage return */
+  switch (ch) {
+  case '\r':         /* Carriage return */
     xpos = 0;
-  }
-  else if (ch == '\n') {    /* Newline */
+    break;
+
+  case '\n':         /* Newline */
     ypos++;
     xpos = 0;                  /* EDLIN needs this behavior */
     sadr = SCREEN_ADR(s);      /* Color newline */
     newline_att = sadr[ypos * CO + xpos - 1] >> 8;
-  }
-  else if (ch == '\010') {
+    break;
+
+  case 8:           /* Backspace */
     if (xpos > 0) xpos--;
-  }
-  else if (ch == '\t') {    /* Tab */
+    break;
+  
+  case '\t':        /* Tab */
     v_printf("tab\n");
     do char_out(' ', s); while (xpos % 8 != 0);
-  }
-  else if (ch == 7) {       /* Bell */
+    break;
+
+  case 7:           /* Bell */
     /* Bell should be sounded here, but it's more trouble than its */
     /* worth for now, because printf, addch or addstr or out_char  */
     /* would all interfere by possibly interrupting terminal codes */
     /* Ignore this for now, since this is a hack til NCURSES.      */
-  }
-  else {                    /* Printable character */
+    break;
+
+  default:          /* Printable character */
     sadr = SCREEN_ADR(s);
     sadr[ypos * CO + xpos] &= 0xff00;
     sadr[ypos * CO + xpos++] |= ch;
@@ -219,6 +227,8 @@
 
   bios_cursor_x_position(s) = xpos;
   bios_cursor_y_position(s) = ypos;
+  cursor_col = xpos;
+  cursor_row = ypos;
 }
 
 /* The following clears the screen buffer. It does it only to the screen 
@@ -239,11 +249,7 @@
        *(schar++) = blank, lx++);
 
   bios_cursor_x_position(s) = bios_cursor_y_position(s) = 0;
-  if (config.console_video) {
-    cli();
-    poscur(0,0); 
-    sti();
-  }
+  cursor_row = cursor_col = 0;
 }
 
 /*
@@ -429,12 +435,9 @@
 
   /* If any part of the screen was updated, then reset the attributes */
   /* and reposition the cursor */
-  if (numdone || 
-     (bios_cursor_x_position(bios_current_screen_page) != oldx) ||
-     (bios_cursor_y_position(bios_current_screen_page) != oldy)) 
-  {
-    oldx = bios_cursor_x_position(bios_current_screen_page);
-    oldy = bios_cursor_y_position(bios_current_screen_page);
+  if (numdone || (cursor_col != oldx) || (cursor_row != oldy)) {
+    oldx = cursor_col;
+    oldy = cursor_row;
     dostputs(me, 1, outcbuf);
     dostputs(tgoto(cm, oldx, oldy), 1, outcbuf);
     oa = 7;
diff -u --recursive --new-file dosemu0.52//video/video.c dosemu0.53//video/video.c
--- dosemu0.52//video/video.c	Thu Jun 16 21:22:35 1994
+++ dosemu0.53//video/video.c	Sun Jun 26 23:22:09 1994
@@ -22,7 +22,7 @@
  * DANG_BEGIN_CHANGELOG
  *
  * $Date: 1994/06/14 22:01:42 $
- * $Source: /usr/src/dosemu0.52/video/RCS/video.c,v $
+ * $Source: /home/src/dosemu0.60/video/RCS/video.c,v $
  * $Revision: 2.2 $
  * $State: Exp $
  *
diff -u --recursive --new-file dosemu0.52//xms.c dosemu0.53//xms.c
--- dosemu0.52//xms.c	Thu Jun 16 21:22:16 1994
+++ dosemu0.53//xms.c	Sun Jun 26 23:21:40 1994
@@ -13,12 +13,15 @@
  * DANG_END_MODULE
  * DANG_BEGIN_CHANGELOG
  *
- * $Date: 1994/06/14 22:00:18 $
- * $Source: /usr/src/dosemu0.52/RCS/xms.c,v $
- * $Revision: 2.2 $
+ * $Date: 1994/06/27 02:15:58 $
+ * $Source: /home/src/dosemu0.60/RCS/xms.c,v $
+ * $Revision: 2.3 $
  * $State: Exp $
  *
  * $Log: xms.c,v $
+ * Revision 2.3  1994/06/27  02:15:58  root
+ * Prep for pre53
+ *
  * Revision 2.2  1994/06/14  22:00:18  root
  * Alistair's DANG inserted for the first time :-).
  *
@@ -125,7 +128,7 @@
  * the 1 MEG mark.  ugly.  fix this.
  */
 
-static char RCSxms[] = "$Header: /usr/src/dosemu0.52/RCS/xms.c,v 2.2 1994/06/14 22:00:18 root Exp root $";
+static char RCSxms[] = "$Header: /home/src/dosemu0.60/RCS/xms.c,v 2.3 1994/06/27 02:15:58 root Exp root $";
 
 #define	 XMS_GET_VERSION		0x00
 #define	 XMS_ALLOCATE_HIGH_MEMORY	0x01
@@ -749,9 +752,11 @@
     handles[h].num = h;
     handles[h].valid = 1;
     if (api == OLDXMS)
-      handles[h].size = LWORD(edx) * 1024;
+      handles[h].size = (long)(LWORD(edx) * 1024);
     else
-      handles[h].size = REG(edx) * 1024;
+      handles[h].size = (long)(REG(edx) * 1024);
+
+    x_printf("XMS: EMB size %l\n", (int) handles[h].size);
 
     /* I could just rely on the behavior of malloc(0) here, but
        * I'd rather not.  I'm going to interpret the XMS 3.0 spec
@@ -758,7 +763,7 @@
        * to mean that reserving a handle of size 0 gives it no address
        */
     if (handles[h].size)
-      handles[h].addr = malloc(handles[h].size);
+      handles[h].addr = malloc((long)handles[h].size);
     else {
       x_printf("XMS WARNING: allocating 0 size EMB\n");
       handles[h].addr = 0;
@@ -859,7 +864,14 @@
     if (flag)
       handles[h].lockcount++;
     else
-      handles[h].lockcount--;
+      if (handles[h].lockcount)
+        handles[h].lockcount--;
+      else {
+        x_printf("XMS: Unlock handle %d already at 0\n", h);
+        LWORD(eax) = 0;
+        LO(bx) = 0xaa;		/* Block is not locked */
+	return;
+      }
 
     LWORD(edx) = (int) handles[h].addr >> 16;
     LWORD(ebx) = (int) handles[h].addr & 0xffff;
@@ -985,6 +997,7 @@
 
   p = (char *) ((seg << 4) + off);
 
+#if 0
   e.Length = *(unsigned long *) p;
   p += 4;
   e.SourceHandle = *(unsigned short *) p;
@@ -994,6 +1007,17 @@
   e.DestHandle = *(unsigned short *) p;
   p += 2;
   e.DestOffset = *(unsigned long *) p;
+#else
+  e.Length = *(unsigned int *) p;
+  p += 4;
+  e.SourceHandle = *(unsigned short *) p;
+  p += 2;
+  e.SourceOffset = *(unsigned int *) p;
+  p += 4;
+  e.DestHandle = *(unsigned short *) p;
+  p += 2;
+  e.DestOffset = *(unsigned int *) p;
+#endif
 
   return e;
 }
