en:docs:bios:api:int16:01

Note: This IBM PC BIOS API call is for DOS/Win16 personality only. Use Family API for portability.

Note: osFree Macro Library provides macros for most of functions

2022/03/13 05:41 · prokushev · 0 Comments

Int 16H, AH=01H

Version

IBM 5150 and higher

Brief

Peek char from keyboard buffer

Family API

Input

  • AH = 01h

Return

  • ZF set if no keystroke available
  • ZF clear if keystroke available
    • AH = BIOS scan code
    • AL = ASCII character

Macro

INCLUDE BIOS.INC
 
@CharPeek

Notes

  • if a keystroke is present, it is not removed from the keyboard buffer; however, any extended keystrokes which are not compatible with 83/84-key keyboards are removed by IBM and most fully-compatible BIOSes in the process of checking whether a non-extended keystroke is available
  • some (older) clone BIOSes do not discard extended keystrokes and manage function AH=00h and AH=10h the same
  • the K3PLUS v6.00+ INT 16 BIOS replacement doesn't discard extended keystrokes (same as with functions 10h and 20h), but will always translate prefix E0h to 00h. This allows old programs to use extended keystrokes and should not cause compatibility problems

Note