CS 465 – Computer Systems Architecture
Prof. Daniel A. Menasce – Fall 2021
Department of Computer Science
George Mason University
HW0: Assembly Programming and Installing MARS MIPS Simulator [0%]
The purpose of this HW assignment is to prepare you for the upcoming assignments by learning about assembly programs and setting up the MARS MIPS simulator on your preferred computing environment.
MARS is a MIPS Assembler and Runtime Simulator developed by Volmar from Missouri State University. Please download the assembler from http://courses.missouristate.edu/KenVollmar/MARS/index.htm. MARS is written in Java and is provided as a "jar" package. Be sure you have Java installed on your preferred computing environment.
java -jar Mars_xxx.jar should load up MARS [where "xxx" is the version number.]
Part 1. Write your first MIPS Program.
First open the MARS simulator using command line option as shown above.
Create a new assembly program
Type in Editor the following code
#Author: Daniel Menasce
#Date: 08.31.2015
.data
silly_str: .asciiz "Hello World, Fall 2021 is going to be fun."
.text
main:
li $v0, 4
la $a0, silly_str
syscall
# To exit off main
li $v0, 10
syscall
Save the code as "hello_world.asm"
Assemble the Code
Run the Code
Does it show the desired output ? Yes ? Congratulations!
Part 2. Tutorial By MARS Authors using fibonacci.asm
Download the Tutorial
Download Fibonacci.asm from here.
Follow Steps 1 to 11 of Tutorial in Part 1.