Bulletin number: 352 Products affected: D700E Description: Using keyboard interruption in TDS3 EXEs Component: Date: Fri Oct 26 15:35:27 BST 1990 ----- ISERVER does not have faciltities for detecting unsolicited keyboard input. All keyboard input must be explicitly polled or demanded from the transputer using one of the library procedures so.pollkey or so.getkey. The keyboard is polled by the code of the TDS while supporting an EXE. Unfortunately there are a couple of coding errors in this part of the TDS which make it not work quite as flexibly as it should. The best workaround is to do explicit keyboard polling from the EXE on the transputer. Two solutions are presented below: ---------------------------------- Solution 1: Not using ALT at all. SEQ running := TRUE WHILE running SEQ ... write something to screen --{{{ poll the keyboard BYTE bkey, bres: SEQ so.pollkey (from.isv, to.isv, bkey, bres) running := bres <> spr.ok --}}} ---------------------------------- Solution 2: Taking advantage of forced poll in TDS after any SP transaction SEQ running := TRUE WHILE running PRI ALT keyboard ? key running := FALSE TRUE & SKIP SEQ ... write something to screen (using channel screen) so.write.string(from.isv,to.isv,"") -- Forces TDS to poll keyboard ---------------------------------- The algorithm determining when a keyboard poll is done inside the TDS is too complex to state in full here, but it may be useful to know that in the absence of any activity on the server channels it is kicked by the clock at intervals which decay slowly from one sixteenth of a second to half a second. It is also done after any explicit server transaction or any transaction on TDS filer channels which need to access the host. It is NOT done (bug?) after outputs on the TDS EXE parameter channel screen and a continuous stream of outputs on this channel can mean the timer branch of the ALT will never be taken! Note that all this applies to set.abort.key testing on kernel channels also. When a poll occurs the key is immediately output to the EXE on the channel keyboard. See also Bulletin 0351.