sapphire/core/__internal/linux/x64.sp
apio f1668853dd Lots of rewrites.
Planning to use LLVM to make stuff easier. Also, moved the random
sapphire stuff to actual examples in an actual examples/ folder. Also
started a standard library even if the compiler is not ready, because
why not?? Also, it helps the examples.
2022-05-28 20:44:26 +02:00

23 lines
399 B
SourcePawn

namespace linux {
@sys_read (u32 fd, i8* buf, u64 size) {
syscall3(0,fd,buf,size);
}
@sys_write (u32 fd, i8* buf, u64 size) {
syscall3(1,fd,buf,size);
}
@sys_open (i8* name, i32 flags, u16 mode) {
syscall3(2,name,flags,mode);
}
@sys_close (u32 fd) {
syscall1(3,fd);
}
@sys_exit (i32 code) {
syscall1(60,code);
}
}