Renesas 7700 FAMILY User Manual page 28

Mitsubishi 16-bit single-chip microcomputer
Table of Contents

Advertisement

(6) Bit 5: Data length flag (m)
It determines whether to use a data as a 16-bit unit or as an 8-bit unit. A data is treated as a 16-
bit unit when this flag is "0," and as an 8-bit unit when it is "1."
Use the SEM or SEP instruction to set this flag to "1," and use the CLM or CLP instruction to clear
it to "0." This flag is cleared to "0" at reset.
Note: When transferring data between registers which are different in bit length, the data is transferred
with the length of the destination register, but except for the TXA, TYA, TXB, TYB, and TXS
instructions. Refer to "7751 Series Software Manual" for details.
(7) Bit 6: Overflow flag (V)
It is used when adding or subtracting with a word regarded as signed binary. When the data length
flag (m) is "0," the overflow flag is set to "1" when the result of addition or subtraction exceeds the
range between –32768 and +32767, and cleared to "0" in all other cases. When the data length flag
(m) is "1," the overflow flag is set to "1" when the result of addition or subtraction exceeds the range
between –128 and +127, and cleared to "0" in all other cases.
The overflow flag is also set to "1" when a result of division exceeds the register length to be stored
in the DIV or DIVS instruction, a division instruction with unsigned or signed; and when a result of
addition exceeds the range between –2147483648 and +2147483647 in the RMPA instruction, a
Repeat MultiPly and Accumulate instruction.
When the BVC or BVS instruction is executed, this flag's contents determine whether the program
causes a branch or not.
Use the SEP instruction to set this flag to "1," and use the CLV or CLP instruction to clear it to "0."
Note: This flag is invalid in the decimal mode.
(8) Bit 7: Negative flag (N)
It is set to "1" when a result of arithmetic operation or data transfer is negative. (Bit 15 of the result
is "1" when the data length flag (m) is "0," or bit 7 of the result is "1" when the data length flag (m)
is "1.") It is cleared to "0" in all other cases. When the BPL or BMI instruction is executed, this flag
determines whether the program causes a branch or not. Use the SEP instruction to set this flag to
"1," and use the CLP instruction to clear it to "0."
Note: This flag is invalid in the decimal mode.
(9) Bits 10 to 8: Processor interrupt priority level (IPL)
These three bits can determine the processor interrupt priority level to one of levels 0 to 7. The
interrupt is enabled when the interrupt priority level of a required interrupt, which is set in each
interrupt control register, is higher than IPL. When an interrupt request is accepted, IPL is stored in
the stack area, and IPL is replaced by the interrupt priority level of the accepted interrupt request.
There are no instruction to directly set or clear the bits of IPL. IPL can be changed by storing the
new IPL into the stack area and updating the processor status register with the PUL or PLP instruction.
The contents of IPL is cleared to "000
CENTRAL PROCESSING UNIT (CPU)
" at reset.
2
7751 Group User's Manual
2.1 Central processing unit
2–9

Advertisement

Table of Contents
loading

This manual is also suitable for:

7751 series

Table of Contents