X-Window Interface

Figure: X-window interface to SPIM.
The X version of SPIM, xspim, looks different, but should operate in the same manner as spim. The X window has five panes (see Figure [*]). The top pane displays the contents of the registers. It is continually updated, except while a program is running.

The next pane contains the buttons that control the simulator:

Exit from the simulator.

Read a source file into memory.

Reinitialize memory and then reload the last file read with load.

Start the program running.

Single-step through a program.

Reinitialize registers or memory.

set value
Set the value in a register or memory location.

Print the value in a register or memory location.

Set or delete a breakpoint or list all breakpoints.

Print a help message.

Raise or hide the console window.

Set SPIM operating modes.

The next two panes display the memory contents. The top one shows instructions from the user and kernel text segments.3 The first few instructions in the text segment are startup code (__start) that loads argc and argv into registers and invokes the main routine.

The lower of these two panes displays the data and stack segments. Both panes are updated as a program executes.

The bottom pane is used to display messages from the simulator. It does not display output from an executing program. When a program reads or writes, its IO appears in a separate window, called the Console, which pops up when needed.

Ian Moor 2009-03-11