XC2200 Derivatives
System Units (Vol. 1 of 2)
Central Processing Unit (CPU)
User’s Manual
4-68
V2.1, 2008-08
CPUSV2_X, V2.2
4.9.9
The 40-bit Signed Accumulator Register
The 40-bit accumulator consists of three concatenated registers MAE, MAH, and MAL.
MAE is 8 bits wide, MAH and MAL are 16 bits wide. MAE is the Most Significant Byte of
the 40-bit accumulator. This byte performs a guarding function. MAE is accessed as the
lower byte of register MSW.
When MAH is written, the value in the accumulator is automatically adjusted to signed
extended 40-bit format. That means MAL is cleared and MAE will be automatically
loaded with zeros for a positive number (the most significant bit of MAH is 0), and with
ones for a negative number (the most significant bit of MAH is 1), representing the
extended 40-bit negative number in 2’s complement notation. One may see that the
extended 40-bit value is equal to the 32-bit value without extension. In other words, after
this extension, MAE does not contain significant bits. Generally, this condition is present
when the highest 9 bits of the 40-bit signed result are the same.
During the accumulator operations, an overflow may happen and the result may not fit
into 32 bits and MAE will change. The extension flag “E” in register MSW is set when the
signed result in the accumulator has exceeded the 32-bit boundary. This condition is
present when the highest 9 bits of the 40-bit signed result are not the same, i.e. MAE
contains significant bits.
Most CoXXX operations specify the 40-bit accumulator register as a source and/or a
destination operand.
MAL
Accumulator Low Word
SFR (FE5C
H
/2E
H
)
Reset Value: 0000
H
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
MAL
rwh
Field
Bits
Type
Description
MAL
[15:0]
rwh
Low Part of Accumulator
The 40-bit accumulator is completed by the
accumulator high word (MAH) and bitfield MAE