28.2.4 __builtin_addr_low, __builtin_addr_high, __builtin_addr

Description

Determine the offset address of a symbol.

Prototype

uint16_t __builtin_addr_low(&symbol);
uint16_t __builtin_addr_high(&symbol);
uint16_t __builtin_addr(&symbol);

Argument

&symbol – The literal address of the symbol

Return Value

Returns the low, high or full address of a symbol, without any adjustment for physical address paging requirements. Therefore, the values returned represent a literal offset and cannot be used for addressing purposes without manipulation.

Machine Instruction

mov.w

(or a pair of mov.w instructions for __builtin_addr)

Error Messages

An error message will be displayed if the argument is not a literal address.