about summary refs log tree commit diff stats
path: root/apps/tui.mu
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2021-02-07 00:17:17 -0800
committerKartik Agaram <vc@akkartik.com>2021-02-07 00:20:29 -0800
commit74f1512ff113cf35706af57e9d40c78b7d77f49e (patch)
tree7c7acb23e1a26387117e464ec6ab01126dbc8ae8 /apps/tui.mu
parent6c4c25555c7df0d78ad41c813345f63cae1819de (diff)
downloadmu-74f1512ff113cf35706af57e9d40c78b7d77f49e.tar.gz
7690
Convert comments about magic constants into metadata.
Diffstat (limited to 'apps/tui.mu')
-rw-r--r--apps/tui.mu30
1 files changed, 15 insertions, 15 deletions
diff --git a/apps/tui.mu b/apps/tui.mu
index 7dad7d1b..c58a82c6 100644
--- a/apps/tui.mu
+++ b/apps/tui.mu
@@ -9,26 +9,26 @@ fn main -> _/ebx: int {
   var ncols/ecx: int <- copy 0
   nrows, ncols <- screen-size 0
   enable-screen-grid-mode
-  move-cursor 0, 5, 0x22
-  start-color 0, 1, 0x7a
-  start-blinking 0
-  print-string 0, "Hello world!"
-  reset-formatting 0
-  move-cursor 0, 6, 0x22
-  print-string 0, "tty dimensions: "
-  print-int32-hex 0, nrows
-  print-string 0, " rows, "
-  print-int32-hex 0, ncols
-  print-string 0, " rows\n"
+  move-cursor 0/screen, 5/row, 0x22/col
+  start-color 0/screen, 1/fg, 0x7a/bg
+  start-blinking 0/screen
+  print-string 0/screen, "Hello world!"
+  reset-formatting 0/screen
+  move-cursor 0/screen, 6/row, 0x22/col
+  print-string 0/screen, "tty dimensions: "
+  print-int32-hex 0/screen, nrows
+  print-string 0/screen, " rows, "
+  print-int32-hex 0/screen, ncols
+  print-string 0/screen, " rows\n"
 
-  print-string 0, "press a key to see its code: "
+  print-string 0/screen, "press a key to see its code: "
   enable-keyboard-immediate-mode
   var x/eax: grapheme <- read-key-from-real-keyboard
   enable-keyboard-type-mode
   enable-screen-type-mode
-  print-string 0, "You pressed "
+  print-string 0/screen, "You pressed "
   var x-int/eax: int <- copy x
-  print-int32-hex 0, x-int
-  print-string 0, "\n"
+  print-int32-hex 0/screen, x-int
+  print-string 0/screen, "\n"
   return 0
 }