|
|
1.1 ! root 1: /* ! 2: Copyright (c) 2008 TrueCrypt Foundation. All rights reserved. ! 3: ! 4: Governed by the TrueCrypt License 2.4 the full text of which is contained ! 5: in the file License.txt included in TrueCrypt binary and source code ! 6: distribution packages. ! 7: */ ! 8: ! 9: #ifndef TC_HEADER_Boot_BootConsoleIo ! 10: #define TC_HEADER_Boot_BootConsoleIo ! 11: ! 12: #include "Platform.h" ! 13: ! 14: #define TC_DEBUG_PORT 0 ! 15: ! 16: #define TC_BIOS_KEY_ESC 1 ! 17: #define TC_BIOS_KEY_BACKSPACE 14 ! 18: #define TC_BIOS_KEY_ENTER 28 ! 19: #define TC_BIOS_KEY_F1 0x3b ! 20: #define TC_BIOS_KEY_F2 0x3c ! 21: #define TC_BIOS_KEY_F3 0x3d ! 22: #define TC_BIOS_KEY_F4 0x3e ! 23: #define TC_BIOS_KEY_F5 0x3f ! 24: #define TC_BIOS_KEY_F6 0x40 ! 25: #define TC_BIOS_KEY_F7 0x41 ! 26: #define TC_BIOS_KEY_F8 0x42 ! 27: #define TC_BIOS_KEY_F9 0x43 ! 28: #define TC_BIOS_KEY_F10 0x44 ! 29: ! 30: #define TC_BIOS_SHIFTMASK_CAPSLOCK (1 << 6) ! 31: #define TC_BIOS_SHIFTMASK_LSHIFT (1 << 1) ! 32: #define TC_BIOS_SHIFTMASK_RSHIFT (1 << 0) ! 33: ! 34: #define TC_BIOS_CHAR_BACKSPACE 8 ! 35: ! 36: #define TC_BIOS_MAX_CHARS_PER_LINE 80 ! 37: ! 38: void Beep (); ! 39: void ClearScreen (); ! 40: void DisableScreenOutput (); ! 41: void EnableScreenOutput (); ! 42: byte GetKeyboardChar (byte *scanCode = nullptr); ! 43: int GetString (char *buffer, size_t bufferSize); ! 44: void InitScreen (); ! 45: bool IsKeyboardCharAvailable (); ! 46: bool IsLbaSupported (byte drive); ! 47: bool IsPrintable (char c); ! 48: void Print (const char *str); ! 49: void Print (uint32 number); ! 50: void Print (const uint64 &number); ! 51: void PrintBackspace (); ! 52: void PrintChar (char c); ! 53: void PrintCharAtCusor (char c); ! 54: void PrintEndl (); ! 55: void PrintEndl (int cnt); ! 56: void PrintRepeatedChar (char c, int n); ! 57: void PrintError (const char *message, bool beep = true, bool newLine = true); ! 58: void PrintHex (byte b); ! 59: void PrintHex (uint16 data); ! 60: void PrintHex (uint32 data); ! 61: void PrintHex (const uint64 &data); ! 62: void SendToDebugPort (byte dataByte); ! 63: ! 64: #endif // TC_HEADER_Boot_BootConsoleIo
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.