ESE 380 Lecture Notes - Lecture 8: Or Gate, Processor Register, Operand

9 views11 pages

Document Summary

Most bits in sreg provide information about the result from the most recently executed logic or arithmetic instruction. These bits, often called, flag bits, are automatically set and cleared by the alu when it executes a logic or arithmetic instruction. At reset, all bits of sreg are 0s. Sreg is located in the i/o register address space at address f (offset f) Information in sregg can be used to alter program flow to perform conditional operations. How each instruction effects the flags is given in the avr instruction set reference manual. Data transfer instructions have no effect on the flags. That is, the flags keep their previous values. In some situations we will need to set or clear specific bits of sreg using instructions. There are a number of instructions that can be used to set or clear any bit of sreg. Example - different ways to clear c flag. V = 0 after all logic operations.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents