Added tests for examples
This commit is contained in:
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)
|
||||
}
|
Reference in New Issue
Block a user