4.8.3 Obtaining a Handle to a Program Address
The handle()
operator can be used to obtain the 16-bit reference to a label in program memory. If the final resolved PC address of the label fits in 16 bits, that value is returned by the handle()
operator. If the final resolved address exceeds 16 bits, the address of a jump table entry is returned instead. The jump table entry is a GOTO
instruction containing a 24-bit absolute address. The handle jump table is created by the linker and is always located in low program memory. Handles permit any location in program memory to be reached via a 16-bit address and are provided to facilitate the use of C function pointers.
The handle jump table is created by the linker and contains an entry for each unique label that is used with the handle()
operator.