about summary refs log tree commit diff stats
path: root/prototypes/browse/22
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/browse/22
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/browse/22')
-rw-r--r--prototypes/browse/22/file-state.mu2
-rw-r--r--prototypes/browse/22/screen-position-state.mu6
2 files changed, 4 insertions, 4 deletions
diff --git a/prototypes/browse/22/file-state.mu b/prototypes/browse/22/file-state.mu
index 0047b2c0..544c7832 100644
--- a/prototypes/browse/22/file-state.mu
+++ b/prototypes/browse/22/file-state.mu
@@ -39,6 +39,6 @@ fn dump in: (addr buffered-file) {
   var c/eax: byte <- read-byte-buffered in
   compare c, 0xffffffff  # EOF marker
   break-if-=
-  print-byte-to-screen c
+  print-byte 0, c
   loop
 }
diff --git a/prototypes/browse/22/screen-position-state.mu b/prototypes/browse/22/screen-position-state.mu
index 2201e019..245f834e 100644
--- a/prototypes/browse/22/screen-position-state.mu
+++ b/prototypes/browse/22/screen-position-state.mu
@@ -17,7 +17,7 @@ fn init-screen-position-state _self: (addr screen-position-state) {
   var self/esi: (addr screen-position-state) <- copy _self
   var nrows/eax: int <- copy 0
   var ncols/ecx: int <- copy 0
-  nrows, ncols <- screen-size
+  nrows, ncols <- screen-size 0
   var dest/edx: (addr int) <- copy 0
   # self->nrows = nrows
   dest <- get self, nrows
@@ -70,7 +70,7 @@ $add-char:body: {
     break $add-char:body
   }
   # print c
-  print-byte-to-screen c
+  print-byte 0, c
   # self->col++
   var tmp/eax: (addr int) <- get self, col
   increment *tmp
@@ -159,5 +159,5 @@ fn reposition-cursor _self: (addr screen-position-state) {
   var self/esi: (addr screen-position-state) <- copy _self
   var r/eax: (addr int) <- get self, row
   var c/ecx: (addr int) <- get self, col
-  move-cursor-on-screen *r *c
+  move-cursor 0, *r *c
 }