Replies: 3 comments 3 replies
-
There are lots of examples for file handling I've left in discussions. Here is another. Device number is presumed to be DEVICE, so you only need file number and secondary address for OPEN. 6 DEVICE sets device number for plotter. require io
: less \ less filename
parse-name ?dup if
else drop s" less"
then
8 8 open ioabort
clrchn
8 chkin ioabort
chrin chrin 2drop page \ load address, clr screen
begin more chrin emit
readst until
clrchn 8 close
; |
Beta Was this translation helpful? Give feedback.
-
Also, EMIT works the same as CHROUT even when output is redirected. |
Beta Was this translation helpful? Give feedback.
-
This is my best untested guess. BASIC open 1,6,0
print#1, "hello!"
CLOSE 1 FORTH include io
: hello
6 device
0 0 1 0 open ioabort \ no filename, channel 1, sa 0
clrchn
s" hello!"
1 chkout ioabort type cr
clrchn
1 close ; Edit: oops ioabort |
Beta Was this translation helpful? Give feedback.
-
I'm currently writing a 1520 interface library for DurexForth, and am currently struggling with the provided low-level device I/O routines. Any guidance is welcome and greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions