projects
/
calu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7288f68
)
sim: setdata bug
author
Martin Perner
<martin@perner.cc>
Tue, 2 Nov 2010 14:22:59 +0000
(15:22 +0100)
committer
Martin Perner
<martin@perner.cc>
Tue, 2 Nov 2010 14:22:59 +0000
(15:22 +0100)
3b_sim/sim.cpp
patch
|
blob
|
history
diff --git
a/3b_sim/sim.cpp
b/3b_sim/sim.cpp
index 764f21632d82adaeda7073cbf328667f8f71d448..24c6dcd407af20062d2cce2b708f0bcfef8ac080 100644
(file)
--- a/
3b_sim/sim.cpp
+++ b/
3b_sim/sim.cpp
@@
-296,7
+296,10
@@
void setRam(const vector<string>& in)
addr = (addr & (~(BYTE_COUNT-1))) / BYTE_COUNT;
val = convertStringToNum(in[2]);
addr = (addr & (~(BYTE_COUNT-1))) / BYTE_COUNT;
val = convertStringToNum(in[2]);
- cout << "Setting RAM-Address " << addr << " to 0x" << std::hex << setw(8) << setfill('0') << val << std::dec << endl;
+ addr *= BYTE_COUNT;
+
+ cout << "Setting RAM-Address 0x" << std::hex << setw(8) << setfill('0') << addr;
+ cout << " to 0x" << setw(8) << setfill('0') << val << std::dec << endl;
global_cpu->setRAM(addr,val);
}
catch(bad_cast&) {
global_cpu->setRAM(addr,val);
}
catch(bad_cast&) {