Register usage r1 address of stored number r2 count

This preview shows page 7 - 8 out of 8 pages.

Register Usage: R1: address of stored number, R2: count, R3: number of numbers remaining, and R4: a number.
Image of page 7

Subscribe to view the full document.

8 Problem 7 (5 Points) Answer the following short answer questions using 1-2 sentences. a. What advantage does the LC-3 LDR instruction provide over the LD instruction? (1 Point) The LDR instruction can address more locations in memory since it uses a register offset which can access 2 16 locations, whereas LD uses PCoffset which can access 2 9 locations. b. What is the difference between Breakpoints and Single-Stepping? (2 Points) Breakpoints are used to indicate an instruction to pause at when execution reaches it. Single-stepping is the act of executing one instruction at a time. c. Name one non -memory addressing mode and one memory addressing mode supported by LC-3. Give an example LC-3 OPCODE corresponding to each mode that you list (e.g. ADD, LD, ST). (2 Points) Memory addressing modes: PC-Relative: LD, ST Indirect: LDI, STI Base offset: LDR, STR Non-memory addressing modes: Register: ADD, AND, NOT Immediate: ADD, AND
Image of page 8

{[ snackBarMessage ]}

Get FREE access by uploading your study materials

Upload your study materials now and get free access to over 25 million documents.

Upload now for FREE access Or pay now for instant access
Christopher Reinemann
"Before using Course Hero my grade was at 78%. By the end of the semester my grade was at 90%. I could not have done it without all the class material I found."
— Christopher R., University of Rhode Island '15, Course Hero Intern

Ask a question for free

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