about summary refs log tree commit diff stats
path: root/apps
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-10-05 21:22:42 -0700
committerKartik Agaram <vc@akkartik.com>2020-10-05 21:22:42 -0700
commitc2844535f38c4eeb3b822d83947d495e716ab580 (patch)
tree41ac066f231e9ddae6f82e2a0e42d4e17bad243f /apps
parent21387ef514e1fa91f8f10f0a5089cc4bc66f3c18 (diff)
downloadmu-c2844535f38c4eeb3b822d83947d495e716ab580.tar.gz
6964 - tile: start tracking word index in fn body
Diffstat (limited to 'apps')
-rw-r--r--apps/tile/environment.mu10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/tile/environment.mu b/apps/tile/environment.mu
index 38aa4af0..a544449c 100644
--- a/apps/tile/environment.mu
+++ b/apps/tile/environment.mu
@@ -222,6 +222,8 @@ fn render-line screen: (addr screen), defs: (addr handle function), bindings: (a
   var line/esi: (addr line) <- copy _line
   var first-word-ah/eax: (addr handle word) <- get line, data
   var curr-word/eax: (addr word) <- lookup *first-word-ah
+  #
+  var word-index/ebx: int <- copy 0
   # loop-carried dependency
   var curr-col/ecx: int <- copy left-col
   #
@@ -285,10 +287,18 @@ fn render-line screen: (addr screen), defs: (addr handle function), bindings: (a
       curr-col <- add 2
       subtract-from top-row, 1
     }
+    # print word index
+    subtract-from top-row, 1
+      move-cursor screen, top-row, curr-col
+      start-color screen, 8, 7
+        print-int32-hex-bits screen, word-index, 4
+      reset-formatting screen
+    add-to top-row, 1
     # now render main column
     curr-col <- render-column screen, defs, bindings, line, curr-word, top-row, curr-col, cursor-word, cursor-col-a
     var next-word-ah/edx: (addr handle word) <- get curr-word, next
     curr-word <- lookup *next-word-ah
+    word-index <- increment
     loop
   }
   right-col <- copy curr-col