about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--501draw-text.mu7
-rw-r--r--apps/ex7.mu3
2 files changed, 8 insertions, 2 deletions
diff --git a/501draw-text.mu b/501draw-text.mu
index 5d2917a9..61023642 100644
--- a/501draw-text.mu
+++ b/501draw-text.mu
@@ -81,6 +81,13 @@ fn move-cursor-to-left-margin-of-next-line screen: (addr screen) {
   set-cursor-position screen, cursor-x, cursor-y
 }
 
+fn draw-code-point-at-cursor screen: (addr screen), c: code-point, 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 dummy/eax: int <- draw-code-point screen, c, cursor-x, cursor-y, color, background-color
+}
+
 fn draw-code-point-at-cursor-over-full-screen screen: (addr screen), c: code-point, color: int, background-color: int {
   var cursor-x/eax: int <- copy 0
   var cursor-y/ecx: int <- copy 0
diff --git a/apps/ex7.mu b/apps/ex7.mu
index b41b6f72..61b9ac20 100644
--- a/apps/ex7.mu
+++ b/apps/ex7.mu
@@ -9,10 +9,9 @@
 # k, l.
 
 fn main screen: (addr screen), keyboard: (addr keyboard), data-disk: (addr disk) {
-  var space/eax: grapheme <- copy 0x20
   set-cursor-position screen, 0, 0
   {
-    draw-cursor screen, space
+    draw-cursor screen, 0x20/space
     var key/eax: byte <- read-key keyboard
     {
       compare key, 0x68/h