diff options
| author | Günther Neuwirth <e0626638@student.tuwien.ac.at> | 2009-05-12 23:00:03 +0200 |
|---|---|---|
| committer | Günther Neuwirth <e0626638@student.tuwien.ac.at> | 2009-05-12 23:00:03 +0200 |
| commit | ddf63e2765a6b225d18c59321595e69e1a126e0c (patch) | |
| tree | 36336d5b3a1f0af0f9c2782351e30efe31bcf159 /ue3/mycpu/cinstruction.cpp | |
| parent | e41c92320aef4a54b7f3b323f7302b180019b6d7 (diff) | |
| download | ooprog-ddf63e2765a6b225d18c59321595e69e1a126e0c.tar.gz ooprog-ddf63e2765a6b225d18c59321595e69e1a126e0c.tar.bz2 ooprog-ddf63e2765a6b225d18c59321595e69e1a126e0c.zip | |
adding tha rest
Diffstat (limited to 'ue3/mycpu/cinstruction.cpp')
| -rw-r--r-- | ue3/mycpu/cinstruction.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ue3/mycpu/cinstruction.cpp b/ue3/mycpu/cinstruction.cpp index 3cbb033..12c5c74 100644 --- a/ue3/mycpu/cinstruction.cpp +++ b/ue3/mycpu/cinstruction.cpp | |||
| @@ -49,15 +49,15 @@ void CDiv::exec(CMem& mem, vector<string>& instr) | |||
| 49 | 49 | ||
| 50 | void CLoad::exec(CMem& mem, vector<string>& instr) | 50 | void CLoad::exec(CMem& mem, vector<string>& instr) |
| 51 | { | 51 | { |
| 52 | istringstream stmp ("22"); | 52 | istringstream stmp (mem.getMemAt(instr[2])); |
| 53 | stmp >> mem.getRegister(instr[1]); | 53 | stmp >> mem.getRegister(instr[1]); |
| 54 | cout <<mem.getRegister(instr[1])<<" "<< mem.getMem(instr[2])<<endl; | 54 | |
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | 57 | ||
| 58 | void CStore::exec(CMem& mem, vector<string>& instr) | 58 | void CStore::exec(CMem& mem, vector<string>& instr) |
| 59 | { | 59 | { |
| 60 | mem.setMem(instr[2], mem.getRegister(instr[1])); | 60 | mem.setMemAt(instr[2], mem.getRegister(instr[1])); |
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | 63 | ||
