about summary refs log tree commit diff stats
path: root/304screen.subx
diff options
context:
space:
mode:
Diffstat (limited to '304screen.subx')
-rw-r--r--304screen.subx31
1 files changed, 31 insertions, 0 deletions
diff --git a/304screen.subx b/304screen.subx
index afed9775..1537a9b1 100644
--- a/304screen.subx
+++ b/304screen.subx
@@ -223,6 +223,37 @@ $print-int32-hex-to-real-screen:end:
     5d/pop-to-ebp
     c3/return
 
+print-int32-decimal-to-real-screen:  # n: int
+    # . prologue
+    55/push-ebp
+    89/<- %ebp 4/r32/esp
+    #
+    (write-int32-decimal-buffered Stdout *(ebp+8))
+    (flush Stdout)
+$print-int32-decimal-to-real-screen:end:
+    # . epilogue
+    89/<- %esp 5/r32/ebp
+    5d/pop-to-ebp
+    c3/return
+
+write-int32-decimal-buffered:  # f: (addr buffered-file), n: int
+    # . prologue
+    55/push-ebp
+    89/<- %ebp 4/r32/esp
+    # var ecx: (stream byte 16)
+    81 5/subop/subtract %esp 0x10/imm32
+    68/push 0x10/imm32/size
+    68/push 0/imm32/read
+    68/push 0/imm32/write
+    89/<- %ecx 4/r32/esp
+    (write-int32-decimal %ecx *(ebp+0xc))
+    (write-stream-data *(ebp+8) %ecx)
+$write-int32-decimal-buffered:end:
+    # . epilogue
+    89/<- %esp 5/r32/ebp
+    5d/pop-to-ebp
+    c3/return
+
 reset-formatting-on-real-screen:
     # . prologue
     55/push-ebp