about summary refs log tree commit diff stats
path: root/baremetal/shell/grapheme-stack.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-02-09 21:41:58 -0800
committerKartik K. Agaram <vc@akkartik.com>2021-02-09 21:41:58 -0800
commit9a91f0a84065e3b53d897a7f232ac58d36e3bb0a (patch)
treee6824d8ad1087a032113fdadfddb1480597aa387 /baremetal/shell/grapheme-stack.mu
parentc1e841fc2dc43cd94e993165ff0fbde12fd0ec15 (diff)
downloadmu-9a91f0a84065e3b53d897a7f232ac58d36e3bb0a.tar.gz
7702
Diffstat (limited to 'baremetal/shell/grapheme-stack.mu')
-rw-r--r--baremetal/shell/grapheme-stack.mu10
1 files changed, 5 insertions, 5 deletions
diff --git a/baremetal/shell/grapheme-stack.mu b/baremetal/shell/grapheme-stack.mu
index 9a4e0644..11df0345 100644
--- a/baremetal/shell/grapheme-stack.mu
+++ b/baremetal/shell/grapheme-stack.mu
@@ -78,7 +78,7 @@ fn copy-grapheme-stack _src: (addr grapheme-stack), dest: (addr grapheme-stack)
 
 # dump stack to screen from bottom to top
 # colors hardcoded
-fn render-stack-from-bottom _self: (addr grapheme-stack), screen: (addr screen), x: int, y: int -> _/eax: int {
+fn render-stack-from-bottom screen: (addr screen), _self: (addr grapheme-stack), x: int, y: int -> _/eax: int {
   var self/esi: (addr grapheme-stack) <- copy _self
   var data-ah/edi: (addr handle array grapheme) <- get self, data
   var _data/eax: (addr array grapheme) <- lookup *data-ah
@@ -99,7 +99,7 @@ fn render-stack-from-bottom _self: (addr grapheme-stack), screen: (addr screen),
 
 # dump stack to screen from top to bottom
 # optionally render a 'cursor' with the top grapheme
-fn render-stack-from-top _self: (addr grapheme-stack), screen: (addr screen), x: int, y: int, render-cursor?: boolean -> _/eax: int {
+fn render-stack-from-top screen: (addr screen), _self: (addr grapheme-stack), x: int, y: int, render-cursor?: boolean -> _/eax: int {
   var self/esi: (addr grapheme-stack) <- copy _self
   var data-ah/edi: (addr handle array grapheme) <- get self, data
   var _data/eax: (addr array grapheme) <- lookup *data-ah
@@ -147,17 +147,17 @@ fn test-render-grapheme-stack {
   var screen/esi: (addr screen) <- address screen-on-stack
   initialize-screen screen, 5, 4
   #
-  var x/eax: int <- render-stack-from-bottom gs, screen, 0/x, 0/y
+  var x/eax: int <- render-stack-from-bottom screen, gs, 0/x, 0/y
   check-screen-row screen, 0/y, "abc ", "F - test-render-grapheme-stack from bottom"
   check-ints-equal x, 3, "F - test-render-grapheme-stack from bottom: result"
   check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "   ", "F - test-render-grapheme-stack from bottom: bg"
   #
-  var x/eax: int <- render-stack-from-top gs, screen, 0/x, 1/y, 0/cursor=false
+  var x/eax: int <- render-stack-from-top screen, gs, 0/x, 1/y, 0/cursor=false
   check-screen-row screen, 1/y, "cba ", "F - test-render-grapheme-stack from top without cursor"
   check-ints-equal x, 3, "F - test-render-grapheme-stack from top without cursor: result"
   check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, "   ", "F - test-render-grapheme-stack from top without cursor: bg"
   #
-  var x/eax: int <- render-stack-from-top gs, screen, 0/x, 2/y, 1/cursor=true
+  var x/eax: int <- render-stack-from-top screen, gs, 0/x, 2/y, 1/cursor=true
   check-screen-row screen, 2/y, "cba ", "F - test-render-grapheme-stack from top with cursor"
   check-ints-equal x, 3, "F - test-render-grapheme-stack from top without cursor: result"
   check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, "|   ", "F - test-render-grapheme-stack from top with cursor: bg"