Exemple #1
0
        public void ExecuteStep()
        {
            try
            {
                StepCounter++;

                PrintClear();

                int pc1 = CPU.GetLongPC();
                PrintPC(pc1);
                CPU.ExecuteNext();
                int pc2 = pc1 + CPU.Opcode.Length;
                PrintStatus(pc1, pc2);

                int pc = CPU.GetLongPC();
                if (breakpoints.ContainsKey(pc))
                {
                    CPU.DebugPause = true;
                    timer1.Enabled = false;
                    BPCombo.Text   = breakpoints.GetHex(pc);
                }
            }
            catch (Exception ex)
            {
                Print(ex.Message);
                CPU.Halt();
            }
        }
Exemple #2
0
        private void BreakpointReached(int pc)
        {
            if (isStepOver)
            {
                isStepOver = false;
                breakpoints.Remove(pc.ToString("X"));
            }
            else
            {
                BPCombo.Text = breakpoints.GetHex(pc);
            }

            RefreshStatus();
            RunButton.Enabled = true;
        }