diff options
author | m8pple <dt10@imperial.ac.uk> | 2014-10-25 00:23:16 +0100 |
---|---|---|
committer | m8pple <dt10@imperial.ac.uk> | 2014-10-25 00:23:16 +0100 |
commit | b2e210093a6b0d7e209f3aa767a65cf6196fa970 (patch) | |
tree | 044fbd4a4af37e35155adcac464d053d7a697faf | |
parent | bbd17d442e787d30daed02ae898e8ed694a75319 (diff) | |
download | MipsCPU-b2e210093a6b0d7e209f3aa767a65cf6196fa970.tar.gz MipsCPU-b2e210093a6b0d7e209f3aa767a65cf6196fa970.zip |
Update README.md
Really stupid typo in the guidance on mem_read_write at the bottom of this page.
The example in the actual documentation is correct though.
-rw-r--r-- | README.md | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -477,10 +477,10 @@ you'll need to cast to and from the types you want to read and write: uint32_t val; - mips_error err=mips_mem_read(mem, 12, 4, (uint32_t*)&val); + mips_error err=mips_mem_read(mem, 12, 4, (uint8_t*)&val); val=val+1; if(!err) - err=mips_mem_write(mem, 12, 4, (uint32_t*)&val); + err=mips_mem_write(mem, 12, 4, (uint8_t*)&val); This should (I haven't compiled it) increment the 32-bit value stored at byte address 12. |