fall_02_e2 - ECE 199 Exam 2 Fall 2002 Tuesday, November...

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

View Full Document Right Arrow Icon
ECE 199 Exam 2 Fall 2002 Tuesday, November 5 th , 2002 Name: 1. Be sure your exam booklet has 7 pages. 2. Write your name at the top of each page. 3. This is a closed book exam. 4. You are allowed one 8.5 x 11 sheet of notes. 5. Absolutely no interaction between students is allowed. 6. Show all of your work. 7. Don’t panic, and good luck! Problem 1 20 points Problem 2 20 points Problem 3 20 points Problem 4 20 points Problem 5 20 points Total 100 points
Background image of page 1

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

View Full DocumentRight Arrow Icon
Name: Problem 1 (20 points): Short Answer Part A. What is the purpose of the Ready bit in the Keyboard Status Register? Be brief. Part B. What is the PC of the instruction that executes immediately after the TRAP instruction in the code below? .ORIG x3000 LD R0, DATA STI R0, TOP TRAP x30 ADD R0, R0, #1 DATA .FILL x1234 TOP .FILL x30 Part C. The following subroutine can be used to output a digit to the monitor. But it has a serious bug. What is it? OUTPUT ST R0, SAVE_R0 ST R1, SAVE_R1 LD R1, ASCII_ZERO ADD R0, R0, R1 OUT LD R1, SAVE_R1 LD R0, SAVE_R0 RET ASCII_ZERO .FILL x30 ; x30 is ASCII for zero (’0’) SAVE_R0 .FILL x0000 SAVE_R1 .FILL x0000 2
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

fall_02_e2 - ECE 199 Exam 2 Fall 2002 Tuesday, November...

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