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