Package mars.tools

Class DigitalLabSim

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Observer, Accessible, RootPaneContainer, WindowConstants, MarsTool

public class DigitalLabSim extends AbstractMarsToolAndApplication
See Also:
Serialized Form
  • Field Details

    • EXTERNAL_INTERRUPT_TIMER

      public static final int EXTERNAL_INTERRUPT_TIMER
      See Also:
      Constant Field Values
    • EXTERNAL_INTERRUPT_HEXA_KEYBOARD

      public static final int EXTERNAL_INTERRUPT_HEXA_KEYBOARD
      See Also:
      Constant Field Values
  • Constructor Details

    • DigitalLabSim

      public DigitalLabSim(String title, String heading)
    • DigitalLabSim

      public DigitalLabSim()
  • Method Details

    • main

      public static void main(String[] args)
    • getName

      public String getName()
      Description copied from class: AbstractMarsToolAndApplication
      Required MarsTool method to return Tool name. Must be defined by subclass.
      Specified by:
      getName in interface MarsTool
      Specified by:
      getName in class AbstractMarsToolAndApplication
      Returns:
      Tool name. MARS will display this in menu item.
    • update

      public void update(Observable ressource, Object accessNotice)
      Description copied from class: AbstractMarsToolAndApplication
      Called when receiving notice of access to MIPS memory or registers. Default implementation of method required by Observer interface. This method will filter out notices originating from the MARS GUI or from direct user editing of memory or register displays. Only notices arising from MIPS program access are allowed in. It then calls two methods to be overridden by the subclass (since they do nothing by default): processMIPSUpdate() then updateDisplay().
      Specified by:
      update in interface Observer
      Overrides:
      update in class AbstractMarsToolAndApplication
      Parameters:
      ressource - the attached MIPS resource
      accessNotice - AccessNotice information provided by the resource
    • updateSevenSegment

      public void updateSevenSegment(int number, char value)
    • updateHexaKeyboard

      public void updateHexaKeyboard(char row)
    • updateOneSecondCounter

      public void updateOneSecondCounter(char value)