updates to io.sl

This commit is contained in:
IgorCielniak
2025-12-19 20:23:26 +01:00
parent 8b5ccf4edc
commit 002b36f89c
40 changed files with 152 additions and 9091 deletions

View File

@@ -2,18 +2,16 @@ import stdlib/stdlib.sl
import stdlib/io.sl
: main
"hello from write_file test\n" # push buf (len addr)
swap # -> (addr len) = buf_ptr buf_len
"/tmp/l2_test_write.txt" # push path (len addr)
swap # -> (addr len) = path_ptr path_len
"/tmp/l2_test_write.txt" # push path (addr len)
"hello from write_file test\n" # push buf (addr len)
write_file
dup 0 > if
"wrote bytes: " puts
puts
puti cr
0
exit
then
"write failed errno=" puts
puts
puti cr
exit
;
;