EE319KMid-Term1S11-MW - 1 /8 EE 319K Spring 2011 First...

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

View Full Document Right Arrow Icon
1/8 EE 319K Spring 2011 First Mid-Term Dr. Ramesh Yerraballi Full Name : Duration : 75 minutes EID :__________________________ Instructions : This is a closed book exam No calculators are allowed Write answers within the box/space provided after each of the questions. If you need more space, you may write on the back of the sheets. There are SEVEN questions on the test, read all of them first so you may properly allocate your time to answer them. Score Sheet Question Max Your Score 1 12 2 8 3 10 4 10 5 15 6 15 7 30
Background image of page 1

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

View Full DocumentRight Arrow Icon
2/8 1. [12 pts ] Give the binary representations for the following i. The signed 5 bit number -14? ii. The unsigned 5-bit number 23? iii. What are the largest unsigned and smallest signed 5-bit numbers one can represent (in decimal)? 2. [ 8 pts ] Identify the addressing modes used in each of the following instructions: Instruction Addressing Modes ldd $44 psha bra ofatree movb foo,bar bset DDRP,#128 3. [10 points] The values of N, Z, C and V flags are 0, 0, 1 and 1 respectively after a comparison operation was performed. Which of the branches will be taken/not taken (put a check mark). Branch Taken Not Taken bge blt blo bne bhs
Background image of page 2
3/8 [Yes/No] [Give your reasoning] 4. [10 pts] Answer the following a. [4 pts] How much time does one clock cycle take on the DP512/DG128 when operating in Run mode? b. [2 pts] Memory-mapped I/O means that the same operations we use to read from and write to memory can be used to read from and write to I/O devices. [True/False] c. [2 pts] Say, your program has subroutines that are called from main . What happens if you do not initialize the stack pointer with a statement like: lds #$4000 [Answer in no more than 15 words] d. [2 pts] The following piece of code is intended to swap the contents of registers A and B pshd pula pulb Does it work? 5. [ 15 pts ] Assume the following instruction: puld is located at address $401A . Memory contents of locations where the stack pointer is pointing to are given below. The stack pointer itself has a value of $3FFC . $00 $20 SP -> $3FFC $10 $40 $30 $00
Background image of page 3

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

View Full DocumentRight Arrow Icon
4/8 Complete the following table showing the contents of the R/W bus line, Address bus lines, the Data bus lines, and registers, PC, SP, when the puld instruction is executed: R/W Addr Data PC SP R $4050 $3A $4051 $3FF0 W $3FEE $12 $4051 $3FEE W $3FEF $34 $4051 $3FEE (Use as many rows as needed) 6. [ 15 pts ] Given the following assembly code Assembly Code Res rmb 1 . . . clr Res ldab #12 loop ldaa Res aba staa Res dbne B,loop a. [5 points] What does the code do? i. Stores in Res , the sum of all odd numbers from 12 down to 1. ii. Stores in Res , the sum of all numbers from 12 down to 1. iii. Stores in Res , the value 144, which is 12 added to itself 12 times. iv.
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/20/2012 for the course EE 319K taught by Professor Bard during the Fall '08 term at University of Texas at Austin.

Page1 / 8

EE319KMid-Term1S11-MW - 1 /8 EE 319K Spring 2011 First...

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

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