Program Control
3
3 – 22
The empty status bits indicate that the number of pop operations for the
stack is greater than or equal to the number of push operations that have
occurred since the last processor reset. The overflow status bits indicate
that the number of push operations for the stack has exceeded the number
of pop operations, by an amount that is greater than the total depth of the
stack. When this occurs, the values most recently pushed will be missing
from the stack—older stack values are considered more important than
new.
Since a stack overflow represents a permanent loss of information, the
stack overflow status bits “stick” once they are set, and subsequent pop
operations have no effect on them. In this situation, then, it is possible to
have both the stack empty and stack overflow bits set for a given stack.
Assume, for example, that the four-location count stack is overflowed by
five successive pushes. Five successive pops will restore the stack empty
condition, but will not clear the overflow condition. The processor must be
reset to clear the stack overflow status.
3.5.3
Mode Status Register (MSTAT)
The MSTAT register determines the operating mode of the processor. The
individual bits of MSTAT are defined as shown in Figure 3.6.
6
5
4
3
2
1
0
Data Register Bank Select
Bit Reverse Mode Enable (DAG1)
ALU Overflow Latch Mode Enable
0 = fractional, 1 = integer
0 = primary, 1 = secondary
AR Saturation Mode Enable
MAC Result Placement
Timer Enable
Go Mode Enable
0
0
0
0
0
0
0
Figure 3.6 MSTAT Register