assign3

assign3 - CSE/EEE230 Assignment 3 Sample Debra Calliss This...

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

View Full Document Right Arrow Icon
# CSE/EEE230 Assignment 3 Sample # Debra Calliss # October 25, 2010 # This program will print my name, and then read in and store # a maximum of 10 integers. The numbers are then displayed # along with the difference from the floating point average # of the numbers. .data list: .space 40 #An array to hold a maximum of 10 integers name: .asciiz "Debra Calliss\n" prompt1: .asciiz "How many values to read? " prompt2: .asciiz "Enter a number: " left: .asciiz " (" right: .asciiz ")\n" .text .globl main # main # The main function will print my name and then set up the # parameters for and then call the functions readdata # and print. main: li $v0, 4 #set command to print string la $a0, name #get string syscall #print string la $a0, list #get start of array jal readdata #call readdata function move $a1, $v0 #copy count into parameter la $a0, list #reload start of array jal print #call print function li $v0, 10 #set command to stop program syscall #halt # readdata # This function will prompt the user to enter the number # of values in the list. If the number is < 0, then the # number is reset to 0. If the number is > 10, then the
Background image of page 1

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

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

This note was uploaded on 11/22/2010 for the course BSE 71920 taught by Professor Nakurmura during the Spring '10 term at ASU.

Page1 / 4

assign3 - CSE/EEE230 Assignment 3 Sample Debra Calliss This...

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

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