
CENTRAL PROCESSING UNIT (CPU)
2.1 Central processing unit (CPU)
7700 FAMILY SOFTWARE MANUAL
2–8
(6) Data length flag (m)
The data length flag is assigned to bit 5 of the processor status register. It determines whether to treat
data as a 16-bit unit or as an 8-bit unit. A data is treated as a 16-bit unit when this flag m is “0”, and
as an 8-bit unit when it is “1”.
This flag can be set with the
SEM
or
SEP
instruction and cleared with the
CLM
or
CLP
instruction.
This flag is cleared to “0” at reset.
C
When transferring between different bit lengths, the data is transferred with the length of the
destination register, but except for the
TXA
,
TYA
,
TXB
, and
TYB
instructions.
(7) Overflow flag (V)
The overflow flag is assigned to bit 6 of the processor status register. It is used when adding or
subtracting a word as signed binary. In case the data length flag m is “0”, the overflow flag is set to
“1” when the result of addition or subtraction is outside the range between –32768 and +32767, and
cleared to “0” in all other cases. In case the data length flag m is “1”, the overflow flag is set to “1”
when the result of addition or subtraction is outside the range between –128 and +127, and cleared
to “0” in all other cases. The overflow flag can be set with the
SEP
instruction and cleared with the
CLV
or
CLP
instructions.
Note :
This flag has no meaning in decimal mode.
(8) Negative flag (N)
The negative flag is assigned to bit 7 of the processor status register. It is set to “1” when the result
of arithmetic operation or data transfer is negative (data bit 15 is “1” when the data length flag m is
“0”, or data bit 7 is “1” when the data length flag m is “1”). It is cleared to “0” in all other cases. This
flag can be set with the
SEP
instruction and cleared with the
CLP
instruction.
Note :
This flag has no meaning in decimal mode.
(9) Processor interrupt priority level (IPL)
The processor interrupt priority level (IPL) is assigned to bits 8, 9, and 10 of the processor status
register. These three bits determine the priority level of processor interrupts from level 0 to level 7.
The interrupt is enabled when the interrupt priority level of a required interrupt (set with the interrupt
control register) is higher than IPL. When an interrupt request is accepted, the IPL is stored in the
stack and IPL is replaced by the interrupt priority level of the accepted interrupt request. This simpli-
fies control of multiple interrupts.
There are no instructions to directly set or clear the IPL. It can be changed by placing the new IPL
on the stack and updating the processor status register with the
PUL
or
PLP
instruction.
The contents of the IPL are cleared to “000
2
” at reset.