![Samsung S3C9454B Скачать руководство пользователя страница 73](http://html1.mh-extra.com/html/samsung/s3c9454b/s3c9454b_user-manual_4006826073.webp)
SAM88RCRI INSTRUCTION SET
S3C9454B/F9454B
6-4
FLAGS REGISTER (FLAGS)
The flags register FLAGS contains eight bits that describe the current status of CPU operations. Four of these bits,
FLAGS.4–FLAGS.7, can be tested and used with conditional jump instructions;
FLAGS register can be set or reset by instructions as long as its outcome does not affect the flags, such as, Load
instruction. Logical and Arithmetic instructions such as, AND, OR, XOR, ADD, and SUB can affect the Flags
register. For example, the AND instruction updates the Zero, Sign and Overflow flags based on the outcome of the
AND instruction. If the AND instruction uses the Flags register as the destination, then simultaneously, two write
will occur to the Flags register producing an unpredictable result.
System Flags Register (FLAGS)
D5H, R/W
.7
.6
.5
.4
.3
.2
.1
.0
MSB
LSB
Carry flag (C)
Zero flag (Z)
Sign flag (S)
Overflow flag (V)
Not mapped
Figure 6-1. System Flags Register (FLAGS)
FLAG DESCRIPTIONS
030303
Overflow Flag (FLAGS.4, V)
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.
Sign Flag (FLAGS.5, S)
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.
Zero Flag (FLAGS.6, Z)
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.
Carry Flag (FLAGS.7, C)
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.
Содержание S3C9454B
Страница 1: ...S3C9454B F9454B 8 BIT CMOS MICROCONTROLLER USER S MANUAL Revision 1 ...
Страница 25: ...PRODUCT OVERVIEW S3C9454B F9454B 1 10 NOTES ...
Страница 35: ...ADDRESS SPACES S3C9454B F9454B 2 10 NOTES ...
Страница 65: ...CONTROL REGISTERS S3C9454B F9454B 4 18 NOTES ...
Страница 123: ...CLOCK CIRCUIT S3C9454B F9454B 7 4 NOTES ...
Страница 133: ...RESET and POWER DOWN S39454B F9454B 8 10 NOTES ...
Страница 145: ...I O PORTS S3C9454B F9454B 9 12 NOTES ...
Страница 173: ...A D CONVERTER S3C9454B F9454B 12 8 NOTES ...
Страница 183: ...ELECTRICAL DATA S3C9454B F9454B 13 10 NOTES ...
Страница 193: ...S3F9454B MTP S3C9454B F9454B 15 4 NOTES ...