
46
μ
PD17068
5.3.2 Address Register Functions
The address register is used to specify program memory addresses for execution of a table reference
instruction (MOVT DBF, @AR), stack manipulation instructions (PUSH AR and POP AR), indirect branch
instruction (BR @AR), and indirect subroutine call instruction (CALL @AR).
For the address register, a dedicated instruction (INC AR) is available which can increment the address
register by 1 at a time.
The operation performed when each instruction is executed is described (1) through (5) below.
(1) Table reference instruction (MOVT DBF, @AR)
The instruction loads the constant data (16 bits) held at the program memory address specified in the
address register into the data buffer.
Constant data stored at addresses 0000H-2FFFH can be specified using the address register.
(2) Stack manipulation instructions (PUSH AR, POP AR)
When the PUSH AR instruction is executed, the stack pointer is decremented by 1, then the contents of the
address register (AR) are stored in the address stack register pointed to by the decremented stack pointer.
When the POP AR is executed, the contents of the address stack register pointed to by the stack pointer
are transferred to the address register, then the stack pointer is incremented by 1.
(3) Indirect branch instruction (BR @AR)
The instruction causes a branch to the program memory address specified by the address register.
A branch address from 0000H to 2FFFH can be specified using the address register.
(4) Indirect subroutine call instruction (CALL @AR)
The subroutine at the program memory address specified by the address register can be called.
A subroutine start address from 0000H to 2FFFH can be specified by the address register.
(5) Address register increment instruction (INC AR)
The instruction increments the address register by 1.
The address register consists of 14 bits. When the INC AR instruction is executed, however, the address
register operates on a 13-bit basis. This means that the address specified after 1FFFH is not 2000H but 0000H.
To increment the address register to 2000H, segment register switching is required. Note, however, that the
address specified after 3FFFH is not 2000H but 0000H; in this case, segment register switching is not required.
5.3.3 Address Register and Data Buffer
The address register allows data transfer through the data buffer as part of peripheral hardware.
See
Chapter 9
for details.
5.3.4 Notes on Using Address Register
The address register consists of 14 bits, so that it can specify up to 3FFFH.
However, the program memory area consists of addresses 0000H-1EFFH and addresses 2000H-2FFFH.
Accordingly, a value from 0000H to 1EFFH or from 2000H to 2FFFH must be specified in the address register.