Class SimpComp

java.lang.Object
  |
  +--SimpComp
All Implemented Interfaces:
java.lang.Runnable

public class SimpComp
extends java.lang.Object
implements java.lang.Runnable

SimpComp simulates a SimpComp computer. It feeds in a file of hex symbols representing a memory image of a program and interprets the hex code sequence into a serie of actions. This SimpComp application utilizes Java's GUIs for enhanced output. Such an approach is meant to facilitate the learning of TCSS372 students.


Constructor Summary
SimpComp(java.lang.String filename)
          Constructors, prompts user for obj file if not supplied while invoking SimpComp and populates main memory with data.
 
Method Summary
 java.lang.String getFileName()
          Returns the name of file currently opened.
static void loadMainMem(java.lang.String fileName, SCMainMem mm)
          Opens a specified Object File (.obj) and populates the main memory.
static void main(java.lang.String[] args)
          Launches the SimpComp simulator.
 void reset()
          Resets all components.
 void run()
          Overwrites the run() from Runnable.
 void sequencerStep()
          Invokes cpu.sequencer() and updates GUI's corresponding fields.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpComp

public SimpComp(java.lang.String filename)
Constructors, prompts user for obj file if not supplied while invoking SimpComp and populates main memory with data.

Method Detail

sequencerStep

public void sequencerStep()
Invokes cpu.sequencer() and updates GUI's corresponding fields.


getFileName

public java.lang.String getFileName()
Returns the name of file currently opened.

Returns:
filename

run

public void run()
Overwrites the run() from Runnable.

Specified by:
run in interface java.lang.Runnable

reset

public void reset()
Resets all components.


loadMainMem

public static void loadMainMem(java.lang.String fileName,
                               SCMainMem mm)
                        throws java.lang.IllegalArgumentException
Opens a specified Object File (.obj) and populates the main memory.

java.lang.IllegalArgumentException

main

public static void main(java.lang.String[] args)
Launches the SimpComp simulator.