COMP SCI 252 Midterm: CS 252 UW Madison Spring2013 Exam4A S1
Document Summary
Tas: rebecca lam, mona jalal, preeti agarwal, pradip vallathol. No: book(s), note(s), or calculators of any sort. Plan your time carefully since some problems are longer than others. The lc-3 instruction set is provided to you on the last page. For the following questions, select the best answer. Jsrr r5 is equivalent to: lea r5, #1. Jmp r7: all of the above are equivalent. Answer the questions below for the following program: (5 points) ; display the string at the address in r0: fill out the following symbol table: (3 points) Upp_a: what is the output of this program? (2 points) Identify the assembly errors in the following assembly program. (3 points) Suppose the following lc-3 subroutine implements a new service routine called gets. The subroutine will store the input string starting at the address in r0 and then return to normal execution.