3 //#include <acess/sys.h>
13 * Whitespace is ignored
15 * >I: Input Long Integer (64-bits)
17 * >d: Input Buffer (Preceded by valid size)
18 * <I: Output long integer
19 * <d: Output Buffer (Preceded by valid size)
21 int _Syscall(const char *ArgTypes, ...)
23 // int outBufSize = 0;
26 va_start(args, ArgTypes);
31 int open(const char *Path, int Flags) {
32 return _Syscall(">s >i", Path, Flags);
39 size_t read(int FD, size_t Bytes, void *Dest) {
40 return _Syscall(">i >i <d", FD, Bytes, Bytes, Dest);
43 size_t write(int FD, size_t Bytes, void *Src) {
44 return _Syscall(">i >i >d", FD, Bytes, Bytes, Src);
47 uint64_t tell(int FD) {
49 _Syscall("<I >i", &ret, FD);
53 int seek(int FD, uint64_t Ofs, int Dir) {
54 return _Syscall(">i >I >i", FD, Ofs, Dir);