summaryrefslogtreecommitdiffstats
path: root/ue3/mycpu/instructions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ue3/mycpu/instructions.cpp')
-rw-r--r--ue3/mycpu/instructions.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/ue3/mycpu/instructions.cpp b/ue3/mycpu/instructions.cpp
index a6ac611..c2ce096 100644
--- a/ue3/mycpu/instructions.cpp
+++ b/ue3/mycpu/instructions.cpp
@@ -1,7 +1,7 @@
1/** 1/**
2 * @module instructions 2 * @module instructions
3 * @author Guenther Neuwirth (0626638), Manuel Mausz (0728348) 3 * @author Guenther Neuwirth (0626638), Manuel Mausz (0728348)
4 * @brief TODO 4 * @brief Implementations of CInstruction
5 * @date 10.05.2009 5 * @date 10.05.2009
6 */ 6 */
7 7
@@ -162,7 +162,7 @@ void CInstructionLoad::execute(CCPU *cpu)
162{ 162{
163 checkRegister(cpu, m_regidx1); 163 checkRegister(cpu, m_regidx1);
164 checkRegister(cpu, m_regidx2); 164 checkRegister(cpu, m_regidx2);
165 CDat val = cpu->getRegisters()[ m_regidx2 ]; 165 CDat val(cpu->getRegisters()[ m_regidx2 ]);
166 cpu->getRegisters()[ m_regidx1 ] = (*cpu->getMemory())[ val ]; 166 cpu->getRegisters()[ m_regidx1 ] = (*cpu->getMemory())[ val ];
167} 167}
168 168
@@ -184,7 +184,7 @@ void CInstructionStore::execute(CCPU *cpu)
184{ 184{
185 checkRegister(cpu, m_regidx1); 185 checkRegister(cpu, m_regidx1);
186 checkRegister(cpu, m_regidx2); 186 checkRegister(cpu, m_regidx2);
187 CDat val = cpu->getRegisters()[ m_regidx2 ]; 187 CDat val(cpu->getRegisters()[ m_regidx2 ]);
188 (*cpu->getMemory())[ val ] = cpu->getRegisters()[ m_regidx1 ]; 188 (*cpu->getMemory())[ val ] = cpu->getRegisters()[ m_regidx1 ];
189} 189}
190 190