about summary refs log tree commit diff stats
path: root/103screen.subx
diff options
context:
space:
mode:
Diffstat (limited to '103screen.subx')
-rw-r--r--103screen.subx25
1 files changed, 25 insertions, 0 deletions
diff --git a/103screen.subx b/103screen.subx
index 75753a1d..944fd4aa 100644
--- a/103screen.subx
+++ b/103screen.subx
@@ -134,6 +134,31 @@ $print-string:end:
     5d/pop-to-ebp
     c3/return
 
+print-byte:  # c: byte
+    # . prologue
+    55/push-ebp
+    89/<- %ebp 4/r32/esp
+    #
+    (write-byte-buffered Stdout *(ebp+8))
+$print-byte:end:
+    # . epilogue
+    89/<- %esp 5/r32/ebp
+    5d/pop-to-ebp
+    c3/return
+
+# just because Mu has no support for global variables yet
+flush-stdout:
+    # . prologue
+    55/push-ebp
+    89/<- %ebp 4/r32/esp
+    #
+    (flush Stdout)
+$flush-stdout:end:
+    # . epilogue
+    89/<- %esp 5/r32/ebp
+    5d/pop-to-ebp
+    c3/return
+
 print-int32-to-screen:  # n: int
     # . prologue
     55/push-ebp