[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Programming Question



Dave Althoff <dalloff@freenet.columbus.oh.us> wrote:

> Once GET finds a keypress, it passes the keypress to the specified
> variable.  But then, GET clears the keyboard strobe for you, so it is not
> necessary to clear it again!  In fact, if you do clear it again, there is
> an extremely remote chance that you will actually lose the next keypress,
> if that keypress comes between the time the GET routine clears the
> keyboard strobe, and the time that you clear it again with the POKE statement!

It is much more likely on a IIgs, if you have keyboard buffering
enabled.  You might have as many as 16 characters waiting to be
processed when you detect the first one, so the POKE -16368 would
clobber every second character.

I'm not sure how the IIc keyboard buffering works, exactly, but it might
suffer from the same problem.

-- 
David Empson
dempson@actrix.gen.nz
Snail mail: P.O. Box 27-103, Wellington, New Zealand