about summary refs log tree commit diff stats
path: root/315slice.subx
diff options
context:
space:
mode:
Diffstat (limited to '315slice.subx')
-rw-r--r--315slice.subx14
1 files changed, 14 insertions, 0 deletions
diff --git a/315slice.subx b/315slice.subx
new file mode 100644
index 00000000..0a348550
--- /dev/null
+++ b/315slice.subx
@@ -0,0 +1,14 @@
+== code
+
+# variant of slice-to-string intended to be called from Mu
+# Mu doesn't yet expose allocation-descriptors
+_slice-to-string:  # in: (addr slice), out: (addr handle array byte)
+    # . prologue
+    55/push-ebp
+    89/<- %ebp 4/r32/esp
+    #
+    (slice-to-string Heap *(ebp+8) *(ebp+0xc))
+    # . epilogue
+    89/<- %esp 5/r32/ebp
+    5d/pop-to-ebp
+    c3/return