Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ User's Guide - there are two code models; http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
There are two code models;

 1. the small code model and

 2. the big code model.

A small code model is one in which all calls to functions are made with near
calls.  In a near call, the destination address is 32 bits and is relative
to the segment value in segment register CS.  Hence, in a small code model,
all code comprising your program, including library functions, must be less
than 4GB.

A big code model is one in which all calls to functions are made with far
calls.  In a far call, the destination address is 48 bits (a 16-bit segment
value and a 32-bit offset relative to the segment value).  This model allows
the size of the code comprising your program to exceed 4GB.

+--------------------------------------------------------------------------+
|   Note:  If your program contains less than 4GB of code, you should use  |
| a memory model that employs the small code model.  This will result in   |
| smaller and faster code since near calls are smaller instructions and    |
| are processed faster by the CPU.                                         |
+--------------------------------------------------------------------------+

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson