• Timothy E Baldwin's avatar
    Disable interrupts whilst checking for keys in OS_ReadC / INKEY · 9d5ab8de
    Timothy E Baldwin authored
    This ensures that on exit from OS_ReadC / INKEY either
    a character is returned or the input buffer is empty,
    and that Portable_Idle is only called when the input
    buffer is empty.
    This avoids a 10 microsecond delay and relying on timer
    interrupts to make progress and allows reliably waiting
    for input and another event by:
    Disable Interrupts
      Call INKEY(0), exit loop if key pressed
      Check other event, exit loop if key pressed
      Call Portable_Idle
    Version 6.42. Tagged as 'Kernel-6_42'
VersionASM 846 Bytes