NEC PD75P402 Manuale Utente

Pagina di 195
162
CHAPTER  9.  INSTRUCTION  SET
9.4.2
Table Reference Instructions
MOVT XA, @PCXA
Function: XA 
 ROM (PC
10
 to PC
8
 + XA)
Moves the high-order three bits (PC
10
 to PC
8
 ) 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
7
4 3
0
Table
Data H
Table
Data L
3
0 3
0
X
X
7
4
12
8
3–0
PC 
12–8
3
0
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
7
0
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.