Index: /trunk/include/iprt/asm-amd64-x86-watcom-16.h
===================================================================
--- /trunk/include/iprt/asm-amd64-x86-watcom-16.h	(revision 59309)
+++ /trunk/include/iprt/asm-amd64-x86-watcom-16.h	(revision 59310)
@@ -48,4 +48,5 @@
 #undef      ASMGetIDTR
 #pragma aux ASMGetIDTR = \
+    ".286p" \
     "sidt fword ptr es:[bx]" \
     parm [es bx] \
@@ -54,4 +55,5 @@
 #undef      ASMGetIdtrLimit
 #pragma aux ASMGetIdtrLimit = \
+    ".286p" \
     "sub  sp, 8" \
     "mov  bx, sp" \
@@ -65,4 +67,5 @@
 #undef      ASMSetIDTR
 #pragma aux ASMSetIDTR = \
+    ".286p" \
     "lidt fword ptr es:[bx]" \
     parm [es bx] nomemory \
@@ -71,4 +74,5 @@
 #undef      ASMGetGDTR
 #pragma aux ASMGetGDTR = \
+    ".286p" \
     "sgdt fword ptr es:[bx]" \
     parm [es bx] \
@@ -77,4 +81,5 @@
 #undef      ASMSetGDTR
 #pragma aux ASMSetGDTR = \
+    ".286p" \
     "lgdt fword ptr es:[bx]" \
     parm [es bx] nomemory \
@@ -104,4 +109,5 @@
 #undef      ASMGetFS
 #pragma aux ASMGetFS = \
+    ".386" \
     "mov ax, fs" \
     parm [] nomemory \
@@ -111,4 +117,5 @@
 #undef      ASMGetGS
 #pragma aux ASMGetGS = \
+    ".386" \
     "mov ax, gs" \
     parm [] nomemory \
@@ -125,4 +132,5 @@
 #undef      ASMGetTR
 #pragma aux ASMGetTR = \
+    ".286" \
     "str ax" \
     parm [] nomemory \
@@ -132,4 +140,5 @@
 #undef      ASMGetLDTR
 #pragma aux ASMGetLDTR = \
+    ".286" \
     "sldt ax" \
     parm [] nomemory \
@@ -226,4 +235,5 @@
 #undef      ASMGetCR0
 #pragma aux ASMGetCR0 = \
+    ".386" \
     "mov eax, cr0" \
     "mov edx, eax" \
@@ -235,4 +245,5 @@
 #undef      ASMSetCR0
 #pragma aux ASMSetCR0 = \
+    ".386" \
     "shl edx, 16" \
     "mov dx, ax" \
@@ -243,4 +254,5 @@
 #undef      ASMGetCR2
 #pragma aux ASMGetCR2 = \
+    ".386" \
     "mov eax, cr2" \
     "mov edx, eax" \
@@ -252,4 +264,5 @@
 #undef      ASMSetCR2
 #pragma aux ASMSetCR2 = \
+    ".386" \
     "shl edx, 16" \
     "mov dx, ax" \
@@ -260,4 +273,5 @@
 #undef      ASMGetCR3
 #pragma aux ASMGetCR3 = \
+    ".386" \
     "mov eax, cr3" \
     "mov edx, eax" \
@@ -269,4 +283,5 @@
 #undef      ASMSetCR3
 #pragma aux ASMSetCR3 = \
+    ".386" \
     "shl edx, 16" \
     "mov dx, ax" \
@@ -277,4 +292,5 @@
 #undef      ASMReloadCR3
 #pragma aux ASMReloadCR3 = \
+    ".386" \
     "mov eax, cr3" \
     "mov cr3, eax" \
@@ -284,4 +300,5 @@
 #undef      ASMGetCR4
 #pragma aux ASMGetCR4 = \
+    ".386" \
     "mov eax, cr4" \
     "mov edx, eax" \
@@ -293,4 +310,5 @@
 #undef      ASMSetCR4
 #pragma aux ASMSetCR4 = \
+    ".386" \
     "shl edx, 16" \
     "mov dx, ax" \
@@ -375,4 +393,5 @@
 #undef      ASMGetDR0
 #pragma aux ASMGetDR0 = \
+    ".386" \
     "mov eax, dr0" \
     "mov edx, eax" \
@@ -384,4 +403,5 @@
 #undef      ASMGetDR1
 #pragma aux ASMGetDR1 = \
+    ".386" \
     "mov eax, dr1" \
     "mov edx, eax" \
@@ -393,4 +413,5 @@
 #undef      ASMGetDR2
 #pragma aux ASMGetDR2 = \
+    ".386" \
     "mov eax, dr2" \
     "mov edx, eax" \
@@ -402,4 +423,5 @@
 #undef      ASMGetDR3
 #pragma aux ASMGetDR3 = \
+    ".386" \
     "mov eax, dr3" \
     "mov edx, eax" \
@@ -411,4 +433,5 @@
 #undef      ASMGetDR6
 #pragma aux ASMGetDR6 = \
+    ".386" \
     "mov eax, dr6" \
     "mov edx, eax" \
@@ -420,4 +443,5 @@
 #undef      ASMGetAndClearDR6
 #pragma aux ASMGetAndClearDR6 = \
+    ".386" \
     "mov edx, 0ffff0ff0h" \
     "mov eax, dr6" \
@@ -431,4 +455,5 @@
 #undef      ASMGetDR7
 #pragma aux ASMGetDR7 = \
+    ".386" \
     "mov eax, dr7" \
     "mov edx, eax" \
@@ -440,4 +465,5 @@
 #undef      ASMSetDR0
 #pragma aux ASMSetDR0 = \
+    ".386" \
     "shl edx, 16" \
     "mov dx, ax" \
@@ -448,4 +474,5 @@
 #undef      ASMSetDR1
 #pragma aux ASMSetDR1 = \
+    ".386" \
     "shl edx, 16" \
     "mov dx, ax" \
@@ -456,4 +483,5 @@
 #undef      ASMSetDR2
 #pragma aux ASMSetDR2 = \
+    ".386" \
     "shl edx, 16" \
     "mov dx, ax" \
@@ -464,4 +492,5 @@
 #undef      ASMSetDR3
 #pragma aux ASMSetDR3 = \
+    ".386" \
     "shl edx, 16" \
     "mov dx, ax" \
@@ -472,4 +501,5 @@
 #undef      ASMSetDR6
 #pragma aux ASMSetDR6 = \
+    ".386" \
     "shl edx, 16" \
     "mov dx, ax" \
@@ -480,4 +510,5 @@
 #undef      ASMSetDR7
 #pragma aux ASMSetDR7 = \
+    ".386" \
     "shl edx, 16" \
     "mov dx, ax" \
@@ -516,4 +547,5 @@
 #undef      ASMOutU32
 #pragma aux ASMOutU32 = \
+    ".386" \
     "shl ecx, 16" \
     "mov cx, ax" \
@@ -525,4 +557,5 @@
 #undef      ASMInU32
 #pragma aux ASMInU32 = \
+    ".386" \
     "in eax, dx" \
     "mov ecx, eax" \
@@ -534,4 +567,5 @@
 #undef      ASMOutStrU8
 #pragma aux ASMOutStrU8 = \
+    ".186" \
     "mov ds, bx" \
     "rep outsb" \
@@ -541,4 +575,5 @@
 #undef      ASMInStrU8
 #pragma aux ASMInStrU8 = \
+    ".186" \
     "rep insb" \
     parm [dx] [es di] [cx] \
@@ -547,4 +582,5 @@
 #undef      ASMOutStrU16
 #pragma aux ASMOutStrU16 = \
+    ".186" \
     "mov ds, bx" \
     "rep outsw" \
@@ -554,4 +590,5 @@
 #undef      ASMInStrU16
 #pragma aux ASMInStrU16 = \
+    ".186" \
     "rep insw" \
     parm [dx] [es di] [cx] \
@@ -560,4 +597,5 @@
 #undef      ASMOutStrU32
 #pragma aux ASMOutStrU32 = \
+    ".386" \
     "mov ds, bx" \
     "rep outsd" \
@@ -567,4 +605,5 @@
 #undef      ASMInStrU32
 #pragma aux ASMInStrU32 = \
+    ".386" \
     "rep insd" \
     parm [dx] [es di] [cx] \
Index: /trunk/include/iprt/asm-amd64-x86.h
===================================================================
--- /trunk/include/iprt/asm-amd64-x86.h	(revision 59309)
+++ /trunk/include/iprt/asm-amd64-x86.h	(revision 59310)
@@ -1270,11 +1270,14 @@
  * @returns true if CPUID is supported.
  */
