about summary refs log tree commit diff stats
path: root/prototypes/tile/7.mu
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-08-01 23:06:41 -0700
committerKartik Agaram <vc@akkartik.com>2020-08-01 23:39:57 -0700
commit6b343a82f29b6dea219504504244591c3042df43 (patch)
tree91c63bd3d66d73aeb4e6714f1b6e5792620839b8 /prototypes/tile/7.mu
parent59a2e363f5f818e3870a275efe375737a76009fa (diff)
downloadmu-6b343a82f29b6dea219504504244591c3042df43.tar.gz
6699 - start building out fake screen
We now have all existing apps and prototypes going through the dependency-injected
wrapper, even though it doesn't actually implement the fake screen yet.
Diffstat (limited to 'prototypes/tile/7.mu')
-rw-r--r--prototypes/tile/7.mu28
1 files changed, 14 insertions, 14 deletions
diff --git a/prototypes/tile/7.mu b/prototypes/tile/7.mu
index 3cec67b6..42182745 100644
--- a/prototypes/tile/7.mu
+++ b/prototypes/tile/7.mu
@@ -72,7 +72,7 @@ $main:loop: {
     render root-addr
     loop
   }
-  clear-screen
+  clear-screen 0
   enable-keyboard-type-mode
   exit-status <- copy 0
 }
@@ -105,7 +105,7 @@ fn create-child node: (addr cell) {
 #######################################################
 
 fn render root: (addr cell) {
-  clear-screen
+  clear-screen 0
   var depth/eax: int <- tree-depth root
   var viewport-width/ecx: int <- copy 0x64  # col2
   viewport-width <- subtract 5  # col1
@@ -175,11 +175,11 @@ fn draw-box row1: int, col1: int, row2: int, col2: int {
 
 fn draw-horizontal-line row: int, col1: int, col2: int {
   var col/eax: int <- copy col1
-  move-cursor-on-screen row, col
+  move-cursor 0, row, col
   {
     compare col, col2
     break-if->=
-    print-string-to-screen "-"
+    print-string 0, "-"
     col <- increment
     loop
   }
@@ -190,8 +190,8 @@ fn draw-vertical-line row1: int, row2: int, col: int {
   {
     compare row, row2
     break-if->=
-    move-cursor-on-screen row, col
-    print-string-to-screen "|"
+    move-cursor 0, row, col
+    print-string 0, "|"
     row <- increment
     loop
   }
@@ -203,8 +203,8 @@ fn try-divide _nr: int, _dr: int -> result/eax: int {
   # x = next power-of-2 multiple of _dr after _nr
   var x/ecx: int <- copy 1
   {
-#?     print-int32-hex-to-screen x
-#?     print-string-to-screen "\n"
+#?     print-int32-hex 0, x
+#?     print-string 0, "\n"
     var tmp/edx: int <- copy _dr
     tmp <- multiply x
     compare tmp, _nr
@@ -212,7 +212,7 @@ fn try-divide _nr: int, _dr: int -> result/eax: int {
     x <- shift-left 1
     loop
   }
-#?   print-string-to-screen "--\n"
+#?   print-string 0, "--\n"
   # min, max = x/2, x
   var max/ecx: int <- copy x
   var min/edx: int <- copy max
@@ -220,8 +220,8 @@ fn try-divide _nr: int, _dr: int -> result/eax: int {
   # narrow down result between min and max
   var i/eax: int <- copy min
   {
-#?     print-int32-hex-to-screen i
-#?     print-string-to-screen "\n"
+#?     print-int32-hex 0, i
+#?     print-string 0, "\n"
     var foo/ebx: int <- copy _dr
     foo <- multiply i
     compare foo, _nr
@@ -231,9 +231,9 @@ fn try-divide _nr: int, _dr: int -> result/eax: int {
   }
   result <- copy i
   result <- decrement
-#?   print-string-to-screen "=> "
-#?   print-int32-hex-to-screen result
-#?   print-string-to-screen "\n"
+#?   print-string 0, "=> "
+#?   print-int32-hex 0, result
+#?   print-string 0, "\n"
 }
 
 fn test-try-divide-1 {