21.08.2013 Views

AVR Instruction Set Nomenclature: Status Register (SREG ...

AVR Instruction Set Nomenclature: Status Register (SREG ...

AVR Instruction Set Nomenclature: Status Register (SREG ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

BCLR - Bit Clear in <strong>SREG</strong><br />

Description:<br />

Clears a single flag in <strong>SREG</strong>.<br />

Operation:<br />

(i) <strong>SREG</strong>(s) ← 0<br />

Syntax: Operands: Program Counter:<br />

(i) BCLR s 0 ≤ s ≤ 7 PC ← PC + 1<br />

16-bit Opcode:<br />

1001 0100 1sss 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: 0 if s = 7; Unchanged otherwise.<br />

T: 0 if s = 6; Unchanged otherwise.<br />

H: 0 if s = 5; Unchanged otherwise.<br />

S: 0 if s = 4; Unchanged otherwise.<br />

V: 0 if s = 3; Unchanged otherwise.<br />

N: 0 if s = 2; Unchanged otherwise.<br />

Z: 0 if s = 1; Unchanged otherwise.<br />

C: 0 if s = 0; Unchanged otherwise.<br />

Example:<br />

bclr 0 ; Clear carry flag<br />

bclr 7 ; Disable interrupts<br />

Words: 1 (2 bytes)<br />

Cycles: 1<br />

<strong>Instruction</strong> <strong>Set</strong><br />

15

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!