about summary refs log tree commit diff stats
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/global.mu4
-rw-r--r--shell/main.mu5
2 files changed, 8 insertions, 1 deletions
diff --git a/shell/global.mu b/shell/global.mu
index 5bd160fb..c8e849e2 100644
--- a/shell/global.mu
+++ b/shell/global.mu
@@ -44,6 +44,10 @@ fn initialize-globals _self: (addr global-table) {
   # keep sync'd with render-primitives
 }
 
+fn write-globals out: (addr stream byte), _self: (addr global-table) {
+  write out, "()\n"
+}
+
 fn render-globals screen: (addr screen), _self: (addr global-table), xmin: int, ymin: int, xmax: int, ymax: int {
   clear-rect screen, xmin, ymin, xmax, ymax, 0x12/bg=almost-black
   var self/esi: (addr global-table) <- copy _self
diff --git a/shell/main.mu b/shell/main.mu
index e6df31ee..5d5dc987 100644
--- a/shell/main.mu
+++ b/shell/main.mu
@@ -74,7 +74,10 @@ fn store-state data-disk: (addr disk), sandbox: (addr sandbox), globals: (addr g
   }
   var stream-storage: (stream byte 0x200)
   var stream/edi: (addr stream byte) <- address stream-storage
-  write stream, "((sandbox . "
+  write stream, "((globals . "
+  write-globals stream, globals
+  write stream, " )\n"
+  write stream, " (sandbox . "
   write-sandbox stream, sandbox
   write stream, "))"
   store-sector data-disk, 0/lba, stream