2024-07-18 21:10:27 +02:00
|
|
|
import mem
|
|
|
|
import sys
|
|
|
|
|
|
|
|
main() {
|
|
|
|
length := 4096
|
|
|
|
address := mem.alloc(length)
|
|
|
|
|
|
|
|
loop {
|
|
|
|
n := sys.read(0, address, length)
|
|
|
|
|
|
|
|
if n <= 0 {
|
2025-02-09 23:52:07 +01:00
|
|
|
mem.free(address)
|
2024-07-18 21:10:27 +02:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
sys.write(1, address, n)
|
|
|
|
}
|
|
|
|
}
|