Lab1
-
Hello world
Using MIPS simulator execute hello program
- Download
hello.s
file - Load the file with QtSpim
- Run the program (F5)
- Notice the console output
Note: If the first line in `User Text Segment` is not the first line in the program set the PC regster with the address of the first line of the program
- Download
-
Addition
Create a program that: reads two integers from standard input,adds them and prints the result
- Copy hello.s and name it
addition.s
- Ask user for the first integer
- Read the number into a register
- Ask user for the second integer
- Read the number into a different register
- Add the numbers
- Print a string followed by the result
- Run the program
- Submit the program and the output of the console via email
Hint: See sytem calls table to identify how to read input from standard console and how to print integers
- Copy hello.s and name it