summaryrefslogtreecommitdiffstats
path: root/ue3/mycpu/cinstruction.cpp
diff options
context:
space:
mode:
authorGünther Neuwirth <e0626638@student.tuwien.ac.at>2009-05-12 23:00:03 +0200
committerGünther Neuwirth <e0626638@student.tuwien.ac.at>2009-05-12 23:00:03 +0200
commitddf63e2765a6b225d18c59321595e69e1a126e0c (patch)
tree36336d5b3a1f0af0f9c2782351e30efe31bcf159 /ue3/mycpu/cinstruction.cpp
parente41c92320aef4a54b7f3b323f7302b180019b6d7 (diff)
downloadooprog-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.cpp8
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
50void CLoad::exec(CMem& mem, vector<string>& instr) 50void 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
58void CStore::exec(CMem& mem, vector<string>& instr) 58void 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