Implemented echo example

This commit is contained in:
Eduard Urbach 2024-07-18 21:10:27 +02:00
parent fcc4f8d2d9
commit 86175d7a53
Signed by: eduard
GPG key ID: 49226B848C78F6C8
9 changed files with 70 additions and 58 deletions

9
lib/mem/alloc.q Normal file
View file

@ -0,0 +1,9 @@
import sys
alloc(length) {
return sys.mmap(0, length, 3, 290)
}
free(address, length) {
return sys.munmap(address, length)
}

View file

@ -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) {