CPU Simulator
    Preparing search index...

    The main logic of the simulator. Trough this class, the CPU cores and execution is controlled.

    Index

    Properties

    HIGH_ADDRESS_PHYSICAL_MEMORY_DEC: number = 4_294_967_295

    This class member stores the highest available memory address of physical memory.

    LOW_ADDRESS_PHYSICAL_MEMORY_DEC: number = 0

    This class member stores the highest available memory address of physical memory.

    autoScrollForPageTableEnabled: boolean

    This field represents a flag, which enables automatic scroll for the GUIs Page Table widget.

    autoScrollForPhysicalRAMEnabled: boolean

    This field represents a flag, which enables automatic scroll for the GUIs physical RAM widget.

    autoScrollForVirtualRAMEnabled: boolean

    This field represents a flag, which enables automatic scroll for the GUIs virtual RAM widget.

    core: CPUCore
    mainMemory: RAM

    Accessors

    • get programmLoaded(): boolean

      This method checks whether an assembly programm is currently loaded into the main memory.

      Returns boolean

      True, if an assembly programm is currently loaded into main memory, false otherwise.

    Methods

    • This method triggers execution of the next instruction of a loaded programm.

      Returns boolean

      True, if the cycle was performed normally and false, if the cycle could not be performed because the programm has ended.

    • This method loads the given and compiled assembly program into the main memory based on the given base address.

      Parameters

      • compiledProgram: DoubleWord[]

        The compiled assembly program.

      • OptionalvirtualBaseAddressDec: number = 0

        The virtual base address of the program in decimal representation.

      Returns void

      — {PrivilegeViolationError} If the page frame associated with this page is not accessable in user mode.

      — {PageFrameNotExecutableError} If the page frame associated with this page is not executable.

      — {PageFrameNotWritableError} If the page frame associated with this page is not writable.