Previous: , Up: XSTORMY16-Dependent   [Contents][Index]


9.54.3 XStormy16 Pseudo-Opcodes

as implements all the standard XStormy16 opcodes.

as also implements the following pseudo ops:

@lo()

Computes the lower 16 bits of the given expression and stores it into the immediate operand field of the given instruction. For example:

add r6, @lo(here - there)

computes the difference between the address of labels ’here’ and ’there’, takes the lower 16 bits of this difference and adds it to register 6.

@hi()

Computes the higher 16 bits of the given expression and stores it into the immediate operand field of the given instruction. For example:

addc r7, @hi(here - there)

computes the difference between the address of labels ’here’ and ’there’, takes the upper 16 bits of this difference, shifts it down 16 bits and then adds it, along with the carry bit, to the value in register 7.