18 lines
213 B
Plaintext
18 lines
213 B
Plaintext
import mem
|
|
import sys
|
|
|
|
main() {
|
|
length := 4096
|
|
address := mem.alloc(length)
|
|
|
|
loop {
|
|
n := sys.read(0, address, length)
|
|
|
|
if n <= 0 {
|
|
mem.free(address, length)
|
|
return
|
|
}
|
|
|
|
sys.write(1, address, n)
|
|
}
|
|
} |