about summary refs log tree commit diff stats
path: root/subx/010core.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2017-10-14 19:18:34 -0700
committerKartik K. Agaram <vc@akkartik.com>2017-10-14 19:18:51 -0700
commit0cb3c774b207c8a94bf9f9775e99e7d593d1e4fe (patch)
tree8f0cc39f13b55f310e974f69887c078f7b27f074 /subx/010core.cc
parentf603d9f2d38a836f452b692c331728ef72a05721 (diff)
downloadmu-0cb3c774b207c8a94bf9f9775e99e7d593d1e4fe.tar.gz
4064
Diffstat (limited to 'subx/010core.cc')
-rw-r--r--subx/010core.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/subx/010core.cc b/subx/010core.cc
index 9229143b..0713ec1d 100644
--- a/subx/010core.cc
+++ b/subx/010core.cc
@@ -68,6 +68,10 @@ uint32_t End_of_program = 0;
 Mem.clear();
 Mem.resize(1024);
 End_of_program = 0;
+:(before "End Includes")
+// depends on Mem being laid out contiguously (so you can't use a map, etc.)
+// and on the host also being little-endian
+#define SET_WORD_IN_MEM(addr, val)  *reinterpret_cast<int32_t*>(&Mem.at(addr)) = val;
 
 //:: core interpreter loop