Index: /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-system-data.asm
===================================================================
--- /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-system-data.asm	(revision 60594)
+++ /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-system-data.asm	(revision 60595)
@@ -390,9 +390,9 @@
 
         ;
-        ; 1000h - the real mode segment number for BS3TEXT16. DPL=0. BASE=0x10000h
+        ; 1000h - the real mode segment number for BS3TEXT16. DPL=0, BASE=0x10000h, conforming, exec, read.
         ;
 BS3GdtAssertOffset 01000h
 BS3_GLOBAL_DATA Bs3Gdte_CODE16, 8h
-        dw  0ffffh, 00000h, 09b01h, 00000h
+        dw  0ffffh, 00000h, 09f01h, 00000h
 
         ;
Index: /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-I4D.asm
===================================================================
--- /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-I4D.asm	(revision 60594)
+++ /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-I4D.asm	(revision 60595)
@@ -63,4 +63,8 @@
         shr     edx, 10h
 
+%ifdef ASM_MODEL_FAR_CODE
+        retf
+%else
         ret
+%endif
 
Index: /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-I8DQ.asm
===================================================================
--- /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-I8DQ.asm	(revision 60594)
+++ /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-I8DQ.asm	(revision 60595)
@@ -44,7 +44,14 @@
         push    ss
         pop     es
+%ifdef ASM_MODEL_FAR_CODE
+        push    cs
+%endif
         call    $_?I8DQE
         pop     es
+%ifdef ASM_MODEL_FAR_CODE
+        retf
+%else
         ret
+%endif
 
 ;;
@@ -97,4 +104,8 @@
         pop     es
         pop     ds
+%ifdef ASM_MODEL_FAR_CODE
+        retf
+%else
         ret
+%endif
 
Index: /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-I8DR.asm
===================================================================
--- /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-I8DR.asm	(revision 60594)
+++ /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-I8DR.asm	(revision 60595)
@@ -44,7 +44,14 @@
         push    ss
         pop     es
+%ifdef ASM_MODEL_FAR_CODE
+        push    cs
+%endif
         call    $_?I8DRE
         pop     es
+%ifdef ASM_MODEL_FAR_CODE
+        retf
+%else
         ret
+%endif
 
 ;;
@@ -97,4 +104,8 @@
         pop     es
         pop     ds
+%ifdef ASM_MODEL_FAR_CODE
+        retf
+%else
         ret
+%endif
 
Index: /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-I8RS.asm
===================================================================
--- /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-I8RS.asm	(revision 60594)
+++ /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-I8RS.asm	(revision 60595)
@@ -61,4 +61,8 @@
 .return:
         pop     si
+%ifdef ASM_MODEL_FAR_CODE
+        retf
+%else
         ret
+%endif
 
Index: /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U4D.asm
===================================================================
--- /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U4D.asm	(revision 60594)
+++ /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U4D.asm	(revision 60595)
@@ -103,4 +103,8 @@
 
 %endif
+%ifdef ASM_MODEL_FAR_CODE
+        retf
+%else
         ret
+%endif
 
Index: /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U8DQ.asm
===================================================================
--- /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U8DQ.asm	(revision 60594)
+++ /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U8DQ.asm	(revision 60595)
@@ -44,7 +44,14 @@
         push    ss
         pop     es
+%ifdef BS3_MODEL_FAR_CODE
+        push    cs
+%endif
         call    $_?U8DQE
         pop     es
+%ifdef BS3_MODEL_FAR_CODE
+        retf
+%else
         ret
+%endif
 
 ;;
@@ -100,4 +107,8 @@
         pop     es
         pop     ds
+%ifdef ASM_MODEL_FAR_CODE
+        retf
+%else
         ret
+%endif
 
Index: /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U8DR.asm
===================================================================
--- /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U8DR.asm	(revision 60594)
+++ /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U8DR.asm	(revision 60595)
@@ -44,7 +44,14 @@
         push    ss
         pop     es
+%ifdef ASM_MODEL_FAR_CODE
+        push    cs
+%endif
         call    $_?U8DRE
         pop     es
+%ifdef ASM_MODEL_FAR_CODE
+        retf
+%else
         ret
+%endif
 
 ;;
@@ -100,4 +107,8 @@
         pop     es
         pop     ds
+%ifdef ASM_MODEL_FAR_CODE
+        retf
+%else
         ret
+%endif
 
Index: /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U8LS.asm
===================================================================
--- /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U8LS.asm	(revision 60594)
+++ /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U8LS.asm	(revision 60595)
@@ -63,4 +63,8 @@
 .return:
         pop     si
+%ifdef ASM_MODEL_FAR_CODE
+        retf
+%else
         ret
+%endif
 
Index: /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U8RS.asm
===================================================================
--- /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U8RS.asm	(revision 60594)
+++ /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-wc16-U8RS.asm	(revision 60595)
@@ -61,4 +61,8 @@
 .return:
         pop     si
+%ifdef ASM_MODEL_FAR_CODE
+        retf
+%else
         ret
+%endif
 
Index: /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h
===================================================================
--- /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h	(revision 60594)
+++ /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h	(revision 60595)
@@ -50,6 +50,8 @@
 
 /** @def BS3_USE_ALT_16BIT_TEXT_SEG
+ * @addtogroup grp_bs3kit
  * Combines the BS3_USE_RM_TEXT_SEG,  BS3_USE_X0_TEXT_SEG, and
- * BS3_USE_X1_TEXT_SEG indicators into a single one. */
+ * BS3_USE_X1_TEXT_SEG indicators into a single one.
+ */
 #if defined(BS3_USE_RM_TEXT_SEG) || defined(BS3_USE_X0_TEXT_SEG) || defined(BS3_USE_X1_TEXT_SEG)
 # define BS3_USE_ALT_16BIT_TEXT_SEG
@@ -57,4 +59,15 @@
 # undef  BS3_USE_ALT_16BIT_TEXT_SEG
 #endif
+
+/** @def BS3_MODEL_FAR_CODE
+ * @addtogroup grp_bs3kit
+ * Default compiler model indicates far code.
+ */
+#ifdef DOXYGEN_RUNNING
+# define BS3_MODEL_FAR_CODE
+#elif !defined(BS3_MODEL_FAR_CODE) && (defined(__LARGE__) || defined(__MEDIUM__) || defined(__HUGE__)) && ARCH_BITS == 16
+# define BS3_MODEL_FAR_CODE
+#endif
+
 
 /*
@@ -64,10 +77,15 @@
  * declarations before we can define it. Thus the duplciate effort.)
  */
-#if ARCH_BITS != 16 || !defined(BS3_USE_ALT_16BIT_TEXT_SEG)
-# define RT_MANGLER(a_Name) RT_CONCAT3(a_Name,_c,ARCH_BITS)
+#if ARCH_BITS == 16
+# undef RTCALL
+# if defined(BS3_USE_ALT_16BIT_TEXT_SEG)
+#  define RTCALL __cdecl __far
+#  define RT_MANGLER(a_Name) RT_CONCAT(a_Name,_f16)
+# else
+#  define RTCALL __cdecl __near
+#  define RT_MANGLER(a_Name) RT_CONCAT(a_Name,_c16)
+# endif
 #else
-# define RT_MANGLER(a_Name) RT_CONCAT(a_Name,_f16)
-# undef RTCALL
-# define RTCALL __cdecl __far
+# define RT_MANGLER(a_Name)  RT_CONCAT3(a_Name,_c,ARCH_BITS)
 #endif
 #include <iprt/mangling.h>
