about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--shell/global.mu12
-rw-r--r--shell/main.mu9
2 files changed, 20 insertions, 1 deletions
diff --git a/shell/global.mu b/shell/global.mu
index 4cf17de3..219ac5e3 100644
--- a/shell/global.mu
+++ b/shell/global.mu
@@ -64,7 +64,7 @@ fn initialize-globals _self: (addr global-table) {
 }
 
 fn load-globals in: (addr handle cell), self: (addr global-table) {
-#?   draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, "a", 2/fg 0/bg
+  draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, "loading globals:", 3/fg, 0/bg
   var remaining-ah/esi: (addr handle cell) <- copy in
   {
     var _remaining/eax: (addr cell) <- lookup *remaining-ah
@@ -76,6 +76,15 @@ fn load-globals in: (addr handle cell), self: (addr global-table) {
     var curr-ah/eax: (addr handle cell) <- get remaining, left
     var curr/eax: (addr cell) <- lookup *curr-ah
     remaining-ah <- get remaining, right
+    {
+      draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, " ", 2/fg 0/bg
+      var name-ah/ecx: (addr handle cell) <- get curr, left
+      var name/eax: (addr cell) <- lookup *name-ah
+      var name-data-ah/eax: (addr handle stream byte) <- get name, text-data
+      var name-data/eax: (addr stream byte) <- lookup *name-data-ah
+      rewind-stream name-data
+      draw-stream-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, name-data, 3/fg, 0/bg
+    }
     var value-ah/eax: (addr handle cell) <- get curr, right
     var value/eax: (addr cell) <- lookup *value-ah
     var value-data-ah/eax: (addr handle stream byte) <- get value, text-data
@@ -93,6 +102,7 @@ fn load-globals in: (addr handle cell), self: (addr global-table) {
 #?     draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, "y", 2/fg 0/bg
     loop
   }
+  move-cursor-to-left-margin-of-next-line 0/screen
 #?   abort "zz"
 }
 
diff --git a/shell/main.mu b/shell/main.mu
index 2c47e4f2..16e23c7a 100644
--- a/shell/main.mu
+++ b/shell/main.mu
@@ -81,15 +81,23 @@ fn load-state data-disk: (addr disk), _sandbox: (addr sandbox), globals: (addr g
   # data-disk -> stream
   var s-storage: (stream byte 0x1000)  # space for 8/sectors
   var s/ebx: (addr stream byte) <- address s-storage
+  draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, "loading sectors from data disk", 3/fg, 0/bg
+  move-cursor-to-left-margin-of-next-line 0/screen
   load-sectors data-disk, 0/lba, 8/sectors, s
 #?   draw-stream-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, s, 7/fg, 0xc5/bg=blue-bg
   # stream -> gap-buffer
+  draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, "parsing", 3/fg, 0/bg
+  move-cursor-to-left-margin-of-next-line 0/screen
   load-gap-buffer-from-stream data, s
+  draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, "  into gap buffer", 3/fg, 0/bg
+  move-cursor-to-left-margin-of-next-line 0/screen
   clear-stream s
   # read: gap-buffer -> cell
   var initial-root-storage: (handle cell)
   var initial-root/ecx: (addr handle cell) <- address initial-root-storage
   read-cell data, initial-root, 0/no-trace
+  draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, "  into s-expressions", 3/fg, 0/bg
+  move-cursor-to-left-margin-of-next-line 0/screen
   clear-gap-buffer data
   #
   {
@@ -113,6 +121,7 @@ fn load-state data-disk: (addr disk), _sandbox: (addr sandbox), globals: (addr g
     load-globals globals-cell-ah, globals
   }
   # sandbox = assoc(initial-root, 'sandbox)
+  draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, "loading sandbox", 3/fg, 0/bg
   var sandbox-literal-storage: (handle cell)
   var sandbox-literal-ah/eax: (addr handle cell) <- address sandbox-literal-storage
   new-symbol sandbox-literal-ah, "sandbox"