1- i didn't study AVR, but i can answer the first question since i have experience in PIC processors, the status register has the size of any other register, and where every bit represent an ALU status (or memory bank if it exists in AVR)
some of the bits are
C: carry bit, set to one when the ALU operation generates a carry
DC: digit carry.. same concept
Z: the Zero bit, if the result of an ALU operation is zero, this bit will be set.
(the Z bit is nothing but a NAND Gate)
OV bit: set to 1 when there is an overflow
N bit: set to 1 when a negative value is generated.
i was talking about the PIC, but the concept is the same. i suggest you download the datasheet of the AVR you are working on, and i will try to help you if you have a question.
__________________
click on 'Groan' to switch to my left testicle.
|