2022-06-16 13:56:10 +00:00
|
|
|
let @sys_read (u32 fd, i8* buf, u64 size) in {
|
|
|
|
syscall3(0,fd,buf,size);
|
|
|
|
}
|
2022-05-28 18:44:26 +00:00
|
|
|
|
2022-06-16 13:56:10 +00:00
|
|
|
let @sys_write (u32 fd, i8* buf, u64 size) in {
|
|
|
|
syscall3(1,fd,buf,size);
|
|
|
|
}
|
2022-05-28 18:44:26 +00:00
|
|
|
|
2022-06-16 13:56:10 +00:00
|
|
|
let @sys_open (i8* name, i32 flags, u16 mode) in {
|
|
|
|
syscall3(2,name,flags,mode);
|
|
|
|
}
|
2022-05-28 18:44:26 +00:00
|
|
|
|
2022-06-16 13:56:10 +00:00
|
|
|
let @sys_close (u32 fd) in {
|
|
|
|
syscall1(3,fd);
|
|
|
|
}
|
2022-05-28 18:44:26 +00:00
|
|
|
|
2022-06-16 13:56:10 +00:00
|
|
|
let @sys_exit (i32 code) in {
|
|
|
|
syscall1(60,code);
|
|
|
|
}
|