diff options
| author | manuel <manuel@nc8430.lan> | 2009-05-14 18:15:28 +0200 |
|---|---|---|
| committer | manuel <manuel@nc8430.lan> | 2009-05-14 18:15:28 +0200 |
| commit | ad6ca84f6e93f983de926ae71f31f42325986f61 (patch) | |
| tree | a28df3e6aa600fc7eec4194bc81dbda930de6c8f /ue3/mycpu/cinstruction.cpp | |
| parent | 9e7c204525a50f36ba7aa7563f1a9702d0bb6f44 (diff) | |
| download | ooprog-ad6ca84f6e93f983de926ae71f31f42325986f61.tar.gz ooprog-ad6ca84f6e93f983de926ae71f31f42325986f61.tar.bz2 ooprog-ad6ca84f6e93f983de926ae71f31f42325986f61.zip | |
* making cdisplay a template
* adding some asserts
* adding classdiagramm and protokoll
* fixing protokoll.pdf in ue1
Diffstat (limited to 'ue3/mycpu/cinstruction.cpp')
| -rw-r--r-- | ue3/mycpu/cinstruction.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ue3/mycpu/cinstruction.cpp b/ue3/mycpu/cinstruction.cpp index 5c1bd5c..a766015 100644 --- a/ue3/mycpu/cinstruction.cpp +++ b/ue3/mycpu/cinstruction.cpp | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | #include <sstream> | 8 | #include <sstream> |
| 9 | #include <stdexcept> | 9 | #include <stdexcept> |
| 10 | #include <boost/lexical_cast.hpp> | 10 | #include <boost/lexical_cast.hpp> |
| 11 | #include <assert.h> | ||
| 11 | #include "cinstruction.h" | 12 | #include "cinstruction.h" |
| 12 | #include "ccpu.h" | 13 | #include "ccpu.h" |
| 13 | 14 | ||
| @@ -35,6 +36,7 @@ const unsigned CInstruction::parseRegister(const std::string& str) | |||
| 35 | 36 | ||
| 36 | inline void CInstruction::checkRegister(CCPU *cpu, const unsigned regidx) | 37 | inline void CInstruction::checkRegister(CCPU *cpu, const unsigned regidx) |
| 37 | { | 38 | { |
| 39 | assert(cpu != NULL); | ||
| 38 | if (regidx >= cpu->getRegisterCount()) | 40 | if (regidx >= cpu->getRegisterCount()) |
| 39 | { | 41 | { |
| 40 | stringstream sstr; | 42 | stringstream sstr; |
