diff options
| author | manuel <manuel@nc8430.lan> | 2009-05-13 04:09:39 +0200 |
|---|---|---|
| committer | manuel <manuel@nc8430.lan> | 2009-05-13 04:09:39 +0200 |
| commit | 89e202f49b9857dcd3627fbc4e0262125d729bbc (patch) | |
| tree | dbe69dd8498eb0a489bc7b7e24f2b73580c598d2 /ue3/mycpu/mycpu.cpp | |
| parent | 45581d3d376e8deed84952cb838ae330549e5241 (diff) | |
| download | ooprog-89e202f49b9857dcd3627fbc4e0262125d729bbc.tar.gz ooprog-89e202f49b9857dcd3627fbc4e0262125d729bbc.tar.bz2 ooprog-89e202f49b9857dcd3627fbc4e0262125d729bbc.zip | |
adding all instructions and displays
Diffstat (limited to 'ue3/mycpu/mycpu.cpp')
| -rw-r--r-- | ue3/mycpu/mycpu.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
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 @@ | |||
| 19 | using namespace std; | 19 | using namespace std; |
| 20 | namespace po = boost::program_options; | 20 | namespace po = boost::program_options; |
| 21 | 21 | ||
| 22 | /** TODO */ | ||
| 23 | void myterminate() | ||
| 24 | { | ||
| 25 | cerr << "Unexpected termination" << endl; | ||
| 26 | abort(); | ||
| 27 | } | ||
| 28 | |||
| 29 | /** | 22 | /** |
| 30 | * @func main | 23 | * @func main |
| 31 | * @brief program entry point | 24 | * @brief program entry point |
| @@ -40,7 +33,6 @@ void myterminate() | |||
| 40 | */ | 33 | */ |
| 41 | int main(int argc, char* argv[]) | 34 | int main(int argc, char* argv[]) |
| 42 | { | 35 | { |
| 43 | //TODO set_terminate(myterminate); | ||
| 44 | string me(argv[0]); | 36 | string me(argv[0]); |
| 45 | 37 | ||
| 46 | /* define commandline options */ | 38 | /* define commandline options */ |
| @@ -136,13 +128,17 @@ int main(int argc, char* argv[]) | |||
| 136 | cpu.setProgram(&program); | 128 | cpu.setProgram(&program); |
| 137 | cpu.run(); | 129 | cpu.run(); |
| 138 | #if DEBUG | 130 | #if DEBUG |
| 139 | cpu.dumpRegisters(cout); | 131 | //cpu.dumpRegisters(cout); |
| 140 | #endif | 132 | #endif |
| 141 | } | 133 | } |
| 142 | catch(runtime_error& ex) | 134 | catch(runtime_error& ex) |
| 143 | { | 135 | { |
| 144 | cerr << me << ": Error while executing program:" << endl | 136 | cerr << me << ": Error while executing program:" << endl |
| 145 | << " " << ex.what() << endl; | 137 | << " " << ex.what() << endl; |
| 138 | #if DEBUG | ||
| 139 | memory.dump(cout); | ||
| 140 | //cpu.dumpRegisters(cout); | ||
| 141 | #endif | ||
| 146 | return 1; | 142 | return 1; |
| 147 | } | 143 | } |
| 148 | 144 | ||
