09.06.2013 Views

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

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

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

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

Many options (or equivalent forms of these options) are passed to the link editor as the<br />

last phase of compilation. The s, m, and 1 configuration options are passed to specify<br />

memory requirements. The -i, -F, and -p are passed to specify other characteristics of<br />

the final program.<br />

The -D and -1 options may be used several times on the command line. The -D option<br />

must not define the same name twice. These options affect subsequent source files<br />

only.<br />

Memory Models<br />

Table 2-2 defines the number of text and data segments for the different program<br />

memory models. This table also lists the segment register values.<br />

*<br />

Table 2-2. Segments in Program Memory Models<br />

Model Text Data<br />

Small 1* 1*<br />

Middle 1 per module 1<br />

Large 1 per module 1 per module<br />

Huge 1 per module 1 per module<br />

In impure-text small model programs, text and data occupy the same segment. In<br />

pure-text programs, they occupy different segments.<br />

Pointer and Integer Sizes<br />

Table 2-3 defines the sizes (in bits) of text and data pointers, in each program memory<br />

model. The integer (int type) size for compilers that run on the 80<strong>2<strong>86</strong></strong> is 16 bits.<br />

Table 2-3. Pointer and Integer Sizes in Program Memory Models<br />

Model Data Pointer Text Pointer<br />

Small 16 16<br />

Middle 16 32<br />

Large 32 32<br />

Huge 32 32<br />

2-23

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

Saved successfully!

Ooh no, something went wrong!