17 lines
438 B
Plaintext
Raw Normal View History

2024-08-19 09:11:45 +00:00
write(fd Int, address Pointer, length Int) -> Int {
// out numberOfBytesWritten
// out overlapped
return kernel32.WriteFile(fd, address, length)
2024-08-16 10:49:17 +00:00
}
2024-08-19 09:11:45 +00:00
mmap(address Int, length Int, protection Int, flags Int) -> Pointer {
return kernel32.VirtualAlloc(address, length, flags, protection)
2024-08-15 11:53:00 +00:00
}
2024-08-19 15:25:51 +00:00
munmap(address Pointer, length Int) -> Int {
return kernel32.VirtualFree(address, length, 0x4000)
}
2024-08-19 09:11:45 +00:00
exit(code Int) {
kernel32.ExitProcess(code)
2024-08-13 17:34:54 +00:00
}