📄 global.h
字号:
#define FAR _far
#define NEAR
#define PASCAL _pascal
#define FASTCALL _fastcall
#define VOID void
#define BOOL int
typedef unsigned char _far *ADDRESS ;
typedef unsigned long LONG ;
typedef unsigned short WORD ;
typedef unsigned char BYTE ;
typedef unsigned long ULONG ;
typedef unsigned short USHORT ;
typedef unsigned char UCHAR ;
typedef unsigned short UINT ;
typedef unsigned long *PULONG ;
typedef union {
struct {
USHORT GeneralConfiguration; /* 00 */
USHORT NumberOfCylinders; /* 02 */
USHORT Reserved1; /* 04 */
USHORT NumberOfHeads; /* 06 */
USHORT UnformattedBytesPerTrack; /* 08 */
USHORT UnformattedBytesPerSector; /* 0A */
USHORT SectorsPerTrack; /* 0C */
USHORT VendorUnique1[3]; /* 0E */
USHORT SerialNumber[10]; /* 14 */
USHORT BufferType; /* 28 */
USHORT BufferSectorSize; /* 2A */
USHORT NumberOfEccBytes; /* 2C */
USHORT FirmwareRevision[4]; /* 2E */
UCHAR ModelNumber[40]; /* 36 */
UCHAR MaximumBlockTransfer; /* 5E */
UCHAR VendorUnique2; /* 5F */
USHORT DoubleWordIo; /* 60 */
USHORT Capabilities; /* 62 49*/
USHORT Reseved8; /* 64 */
UCHAR VendorUnique3; /* 66 51*/
UCHAR PioCycleTimingMode; /* 67 */
UCHAR VendorUnique4; /* 68 52 */
UCHAR DmaCycleTimingMode; /* 69 */
USHORT TranslationFieldsValid; /* 6A 53*/
USHORT NumberOfCurrentCylinders; /* 6C 54*/
USHORT NumberOfCurrentHeads; /* 6E 55*/
USHORT CurrentSectorsPerTrack; /* 70 56*/
ULONG CurrentSectorCapacity; /* 72 57*/
USHORT SectorsPerInterrupt; /* 59 Current sectores in Multiple*/
ULONG MaxLBA; /* 60 Number of addressable sector*/
USHORT SingleWordDMAMode; /* 62 Single Word DMA Mode */
USHORT MultiWordDMAMode; /* 63 MultiWord DMA Mode */
USHORT PIOModesList; /* 64 Advanced PIO Mode Supported */
USHORT MinDMACycleTime; /* 65 Minimum DMA Cycle Time */
USHORT RecommDMACycleTime; /* 66 Recommended DMA Cycle Time */
USHORT PIOTimingWOIORDY; /* 67 PIO Cycle Time Without IORDY*/
USHORT PIOModeTiming; /* 68 PIO Cycle Time With IORDY */
USHORT reseved6[14]; /* 69 */
USHORT Smart; /* 82 bit 0 for smart support*/
USHORT reseved7[4]; /* 83 */
USHORT UtralDmaMode; /* 88 */
} IdentifyInfo;
int info[256];
} buffer;
#define TRUE 1
#define FALSE 0
#define NR_ATTRIBUTES 30
#define MAX_DEV 4
typedef union {
struct {
BYTE lba[6];
} LBA;
struct {
long cap_low;
long cap_high;
} cap;
} Capacity;
typedef struct _device{
WORD IoPort;
WORD ContrlPort;
BOOL ISATAPI;
BOOL Status;
BOOL SMART;
BOOL PASS;
BYTE Unit;
BOOL BigLBA;
BYTE BestPIO;
BYTE BestDMA;
BYTE BestUDMA;
LONG cap;
Capacity m;
BYTE Name[40];
BYTE FirmwareRevision[9];
char *channelname;
}Device,*pDevice;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -