diff -Nru 012/main/source/display/scrlback.c 013/main/source/display/scrlback.c
--- 012/main/source/display/scrlback.c	1996-08-09 09:48:36 +0000
+++ 013/main/source/display/scrlback.c	2014-10-02 04:53:12 +0000
@@ -52,6 +52,7 @@
 static postype End;
 static bool    FirstLineInScrollBack = FALSE;
 
+extern uint far *KbdStatus;
 
 /********************************************************************
 *
diff -Nru 012/main/source/h/pcboard.ext 013/main/source/h/pcboard.ext
--- 012/main/source/h/pcboard.ext	1995-08-20 16:48:02 +0000
+++ 013/main/source/h/pcboard.ext	2014-10-02 04:53:12 +0000
@@ -1,7 +1,3 @@
-#ifndef __OS2__
-extern char far *KbdStatus;
-#endif
-
 extern controltype Control;
 extern asytype Asy;
 extern disptype Display;
diff -Nru 012/main/source/main/init.c 013/main/source/main/init.c
--- 012/main/source/main/init.c	2014-10-01 21:59:30 +0000
+++ 013/main/source/main/init.c	2014-10-02 04:53:12 +0000
@@ -54,7 +54,7 @@
   CTimeoutSemaphore WaitKeySem;
   CSemaphore        KbdTimer;
 #else
-  char far *KbdStatus;         /* pointer to Keyboard status byte */
+  uint far *KbdStatus;
 #endif
 
 colortype static ScreenColors[2] = {{0x07,0x70,0x70,0x07,0x00,0x07,0x70,0x07,0x07,0x07,0x07}, {0x1F,0x70,0x70,0x4F,0x10,0x17,0x30,0x1E,0x4E,0x1E,0x1C}};
@@ -1084,7 +1084,7 @@
   setlimits(23);
 
   #ifndef __OS2__
-    KbdStatus  = (char far *) MK_FP(0x40,0x17);
+    KbdStatus  = (uint far *) MK_FP(0x40,0x17);
   #endif
 
   Scrn_24Hour           = TRUE;
diff -Nru 012/main/source/modem/modemfos.c 013/main/source/modem/modemfos.c
--- 012/main/source/modem/modemfos.c	2014-10-01 21:59:30 +0000
+++ 013/main/source/modem/modemfos.c	2014-10-02 04:53:12 +0000
@@ -12,12 +12,6 @@
 /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
 
 
-#if __BORLANDC__ < 0x500
-// under BC5, the usage of the inline pragma causes errors - under BC31 the
-// opposite occurs!
-#pragma inline
-#endif
-
 #if defined(COMM) && defined(MULTIPORT)
 
 #include "project.h"
@@ -99,11 +93,11 @@
     char SaveCD = CDokay;
   #endif
 
-  asm mov ah,03
-  asm mov dx,Port
-  asm int 14h
-  asm and ax,80h
-  asm mov CDokay,al
+  _AH = 3;                              //  asm mov ah,03
+  _DX = Port;                           //  asm mov dx,Port
+  geninterrupt (0x14);                  //  asm int 14h
+  _AX &= 0x80;                          //  asm and ax,80h
+  CDokay = _AL;                         //  asm mov CDokay,al
 
   #ifdef FOSSILTEST
     if (CDokay != SaveCD)
@@ -175,10 +169,10 @@
   BaudDivisor += (N81 ? 3 : 2);                /* add data bits             */
   BaudDivisor += 0;                            /* hardcode 1 stop bit       */
   BaudDivisor += (N81 ? 0 : 0x18);             /* set parity bits           */
-  asm mov Ax,BaudDivisor
-  asm mov Ah,00
-  asm mov Dx,Port
-  asm int 14h
+  _AX = BaudDivisor;                    //  asm mov Ax,BaudDivisor
+  _AH = 0;                              //  asm mov Ah,00
+  _DX = Port;                           //  asm mov dx, Port
+  geninterrupt (0x14);                  //  asm int 14h
 }   /*lint !e550 */
 
 
@@ -191,12 +185,12 @@
     _CX = sizeof(Fossil);
   #endif
 
-  asm mov ax, seg Fossil
-  asm mov es, ax
-  asm mov di, offset Fossil
-  asm mov dx, Port
-  asm mov ah, 1Bh
-  asm int 14h
+  _ES = FP_SEG ((void far *) &Fossil);  //  asm mov ax, seg Fossil
+                                        //  asm mov es, ax
+  _DI = FP_OFF ((void far *) &Fossil);  //  asm mov di, offset Fossil
+  _DX = Port;                           //  asm mov dx, Port
+  _AH = 0x1b;                           //  asm mov ah, 1Bh
+  geninterrupt (0x14);                  //  asm int 14h
 
 //#ifdef FOSSILTEST
 //{
