Implemented package imports

This commit is contained in:
2024-07-18 18:08:30 +02:00
parent fa373e7dc2
commit b34470a97d
21 changed files with 510 additions and 353 deletions

View File

@ -1,5 +1,7 @@
import sys
main() {
syscall(60, factorial(5))
sys.exit(factorial(5))
}
factorial(x) {

View File

@ -1,5 +1,7 @@
import sys
main() {
syscall(60, fibonacci(10))
sys.exit(fibonacci(10))
}
fibonacci(x) {

View File

@ -1,11 +1,9 @@
import sys
main() {
print("Hello", 5)
}
print(address, length) {
write(1, address, length)
}
write(fd, address, length) {
syscall(1, fd, address, length)
sys.write(1, address, length)
}