SAM3N00A Atmel Corporation, SAM3N00A Datasheet - Page 85

no-image

SAM3N00A

Manufacturer Part Number
SAM3N00A
Description
Manufacturer
Atmel Corporation
Datasheets
10.11.7.1
10.11.7.2
11011A–ATARM–04-Oct-10
The condition flags
Condition code suffixes
This section describes:
The APSR contains the following condition flags:
N
Z
C
V
For more information about the APSR see
A carry occurs:
Overflow occurs if the result of an add, subtract, or compare is greater than or equal to 2
less than –2
Most instructions update the status flags only if the S suffix is specified. See the instruction
descriptions for more information.
The instructions that can be conditional have an optional condition code, shown in syntax
descriptions as {cond}. Conditional execution requires a preceding IT instruction. An instruction
with a condition code is only executed if the condition code flags in the APSR meet the specified
condition.
You can use conditional execution with the IT instruction to reduce the number of branch instruc-
tions in code.
Table 10-16
flags.
Table 10-16. Condition code suffixes
Suffix
EQ
NE
CS or
HS
CC or
LO
MI
PL
VS
• if the result of an addition is greater than or equal to 2
• if the result of a subtraction is positive or zero
• as the result of an inline barrel shifter operation in a move or logical instruction.
“The condition flags”
“Condition code suffixes”
Table 10-16
Flags
Z = 1
Z = 0
C = 1
C = 0
N = 1
N = 0
V = 1
31
also shows the relationship between condition code suffixes and the N, Z, C, and V
.
Set to 1 when the result of the operation was negative, cleared to 0 otherwise.
Set to 1 when the result of the operation was zero, cleared to 0 otherwise.
Set to 1 when the operation resulted in a carry, cleared to 0 otherwise.
Set to 1 when the operation caused overflow, cleared to 0 otherwise.
shows the condition codes to use.
.
Meaning
Equal
Not equal
Higher or same, unsigned ≥
Lower, unsigned <
Negative
Positive or zero
Overflow
“Program Status Register” on page
32
46.
SAM3N
31
, or
85

Related parts for SAM3N00A