44
CHAPTER 2 CPU
2.7.1
Accumulator (A)
The accumulator (A) consists of two 16-bit arithmetic operation registers (AH and AL).
The accumulator is used to temporarily store the results of an arithmetic operation and
data.
The accumulator (A) can be used as a 32-bit, 16-bit, or 8-bit register. Arithmetic
operations can be performed between memory and other registers or between the
higher 16-bit arithmetic operation register (AH) and the lower 6-bit arithmetic operation
register (AL). The A register has a data retention function: When data not longer than
a word is transferred to the AL register, data stored in the AL register before the
transfer is transferred to the AH register. (Data is not retained for some instructions.)
s Accumulator (A)
r Data transfer to the accumulator
The accumulator (A) can handle 32-bit (long word), 16-bit (word), and 8-bit (byte) data. The
four-bit data transfer instruction (MOVN) is exceptionally provided but the data is processed in
the same way as that for 8-bit data.
For 32-bit data processing, the AH and AL registers are used in combination.
For 16-bit and 8-bit data, the AL register is used while the AH register retains data in the AL
register.
Data not longer than a byte, when transferred to the AL register, becomes 16 bits long
through sign or zero extension and is stored in the AL register.
Data stored in the AL
register can be handled as 16-bit or 8-bit data.
Figure 2.7-3 "Example of AL-AH Transfer in the Accumulator (A) (8-bit Immediate Value, Zero
Extension)" to
Figure 2.7-6 "Example of AL-AH Transfer in the Accumulator (A) (16 bits,
Register Indirect)" show specific examples of transfer.