@@ -237,9 +231,9 @@
 
   if (NumBytes != 0) {
     if (NumBytes == 1) {
-      asm mov ah,02
-      asm mov dx,Port
-      asm int 14h
+      _AH = 2;                          //  asm mov ah,02
+      _DX = Port;                       //  asm mov dx,Port
+      geninterrupt (0x14);              //  asm int 14h
       #ifdef _MSC_VER
         {
           char ALreg;
@@ -250,17 +244,12 @@
         Buf[0] = _AL;
       #endif
     } else {
-      #ifdef LDATA
-        asm les di,Buf
-      #else
-        asm mov ax,ds
-        asm mov es,ax
-        asm mov di,Buf
-      #endif
-      asm mov ah,18h
-      asm mov cx,NumBytes
-      asm mov dx,Port
-      asm int 14h
+      _ES = FP_SEG ((void far *) Buf);
+      _DI = FP_OFF ((void far *) Buf);
+      _AH = 0x18;                       //  asm mov ah,18h
+      _CX = NumBytes;                   //  asm mov cx,NumBytes
+      _DX = Port;                       //  asm mov dx,Port
+      geninterrupt (0x14);              //  asm int 14h
     }
 
     #ifdef FOSSILTEST
@@ -349,12 +338,12 @@
     _CX = sizeof(Fossil);
   #endif
 
-  asm mov ax, seg Fossil
-  asm mov es, ax
-  asm mov di, offset Fossil
-  asm mov dx, Port
-  asm mov ah, 1Bh
-  asm int 14h
+  _ES = FP_SEG ((void far *) &Fossil);  //  asm mov ax, seg Fossil
+                                        //  asm mov es, ax
+  _DI = FP_OFF ((void far *) &Fossil);  //  asm mov di, offset Fossil
+  _DX = Port;                           //  asm mov dx, Port
+  _AH = 0x1b;                           //  asm mov ah, 1Bh
+  geninterrupt (0x14);                  //  asm int 14h
   return(Fossil.OutBufSize - Fossil.BufOutBytes);
 }
 
@@ -371,9 +360,9 @@
 }
 
 void LIBENTRY FOSSIL_turnoffdtr(void) {
-  asm mov ax,0600h
-  asm mov dx,Port
-  asm int 14h
+  _AX = 0x600;                          //  asm mov ax,0600h
+  _DX = Port;                           //  asm mov dx,Port
+  geninterrupt (0x14);                  //  asm int 14h
 
   #ifdef FOSSILTEST
     dump(NULL,0,FOSSIL_DTROFF);
@@ -381,9 +370,9 @@
 }
 
 void LIBENTRY FOSSIL_turnondtr(void) {
-  asm mov ax,0601h
-  asm mov dx,Port
-  asm int 14h
+  _AX = 0x601;                          //  asm mov ax,0601h
+  _DX = Port;                           //  asm mov dx,Port
+  geninterrupt (0x14);                  //  asm int 14h
 
   #ifdef FOSSILTEST
     dump(NULL,0,FOSSIL_DTRON);
@@ -400,18 +389,18 @@
 }
 
 void LIBENTRY FOSSIL_clearoutbuf(void) {
-  asm mov ah,09h
-  asm mov dx,Port
-  asm int 14h
+  _AH = 9;                              //  asm mov ah,09h
+  _DX = Port;                           //  asm mov dx,Port
+  geninterrupt (0x14);                  //  asm int 14h
 }
 
 void LIBENTRY FOSSIL_clearinbuf(void) {
 //#ifdef FOSSILTEST
 //  fastprint(0,23,"in buffer cleared",0x2F);
 //#endif
-  asm mov ah,0Ah
-  asm mov dx,Port
-  asm int 14h
+  _AH = 0x0a;                           //  asm mov ah,0Ah
+  _DX = Port;                           //  asm mov dx,Port
+  geninterrupt (0x14);                  //  asm int 14h
 
   FosInBytes = 0;
   FosHeadPtr = 0;
@@ -423,18 +412,18 @@
 }
 
 void LIBENTRY FOSSIL_commgo(void) {
-  asm mov Ax,1000h
-  asm mov Dx,Port
-  asm int 14h
+  _AX = 0x1000;                         //  asm mov Ax,1000h
+  _DX = Port;                           //  asm mov dx,Port
+  geninterrupt (0x14);                  //  asm int 14h
 }
 
 void LIBENTRY FOSSIL_commstop(void) {
 //#ifdef FOSSILTEST
 //  fastprint(0,23,"comm stopped",0x2F);
 //#endif
-  asm mov Ax,1002h
-  asm mov Dx,Port
-  asm int 14h
+  _AX = 0x1002;                         //  asm mov Ax,1002h
+  _DX = Port;                           //  asm mov dx,Port
+  geninterrupt (0x14);                  //  asm int 14h
 }
 
 void LIBENTRY FOSSIL_commpause(void) {
@@ -450,9 +439,9 @@
   if (NumBytes == 0)
     return(0);
 
-  asm mov ah,0Ch
-  asm mov dx,Port
-  asm int 14h
+  _AH = 0x0c;                           //  asm mov ah,0Ch
+  _DX = Port;                           //  asm mov dx,Port
+  geninterrupt (0x14);                  //  asm int 14h
 
   #ifdef _MSC_VER
     asm mov AXreg,ax
@@ -609,10 +598,10 @@
 
 
 void LIBENTRY FOSSIL_csendbyte(unsigned char ByteToSend) {
-  asm mov ah,01h
-  asm mov al,ByteToSend
-  asm mov dx,Port
-  asm int 14h
+  _AH = 1;                              //  asm mov ah,01h
+  _AL = ByteToSend;                     //  asm mov al,ByteToSend
+  _DX = Port;                           //  asm mov dx,Port
+  geninterrupt (0x14);                  //  asm int 14h
 
   #ifdef FOSSILTEST
     dump(&ByteToSend,1,FOSSIL_OUT);
@@ -626,18 +615,12 @@
 
 
 void LIBENTRY FOSSIL_csendstr(char *pStr, int StrLen) {
-  #ifdef LDATA
-    asm les di,pStr
-  #else
-    asm mov ax,ds
-    asm mov es,ax
-    asm mov di,pStr
-  #endif
-
-  asm mov ah,19h
-  asm mov cx,StrLen
-  asm mov dx,Port
-  asm int 14h
+  _CX = StrLen;                         //  asm mov cx,StrLen
+  _ES = FP_SEG ((void far *) pStr);
+  _DI = FP_OFF ((void far *) pStr);
+  _DX = Port;                           //  asm mov dx,Port
+  _AH = 0x19;                           //  asm mov ah,19h
+  geninterrupt (0x14);                  //  asm int 14h
 
   #ifdef FOSSILTEST
     dump(pStr,StrLen,FOSSIL_OUT);
@@ -651,11 +634,11 @@
 
 
 int static near LIBENTRY FOSSIL_initializedriver(int PortNum) {
-  asm mov Ah,04h
-  asm mov Dx,PortNum
-  asm xor Bx,Bx
-  asm int 14h
-  asm sub Ax,1954h
+  _AH = 4;                              //  asm mov Ah,04h
+  _DX = PortNum;                        //  asm mov Dx,PortNum
+  _BX = 0;                              //  asm xor Bx,Bx
+  geninterrupt (0x14);                  //  asm int 14h
+  _AX -= 0x1954;                        //  asm sub Ax,1954h
   #ifdef _MSC_VER
     return;  /* return value is in AX */
   #else
@@ -673,13 +656,12 @@
     _CX = sizeof(Fossil);
   #endif
 
-  asm mov ax, seg Fossil
-  asm mov es, ax
-  asm mov di, offset Fossil
-  asm mov dx, Port
-
-  asm mov ah, 1Bh
-  asm int 14h
+  _ES = FP_SEG ((void far *) &Fossil);  //  asm mov ax, seg Fossil
+                                        //  asm mov es, ax
+  _DI = FP_OFF ((void far *) &Fossil);  //  asm mov di, offset Fossil
+  _DX = Port;                           //  asm mov dx, Port
+  _AH = 0x1b;                           //  asm mov ah, 1Bh
+  geninterrupt (0x14);                  //  asm int 14h
 
 /*
   #ifdef _MSC_VER
@@ -742,14 +724,14 @@
   }
 
   if (! PcbData.DisableCTS) {
-    asm mov Ax,0F02h             /* enable CTS/RTS flow control */
-    asm mov Dx,Port
-    asm int 14h
+    _AX = 0x0f02;                 /* enable CTS/RTS flow control */
+    _DX = Port;
+    geninterrupt (0x14);
   }
 
-  asm mov Ax,1000h               /* disable Ctrl-C/K check in FOSSIL driver */
-  asm mov Dx,Port
-  asm int 14h
+  _AX = 0x1000;               /* disable Ctrl-C/K check in FOSSIL driver */
+  _DX = Port;
+  geninterrupt (0x14);
 
   setport(bauddivisor(Asy.ModemSpeed),Asy.DataBits);
 
