AVR Instruction Set Nomenclature: Status Register (SREG ...
AVR Instruction Set Nomenclature: Status Register (SREG ...
AVR Instruction Set Nomenclature: Status Register (SREG ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
BSET - Bit <strong>Set</strong> in <strong>SREG</strong><br />
Description:<br />
<strong>Set</strong>s a single flag or bit in <strong>SREG</strong>.<br />
Operation:<br />
(i) <strong>SREG</strong>(s) ← 1<br />
Syntax: Operands: Program Counter:<br />
(i) BSET s 0 ≤ s ≤ 7 PC ← PC + 1<br />
16-bit Opcode:<br />
1001 0100 0sss 1000<br />
<strong>Status</strong> <strong>Register</strong> (<strong>SREG</strong>) and Boolean Formulae:<br />
I T H S V N Z C<br />
⇔ ⇔ ⇔ ⇔ ⇔ ⇔ ⇔ ⇔<br />
I: 1 if s = 7; Unchanged otherwise.<br />
T: 1 if s = 6; Unchanged otherwise.<br />
H: 1 if s = 5; Unchanged otherwise.<br />
S: 1 if s = 4; Unchanged otherwise.<br />
V: 1 if s = 3; Unchanged otherwise.<br />
N: 1 if s = 2; Unchanged otherwise.<br />
Z: 1 if s = 1; Unchanged otherwise.<br />
C: 1 if s = 0; Unchanged otherwise.<br />
Example:<br />
bset 6 ; <strong>Set</strong> T flag<br />
bset 7 ; Enable interrupt<br />
Words: 1 (2 bytes)<br />
Cycles: 1<br />
<strong>Instruction</strong> <strong>Set</strong><br />
37