Next: RL78-Directives, Previous: RL78-Opts, Up: RL78-Dependent [Contents][Index]
The RL78 has three modifiers that adjust the relocations used by the linker:
%lo16()
When loading a 20-bit (or wider) address into registers, this modifier selects the 16 least significant bits.
movw ax,#%lo16(_sym)
%hi16()
When loading a 20-bit (or wider) address into registers, this modifier selects the 16 most significant bits.
movw ax,#%hi16(_sym)
%hi8()
When loading a 20-bit (or wider) address into registers, this modifier selects the 8 bits that would go into CS or ES (i.e. bits 23..16).
mov es, #%hi8(_sym)