diff -Nru 013/lib/source/screen/giveup.c 014/lib/source/screen/giveup.c
--- 013/lib/source/screen/giveup.c	2014-10-01 21:59:24 +0000
+++ 014/lib/source/screen/giveup.c	2014-10-21 06:01:40 +0000
@@ -33,7 +33,9 @@
 #else
 //#pragma inline
 #include <dos.h>
+#include <conio.h>
 #endif
+#define NOCURSOR
 #include "screen.h"
 bool Novell = FALSE;
 bool DisableGiveup = FALSE;
@@ -45,79 +47,28 @@
 long Int15;
 long Int28;
 
+static unsigned win3x;
 
-/*
-    Checking for Windows/386 and Windows 3.0
-
-    Mov  Ax,1600h
-    Int  2Fh
-
-    AL =  0h  means No Windows
-    AL = 80h  means No Win/386 mode
-    AL =  1h  means Win/386 2.xx running
-    AL = FFh  means Win/386 2.xx running
-
-    otherwise AL = Major Version and AH = Minor Version
-
-    Giving up time slices is done by issuing:
-
-    Mov  Ax,1680h
-    Int  2Fh
-
-    Starting a critical section is done by issuing:
-
-    Mov  Ax,1681h
-    Int  2Fh
-
-    Leaving a critical section is done by issuing:
-
-    Mov  Ax,1682h
-    Int  2Fh
-*/
-
-
-void pascal giveup(void) {
-  asm  nop
-  asm  nop
-  asm  nop
-  asm  nop
-  asm  nop
-  asm  nop
-  asm  nop
-  asm  nop
-  asm  nop
-  asm  nop
-  asm  nop
-  asm  nop
-  asm  nop
-  asm  nop
-  asm  nop
-  asm  nop
-  asm  nop
-  asm  nop
-  asm  nop
-  asm  nop
-  asm  nop
-  asm  nop
-  asm  nop
-  asm  nop
-  asm  nop
+static void pascal near NoMultitasker(void) {
   return;
 }
 
 
-static void pascal NoMultitasker(void) {
+static void (pascal near *pgiveup)(void) = NoMultitasker;
+
+void pascal giveup(void) {
+  pgiveup();
   return;
 }
 
 
-static void pascal DoubleDOS(void) {
+static void pascal near DoubleDOS(void) {
   asm  Mov   Ax,0EE02h   /* Give away 2 timer cycles (55ms ea) */
   asm  Int   21h
 }
 
 
-static void pascal PCMos(void) {
+static void pascal near PCMos(void) {
   NEEDSEGPUSHDS;
   NEEDSEGGETDS(MosVect);
   asm  Mov   Ah,07h      /* Wait for event */
@@ -129,25 +80,17 @@
   NEEDSEGPOPDS;
 }
 
-static void pascal Windows(void) {
-  static int Count;
-
-  /* if Windows 4.0 (i.w. Win95) then give up a time slice only once every */
-  /* 8th call to give up time.  This reduces the friendliness, but also    */
-  /* fixes the problem of Win95 taking away too many time slices and not   */
-  /* leaving enough time slices left to get real work done                 */
-
-  if (Tasker == WIN4) {
-    if (++Count < 8)
-      return;
-    Count = 0;
-  }
-
-  asm  Mov   Ax,1680h    /* give away cycles */
-  asm  Int   2Fh
+static void pascal near Windows(void) {
+    static unsigned tux;
+    if (win3x) {
+        gettext (1, 1, 1, 1, &tux);     /* dummy screen output to prevent */
+        puttext (1, 1, 1, 1, &tux);     /* Windows 3x from suspending task */
+    }
+    _AX = 0x1680;
+    geninterrupt (0x2f);
 }
 
-static void pascal Os2(void) {
+static void pascal near Os2(void) {
 
 #ifdef NEEDSEG
   asm  Int   28h
@@ -180,7 +123,7 @@
 #endif
 }
 
-static void pascal TopView(void) {
+static void pascal near TopView(void) {
   asm  Mov   Ax,1000h    /* give away timer cycles */
 #ifdef NEEDSEG
   asm  Int   15h
@@ -298,7 +241,7 @@
 asm             Int   21h
 asm             Pop   Bx
 asm             Cmp   Bx,Ax
-asm             Je    CheckWin3
+asm             Je    CheckWin
                 Tasker = MOS;
 asm             Mov   Ah,34h
 asm             Int   21h
@@ -308,34 +251,19 @@
 
 asm             Mov   word ptr [MosVect],Bx
 asm             Mov   word ptr [MosVect+2],Es
-asm             Jmp   short Exit
+asm             Jmp   Exit
+
+CheckWin:
+    _AX = 0x1680;
+    geninterrupt (0x2f);
+    if (_AL)
+        goto Exit;
+    Tasker = WIN;
+    _AX = 0x160a;                       /* returns AL=0, Windows version */
+    geninterrupt (0x2f);                /* in BX, works for Windows 3x/9x */
+    if (!_AL && _BH == 3)               /* but not supported on Windows NT */
+        win3x = 1;
 
-CheckWin3:
-asm             Mov  Ax,1600h
-asm             Int  2Fh
-asm             Cmp  Al,0           /* AL = 0   means No Windows    */
-asm             Je   CheckDOS5
-asm             Cmp  Al,80h         /* AL = 80h means no "386 mode" */
-asm             Je   CheckDOS5
-asm             Cmp  Al,1h          /* AL = 1   means Win/386 v2.xx */
-asm             Je   CheckDOS5      /*          don't want it       */
-asm             Cmp  Al,0FFh        /* AL = FFh means Win/386 v2.xx */
-asm             Je   CheckDOS5      /*          don't want it       */
-
-Win4:
-asm             Cmp  Al,4           /* AL = 4 means Win4 aka Win95  */
-asm             Jne  WinMethod
-
-                Tasker = WIN4;
-                goto Exit;
-
-WinMethod:
-                Tasker = WIN;       /* must be Win 3.0 in 386 mode  */
-                goto Exit;
-
-CheckDOS5:
-  if (DosVer >= 5)
-    goto WinMethod;
 
 Exit:;
   NEEDSEGPOPDS;
@@ -361,15 +289,8 @@
                 break;
   }
 
-  asm  Push Ds
-  asm  Mov  Ax, Cs
-  asm  Mov  Es, Ax
-  asm  Mov  Ds, Ax
-  asm  Mov  Di, offset giveup
-  asm  Mov  Cx, 12
-  asm  Cld
-  asm  Rep  Movsw
-  asm  Pop  Ds
+  pgiveup =  (void (pascal near *)(void)) _SI;
+
 #endif /* ifdef __OS2__ */
 }
 
