added io
This commit is contained in:
13
test_read_stdin.sl
Normal file
13
test_read_stdin.sl
Normal file
@@ -0,0 +1,13 @@
|
||||
import stdlib/stdlib.sl
|
||||
import stdlib/io.sl
|
||||
|
||||
: main
|
||||
1024
|
||||
read_stdin # returns (len addr)
|
||||
dup 0 > if
|
||||
write_buf
|
||||
0 exit
|
||||
then
|
||||
"read_stdin failed" puts
|
||||
exit
|
||||
;
|
||||
Reference in New Issue
Block a user