From 5685d0eb4d9108a183a3a44c7b6b2ec197d3a980 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?b=CA=B0edoh=E2=82=82=20sw=C3=A9?= Date: Mon, 17 Jun 2024 05:30:39 +0500 Subject: [PATCH] Add null-based string to std --- std/string/array2null.lb | 7 +++++++ std/string/null/print.lb | 9 +++++++++ 2 files changed, 16 insertions(+) create mode 100644 std/string/array2null.lb create mode 100644 std/string/null/print.lb diff --git a/std/string/array2null.lb b/std/string/array2null.lb new file mode 100644 index 0000000..59833e2 --- /dev/null +++ b/std/string/array2null.lb @@ -0,0 +1,7 @@ +@ 0 + args 0 + size + #exec std/rev.lb + push 0 + size + #exec std/rev.lb diff --git a/std/string/null/print.lb b/std/string/null/print.lb new file mode 100644 index 0000000..bc2688b --- /dev/null +++ b/std/string/null/print.lb @@ -0,0 +1,9 @@ +@ 0 + args 1 + dup + jz 1 + putc + jmp 0 + +@ 1 + quit