aboutsummaryrefslogtreecommitdiff
path: root/examples/hello_world/src
diff options
context:
space:
mode:
authorHimbeer <himbeer@disroot.org>2024-06-18 19:58:20 +0200
committerHimbeer <himbeer@disroot.org>2024-06-18 19:58:20 +0200
commit92a0effabf007aa2dcee52804476155687237fa1 (patch)
tree6e3b189e39758cd2d55bb47c571356f4945e9aa1 /examples/hello_world/src
parent099f5db6aa550780fc8702821d65d7652e58bd16 (diff)
examples: Add hello_world example program
Diffstat (limited to 'examples/hello_world/src')
-rw-r--r--examples/hello_world/src/main.zig11
1 files changed, 11 insertions, 0 deletions
diff --git a/examples/hello_world/src/main.zig b/examples/hello_world/src/main.zig
new file mode 100644
index 0000000..2a9eb86
--- /dev/null
+++ b/examples/hello_world/src/main.zig
@@ -0,0 +1,11 @@
+// SPDX-FileCopyrightText: 2024 Himbeer <himbeer@disroot.org>
+//
+// SPDX-License-Identifier: AGPL-3.0-or-later
+
+export fn _start() void {
+ main();
+}
+
+pub fn main() void {
+ asm volatile ("ecall");
+}