162
CHAPTER 9. INSTRUCTION SET
9.4.2 Table Reference Instructions
MOVT XA, @PCXA
Function: XA ROM (PC10 to PC8 + XA)
Moves the high-order three bits (PC10 to PC8 ) of the program counter (PC) and the low-order four bits of
the table data in the program memory addressed by the contents of register pair XA to the A register and the
high-order four bits to the X register.
The high-order three bits of the table address are determined by the contents of the grogram counter (PC)
when this instruction is executed.
The necessary data must be preprogrammed at the table area by assembler pseudo instruction (DB
instruction).
The program counter is not affected by execution of this instruction.
This instruction is effective when referencing table data consecutively.
Program Memory
74
30
Table
Data H
Table
Data L
3030
XX
74
12 8
X 3–0PC 12–8
30
A 3–0
Table
Address
Note The MOVT XA, @PCXA instruction usually references the table data of the page containing the instruction.
However, when the instruction is at address ×FFH, the table data of the next page is referenced instead of
the table data on that page.
Page2
Page3
02FFH
0300H
70
Program Memory
For instance, when there is a MOVT XA, @PCXA instruction at position in the figure above, the table data
specified by the contents of register pair XA of page 3 instead of page 2 is moved to register pair XA.