MITSUBISHI MICROCOMPUTERS
4238 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTERS
5
FUNCTION BLOCK OPERATIONS
ARITHMETIC LOGIC UNIT (ALU)
The arithmetic logic unit ALU performs 4-bit arithmetic such as 4-bit
data addition, comparison, and bit manipulation.
REGISTER A AND CARRY FLAG (CY)
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 (it is unchanged with both A n instruction
and AM instruction). The value of A0 is stored in the carry flag CY
with the RAR instruction.
Carry flag CY can be set to “1” with the SC instruction and cleared
to “0” with the RC instruction.
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.
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 instruction is executed.
Fig. 1 AMC instruction execution example
Fig. 2 RAR instruction execution example
Fig. 3 Registers A, B and register E
ALU
(CY)
Addition
(M(DP))
Carry
Result
(A)
Set
SC instruction
Rotation
RAR instruction
Clear
RC instruction
CY
A3
A2
A1
A0
CY
A3
A2
A1
A0
Fig. 4 TABP p instruction execution example
B3
B2
B1
B0
B3
B2
B1
B0
A3
A2
A1
A0
A3
A2
A1
A0
E3
E2
E1
E0
E7
E6
E5
E4
TEAB instruction
TAB instruction
TABE instruction
Register B
Register A
TBA instruction
Register B
Register A
Register E
p1
p0
DR2 DR1 DR0 A3
A2
A1
A0
Specifying address
Register B(4)
Register A(4)
PCH
PCL
Immediate
field value p
Contents
of register D
Contents
of register A
Low-order 4 bits
Middle-order 4 bits
0
4
8
ROM
TABP p instruction
p2