Example #1
0
        /// <summary>
        /// Function added to display result of cpu exercizer test
        /// </summary>
        public void PerformMultipleStep(string fullPath, int memoryOffset)
        {
            if (MCU.LoadFileInMemoryAt(fullPath, memoryOffset))
            {
                _currentState = TCurrentState.RUNNING;
                while (_currentState != TCurrentState.STOPPED)
                {
                    if (!_cpu.Halted)
                    {
                        _cpu.Fetch();
                        _cpu.Execute();
                    }

                    // CP/M warm boot (test finished and restarted itself)
                    if (_cpu.PC == 0x00)
                    {
                        _currentState = TCurrentState.STOPPED;
                    }

                    // Call to CP/M bios emulated function to write characters on screen
                    if (_cpu.PC == 0x05)
                    {
                        _cpu.PerformBdosCall();
                    }
                }
            }
        }
Example #2
0
 public void Run(String fullPath, int offset)
 {
     if (_currentState == TCurrentState.STOPPED)
     {
         if (MCU.LoadFileInMemoryAt(fullPath, offset))
         {
             _stopWatch.Start();
             _currentState = TCurrentState.RUNNING;
             _timer        = new Timer(TimerAsync_CallBack, null, 0, Timeout.Infinite);
         }
     }
 }