+#ifdef __WATCOMC__
+DECLASM(bool) ASMHasCpuId(void);
+#else
 DECLINLINE(bool) ASMHasCpuId(void)
 {
-#ifdef RT_ARCH_AMD64
+# ifdef RT_ARCH_AMD64
     return true; /* ASSUME that all amd64 compatible CPUs have cpuid. */
-#else /* !RT_ARCH_AMD64 */
+# else /* !RT_ARCH_AMD64 */
     bool        fRet = false;
-# if RT_INLINE_ASM_GNU_STYLE
+#  if RT_INLINE_ASM_GNU_STYLE
     uint32_t    u1;
     uint32_t    u2;
@@ -1292,5 +1295,5 @@
              "popf\n\t"
              : "=m" (fRet), "=r" (u1), "=r" (u2));
-# else
+#  else
     __asm
     {
@@ -1308,8 +1311,9 @@
         popfd
     }
-# endif
+#  endif
     return fRet;
-#endif /* !RT_ARCH_AMD64 */
-}
+# endif /* !RT_ARCH_AMD64 */
+}
+#endif
 
 
Index: /trunk/include/iprt/cdefs.h
===================================================================
--- /trunk/include/iprt/cdefs.h	(revision 59309)
+++ /trunk/include/iprt/cdefs.h	(revision 59310)
@@ -411,4 +411,6 @@
 # elif defined(_WIN32) || defined(_WIN64)
 #  define RT_OPSYS      RT_OPSYS_WINDOWS
+# elif defined(MSDOS) || defined(_MSDOS) || defined(DOS16RM) /* OW+MSC || MSC || DMC */
+#  define RT_OPSYS      RT_OPSYS_DOS
 # else
 #  error "Port Me"
Index: /trunk/include/iprt/types.h
===================================================================
--- /trunk/include/iprt/types.h	(revision 59309)
+++ /trunk/include/iprt/types.h	(revision 59310)
@@ -764,5 +764,5 @@
 
 /** Signed integer which can contain both GC and HC pointers. */
-#if (HC_ARCH_BITS == 32 && GC_ARCH_BITS == 32)
+#if (HC_ARCH_BITS == 32 && GC_ARCH_BITS == 32) || (HC_ARCH_BITS == 16 || GC_ARCH_BITS == 16)
 typedef int32_t         RTINTPTR;
 #elif (HC_ARCH_BITS == 64 || GC_ARCH_BITS == 64)
@@ -776,5 +776,5 @@
 typedef const RTINTPTR *PCRTINTPTR;
 /** The maximum value the RTINTPTR type can hold. */
-#if (HC_ARCH_BITS == 32 && GC_ARCH_BITS == 32)
+#if (HC_ARCH_BITS == 32 && GC_ARCH_BITS == 32) || (HC_ARCH_BITS == 16 || GC_ARCH_BITS == 16)
 # define RTINTPTR_MAX   INT32_MAX
 #elif (HC_ARCH_BITS == 64 || GC_ARCH_BITS == 64)
@@ -784,5 +784,5 @@
 #endif
 /** The minimum value the RTINTPTR type can hold. */
-#if (HC_ARCH_BITS == 32 && GC_ARCH_BITS == 32)
+#if (HC_ARCH_BITS == 32 && GC_ARCH_BITS == 32) || (HC_ARCH_BITS == 16 || GC_ARCH_BITS == 16)
 # define RTINTPTR_MIN   INT32_MIN
 #elif (HC_ARCH_BITS == 64 || GC_ARCH_BITS == 64)
@@ -793,5 +793,5 @@
 
 /** Unsigned integer which can contain both GC and HC pointers. */
-#if (HC_ARCH_BITS == 32 && GC_ARCH_BITS == 32)
+#if (HC_ARCH_BITS == 32 && GC_ARCH_BITS == 32) || (HC_ARCH_BITS == 16 || GC_ARCH_BITS == 16)
 typedef uint32_t        RTUINTPTR;
 #elif (HC_ARCH_BITS == 64 || GC_ARCH_BITS == 64)
@@ -805,5 +805,5 @@
 typedef const RTUINTPTR *PCRTUINTPTR;
 /** The maximum value the RTUINTPTR type can hold. */
-#if (HC_ARCH_BITS == 32 && GC_ARCH_BITS == 32)
+#if (HC_ARCH_BITS == 32 && GC_ARCH_BITS == 32) || (HC_ARCH_BITS == 16 || GC_ARCH_BITS == 16)
 # define RTUINTPTR_MAX  UINT32_MAX
 #elif (HC_ARCH_BITS == 64 || GC_ARCH_BITS == 64)
