Renesas rl78 Answering Machine User Manual


  Open as PDF
of 1004
 
RL78/G1A CHAPTER 14 MULTIPLIER AND DIVIDER/MULTIPLY-ACCUMULATOR
14.2.1 Multiplication/division data register A (MDAH, MDAL)
The MDAH and MDAL registers set the values that are used for a multiplication or division operation and store the
operation result. They set the multiplier and multiplicand data in the multiplication mode or multiply-accumulator mode,
and set the dividend data in the division mode. Furthermore, the operation result (quotient) is stored in the MDAH and
MDAL registers in the division mode.
The MDAH and MDAL registers can be set by a 16-bit manipulation instruction.
Reset signal generation clears these registers to 0000H.
Figure 14-2. Format of Multiplication/Division Data Register A (MDAH, MDAL)
FFFF3H FFFF2H
MDAH MDAH
15
MDAH
14
MDAH
13
MDAH
12
MDAH
11
MDAH
10
MDAH
9
MDAH
8
MDAH
7
MDAH
6
MDAH
5
MDAH
4
MDAH
3
MDAH
2
MDAH
1
MDAH
0
FFFF1H FFFF0H
MDAL MDAL
15
MDAL
14
MDAL
13
MDAL
12
MDAL
11
MDAL
10
MDAL
9
MDAL
8
MDAL
7
MDAL
6
MDAL
5
MDAL
4
MDAL
3
MDAL
2
MDAL
1
MDAL
0
Address: FFFF0H, FFFF1H, FFFF2H, FFFF3H After reset: 0000H, 0000H R/W
Symbol
Symbol
Cautions 1. Do not rewrite the MDAH and MDAL registers values during division operation processing (when
the multiplication/division control register (MDUC) value is 81H or C1H). The operation will be
executed in this case, but the operation result will be an undefined value.
2. The MDAH and MDAL registers values read during division operation processing (when the
MDUC register value is 81H or C1H) will not be guaranteed.
3. The data is in the two's complement format in either the multiplication mode (signed) or multiply-
accumulator mode (signed).
The following table shows the functions of the MDAH and MDAL registers during operation execution.
Table 14-2. Functions of MDAH and MDAL Registers During Operation Execution
Operation Mode Setting Operation Result
Multiplication mode (unsigned)
Multiply-accumulator mode (unsigned)
MDAH: Multiplier (unsigned)
MDAL: Multiplicand (unsigned)
Multiplication mode (signed)
Multiply-accumulator mode (signed)
MDAH: Multiplier (signed)
MDAL: Multiplicand (signed)
Division mode (unsigned)
MDAH: Dividend (unsigned)
(higher 16 bits)
MDAL: Dividend (unsigned)
(lower 16 bits)
MDAH: Division result (unsigned)
Higher 16 bits
MDAL: Division result (unsigned
Lower 16 bits
R01UH0305EJ0200 Rev.2.00 654
Jul 04, 2013