Question: l Now, suppose that the entire program is executed again, with one small difference. Assumethatthe first line of the program is replaced with:.EQU var1 =

lNow, suppose that the entire program is executed again, with one smalllNow, suppose that the entire program is executed again, with one small difference. Assumethatthe first line of the program is replaced with:.EQU var1 = 0b10101010Assuming that the code has executed and reached the donelabel:

(h)What 8-bit binaryvalue is stored in SRAM at the memory location specified by resultA?

(i)What decimal value is stored in SRAM at the memory location specified by resultB?

Answer question 1 a-i and I will rate you.

1- Consider the AVR assembly code provided below. Read the code and use your knowledge of assembly instructions to answer the questions given at the bottom of this page. EQU varl = Ob11011010 .EQU var2 8 .DEF count = r17 .ORG Ox0000 RJMP init .ORG 0x0046 init: LDI LDI LDI LDI CLR LDI LDI loop: CLC ROR BRCC INC skip: ROL DEC BRNE XH, HIGH (resulta) XL, LOW (resulta) YH, HIGH (resultB) YL, LOW (results) r10 r20, varl count, var2 r20 skip ri r10 count loop ST ST done : RJMP X, r10 Y+, r1 done .DSEG .ORG Ox03FE resultA: .BYTE 1 resultB: .BYTE 1 Answer the following questions (assuming that the code has executed and reached the done label): (a) What is the decimal value of the count register? (b) In total, how many times is the instruction "ROR 120 executed? (c) What are the hexadecimal values of r27 and r26? (d) What are the hexadecimal values of r29 and r28? (e) What hexadecimal address does the assembler assign to the label resultB? (f) What 8-bit binary value is stored in SRAM at the memory location specified by resultA? (g) What decimal value is stored in SRAM at the memory location specified by resultB? 1- Consider the AVR assembly code provided below. Read the code and use your knowledge of assembly instructions to answer the questions given at the bottom of this page. EQU varl = Ob11011010 .EQU var2 8 .DEF count = r17 .ORG Ox0000 RJMP init .ORG 0x0046 init: LDI LDI LDI LDI CLR LDI LDI loop: CLC ROR BRCC INC skip: ROL DEC BRNE XH, HIGH (resulta) XL, LOW (resulta) YH, HIGH (resultB) YL, LOW (results) r10 r20, varl count, var2 r20 skip ri r10 count loop ST ST done : RJMP X, r10 Y+, r1 done .DSEG .ORG Ox03FE resultA: .BYTE 1 resultB: .BYTE 1 Answer the following questions (assuming that the code has executed and reached the done label): (a) What is the decimal value of the count register? (b) In total, how many times is the instruction "ROR 120 executed? (c) What are the hexadecimal values of r27 and r26? (d) What are the hexadecimal values of r29 and r28? (e) What hexadecimal address does the assembler assign to the label resultB? (f) What 8-bit binary value is stored in SRAM at the memory location specified by resultA? (g) What decimal value is stored in SRAM at the memory location specified by resultB

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!