Machine Organization & Assembly Language

CSE 378, Spring Quarter 2000


Running SPIM

SPIM is the MIPS simulator we are using this quarter. We encourage you to use the Linux version on the instructional Linux machines rather than the PC version of SPIM, since the Linux version is more stable. Also you will be performing your electronic turnin from these machines, so by working on them you won't have to transfer files.

Use Reflection X to start an XTerm session to any of the instructional Linux machines. Edit your assembly language files using a UNIX text editor (Emacs, vi, ...). An alternative would be to use a Windows text editor to create the file and ftp it to any of the instructional Linux machines. All of these machines access the same files - if you edit files on one machine, the others will "see" the changes (the drives holding your files are "mounted" on each of these machines).

First edit your .mycshrc file using a UNIX text editor and add the following line near the top:
    set path = ($path /cse/courses/cse378/2000sp/lib)
Next type:
    source .mycshrc
to set things up.

To run the text-only version of SPIM type:
    spim
to run the simulator.

Once you have SPIM running, type:
    load "your_file"
to load your assembly language program your_file into memory, then
    run
to execute your program.

Type:
    ?
for help on commands and
    quit
to exit the simulator.

To run the version of SPIM with a graphical user interface, type:
    ln -s /cse/courses/cse378/2000sp/lib/trap.handler trap.handler
You only need to do the first time you want to run xspim from a particular directory.

Next type:
    xspim
to run xspim.

Use the load button to load your assembly language program and the run button to execute it.

The help button will tell you about what each button does.
The quit button exits the simulator (SPIM will ask you if you really want to quit - press the quit button in the dialog window which appears).


Main Page  Section Notes Page