Class Display

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

public class Display extends JFrame
Main graphical user interface for the CPU Simulator application. This class provides a comprehensive visual representation of a simulated CPU, including CPU registers, central memory, control unit, ALU, and I/O interfaces.

The Display class extends JFrame and creates a detailed simulation environment with the following major components:

  • CPU Section: Shows registers (PC, IR, MAR, MDR, Pointer, Acc, RegB), ALU operations, and Program Status Word (PSW)
  • Central Memory: Scrollable view of memory addresses and their values
  • Control Unit: Displays current instruction, execution phases, and cycle information
  • I/O Interfaces: Input/output buffers, display, and numeric keypad for user interaction
  • Control Panel: Buttons for stepping through execution and loading files

This class follows the Singleton pattern to ensure only one display instance exists. All GUI updates are thread-safe and executed on the Swing Event Dispatch Thread.

Since:
1.0
See Also:
  • Field Details

    • instance

      public static Display instance
      Singleton instance of the Display window.
  • Method Details