aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimbeer <himbeer@disroot.org>2024-07-31 14:27:38 +0200
committerHimbeer <himbeer@disroot.org>2024-07-31 14:27:38 +0200
commit7837f7c2c3a8d662db44bbf89f6b9c62fc948111 (patch)
tree42172bb5205076fbd5071ce4cbba4cbc1b41fe55
parent9e3eaed167665c47c61ee5b8a2ddaea5116b5b67 (diff)
root: Add consoleWrite syscall
-rw-r--r--src/root.zig6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/root.zig b/src/root.zig
index c5625d0..5063e4e 100644
--- a/src/root.zig
+++ b/src/root.zig
@@ -48,3 +48,9 @@ pub fn errorName(code: u16, buffer: []u8) !usize {
if (result.error_code != 0) return Error.Kernel;
return result.value;
}
+
+pub fn consoleWrite(bytes: []const u8) !usize {
+ const result = ecall(100001, .{ bytes.ptr, bytes.len });
+ if (result.error_code != 0) return Error.Kernel;
+ return result.value;
+}