Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Flushing the one-character BDOS console input buffer

2 views
Skip to first unread message

Keith Petersen

unread,
Oct 31, 1986, 12:12:58 PM10/31/86
to
Russ, this works for my programs that use function 6 for portability.
This will flush the BDOS buffer if there are any characters waiting.

MVI C,CONSTAT ;BDOS console status function
CALL BDOS
ORA A ;check for character pending
JZ SKIPIT ;zero means nothing there
MVI C,CONIN ;BDOS console input function
CALL BDOS ;go get it
;
SKIPIT: (do your next task here, ignoring any character gathered above)

--Keith

penc...@xerox.arpa

unread,
Oct 31, 1986, 2:33:53 PM10/31/86
to
Your solution is the one I am in the process of trying, however it has
the unsightly side effect of displaying the character if one was
waiting... not good for the type of single character input I'm doing.
My thoughts are to get the character and print a BS,space,BS immediately
to cover it up.

Any thoughts?

Russ

0 new messages