I took this class in my sophomore year at the University of South Carolina. This is the code I had to write.
To execute the code, download the file or files you want to view. I recommend also downloading the Mars 4.5 IDE (http://courses.missouristate.edu/KenVollmar/mars/download.htm).
In Mars 4.5, open the file you want to execute. Click RUN then ASSEMBLE. This essentially compiles the code. Finally, click RUN then GO. Now the program is running.