ece330_f10_hw5

ece330_f10_hw5 - ECE 332 Homework 5 Fall 2010 Due Page 1 of...

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: ECE 332 Homework 5 Fall 2010 Due: 09/27/2010 Page 1 of 4 1. Use the following assembly code and memory snapshots to answer the questions on the following page. # file: problem7.s .include “system.inc” .text _start: .global _start movia sp,STACK movi r17,801 srli r17,r17,4 andi r4,r17,0xf call magic A: mov r4,r2 call prints B: br . .end You can assume that the symbol _start is associated with memory address 0x20000 . Note: The data section of magic.s is loaded at memory address 0x200e0 . # file: magic.s .text magic: .global magic movia r8,LIST andi r9,r4,0xf C: slli r9,r9,2 add r9,r8,r9 ldw r2,0(r9) ret .data .word 0xaaaaaaaa LIST: .word m0, m1, m2, m3 .word 0xbbbbbbbb m0: .string "dragon" m1: .string "rat" m2: .string "rabbit" m3: .string "tiger" .word 0xcccccccc .end Figure 7.1. Partial memory snapshot of data section (word format) Figure 7.2. Partial memory snapshot of data section (byte format) ECE 332 Homework 5 Fall 2010 Due: 09/27/2010 Page 2 of 4 1. Based on the code and memory snapshots on the previous page : a. What is the value of the symbol...
View Full Document

This document was uploaded on 11/02/2011 for the course ECE 330 at Boise State.

Page1 / 4

ece330_f10_hw5 - ECE 332 Homework 5 Fall 2010 Due Page 1 of...

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