User guide

134 CHAPTER 5. CONSOLE INPUT AND OUTPUT
5.2.2 Exclusive Input
The console handler can be set to exclusive input mode by the call:
sendpkt(notinuse, console_task, Action_exclusiveinput,
?, ?,
TRUE)
While in exclusiveinput mod e normal input line editing by t he console handler is
suspended and client tasks have direct access to the keyboard input device on a first
come first serve d basis by the call:
ch := sendpkt(notinuse, console_task, Action_exclusiverdch,
?, ?)
Sending an exclusiveinput request with argument FALSE returns the console handler
to it s normal line editing mode and causes all outstanding exclusiverdch requests to
return end-of-file characters (-1) to their client tasks.
5.2.3 Direct access to the screen and keyboard
Although it is not recommended, client task can send read (Action ttyin) and write
(Action
ttyout) requests to keyboard and screen devices. These will be serviced in a
first come first served basis and since the console handler is maki ng such requ es ts you
can expect strange results.
Finally the functions sardch and sawrch provide direc t access to the keyboard and
screen but are mainly only used for system debugging particularly when the console
handler is not runni n g. Note that sawrch is the character output function used by
sawritef whose output may be merged with output from the console handler.
The following test programs can be used to demonstate some of the console handlers
features.
Cintpos/posprogs/test/inputtst.b
Cintpos/posprogs/test/sardchtst.b
Cintpos/posprogs/test/devrdchtst.b
Cintpos/posprogs/test/xintst.b