Package lab06

Class TryCPU

java.lang.Object
lab06.TryCPU

public class TryCPU
extends java.lang.Object
Holds a main method to run a Pippin Computer simulation
Author:
cs140
  • Method Summary

    Modifier and Type Method Description
    static void main​(java.lang.String[] args)
    Main method to run a Pippin computer simulation.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • main

      public static void main​(java.lang.String[] args)
      Main method to run a Pippin computer simulation. Loads a program which determines if memory[0] is divisible by memory[1]. The result is stored in memory[3] as either a 0 (is not divisible) or 1 (is divisible)
      Parameters:
      args - Array of Strings from command line.
      • if the first argument is -trace, turn on tracing.
      • if there is another argument, convert it to integer, and use it for memory[0]. If not, default t0 43
      • if there is another argument, convert it to integer, and use if for memory[1]. If not, default to 3.