zig/test/cases/plan9/hello_world_with_updates.0.zig
2022-10-24 16:53:12 -04:00

29 lines
538 B
Zig

pub fn main() void {
const str = "Hello World!\n";
asm volatile (
\\push $0
\\push %%r10
\\push %%r11
\\push $1
\\push $0
\\syscall
\\pop %%r11
\\pop %%r11
\\pop %%r11
\\pop %%r11
\\pop %%r11
:
// pwrite
: [syscall_number] "{rbp}" (51),
[hey] "{r11}" (@ptrToInt(str)),
[strlen] "{r10}" (str.len),
: "rcx", "rbp", "r11", "memory"
);
}
// run
// target=x86_64-plan9
//
// Hello World
//