Question: Problem #3 [25 pts] Consider the following code written in AVR assembly. Explain in words what the program accomplishes when it is executed. That is,

 Problem #3 [25 pts] Consider the following code written in AVR

Problem #3 [25 pts] Consider the following code written in AVR assembly. Explain in words what the program accomplishes when it is executed. That is, explain what it does, how it does it, and how many times it does it. What is the value of location CTR when the execution completes and how many times is the LOOP executed? How much memory is allocated in SRAM? .ORG Ox0046 LDI XH, high (CTR) LDI XL, low (CTR) LDIR31, Oxla LDI R17, 8 CLR R6 LOOP: CLC ROR R31 BRCC NEXT INC R6 NEXT: DEC R17 BRNE LOOP ST X, R6 DONE: JMP DONE .DSEG .org $0104 CTR: .BYTE 1 Extra Credit [2 pts] Considering the portion of AVR code above that is shown in bold text. Which assembly instruction is unnecessary? In other words, which assembly instruction in the bold section) could be deleted while still retaining the exact same program functionality? Problem #3 [25 pts] Consider the following code written in AVR assembly. Explain in words what the program accomplishes when it is executed. That is, explain what it does, how it does it, and how many times it does it. What is the value of location CTR when the execution completes and how many times is the LOOP executed? How much memory is allocated in SRAM? .ORG Ox0046 LDI XH, high (CTR) LDI XL, low (CTR) LDIR31, Oxla LDI R17, 8 CLR R6 LOOP: CLC ROR R31 BRCC NEXT INC R6 NEXT: DEC R17 BRNE LOOP ST X, R6 DONE: JMP DONE .DSEG .org $0104 CTR: .BYTE 1 Extra Credit [2 pts] Considering the portion of AVR code above that is shown in bold text. Which assembly instruction is unnecessary? In other words, which assembly instruction in the bold section) could be deleted while still retaining the exact same program functionality

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!