--- truecrypt/boot/windows/bootconsoleio.cpp 2018/04/24 16:49:04 1.1.1.1 +++ truecrypt/boot/windows/bootconsoleio.cpp 2018/04/24 16:50:06 1.1.1.2 @@ -231,6 +231,22 @@ bool IsKeyboardCharAvailable () } +void ClearBiosKeystrokeBuffer () +{ + __asm + { + push es + xor ax, ax + mov es, ax + mov di, 0x41e + mov cx, 32 + cld + rep stosb + pop es + } +} + + bool IsPrintable (char c) { return c >= ' ' && c <= '~';