about summary refs log tree commit diff stats
path: root/shell
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-04-15 20:15:22 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-04-15 20:15:22 -0700
commitb2e0ce69ef7bda06971a29bb8a24ff915c53ffd1 (patch)
treec1e651191456336ca9beb70b43c659d165f2a739 /shell
parent0192e2031f41b1eabe0c2d764d7710fafe8f4a01 (diff)
downloadmu-b2e0ce69ef7bda06971a29bb8a24ff915c53ffd1.tar.gz
.
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