diff options
author | Himbeer <himbeer@disroot.org> | 2024-07-27 20:01:14 +0200 |
---|---|---|
committer | Himbeer <himbeer@disroot.org> | 2024-07-27 20:01:14 +0200 |
commit | 9d081079402cb34f3ef0d3219309566ae81b73a9 (patch) | |
tree | 5dadcb80644be3627ff2cdedbe61b8cb74b3985c /examples | |
parent | 5be972fca82fe1233856ed7cabe5bb5ff9cc2f86 (diff) |
hello_world: Terminate cleanly (instead of raising an instruction page fault)
Diffstat (limited to 'examples')
-rw-r--r-- | examples/hello_world/src/main.zig | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/hello_world/src/main.zig b/examples/hello_world/src/main.zig index f2520d0..6f1b546 100644 --- a/examples/hello_world/src/main.zig +++ b/examples/hello_world/src/main.zig @@ -15,4 +15,9 @@ pub fn main() void { : [s] "{a0}" (s.ptr), [n] "{a1}" (s.len), ); + + asm volatile ( + \\ li a7, 100003 + \\ ecall + ::: "a7"); } |