AH = 05h: Write Character to Keyboard Input Buffer

This function writes the scancode and character code in CX to the keyboard input buffer. The scancode and character code are placed at the end of the buffer. The function will return an error status if the buffer is full.

Note: The condition for return from a call to Int 16h, services {13h, 14h} is a timeout or a particular type of change in the BIOS RAM variable INTLST "([INTLST] AND 11h) # 0)". Keyboard make interrupts and successful calls to {Int 16h, Fcn 05h} set Bit1, while UART interrupts set Bit4. Applications that push keys directly into the keybuffer (without using Int 16h, function 05h), should set Bit1 of INTLST to avoid erratic key execution timing for applications using the Int 16h, Fcn's 13h, 14h.