Question: Question 1 This question is sbout the Status Register (SREG) and branch instructions of the AVR architecture. (1) Find a case in byte addition that

Question 1 This question is sbout the Status Register (SREG) and branch instructions of the AVR architecture. (1) Find a case in byte addition that set flags Z, C and V in SREG at the same time. 4 (2) Use the flags in SREG, form the conditions for two hypothetical branch in structionsBRHI (branch if higher for unsigned values) and "BRLE (branch if less or equal for signed values).5 (3) Suppose we extend the SREG with three more flags NZ, NC, NS. They are used to store the previous values of flags Z, C and S, respectively. In this way we can actually use two compare instructions together to support more sophis- ticated branch instructions. For example, we can test if a value (e.g., in R16) is in range |2,5) by: cpi R16, 2 cpi R16, 5 If R16-3, we know that Z-0, C-1, S-1 (since R16
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
