about summary refs log tree commit diff stats
path: root/subx/010core.cc
diff options
context:
space:
mode:
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