Files
l2/test_write_file.sl
2026-01-03 09:04:50 +00:00

18 lines
321 B
Plaintext

import stdlib/stdlib.sl
import stdlib/io.sl
: main
"/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
puti cr
0
exit
end
"write failed errno=" puts
puti cr
exit
;