SAM3N00A Atmel Corporation, SAM3N00A Datasheet - Page 132

no-image

SAM3N00A

Manufacturer Part Number
SAM3N00A
Description
Manufacturer
Atmel Corporation
Datasheets
10.17.2
10.17.2.1
10.17.2.2
10.17.2.3
10.17.2.4
10.17.2.5
132
CBZ
CBNZ
SAM3N
CBZ and CBNZ
Syntax
Operation
Restrictions
Condition flags
Examples
R5, target ; Forward branch if R5 is zero
R0, target ; Forward branch if R0 is not zero
Compare and Branch on Zero, Compare and Branch on Non-Zero.
where:
Rn
label
Use the CBZ or CBNZ instructions to avoid changing the condition code flags and to reduce the
number of instructions.
CBZ Rn, label does not change condition flags but is otherwise equivalent to:
CBNZ Rn, label does not change condition flags but is otherwise equivalent to:
The restrictions are:
These instructions do not change the flags.
• Rn must be in the range of R0 to R7
• the branch destination must be within 4 to 130 bytes after the instruction
• these instructions must not be used inside an IT block.
CBZ Rn, label
CBNZ Rn, label
CMP
BEQ
CMP
BNE
is the register holding the operand.
is the branch destination.
Rn, #0
label
Rn, #0
label
11011A–ATARM–04-Oct-10

Related parts for SAM3N00A