On 2/20/2013 12:51 PM, rtk wrote:
Presently, I have words in Forth for reading a character from the port and writing a character to the port. What I'm curious to know is if there is a way to tell that there is a character in the port waiting to be read but without blocking waiting for one as the read routine does presently.
Yes. If you re-base your implementation on today's ADTPro code, you will notice that it changed from blocking to non-blocking so as to implement timeouts. That change went into version 1.2.6 last October. You set a timeout value (maybe zero), and the accumulator and carry are set based on a character being available (clear carry) or unavailable (set carry).