5. List the values that will be in int array A with n = 10? void fillByUnkown (int A[], int n) { asm volatile( A[0]. "movw r30, BA0 \n\t "ldi r16, 0 \n\t //z holds &A[0] //this will be our loop counter A[1] "ldi r26, 10 \n\t // ldi r27, 0 \n\t // A[2]. 1di r25, 0 \n\t // "push r30 \n\t //store z, the beginning of the array on the sta "push r31 \n\t A[3] "top: cp r16, 8A1 \n\t // i-n // // : //output variables "brge out&= \n\t //no branch if greater so reversed the cp order "movw r24, r26 \n\t // "st z+, r24 \n\t" "st z+, r25 \n\t "adiw r26, 5 \n\t "inc r16 \n\t "rimp top \n\t "out: clr r1 \n\t "pop r31 \n\t "pop r30 \n\t "ldi r16, 99 \n\t" "std z+14, r16 \n\t" "ldi r16, 0 \n\t" "std z+15, r16 \n\t" "eor rl, rl \n\t : "z" (A), "r" (n) //store the low byte, move z to the high byte //store the high byte, move z to the next element // //inc counter by 1 // bottom of the loop // // restore z to point to A[0] A[4] A[5]. A[6] A[7] //this is to test if you understand // how storing with displacment works! A[8] //store the high byte A[9] //note that z is a pointer to our array A : "r16", "r26", "r27", "r24", "r25" //clobber list
5. List the values that will be in int array A with n = 10? void fillByUnkown (int A[], int n) { asm volatile( A[0]. "movw r30, BA0 \n\t "ldi r16, 0 \n\t //z holds &A[0] //this will be our loop counter A[1] "ldi r26, 10 \n\t // ldi r27, 0 \n\t // A[2]. 1di r25, 0 \n\t // "push r30 \n\t //store z, the beginning of the array on the sta "push r31 \n\t A[3] "top: cp r16, 8A1 \n\t // i-n // // : //output variables "brge out&= \n\t //no branch if greater so reversed the cp order "movw r24, r26 \n\t // "st z+, r24 \n\t" "st z+, r25 \n\t "adiw r26, 5 \n\t "inc r16 \n\t "rimp top \n\t "out: clr r1 \n\t "pop r31 \n\t "pop r30 \n\t "ldi r16, 99 \n\t" "std z+14, r16 \n\t" "ldi r16, 0 \n\t" "std z+15, r16 \n\t" "eor rl, rl \n\t : "z" (A), "r" (n) //store the low byte, move z to the high byte //store the high byte, move z to the next element // //inc counter by 1 // bottom of the loop // // restore z to point to A[0] A[4] A[5]. A[6] A[7] //this is to test if you understand // how storing with displacment works! A[8] //store the high byte A[9] //note that z is a pointer to our array A : "r16", "r26", "r27", "r24", "r25" //clobber list
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Solve the attached
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education