Implemented echo example
This commit is contained in:
9
lib/mem/alloc.q
Normal file
9
lib/mem/alloc.q
Normal file
@ -0,0 +1,9 @@
|
||||
import sys
|
||||
|
||||
alloc(length) {
|
||||
return sys.mmap(0, length, 3, 290)
|
||||
}
|
||||
|
||||
free(address, length) {
|
||||
return sys.munmap(address, length)
|
||||
}
|
@ -3,7 +3,7 @@ read(fd, address, length) {
|
||||
}
|
||||
|
||||
write(fd, address, length) {
|
||||
syscall(1, fd, address, length)
|
||||
return syscall(1, fd, address, length)
|
||||
}
|
||||
|
||||
open(file, flags, mode) {
|
||||
|
Reference in New Issue
Block a user