The .addr directive generates eight bits as specified by one or more expressions in the operand field of this directive and places them in successive memory locations. These expressions are usually labels and are used as address pointers by the COP8 JID (Jump Indirect) instruction which transfers program control to the contents of the address generated by the .addr directive. The lower 8 bits of each expression is stored in memory; the JID, .addr, and expression must all be in the same page. Otherwise, an error message will be generated.
It is highly recommended that the JID, associated .addr, and labels all be placed in a section with the inpage attribute (see the .sect). This will guarantee that proper error checking is done. .addr may be used in an absolute or PAGE aligned relocatable section without the inpage attribute; however, the assembler cannot check that the JID is in the proper page.
Whenever an .addr expression evaluates to an address which is not in the same page as the .addr, an error is generated.
Note: If the JID is at the last byte of a 256-byte ROM block, the ROM accessed is in the next 256-byte block.