{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

finalexam_2002 solutions

finalexam_2002 solutions - C Opcode ADD AND(one is enough...

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 University of Texas at Austin EE 379K Fall 2000 Y. N. Patt, Instructor TAs: Kathy Buchheit, Laura Funderburg, Chandresh Jain, Onur Mutlu, Danny Nold, Kameswar Subramanian, Francis Tseng, Brian Ward Solutions to Exam 2 Problem 1 Part 1 Both instructions are noops (they do *essentially* nothing) Difference: B sets the condition codes. Part 2 128 locations on a page, 8 pages Part 3 LDI R6, x50 Part 4 largest address for current LDR : x323F largest address for modified LDR : x321F smallest address for modified LDR : x31E0 Problem 2 A Opcode : TRAP Function : Carries the trapvector, which is used to find the starting address of the system call. B Opcode : LDR, STR, JSRR (one is enough) Function : Carries the contents of the base register.
Background image of page 1

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

View Full Document Right Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: C Opcode : ADD, AND (one is enough) Function : Selects whether an immediate operand or a value from a register will be used (Bit 5). Problem 3 Part A P condition code. Part B Whether the instruction sets the condition codes. Problem 4 1100 1 00 001 000100 Problem 5 1111 0000 00100111 No. Because GETC and OUT overwrite R7 linkage to main program will be lost. Problem 6 Outputs the input characters in reverse order. Problem 7 Filled blanks in order: ADD R1, R1, #-1 LDR R4, R1, #0 ADD R0, R0, #1 ADD R1, R1, #-1 BRnzp LOOP Problem 8 Part A Sets the Interrupt Enable bit of KBSR and continually outputs 2. Part B Echoes the input character and halts. Part C A number of 2's followed by the key struck by the user....
View Full Document

{[ snackBarMessage ]}