
C165UTAH
Central Processor Unit
Data Sheet
82
2001-02-23
Scope of Stack Limit Control
The stack limit control realized by the register pair STKOV and STKUN detects cases
where the stack pointer SP is moved outside the defined stack area either by ADD or
SUB instructions or by PUSH or POP operations (explicit or implicit, ie. CALL or RET
instructions).
This control mechanism is not triggered, ie. no stack trap is generated, when
the stack pointer SP is directly updated via MOV instructions
the limits of the stack area (STKOV, STKUN) are changed, so that SP is outside of the
new limits.
Multiply/Divide High Register MDH
This register is a part of the 32-bit multiply/divide register, which is implicitly used by the
CPU, when it performs a multiplication or a division. After a multiplication, this non-bit
addressable register represents the high order 16 bits of the 32-bit result. For long
divisions, the MDH register must be loaded with the high order 16 bits of the 32-bit
dividend before the division is started. After any division, register MDH represents the
16-bit remainder.
MDH (FE0C
H
/ 06
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'.
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
MDH must be saved along with registers MDL and MDC to avoid erroneous results.
A detailed description of how to use the MDH register for programming multiply and
divide algorithms can be found in chapter “System Programming”.
Bit
Function
mdh
Specifies the high 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
mdh