[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Checking the IIgs serial port to see if a character is waiting
On Feb 20, 11:35 am, David Schmidt <schmi...@my-deja.com> wrote:
> 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).
Thanks for the tip! I'll take a look at the new ADTPro code.