diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-12-06 22:12:49 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-12-06 22:12:49 -0800 |
commit | 35898016ac6fd2d85ebc7ef0056124e30d455e30 (patch) | |
tree | 64b06f6ee16ed3f38137f64f26492c53e1486b82 | |
parent | b0d323ff87e49cd245ee6da8113f1ae6db86b9d8 (diff) | |
download | mu-35898016ac6fd2d85ebc7ef0056124e30d455e30.tar.gz |
7345
-rw-r--r-- | apps/tile/environment.mu | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/apps/tile/environment.mu b/apps/tile/environment.mu index 776b4185..5c17a97d 100644 --- a/apps/tile/environment.mu +++ b/apps/tile/environment.mu @@ -1899,20 +1899,6 @@ fn render-column screen: (addr screen), functions: (addr handle function), bindi return right-col } -fn clear-canvas _env: (addr environment) { - var env/esi: (addr environment) <- copy _env - var screen-ah/edi: (addr handle screen) <- get env, screen - var _screen/eax: (addr screen) <- lookup *screen-ah - var screen/edi: (addr screen) <- copy _screen - clear-screen screen - var nrows/eax: (addr int) <- get env, nrows - var sep-col/ecx: (addr int) <- get env, code-separator-col - # divider - draw-vertical-line screen, 1, *nrows, *sep-col - # primitives - var dummy/eax: int <- render-primitives screen, *nrows, *sep-col -} - # wordstar-style cheatsheet of shortcuts fn render-menu _env: (addr environment) { var env/esi: (addr environment) <- copy _env @@ -1967,6 +1953,20 @@ fn render-menu _env: (addr environment) { print-string screen, " define function " } +fn clear-canvas _env: (addr environment) { + var env/esi: (addr environment) <- copy _env + var screen-ah/edi: (addr handle screen) <- get env, screen + var _screen/eax: (addr screen) <- lookup *screen-ah + var screen/edi: (addr screen) <- copy _screen + clear-screen screen + var nrows/eax: (addr int) <- get env, nrows + var sep-col/ecx: (addr int) <- get env, code-separator-col + # divider + draw-vertical-line screen, 1, *nrows, *sep-col + # primitives + var dummy/eax: int <- render-primitives screen, *nrows, *sep-col +} + # return value: top-most row written to fn render-primitives screen: (addr screen), bottom-margin-row: int, right-col: int -> _/eax: int { # render primitives from the bottom of the screen upward |