1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/os/bare/bare.v

17 lines
300 B
V
Raw Normal View History

2019-11-14 07:08:11 +03:00
fn syscall5(number, arg1, arg2, arg3, arg4, arg5 voidptr) voidptr
fn write(fd int, data voidptr, nbytes u64) int {
2019-11-14 10:23:44 +03:00
return syscall5(
2019-11-14 07:08:11 +03:00
1, // SYS_write
2019-11-14 10:23:44 +03:00
fd,
data,
nbytes,
0, // ignored
0 // ignored
)
2019-11-14 07:08:11 +03:00
}
fn main() {
2019-11-14 10:23:44 +03:00
write(1, "hallo\n", 6)
2019-11-14 07:08:11 +03:00
}