You are on page 1of 2

CPU SIM 3.6.

X
March 2011
INSTALLATION INSTRUCTIONS
1. Download the CPUSim3.6.X.zip file onto your hard disk.
2. Unzip the CPUSim3.6.X.zip file. The unzipping process
will create a folder called "CPUSim3.6.X" containing 9
documents and a folder with 3 more documents.
3. Install Java 1.5 or later on your
machine if it is not already there. Go to the web site
http://java.sun.com/
to get the software and to read installation instructions.
MacOS X users will find Java comes installed
with the OS.
4. Fix, if necessary, your PATH system variable so that
it includes the directory (installed as part of the
Java installation) in which the java interpreter
application is located. MacOS X users can skip this step.
STARTING CPU SIM
1. On a Macintosh computer, just double-click on the "CPUSim3.6.X.app"
file.
2. On a Windows computer, double-click on the "CPUSim.bat" file.
3. On a Linux computer or for those who prefer to use the command line,
(a) open a command or terminal window and navigate to
the "CPUSim3.6.X" folder.
(b) Type in one of the following commands (all on one line):
(Windows users)
java -cp CPUSim3.6.jar;jhall.jar;CPUSimHelp3.6.jar cpusim.Main
(Mac or Linux users)
java -cp CPUSim3.6.jar:jhall.jar:CPUSimHelp3.6.jar cpusim.Main
(c) You can also add three optional arguments to the
command line in any order:
-m <machine file name>
-t <text (assembly program) file name>
-c
For example, to start up the Wombat1 machine and load the
W1-0.a assembly language program that appear in the
SampleAssignments folder, you could type in the following
command (all on one line) on Windows:
java -cp CPUSim3.6.jar;jhall.jar;CPUSimHelp3.6.jar cpusim.Mai
n
-m SampleAssignments/Wombat1.cpu -t SampleAssignments/W1-0.a
(This command is, in fact, the command in the "CPUSim.bat" file.
)
If the user does not specify a machine file, a new empty
machine is opened. Note that version 3.2.0 did not use flags
-m and -t whereas version 3.4 and later requires flags for all
arguments.
The -c flag indicates that the Java Swing GUI should not be used

and instead CPU Sim should run in command line mode.


Note that if you use the -c flag, you must also
use the -m and -t flags. In that case, CPU Sim will load the
machine indicated by the -m flag and the text file indicated by
the -t flag and run them without a GUI. Instead, all user input
and output is done via the command line.
TUTORIAL
The User's manual (included in the zip file as a PDF
document) and CPU Sim's online help include tutorials on
CPU Sim that use the sample assignments.
CONTACT INFO
Questions and comments should be directed to:
Dale Skrien
Author email: djskrien@colby.edu
Author home page: http://www.cs.colby.edu/djskrien
CPU Sim home page: http://www.cs.colby.edu/djskrien/CPUSim/

You might also like