3 data buffer and table referencing – NEC PD17062 User Manual

Page 91

Advertising
background image

91

µ

PD17062

10.3 DATA BUFFER AND TABLE REFERENCING

10.3.1 Table Referencing

Tables are referenced by reading the constant data from program memory into the data buffer. This is done

using the MOVT DBF, @AR instruction.

Therefore, if display data or other constant data is written to program memory in advance and a table

reference instruction is executed, writing of a complex data conversion program is unnecessary.

The MOVT instruction is described below.

A example program is given in Section 10.3.2.

MOVT DBF, @AR ; Reads the contents of the program memory addressed by the address register into the

data buffer as shown below.

When a table reference instruction is executed, the stack is used one level.

Because the address register (AR) has only eight valid bits, program memory available for table reference

is limited to 256 steps from address 0000H to address 00FFH.

See also Chapter 4 and Section 8.1.

16

MOVT DBF, @ AR

DBF3

DBF2

DBF1

DBF0

b

15

b

14

b

13

b

12

b

11

b

10

b

9

b

8

b

7

b

6

b

5

b

4

b

3

b

2

b

1

b

0

b

15

b

14

b

13

b

12

b

11

b

10

b

9

b

8

b

7

b

6

b

5

b

4

b

3

b

2

b

1

b

0

Constant data

Data buffer

Program memory

(ROM)

Specifies the program memory address

Advertising