Crossware

Table of Contents        Previous topic       Next topic       

CROSS ASSEMBLER->Assembler Expressions->Symbols

Symbols in the expression take the value assigned to them in other parts of the source program.

Typically a symbol gets its value by being present in the label field at some point.  The actual value depends upon the opcode or pseudo-op present in the operation field on the same line as the label.  The EQU and SET directive explicitly assign a value to the symbol in the label field.  Other directives or no directive at all may result in the symbol being assigned the value of the program counter.

Two special symbols generated by the cross assembler are '*' and NARG (or narg).
    
'*'    When this is used as a symbol it takes the current value of the program counter.

NARG    This is only allowed within a macro definition and takes the value, during the expansion of the macro, equal to the number of arguments used in the macro call.