SPARC Architecture, Assembly Language Programming, and C (2nd Edition)

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Sample Exercises for Quiz 3 Sample Exercises for Quiz 3 The Stack, Accessing Stack Variables, One-Dimensional Arrays, Multi-Dimensional Arrays, Structures, Unions [multi-dimensional arrays, structs/unions, and arrays of structs will not be on Quiz 3 but will be on the Midterm] Review the load/store instructions, alignment restrictions, save instruction formula to allocate local variables on the stack. What are some of the reasons why we have to use the runtime Stack for local variables (as opposed to just mapping all local variables to the local registers in the register set window)? Draw what the following local variable definitions would look like on the Stack. Write the appropriate save instruction to allocate these local variables on the Stack. Write SPARC assembly statements to store the initial values in each local variable. Write SPARC assembly statements to access/read and write each local variable (for example, placing each local
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern