diff options
Diffstat (limited to 'examples/hello_world/src/main.zig')
-rw-r--r-- | examples/hello_world/src/main.zig | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/examples/hello_world/src/main.zig b/examples/hello_world/src/main.zig index 6f1b546..d45eea1 100644 --- a/examples/hello_world/src/main.zig +++ b/examples/hello_world/src/main.zig @@ -2,22 +2,12 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -export fn _start() void { - main(); -} +const srvre_sys = @import("srvre_sys"); +const os = srvre_sys.os; + +usingnamespace srvre_sys; pub fn main() void { const s = "Hello from U-mode init\r\n"; - asm volatile ( - \\ li a7, 100001 - \\ ecall - : - : [s] "{a0}" (s.ptr), - [n] "{a1}" (s.len), - ); - - asm volatile ( - \\ li a7, 100003 - \\ ecall - ::: "a7"); + _ = os.consoleWrite(s) catch unreachable; } |