From c2844535f38c4eeb3b822d83947d495e716ab580 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Mon, 5 Oct 2020 21:22:42 -0700 Subject: 6964 - tile: start tracking word index in fn body --- apps/tile/environment.mu | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 -- cgit 1.4.1-2-gfad0