{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lab2 - Lab 2(Sections 500 and 501 PCSPIM to understand the...

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

View Full Document Right Arrow Icon
Lab 2 (Sections 500 and 501) : PCSPIM to understand the MIPS architecture Name: Sign the following statement: On my honor, as an Aggie, I have neither given nor received unauthorized aid on this academic work 1 Objective The objective of this lab is to make you more familiar with MIPS pseudo instructions as well as using memory. 2 Pre-requisite Before starting with this lab, you are required to know what pseudo instructions are as well as how MIPS access memory. 3 Basic Memory Access 1. Load the following program into SPIM and use it to answer the questions below 1 . data 2 msg1 : . asciiz ”A 17 byte message” 3 msg2 : . asciiz ”Another message of 27 bytes ” 4 num1 : . byte 45 5 num2 : . h a l f 654 6 num3 : . word 0 xcafebabe 7 num4 : . word 0 xfeedface 1
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
Computer Architecture and Design, InLab 2 2 8 . text 9 . globl main 10 main : 11 addu $s0 , $ra , $0 #save the return address 12 l i $v0 , 4 #system c a l l for p r i n t s t r 13 la $a0 , msg1 #address of s t r i n g to p r i nt 14 syscall 15 la $a0 , msg2 #address of s t r i n g to p r i nt 16 syscall 17
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.

{[ snackBarMessage ]}