49h KB$INIT initialise keyboard interrupts
Input - none -
Output - none -
Description

Initialises keyboard interrupts.

The following tasks are carried out by this routine:

  1. The keyboard buffer is flushed of any characters.
  2. The keyboard interrupt rate KBW_TDEL is set to $B3DD.
  3. The initial delay and key repeat rate KBB_DLAY, KBB_REPT are set to 14 and 0 respectively.
  4. The keyboard status flags, in KBB_STAT are set to 0, ie KY_SHFT, KY_CPNM, KY_CAPS and KY_NUMB are cleared.
  5. The length of the key click, KBB_CLIK, is set to 1.
  6. The interrupts are enabled: FREE RUNNING COUNTER is set to 0, TIMER 1 OUTPUT COMPARE REGISTER 1 is set to $B3DD, bit 3 of TIMER 1 CONTROL STATUS REGISTER 1 is set, to enable the interrupt, and the I mask bit of the condition code register is cleared.
Example
example
Errors - none -