you are here:   TCNJ :: mic1 :: Step

mic1 simulator - Step-by-step user guide

[also see mic1's detailed User Guide http://www.ontko.com/mic1/user_guide.html]


jump to:  UNIX   Windows   Notes


UNIX [you need a GUI (e.g. Xwindows) to run the simulator]

  1. download the .tar file from http://www.ontko.com/mic1/ . This includes all .classes, documentation, source, and samples.
  2. unzip and untar the distribution into its own folder:
    # gunzip mic1.tar.gz
    # tar xvf mic1.tar
  3. make sure your shell knows where the java executable is:
    # which java
    java is in /usr/bin/java, and /usr/bin should already be in your PATH. If for some reason it is not (or your on a system that has java in a different location):
    bash: # PATH=$PATH:/path/to/java
    bash: # export PATH
    csh: > set PATH=($PATH /path/to/java)
  4. next, the classes.zip from the distribution must be in your CLASSPATH:
    bash: # CLASSPATH=$CLASSPATH:/my/home/dir/mic1/classes.zip
    bash: # export $CLASSPATH
    csh: > setenv CLASSPATH=($CLASSPATH /full/path/to/classes.zip)
  5. you can now run the simulator:
    # java mic1sim
    then you can load a micro and macro program through the GUI
    or # java mic1sim mic1ijvm.mic1 ijvmtest.ijvm
    if you want to specify micro and macro programs on the command line.
  6. get the m.jas, m2.jas and m3.jas programs (.jas= "Java ASsembler") from my website ( http://www.tcnj.edu/~boehnke2/cmsc499 )
    assemble them to .ijvm (integer java virtual machine) code:
    # java ijvmasm m.jas m.ijvm
    then load them in the simulator and run/trace them
    # java mic1sim mic1ijvm.mic1 m.ijvm

^ back to top

WINDOWS

You will also need the Java Development Kit (I have 1.2, older 1.1 versions should work, too.). http://sun.java.com. BIG!

  1. download the self-extracting ZIP archive from http://www.ontko.com/mic1/ .
  2. run the mic1win.exe in its own folder, this will extract all necessary files.
  3. Open the env.bat file from the distribution in notepad, and comment ("rem") out the four lines as described in the file.
    Also, set the PATH and CLASSPATH as described in the file.
  4. from the DOS prompt, change to you mic1 directory (where you installed the simulator)
  5. use the batch files to start compiler and simulator:
    > mic1sim
    starts the simulator (GUI)
  6. get the m.jas, m2.jas and m3.jas programs (.jas= "Java ASsembler") from my website ( http://www.tcnj.edu/~boehnke2/cmsc499 )
    assemble them to .ijvm (integer java virtual machine) code:
    > ijvmasm
    starts the assembler. load m.jas as the input file. you can leave the output file blank, it will become m.ijvm by default (same name, .ijvm extension)
    then run load them in the simulator and run/trace them
    > mic1sim
    load the mic1ijvm.mic1 microcode, load the m.ijvm macroprogram, then run and trace it.

^ back to top

NOTES

^ back to top