Added tests for examples

This commit is contained in:
Eduard Urbach 2024-06-29 21:40:14 +02:00
parent a0edc45e19
commit 1510f88165
Signed by: eduard
GPG key ID: 49226B848C78F6C8
4 changed files with 87 additions and 3 deletions

13
examples/write/write.q Normal file
View file

@ -0,0 +1,13 @@
main() {
address := 4194304 + 1
length := (0 + 50 - 20) * 10 / 100
print(address, length)
}
print(address, length) {
write(length-2, address, length)
}
write(fd, address, length) {
syscall(1, fd, address, length)
}