Epson S1C17 Series Manual page 12

Cmos 16-bit single chip microcontroller
Hide thumbs Also See for S1C17 Series:
Table of Contents

Advertisement

V (bit 2): OVerflow
This bit indicates that an overflow or underflow occurred in an arithmetic operation. More specifically, this bit
is set to 1 when, in an add or subtract instruction in which the result of operation is handled as a signed 16-bit
integer, the execution of the instruction resulted in an overflow or underflow, or is reset to 0 when the result of
the add or subtract operation is within the range of values representable by a signed 16-bit integer. This flag is
also reset to 0 by executing a logical operation instruction.
Note that 16-bit arithmetic operation instructions can set the V flag, but 24-bit arithmetic operation instructions
cannot.
The V flag is set under the following conditions:
(1) When negative integers are added together, the operation produced a 0 (positive) in the sign bit (most sig-
nificant bit of the result)
(2) When positive integers are added together, the operation resulted in a 1 (negative) in the sign bit (most sig-
nificant bit of the result)
(3) When a negative integer is subtracted from a positive integer, the operation resulted in producing a 1 (nega-
tive) in the sign bit (most significant bit of the result)
(4) When a positive integer is subtracted from a negative integer, the operation resulted in producing a 0 (positive)
in the sign bit (most significant bit of the result)
Z (bit 1): Zero
This bit indicates that an operation resulted in 0. More specifically, this bit is set to 1 when the execution of a
logical operation, arithmetic operation, or shift instruction resulted in 0, or is otherwise reset to 0.
Note that 16-bit arithmetic operation and comparison instructions can set the Z flag, but 24-bit addition and
subtraction instructions cannot.
N (bit 0): Negative
This bit indicates a sign. More specifically, the most significant bit (bit 15) of the result of a logical operation,
arithmetic operation, or shift instruction is copied to this N flag.
Note that 16-bit arithmetic operation instructions can set the N flag, but 24-bit arithmetic operation instructions
cannot.
S1C17 CORE MANUAL
(Rev. 1.2)
Seiko Epson Corporation
2 REGISTERS
2-3

Advertisement

Table of Contents
loading

Table of Contents