Added tests for examples

This commit is contained in:
2024-06-29 21:40:14 +02:00
parent 83640ba590
commit 6e1af81733
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)
}