Added tests for examples
This commit is contained in:
parent
a0edc45e19
commit
1510f88165
4 changed files with 87 additions and 3 deletions
13
examples/write/write.q
Normal file
13
examples/write/write.q
Normal 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)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue