![Samsung S3P80C5 User Manual Download Page 116](http://html1.mh-extra.com/html/samsung/s3p80c5/s3p80c5_user-manual_3993739116.webp)
S3P80C5/C80C5/C80C8
INSTRUCTION SET
6-7
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 the
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 register bits, and for shift and rotate operations, 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 the state of the MSB of the
result. A logic zero indicates a positive number and a logic one indicates a negative number.
V
Overflow Flag (FLAGS.4)
The V flag is set to "1" when the result of a two's-complement operation is greater than + 127 or less than
– 128. It is also cleared to "0" following logic operations.
D
Decimal Adjust Flag (FLAGS.3)
The DA bit is used to specify what type of instruction was executed last during BCD operations, so that a
subsequent decimal adjust operation can execute correctly. The DA bit 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" whenever an addition generates a carry-out of bit 3, or when 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 following interrupt servicing.
When set, it inhibits 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 the set 1 area of the internal register file is currently
selected, bank 0 or bank 1. The BA flag is cleared to "0" (select bank 0) when you execute the SB0
instruction and is set to "1" (select bank 1) when you execute the SB1 instruction.
Summary of Contents for S3P80C5
Page 2: ...S3P80C5 C80C5 C80C8 8 BIT CMOS MICROCONTROLLERS USER S MANUAL Revision 1 ...
Page 5: ......
Page 13: ......
Page 15: ......
Page 17: ......
Page 19: ......
Page 49: ...ADDRESS SPACES S3P80C5 C80C5 C80C8 2 20 NOTES ...
Page 197: ...INSTRUCTION SET S3P80C5 C80C5 C80C8 6 88 NOTES ...
Page 201: ...CLOCK CIRCUITS S3P80C5 C80C5 C80C8 7 4 NOTES ...
Page 237: ...TIMER 1 S3P80C5 C80C5 C80C8 11 6 NOTES ...
Page 245: ...COUNTER A S3P80C5 C80C5 C80C8 12 8 NOTES ...
Page 255: ......
Page 257: ......
Page 259: ......
Page 261: ......