4Ah KB$STAT set keyboard state
Input B register - keyboard state byte.
Output - none -
Description

Sets the state of the keyboard. The B register is stored into keyboard status byte KBB_STAT.

  • if bit 0 of B register is set then lower case,
  • if bit 0 of B register is clear then upper case,
  • if bit 6 of B register is set then numeric lock,
  • if bit 6 of B register is clear then not in numeric lock.

Note that some other bits of KBB_STAT are used as flags and should not be affected. Hence KBB_STAT should be read and bits 0 and 6 either cleared or set before calling KB$STAT, see example below.

The state of the cursor (block or line) is determined by the new keyboard status and stored in DPB_CUST. A line cursor is for 'shift' mode, otherwise it's a block cursor. The new cursor type is immediately refreshed on the display.

Example
        LDAB    KBB_STAT       ;GET CURRENT KEYBOARD STATUS
        ORAB    #40h           ;NUMERIC LOCK. LINE CURSOR.
        OS      KB$STAT         ;SET KEYBOARD STATUS
Errors - none -