Ejemplo n.º 1
0
        //-------------------------------- Functions to update panels in the form ---------------------------------------------------------------

        /// HELPER FUNCTION: to
        ///     - Enable menu items: Run, Single Step
        ///     - Disable menu items: Break/Stop
        ///     - Update panels: dissasembly, registers, flags, memory
        private void updatePanelsAndResetMenuItems_ForStepEvent()
        {
            // reset menu item availability
            breakExecutionToolStripMenuItem.Enabled = false;
            runToolStripMenuItem.Enabled            = true;
            singleStepToolStripMenuItem.Enabled     = true;

            // change simulator status to not running
            simStatus.Text = "Simulator status: stopped";

            // UPDATE PANELS
            updateRegistersPanel();
            updateFlagsPanel();

            // update memory panel
            uint startMemoryAddress = computer.getProgramCounter();

            updateMemoryPanel(startMemoryAddress);

            // update stack
            updateStackPanel();

            // update disassembly
            string str = computer.getDisassembledLastInstructionExecuted();

            disTextBox.Text += str;
        }