Annotation of truecrypt/boot/windows/platform.h, revision 1.1.1.1

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_Platform
                     10: #define TC_HEADER_Boot_Platform
                     11: 
                     12: #pragma warning ( disable : 4769 )
                     13: 
                     14: #include "TCdefs.h"
                     15: 
                     16: #include <memory.h>
                     17: 
                     18: #ifndef DEBUG
                     19: #      pragma intrinsic (memcpy)
                     20: #      pragma intrinsic (memset)
                     21: #endif
                     22: 
                     23: typedef int bool;
                     24: #define false 0
                     25: #define true 1
                     26: 
                     27: #define nullptr 0
                     28: 
                     29: typedef UINT64_STRUCT uint64;
                     30: 
                     31: #define array_capacity(arr) (sizeof (arr) / sizeof ((arr)[0]))
                     32: 
                     33: #define TC_TO_STRING2(n) #n
                     34: #define TC_TO_STRING(n) TC_TO_STRING2(n)
                     35: 
                     36: 
                     37: #define TC_X86_CARRY_FLAG 0x1
                     38: 
                     39: #define TC_ASM_EMIT(A,B) __asm _emit 0x##A __asm _emit 0x##B
                     40: #define TC_ASM_EMIT3(A,B,C) __asm _emit 0x##A __asm _emit 0x##B __asm _emit 0x##C
                     41: #define TC_ASM_EMIT4(A,B,C,D) __asm _emit 0x##A __asm _emit 0x##B __asm _emit 0x##C __asm _emit 0x##D 
                     42: 
                     43: 
                     44: #pragma pack(1)
                     45: 
                     46: struct Registers
                     47: {
                     48:        uint16 Flags;
                     49: 
                     50:        union
                     51:        {
                     52:                uint32 EAX;
                     53:                struct { uint16 AX; uint16 EAXH; };
                     54:        };
                     55: 
                     56:        union
                     57:        {
                     58:                uint32 EBX;
                     59:                struct { uint16 BX; uint16 EBXH; };
                     60:        };
                     61: 
                     62:        union
                     63:        {
                     64:                uint32 ECX;
                     65:                struct { uint16 CX; uint16 ECXH; };
                     66:        };
                     67: 
                     68:        union
                     69:        {
                     70:                uint32 EDX;
                     71:                struct { uint16 DX; uint16 EDXH; };
                     72:        };
                     73: 
                     74:        uint16 DI;
                     75:        uint16 SI;
                     76:        uint16 DS;
                     77:        uint16 ES;
                     78:        uint16 SS;
                     79: };
                     80: 
                     81: #pragma pack()
                     82: 
                     83: 
                     84: uint64 operator+ (const uint64 &a, const uint64 &b);
                     85: uint64 operator+ (const uint64 &a, uint32 b);
                     86: uint64 operator- (const uint64 &a, const uint64 &b);
                     87: uint64 operator- (const uint64 &a, uint32 b);
                     88: uint64 operator>> (const uint64 &a, int shiftCount);
                     89: uint64 operator<< (const uint64 &a, int shiftCount);
                     90: uint64 &operator++ (uint64 &a);
                     91: bool operator== (const uint64 &a, const uint64 &b);
                     92: bool operator> (const uint64 &a, const uint64 &b);
                     93: bool operator< (const uint64 &a, const uint64 &b);
                     94: bool operator>= (const uint64 &a, const uint64 &b);
                     95: bool operator<= (const uint64 &a, const uint64 &b);
                     96: 
                     97: void CopyMemory (byte *source, uint16 destSegment, uint16 destOffset, uint16 blockSize);
                     98: void CopyMemory (uint16 sourceSegment, uint16 sourceOffset, byte *destination, uint16 blockSize);
                     99: uint32 GetLinearAddress (uint16 segment, uint16 offset);
                    100: void Jump (uint16 jumpSegment, uint16 jumpOffset, byte dlRegister);
                    101: bool TestInt64 ();
                    102: 
                    103: #endif // TC_HEADER_Boot_Platform

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.