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