
C165H
Central Processor Unit
Data Sheet
82
2001-04-19
PRELMNARY
-
-
-
-
-
-
-
-
-EXCERPT-
When a division or multiplication was interrupted before its completion and the multiply/
divide unit is required, the MDC register must first be saved along with registers MDH
and MDL (to be able to restart the interrupted operation later), and then it must be
cleared prepare it for the new calculation. After completion of the new division or
multiplication, the state of the interrupted multiply or divide operation must be restored.
The MDRIU flag is the only portion of the MDC register which might be of interest for the
user. The remaining portions of the MDC register are reserved for dedicated use by the
dividend before the division is started. After any division, register MDL represents the 16-
bit quotient.
MDL (FE0E
H
/ 07
H
)
15
14
SFR
Reset Value: 0000
H
3
2
Whenever this register is updated via software, the Multiply/Divide Register In Use
(MDRIU) flag in the Multiply/Divide Control register (MDC) is set to '1'. The MDRIU flag
is cleared, whenever the MDL register is read via software.
When a multiplication or division is interrupted before its completion and when a new
multiply or divide operation is to be performed within the interrupt service routine, register
MDL must be saved along with registers MDH and MDC to avoid erroneous results.
A detailed description of how to use the MDL register for programming multiply and
divide algorithms can be found in chapter “System Programming”.
Multiply/Divide Control Register MDC
This bit addressable 16-bit register is implicitly used by the CPU, when it performs a
multiplication or a division. It is used to store the required control information for the
corresponding multiply or divide operation. Register MDC is updated by hardware during
each single cycle of a multiply or divide instruction.
MDC (FF0E
H
/ 87
H
)
15
14
SFR
Reset Value: 0000
H
3
2
Bit
Function
mdl
Specifies the low order 16 bits of the 32-bit multiply and divide register MD.
5
4
1
0
11
10
9
8
7
6
13
12
rw
mdl
!!
5
4
1
0
11
10
9
8
7
6
13
12
-
r(w)
-
-
-
-
-
!!
!!
!!
!!
!!
!!
-
-
r(w)
r(w)
r(w)
r(w)
r(w)
r(w)
r(w)
MDR
IU