Section 3: Assembler
161
TI
-
89 / TI
-
92 Plus Sierra C Assembler Reference Manual
Not for Distribution
Beta Version February 2, 2001
location are both in the same relocatable section or are both in absolute sections
(see section
3.3.7.3 Expression Evaluation
).
If the displacement can be computed relative to the program counter when it is
encountered, then coercion is performed if one of the following two conditions is
met:
•
The
pcb32 / PCB32
option is in effect.
•
The
pcb16 / PCB16
option is in effect and the relative displacement fits in a
word.
If the displacement cannot be computed relative to the program counter, then
coercion is performed if one of the following three conditions is met:
•
The
pcb16 / PCB16
option is in effect and the coercion is permitted by
relocation hole compression.
•
The
pcf / PCF
option and the
pca / PCA
option are both in effect.
•
The
pcf / PCF
option is in effect and neither the displacement nor the
reference of the displacement is known to be in an absolute section when the
instruction is encountered.
To generate position-independent code, the
pcf / PCF
and
nopca / NOPCA
options should be selected. For more information on these option settings see
sections
3.6 Asm68 Assembler Directives
and
3.7 Asm68k Assembler
Directives
.
3.5.4.2. Displacement Sizing
If a size qualifier is present, the designated size is used. An error is generated if it
can be determined that this size is too small for the displacement. In the absence
of a size qualifier, the size of the displacement is based on its value; however, if
the value cannot be reduced to an absolute expression when it is encountered
(see section
3.3.7.3 Expression Evaluation
), the displacement is sized
according to the current set of displacement sizing options. These options are
summarized in Table 3.14 and Table 3.15, which show the sizing rules for
unknown absolute and PC-relative displacements, respectively. For more
information on these options, see the
.opt / OPT
directive.