Intel XENIX 286 Programmers Guide (86) - Tenox.tc

Intel XENIX 286 Programmers Guide (86) - Tenox.tc Intel XENIX 286 Programmers Guide (86) - Tenox.tc

09.06.2013 Views

XENIX Programming cc: C Compiler Many options (or equivalent forms of these options) are passed to the link editor as the last phase of compilation. The s, m, and 1 configuration options are passed to specify memory requirements. The -i, -F, and -p are passed to specify other characteristics of the final program. The -D and -1 options may be used several times on the command line. The -D option must not define the same name twice. These options affect subsequent source files only. Memory Models Table 2-2 defines the number of text and data segments for the different program memory models. This table also lists the segment register values. * Table 2-2. Segments in Program Memory Models Model Text Data Small 1* 1* Middle 1 per module 1 Large 1 per module 1 per module Huge 1 per module 1 per module In impure-text small model programs, text and data occupy the same segment. In pure-text programs, they occupy different segments. Pointer and Integer Sizes Table 2-3 defines the sizes (in bits) of text and data pointers, in each program memory model. The integer (int type) size for compilers that run on the 80286 is 16 bits. Table 2-3. Pointer and Integer Sizes in Program Memory Models Model Data Pointer Text Pointer Small 16 16 Middle 16 32 Large 32 32 Huge 32 32 2-23

cc: C Compiler XENIX Programming Segment and Module Names Table 2-4 lists the default text and data segment names, and the default module name, for each object file. Table 2-4. Default Segment and Module Names Model Text Data Small TEXT DATA - Middle module* TEXT DATA - Large module* TEXT DATA Huge module*_TEXT DATA * module is the filename of the program being compiled without the .c extension. 2-24

cc: C Compiler <strong>XENIX</strong> Programming<br />

Segment and Module Names<br />

Table 2-4 lists the default text and data segment names, and the default module name,<br />

for each object file.<br />

Table 2-4. Default Segment and Module Names<br />

Model Text Data<br />

Small TEXT DATA<br />

-<br />

Middle module* TEXT DATA<br />

-<br />

Large module* TEXT DATA<br />

Huge module*_TEXT DATA<br />

* module is the filename of the program being compiled without the .c extension.<br />

2-24

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!