/** @brief OnIo * * @todo: document this function */ void ComplxFrame::OnGetIo() { wxCriticalSectionLocker enter(threadCS); if (thread != NULL && thread->IsPaused()) { refreshednoio = false; UpdatePhrase("&Stop"); thread->Resume(); } }
/** @brief OnNoIo * * @todo: document this function */ void ComplxFrame::OnNoIo(wxThreadEvent& event) { //printf("There is no time\n"); wxCriticalSectionLocker enter(threadCS); if (thread != NULL && !thread->IsPaused()) thread->Pause(); if (!refreshednoio) { UpdatePhrase("&NO IO"); UpdateRegisters(); UpdateMemory(); UpdateStatus(); refreshednoio = true; } }
void ComplxFrame::OnRunUpdate(wxThreadEvent& event) { static int i = 0; i = (i + 1) % (/*1024 * */(!changed ? 3 : 9)); if (i == 0 && !changed) { UpdatePhrase("&Stop"); changed = true; } if (i == 0) console->Update(); }
void ComplxFrame::SetupExecution(int run_mode, int runtime) { wxCriticalSectionLocker enter(threadCS); if (run_mode != RUNMODE_STEP && run_mode != RUNMODE_BACK) UpdatePhrase("&Stop"); if (thread != NULL) { if (thread->IsPaused()) return; if (thread->IsRunning()) { thread->Delete(); thread = NULL; std::cout.flush(); console->Update(); UpdatePlay(); UpdateRegisters(); UpdateMemory(); UpdateStatus(); return; } else { thread->Delete(); thread = NULL; return; } } else { thread = new LC3RunThread(this, run_mode, runtime); thread->Create(); } thread->SetPriority(0); thread->Run(); }