CS210: Laboratory Four
Getting started with SPIM

In this lab, we will use text book John Waldron "Introduction to RISC Assembly Language Programming", and cover the following topics:

-- SPIM SIMULATOR (3.5 in text book)
-- MIPS (SPIM) REGISTERS (3.4)
-- SPIM SYSTEM CALL (3.6)
-- XSPIM SIMULATOR (4.4)
-- SOME SIMPLE EXAMPLES



First, get familiar with XSPIM simulator by a little program (add.a - using some pseudoinstructions; add1.a - original MIPS instructions).

Then, learn how to display "hello world" on the terminal (using System call) (hello.a - using some pseudoinstructions; hello1.a - original MIPS instructions).

Finally, put them together: read inputs from the terminal, add two integers and displays the result (example.a - using some pseudoinstructions; example1.a - original MIPS instructions).