Super Lean Instruction Machine Emulator

To use the emulator, type (or paste) your code into the area below and hit the "Load" button that appears below it. Two new windows will then appear on your screen for SLIME: the main SLIME window, showing the registers, instruction memory, data memory, etc., and a smaller "console" window that is used when your SLIM program reads input from the user or writes output. Your program, from the area below, will have been loaded into the instruction memory. If your program has syntax errors, a window will appear listing them.

Next, using the controls on the main SLIME window, press "Start" to start your program, or "Step" to execute a single instruction. If a run-time error occurs, the OK indicator will change to Exception and the status line will show the exception. You can click on the indicator to clear the exception. ("Reset" will do so as well.)

When your program reads input, you will need to type it in the text field near the bottom of the console window.

If you change the program in the area below and want to load the changed version into SLIME's instruction memory, you can press the "Load" button on the main SLIME window. Or, if you press the "Quit" button, the SLIME window will disappear, and the "Load" button below will once again become active, allowing you to restart SLIME and load a new program in.

Example Programs

If Copy and Paste Doesn't Work

This is apparently a known problem in recent browser plugins. See this explanation and fix from Kyle Hatlestad. Alternatively, see the next section for how to run SLIME outside a browser.

Running SLIME as a Standalone Application

You can download SLIME.jar and run it as a standalone application. On many systems, you just need to double-click the SLIME.jar file. Alternatively, you can use a shell command like this:

   java -jar SLIME.jar

The "Load" button in this version of SLIME lets you select a file from which to load the assembly code. Alternatively, you can give the filename as an extra command-line argument, as in this example:

   java -jar SLIME.jar mySLIMcode.asm

For more information, see the parent web page, or contact Max Hailperin:
Mathematics and Computer Science Department
Gustavus Adolphus College
800 W. College Avenue
St. Peter, MN 56082

SLIME was written by Mark Gritter. Thanks, Mark.