Chapter 8 Writing Source Statements

8.7.4Expression Attributes

When expression operands are connected by an operator, the calculated result of the expression will have attributes of the operands and the operator.

The most important attributes for expression evaluation are as follows.

Undefined (undefined-UND)

Absolute (absolute-ABS)

External (external-EXT)

Relative (relocate-REL)

Operation result attributes

The operation result attributes for the label itself or the labels are following four.

UND: undefined attributes

The label is undefined at the reference.

ABS: absolute attributes

The label is undefined with equ pseudo instruction. The value is not changed. The constant value written directly will be regarded as an absolute attribute.

REL: relative attributes

The label is already defined in the same file at the reference (the label referring forward).

EXT: external reference attributes

The label is declared with global pseudo instruction and defined by another file.

The rules for connecting attributes are as follows.

For ~, +, – (unary) operators

Attribute of Operand

Attribute of Result

 

 

UND

UND

ABS

ABS

REL

REL

EXT

EXT

142 Expressions

Page 154
Image 154
Panasonic MN1030 user manual Expression Attributes, Operation result attributes, For ~, +, unary operators