probset4 - Department of Electrical and Computer...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Department of Electrical and Computer Engineering The University of Texas at Austin EE 306, Fall 2009 Problem Set 4 Due: November 2, before class Yale N. Patt, Instructor TAs: Aater Suleman, Chang Joo Lee, Ameya Chaudhari, Antonius Keddis, Arvind Chandrababu, Bhargavi Narayanasetty, Eshar Ben-dor, Faruk Guvenilir, Marc Kellermann, RJ Harden Instructions: You are encouraged to work on the problem set in groups and turn in one problem set for the entire group. Remember to put all your names on the solution sheet. Also, remember to put the name of the TA and the time for the discussion section you would like the problem set turned back to you. Show your work. 1. (7.2) An LC-3 assembly language program contains the instruction: ASCII LD R1, ASCII The symbol table entry for ASCII is x4F08. If this instruction is executed during the running of the program, what will be contained in R1 immediately after the instruction is executed? 2. (7.10) The following program fragment has an error in it. Identify the error and explain how to fix it. Note: R3 is the only register which should change its value after the program runs. ADD R3, R3, #30 ST R3, A HALT A .BLKW 1 Will this error be detected when this code is assembled or when this code is run on the LC-3? 3. (Adapted from 6.14) Consider the following machine language program: AND R2, R2, #0 LOOP ADD R1, R1, #-3 BRn END ADD R2, R2, #1 BRnzp LOOP
Background image of page 1

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

View Full DocumentRight Arrow Icon
END HALT What are the possible initial values of R1 that cause the final value in R2 to be 3? 4.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 7

probset4 - Department of Electrical and Computer...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online