COMP SCI 252 Midterm: CS 252 UW Madison Fall2012 Exam4B sol
Document Summary
No: book(s), note(s), or calculators of any sort. Plan your time carefully since some problems are longer than others. Problem 1: assembly language (a) briefly explain the four assembly errors in the following lc-3 program. (4 points) Duplicate label next x2a cannot be represented as a signed number in 5 bits. Nor is an undefined instruction (b) which of the following (if any) of the following pseudo-ops can be used multiple (2 points) times in a single assembly file. An lc-3 assembly language program in given below: . end (a) a symbol table is created during the first pass by the assembler. Fill in the following symbol table for the above program: (4 points) Address x3005 x3008 x300a x300b x3012 x301c (b) the assembly program is converted into a binary file during the second pass by the assembler. Fill in the binary instructions at the following memory locations: (2 points) ; (do not echo it on the display)