SHANIT Menu

Information Technology

Software Consulting


Borland Turbo C


Borland Turbo C manual [1988]

Borland tried to follow on the success of Turbo Pascal, but it took longer than they expected to produce a good C compiler. We didn't have many C programs in 1988, so we didn't use Turbo C that much. Turbo C shows marks the beginning of the memory model explosion offering a work around the 64K segment limitation of the Intel 8086 architecture. Near pointers were two-byte values with an offset from a fixed segment pointer and could access only a single 64K segment. Far pointers were four-byte values with a two-byte segment pointer and a two-byte offset and could access the lower 1MB of memory, because the address calculation shifted the segment pointer 4 bits before adding the offset.

Later compilers invented huge pointers, which were four-byte values that were in fact four-byte addresses and could access any area of memory by copying through a window created by a memory manager. For many C programmers, far pointers on Intel systems were the first time they have had to deal with a system where the size of a pointer did not match the size of an integer.

Turbo C also supported the "tiny" model, where all code and data remain within the same 64K segment. This model was required for the .COM format executables. The "Small" model, where code and data were separate each in its own 64K segment, the "Medium" model with far pointers for code and near pointers for data, the "Compact" model with near pointers for code and far pointers for data, and the "Large" model with far pointers for both code and data, as well as the "Huge" model with far pointers for code, data and static data.


Tablet/Mobile website
Tablet/Mobile website

Borland Turbo C

Borland Turbo C manual [1988]
Borland tried to follow on the success of Turbo Pascal, but it took longer than they expected to produce a good C compiler. We didn't have many C programs in 1988, so we didn't use Turbo C that much. Turbo C shows marks the beginning of the memory model explosion offering a work around the 64K segment limitation of the Intel 8086 architecture. Near pointers were two-byte values with an offset from a fixed segment pointer and could access only a single 64K segment. Far pointers were four-byte values with a two-byte segment pointer and a two-byte offset and could access the lower 1MB of memory, because the address calculation shifted the segment pointer 4 bits before adding the offset.

Later compilers invented huge pointers, which were four-byte values that were in fact four-byte addresses and could access any area of memory by copying through a window created by a memory manager. For many C programmers, far pointers on Intel systems were the first time they have had to deal with a system where the size of a pointer did not match the size of an integer.

Turbo C also supported the "tiny" model, where all code and data remain within the same 64K segment. This model was required for the .COM format executables. The "Small" model, where code and data were separate each in its own 64K segment, the "Medium" model with far pointers for code and near pointers for data, the "Compact" model with near pointers for code and far pointers for data, and the "Large" model with far pointers for both code and data, as well as the "Huge" model with far pointers for code, data and static data.

©2005-2024 Shanit
Unmute
English
Francais