Renesas rl78 Answering Machine User Manual


  Open as PDF
of 1004
 
RL78/G1A CHAPTER 14 MULTIPLIER AND DIVIDER/MULTIPLY-ACCUMULATOR
14.2.2 Multiplication/division data register B (MDBL, MDBH)
The MDBH and MDBL registers set the values that are used for multiplication or division operation and store the
operation result. They store the operation result (product) in the multiplication mode and multiply-accumulator mode, and
set the divisor data in the division mode.
The MDBH and MDBL registers can be set by a 16-bit manipulation instruction.
Reset signal generation clears these registers to 0000H.
Figure 14-3. Format of Multiplication/Division Data Register B (MDBH, MDBL)
Address: FFFF4H, FFFF5H, FFFF6H, FFFF7H After reset: 0000H, 0000H R/W
Symbol
FFFF5H FFFF4H
MDBH MDBH
15
MDBH
14
MDBH
13
MDBH
12
MDBH
11
MDBH
10
MDBH
9
MDBH
8
MDBH
7
MDBH
6
MDBH
5
MDBH
4
MDBH
3
MDBH
2
MDBH
1
MDBH
0
Symbol
FFFF7H FFFF6H
MDBL MDBL
15
MDBL
14
MDBL
13
MDBL
12
MDBL
11
MDBL
10
MDBL
9
MDBL
8
MDBL
7
MDBL
6
MDBL
5
MDBL
4
MDBHL
3
MDBL
2
MDBL
1
MDBL
0
Cautions 1. Do not rewrite the MDBH and MDBL registers values during division operation processing (when
the multiplication/division control register (MDUC) value is 81H or C1H) or multiply-accumulation
operation processing. The operation result will be an undefined value.
2. Do not set the MDBH and MDBL registers to 0000H in the division mode. If they are set, the
operation result will be an undefined value.
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 MDBH and MDBL registers during operation execution.
Table 14-3. Functions of MDBH and MDBL Registers During Operation Execution
Operation Mode Setting Operation Result
Multiplication mode (unsigned)
Multiply-accumulator mode (unsigned)
MDBH: Multiplication result (product) (unsigned)
Higher 16 bits
MDBL: Multiplication result (product) (unsigned)
Lower 16 bits
Multiplication mode (signed)
Multiply-accumulator mode (signed)
MDBH: Multiplication result (product) (signed)
Higher 16 bits
MDBL: Multiplication result (product) (signed)
Lower 16 bits
Division mode (unsigned)
MDBH: Divisor (unsigned)
(higher 16 bits)
MDBL: Divisor (unsigned)
(lower 16 bits)
R01UH0305EJ0200 Rev.2.00 655
Jul 04, 2013