NEC PD75402A, PD75P402 user manual Table Reference Instructions, Table data on that, 162, 02FFH

Models: PD75402A PD75P402

1 195
Download 195 pages 45.34 Kb
Page 173
Image 173

CHAPTER 9. INSTRUCTION SET

9.4.2Table 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.

Table

Address

12

8 7

4 3

0

PC 12–8

 

X 3–0

 

 

A 3–0

 

 

 

 

 

 

 

Program Memory

 

 

 

7

4 3

0

 

 

 

Table

 

Table

 

 

Data H

 

Data L

 

 

 

 

 

 

 

 

 

 

 

 

3

0

3

0

 

X

 

 

 

X

 

 

 

 

 

 

 

 

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.

 

 

 

Program Memory

Page2

 

0

 

 

7

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

02FFH

 

 

 

 

 

 

 

 

 

 

 

 

0300H

 

 

 

 

 

 

 

 

 

 

 

Page3

 

 

 

 

 

 

 

 

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.

162

Page 173
Image 173
NEC PD75402A, PD75P402 user manual Table Reference Instructions, Table data on that, 162, 02FFH