exam2_2004 solutions

exam2_2004 solutions - Department of Electrical and...

Info iconThis preview shows pages 1–2. 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 2004 Exam 2 Solutions Yale N. Patt, Instructor Siddharth Balwani, Linda Bigelow, Tommy Buell, Jeremy Carrillo, Aamir Hasan, Danny Lynch, Rustam Miftakhutdinov, Veynu Narasiman, Vishal Parikh, Basit Sheikh 1) Part a) As you know the memory address space of the LC-3 is 16 bits. If the MAR is loaded with the value xFE00, how does the hardware know to access the Keyboard Status Register or memory location xFE00? There is no memory location xFE00, so the address control logic tells the hardware that it is accessing a device register. Part b) The following assembly program is assembled, and run on the LC-3 Simulator. .ORIG x3000 LD R0, ASCII0 TRAP x23 TRAP x23 TRAP x23 TRAP x23 TRAP x23 TRAP x25 ASCII0 .FILL x30 .END Before it is executed, you set a breakpoint at x3003. What happens? The number "0" is output twice, then the process stops. Part c) At the end of an LD instruction midway through the execution of an LC-3 program, the contents of the condition codes are set as follows: N=1, Z=1, P=0. What can you infer? This is impossible, so the machine is broken. Note: there is no instruction that can cause this to happen. Part d) There are three addressing modes available to the assembly language programmer who wishes to load a value from memory into R5. If the load instruction is in a loop and
Background image of page 1

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

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

This note was uploaded on 04/26/2009 for the course EE 302 taught by Professor Mccann during the Fall '06 term at University of Texas.

Page1 / 5

exam2_2004 solutions - Department of Electrical and...

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

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