Implemented return values

This commit is contained in:
2024-06-29 21:06:59 +02:00
parent 3e47a12ecd
commit 83640ba590
7 changed files with 113 additions and 61 deletions

View File

@ -1,19 +1,8 @@
// Comment
main() {
address := 4194304 + 1
length := (0 + 50 - 20) * 10 / 100
loop {
print(address, length)
}
x := f(2, 3)
syscall(60, x)
}
// Comment
print(address, length) {
write(length-2, address, length)
}
// Comment
write(fd, address, length) {
syscall(1, fd, address, length)
f(x, y) {
return (x + y) * (x + y)
}