From 89e202f49b9857dcd3627fbc4e0262125d729bbc Mon Sep 17 00:00:00 2001 From: manuel Date: Wed, 13 May 2009 04:09:39 +0200 Subject: adding all instructions and displays --- ue3/mycpu/mycpu.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'ue3/mycpu/mycpu.cpp') diff --git a/ue3/mycpu/mycpu.cpp b/ue3/mycpu/mycpu.cpp index af91fe7..08861a4 100644 --- a/ue3/mycpu/mycpu.cpp +++ b/ue3/mycpu/mycpu.cpp @@ -19,13 +19,6 @@ using namespace std; namespace po = boost::program_options; -/** TODO */ -void myterminate() -{ - cerr << "Unexpected termination" << endl; - abort(); -} - /** * @func main * @brief program entry point @@ -40,7 +33,6 @@ void myterminate() */ int main(int argc, char* argv[]) { - //TODO set_terminate(myterminate); string me(argv[0]); /* define commandline options */ @@ -136,13 +128,17 @@ int main(int argc, char* argv[]) cpu.setProgram(&program); cpu.run(); #if DEBUG - cpu.dumpRegisters(cout); + //cpu.dumpRegisters(cout); #endif } catch(runtime_error& ex) { cerr << me << ": Error while executing program:" << endl - << " " << ex.what() << endl; + << " " << ex.what() << endl; +#if DEBUG + memory.dump(cout); + //cpu.dumpRegisters(cout); +#endif return 1; } -- cgit v1.2.3