--- truecrypt/boot/windows/bootconsoleio.cpp 2018/04/24 16:49:04 1.1 +++ truecrypt/boot/windows/bootconsoleio.cpp 2018/04/24 16:52:03 1.1.1.3 @@ -28,7 +28,7 @@ void EnableScreenOutput () void PrintChar (char c) { -#ifdef TC_TRACING_ENABLED +#ifdef TC_BOOT_TRACING_ENABLED WriteDebugPort (c); #endif @@ -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 <= '~';