diff options
author | Naren Ratan <narenratan@gmail.com> | 2019-11-19 00:20:31 +0000 |
---|---|---|
committer | Naren Ratan <narenratan@gmail.com> | 2019-11-19 00:20:31 +0000 |
commit | 032204d951e191771ce6cd99ecf5118ee1e1dce5 (patch) | |
tree | b8e1ee590a753a0da3ac2c32bc75d230e11e4e8b /examples | |
parent | cb51cf13682476f5afe91c638bef7e50c232d117 (diff) | |
download | jonesforth_arm64_apl-032204d951e191771ce6cd99ecf5118ee1e1dce5.tar.gz |
Add file_io.f example
Diffstat (limited to 'examples')
-rw-r--r-- | examples/file_io.f | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/examples/file_io.f b/examples/file_io.f new file mode 100644 index 0000000..b9cce38 --- /dev/null +++ b/examples/file_io.f @@ -0,0 +1,10 @@ +/ Example file IO using syscalls / + +/ Open a file read only with open ⍐ syscall / +0 H" input.txt" ↓ ⍐ + +/ Read one byte with read ⍇ syscall / +↑ 1 H ⌽ ⍇ + +/ Close file with close ⍗ syscall / +↓ ⍗ |