about summary refs log tree commit diff stats
path: root/baremetal/501draw-text.mu
diff options
context:
space:
mode:
Diffstat (limited to 'baremetal/501draw-text.mu')
-rw-r--r--baremetal/501draw-text.mu6
1 files changed, 3 insertions, 3 deletions
diff --git a/baremetal/501draw-text.mu b/baremetal/501draw-text.mu
index b17b54a3..9b207361 100644
--- a/baremetal/501draw-text.mu
+++ b/baremetal/501draw-text.mu
@@ -130,12 +130,12 @@ fn draw-text-rightward-over-full-screen screen: (addr screen), text: (addr array
   return result
 }
 
-fn draw-text-rightward-from-cursor screen: (addr screen), text: (addr array byte), xmax: int, color: int, background-color: int -> _/eax: int {
+fn draw-text-rightward-from-cursor screen: (addr screen), text: (addr array byte), xmax: int, color: int, background-color: int {
   var cursor-x/eax: int <- copy 0
   var cursor-y/ecx: int <- copy 0
   cursor-x, cursor-y <- cursor-position screen
-  var result/eax: int <- draw-text-rightward screen, text, cursor-x, xmax, cursor-y, color, background-color
-  return result
+  cursor-x <- draw-text-rightward screen, text, cursor-x, xmax, cursor-y, color, background-color
+  set-cursor-position screen, cursor-x, cursor-y
 }
 
 fn render-grapheme screen: (addr screen), g: grapheme, xmin: int, ymin: int, xmax: int, ymax: int, x: int, y: int, color: int, background-color: int -> _/eax: int, _/ecx: int {