Hints_for_HW2 - main: # begin your code here # exit from...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
1. Following is the typical structure for the code that can run on PCSpim: ################### # The data segment ################### .data # Create some data such as strings to use ########################################## # The text segment -- instructions go here ########################################## .text .globl main # creat a main function for the “OS” to call
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: main: # begin your code here # exit from your code after completing your tasks li $v0, 10 # Syscall number 10 is to terminate the program syscall # exit now 2. Format strings: You’d better use .asciiz instead of .ascii The formal will have a null-terminator so that the machine will know where your format string terminates....
View Full Document

This note was uploaded on 05/11/2010 for the course CSE/EEE CSE/EEE230 taught by Professor Baoxinli during the Fall '08 term at ASU.

Ask a homework question - tutors are online