aboutsummaryrefslogtreecommitdiff
path: root/std/stdlib.sloth
diff options
context:
space:
mode:
Diffstat (limited to 'std/stdlib.sloth')
-rw-r--r--std/stdlib.sloth14
1 files changed, 14 insertions, 0 deletions
diff --git a/std/stdlib.sloth b/std/stdlib.sloth
new file mode 100644
index 0000000..7b6e2f9
--- /dev/null
+++ b/std/stdlib.sloth
@@ -0,0 +1,14 @@
+foreign fn wait(x: Int) Void;
+foreign fn print(str: String) Void;
+
+fn termpos(x: int, y: int) Void {
+ print("\x1b[");
+ print(x);
+ print(";");
+ print(y);
+ print("H");
+}
+
+fn termclear() Void {
+ print("\x1b[2J\x1b[H");
+}