Syntax: |
Operation: |
Operands: |
Program Counter: |
Opcode |
Comment |
Stack |
SBRS Rr,b |
If Rr(b) == 1 then PC = PC + 2 (or 3) else PC = PC + 1 |
0 <= r <= 31, 0 <= b <= 7 |
PC = PC + 1, Condition false - no skip PC = PC + 2, Skip a one word instruction PC = PC + 3, Skip a two word instruction |
1111111rrrrr0bbb |
This instruction tests a single bit in a register and skips the next instruction if the bit is set.
I |
– |
||
T |
– |
||
H |
– |
||
S |
– |
||
V |
– |
||
N |
– |
||
Z |
– |
||
C |
– |
sub r0,r1 ; Subtract r1 from r0 sbrs r0,7 ; Skip if bit 7 in r0 set neg r0 ; Only executed if bit 7 in r0 not set nop ; Continue (do nothing)
1 (2 bytes)
Name |
Cycles i |
ii |
iii |
AVRe |
1 |
2 |
3 |
AVRxm |
1 |
2 |
3 |
AVRxt |
1 |
2 |
3 |
AVRrc |
1 |
2 |
N/A |
i) If the condition is false (no skip).
ii) If the condition is true (skip is executed) and the instruction skipped is one word.
iii) If the condition is true (skip is executed) and the instruction skipped is two words.