diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-08-01 23:06:41 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-08-01 23:39:57 -0700 |
commit | 6b343a82f29b6dea219504504244591c3042df43 (patch) | |
tree | 91c63bd3d66d73aeb4e6714f1b6e5792620839b8 /prototypes/tile/10.mu | |
parent | 59a2e363f5f818e3870a275efe375737a76009fa (diff) | |
download | mu-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/10.mu')
-rw-r--r-- | prototypes/tile/10.mu | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/prototypes/tile/10.mu b/prototypes/tile/10.mu index a20e50ef..a9a4c85c 100644 --- a/prototypes/tile/10.mu +++ b/prototypes/tile/10.mu @@ -75,7 +75,7 @@ $main:loop: { render root-addr, cursor-addr loop } - clear-screen + clear-screen 0 enable-keyboard-type-mode exit-status <- copy 0 } @@ -199,7 +199,7 @@ fn create-child node: (handle cell) { ####################################################### fn render root: (addr cell), cursor: (addr cell) { - clear-screen + clear-screen 0 var depth/eax: int <- tree-depth root var viewport-width/ecx: int <- copy 0x65 # col2 viewport-width <- subtract 5 # col1 @@ -318,11 +318,11 @@ fn draw-hatching 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 } @@ -333,8 +333,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 } @@ -346,8 +346,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 @@ -355,7 +355,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 @@ -363,8 +363,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 @@ -374,9 +374,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 { |