Flag Descriptions - Samsung S3F84B8 User Manual

8-bit cmos
Hide thumbs Also See for S3F84B8:
Table of Contents

Advertisement

S3F84B8_UM_REV 1.00

6.2.1 FLAG DESCRIPTIONS

C
Carry Flag (FLAGS.7)
The C flag is set to "1" if the result from an arithmetic operation generates a carry-out from (or a borrow to) the
bit 7 position (MSB). After rotate and shift operations, it contains the last value shifted out of specified register.
Program instructions can set, clear, or complement the carry flag.
Z
Zero Flag (FLAGS.6)
For arithmetic and logic operations, the Z flag is set to "1" if the result of the operation is zero. For operations
that test the register bits and for operations that require shift and rotate, the Z flag is set to "1" if the result is
logic zero.
S
Sign Flag (FLAGS.5)
Following arithmetic, logic, rotate, or shift operations, the sign bit identifies state of the MSB of the result. A
logic zero indicates a positive number, while a logic one indicates a negative number.
V
Overflow Flag (FLAGS.4)
The V flag is set to "1" if the result of a two's-complement operation is greater than +127 or less than -128. It is
cleared to "0" following logic operations such as ADD.
D
Decimal Adjust Flag (FLAGS.3)
The DA bit is used to specify the last executed instruction during BCD operations, so that a subsequent
decimal adjust operation can execute correctly. It is not usually accessed by programmers, and cannot be
used as a test condition.
H
Half-Carry Flag (FLAGS.2)
The H bit is set to "1" if an addition generates a carry-out of bit 3, or if a subtraction borrows out of bit 4. It is
used by the Decimal Adjust (DA) instruction to convert the binary result of a previous addition or subtraction
into the correct decimal (BCD) result. The H flag is seldom accessed directly by a program.
FIS Fast Interrupt Status Flag (FLAGS.1)
The FIS bit is set during a fast interrupt cycle and reset during the IRET at the end of the interrupt service
routine. Once set, it disables all interrupts and causes the fast interrupt return to be executed when the IRET
instruction is executed.
BA Bank Address Flag (FLAGS.0)
The BA flag indicates which register bank in set 1 area of internal register file is currently selected. In other
words, it indicates whether bank 0 or bank 1 is selected. The BA flag is cleared to "0" (select bank 0) if the
SB0 instruction is executed and is set to "1" (select bank 1) if the SB1 instruction is executed.
6-6
6 INSTRUCTION SET

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents