NEC PD750008 Manuale Utente

Pagina di 342
270
µPD750008 USER'S MANUAL
11.4.2   Table Reference Instructions
MOVT XA,@PCDE
Function:  For the µPD750006 and µPD750008
XA <– ROM (PC
12-8
+DE)
Transfers the low-order four bits of the table data in program memory to the A register, and the high-order
four bits to the X register.  The table data is addressed by the program counter (PC) with its low-order eight
bits (PC
7-0
) exchanged with the contents of the DE register pair.
The table address is determined by the contents of the program counter (PC) present when this instruction
is executed.
The table area must have necessary data loaded by an assembler pseudo instruction (DB instruction).
The program counter is not affected by the execution of the pseudo instruction.
This instruction is useful for consecutive table data references.
Example  For the µPD750006 and µPD750008
Remark "Function" in this section is applicable to the µPD750006 and µPD750008 whose program
counters consist of 13 bits each.  This is also applicable to the µPD750004 whose program
counter consists of 12 bits and the µPD75P0016 whose program counter consists of 14 bits,
however.
Caution The MOVT XA,@PCDE instruction usually references table data in the page containing that
instruction.  However, when the instruction is located at address xxFFH, table data in the
next page is referenced instead of table data in the page containing that instruction.
PC
12-8
D
3-0
E
3-0
8 7
4 3
0
12
Table
address
Table
data H
Table
data L
X
3
0
A
3
0
4 3
7
0
Program memory
7
0
Program memory
Page 2
Page 3
a
02FFH
0300H