Write and test a MIPS program consisting of four functions...

This preview shows page 1 out of 1 page.

CSE/EEE 230 Spring 2018 Assignment 4 Due March 29 11:59PM Write and test a MIPS program consisting of four functions. In the following descriptions, the symbol & means “address of”. 1. void main(): The main function must 1) print your name 2) call the readData function 3) call count function 4) complete the program. The main function must set up all parameters before calling each of the functions. 2. int readData (&array): The starting address of an array is passed to the function as a parameter using $a0. The function must prompt for and read and store integers in the array until either a zero is entered or 10 numbers are read. Once the tenth integer is entered, your program must stop reading. The function must return (using $v0) the number of values read and stored in the array (10 or less). The zero input is not part of the array and must not be stored in the array. If the first input is a zero, then the array will be empty and the count returned is zero. 3.

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture