

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Class: Computer Systems&Assembly Lang; Subject: Elect Engr & Computer Science; University: University of Kansas; Term: Fall 2007;
Typology: Assignments
1 / 2
This page cannot be seen from the preview
Don't miss anything!


Homework # Due: October 1, 2007 Problem #1. Consider the following setup for memory and registers. Assume the same starting setup for each part of the question. Show the values of the registers and memory locations after each series of instruction(s) are executed. If an unaligned access is encountered, write exception next to the instruction and also show the contents of the memory and address registers. (note* on an illegal access the instruction that caused the unaligned access will not be executed). a. lw r2, r3,r shi r2,r3, b. lw r0, r3,r addi r5,r5, 1 sw r5,r5,r c. lbi r1,r6, 0 or r1,r1,r swi r1,r2, d. lw r1,r5,r sw r1, r1, r
Problem #2. Translate the following C code into Microblaze assembler. To keep things easy to grade, assume that the starting address of the A array is in memory location 0x0010 and should be loaded into register R1, and the address of the B array is in memory location 0x and should be laoded into R2. Int A[100], B[100]; /*determines the size of the operands */ For(I = 0; I< 100, I +=2){ If (A[I] == B[I]) A[I] = 0; Else A[I] = B[I]; } Problem # Redraw the following waveform for the following instructions. a. shi, r1, r0, 2 b. lwi r1, r0, 4