Rev.1.04
REJ03B0188-0104
Aug 23, 2007
Page 18 of 146
4559 Group
FUNCTION BLOCK OPERATIONS
CPU
(1) Arithmetic logic unit (ALU)
The arithmetic logic unit ALU performs 4-bit arithmetic such as
4-bit data addition, comparison, AND operation, OR operation,
and bit manipulation.
(2) Register A and carry flag
Register A is a 4-bit register used for arithmetic, transfer,
exchange, and I/O operation.
Carry flag CY is a 1-bit flag that is set to “1” when there is a
carry with the AMC instruction (Figure 12).
It is unchanged with both A n instruction and AM instruction.
The value of A
0
is stored in carry flag CY with the RAR
instruction (Figure 13).
Carry flag CY can be set to “1” with the SC instruction and
cleared to “0” with the RC instruction.
(3) Registers B and E
Register B is a 4-bit register used for temporary storage of 4-bit
data, and for 8-bit data transfer together with register A.
Register E is an 8-bit register. It can be used for 8-bit data
transfer with register B used as the high-order 4 bits and register
A as the low-order 4 bits (Figure 14).
Register E is undefined after system is released from reset and
returned from the power down mode. Accordingly, set the initial
value.
(4) Register D
Register D is a 3-bit register.
It is used to store a 7-bit ROM address together with register A
and is used as a pointer within the specified page when the TABP
p, BLA p, or BMLA p instruction is executed (Figure 15).
Also, when the TABP p instruction is executed at UPTF flag =
“1”, the high-order 2 bits of ROM reference data is stored to the
low-order 2 bits of register D, the high-order 1 bit of register D is
“0”.
When the TABP p instruction is executed at UPTF flag = “0”, the
contents of register D remains unchanged. The UPTF flag is set
to “1” with the SUPT instruction and cleared to “0” with the
RUPT instruction.
The initial value of UPTF flag is “0”.
Register D is undefined after system is released from reset and
returned from the power down mode. Accordingly, set the initial
value.
Fig 12. AMC instruction execution example
Fig 13. RAR instruction execution example
Fig 14. Registers A, B and register E
Fig 15. TABP p instruction execution example
(CY)
<Result>
(M(DP))
(A)
Addition
ALU
<Carry>
<Clear>
RC instruction
<Set>
SC instruction
CY
A
3
A
2
A
1
A
0
<Rotation>
RAR instruction
A
0
CY A
3
A
2
A
1
TABE instruction
TEAB instruction
A
3
A
2
A
1
A
0
Register A
TAB instruction
E
3
E
2
E
1
E
0
E
7
E
6
E
5
E
4
B
3
B
2
B
1
B
0
Register B
Register E
A
3
A
2
A
1
A
0
Register A
TBA instruction
B
3
B
2
B
1
B
0
Register B
A
3
A
2
A
1
A
0
DR
2
DR
1
DR
0
PC
L
Register A (4)
Low-order 2 bits
Register D (3)
Register B (4)
Middle-order 2 bits
ROM
Field value p
The contents
of register D
Specifying address
TABP p
instruction
p
3
p
2
p
1
p
0
p
6
p
5
p
4
PC
H
8
4
0
The contents
of register A
High-order 2 bits
Flag UPTF = 1;
High-order 2 bits of reference data is transferred to the low-order 2
bits of register D.
“0” is stored to the high-order 1 bit of register D.
Flag UPTF = 0;
Data is not transferred to register D.