CPU SIM 3.9.X July 2013 INSTALLATION INSTRUCTIONS 1. Download the CPUSim3.9.X.zip file onto your hard disk. 2. Unzip the CPUSim3.9.X.zip file. The unzipping process will create a folder called "CPUSim3.9.X" containing 10 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.9.0.app" file for the English language version or "CPUSim3.9.0.Chinese.app" for the Chinese language version. 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.9.X" folder. (b) Type in one of the following commands (all on one line): (Windows users) java -cp CPUSim3.9.jar;jhall.jar;CPUSimHelp3.9.jar cpusim.Main (Mac or Linux users) java -cp CPUSim3.9.jar:jhall.jar:CPUSimHelp3.9.jar cpusim.Main (c) You can also add four optional arguments to the command line in any order: -m -t -l -c CPU Sim will load the machine indicated by the -m flag and the text file indicated by the -t flag and will display menus and dialogs using the language specified by the -l flag. You can specify either "-l Chinese" or "-l English". If no language is specified, English is used. 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.9.jar;jhall.jar;CPUSimHelp3.9.jar cpusim.Main -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. 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/