A proper way to handle serial port i/o under gforth
running on 386 compatibles with Linux is now available.
The code, serial.fs, which is the same as kForth's
serial.4th, relies on the support file, syscalls386.fs,
which provide a way of making Linux system calls from
gforth using the $80 interrupt. Provided in syscalls386.fs
are the primitive "open", "close", "read", "write", "lseek",
and "ioctl" words implemented as system calls. These
words are the basis for communicating with other device
drivers as well. The source files may be obtained from
ftp://ccreweb.org/software/gforth/
There is a simple terminal program (also another kForth
program), terminal.fs, to illustrate the use of serial.fs.
You will need the following to run terminal.fs under gforth:
strings.fs
ansi.fs
syscalls386.fs
serial.fs
terminal.fs
--
Krishna Myneni