17 #define DOSVERSION 0x0330;
18 #define MAX_DOS_DRIVES 26
20 #define pointer(a,b) (BYTE*)(((WORD) a << 16) | b)
21 #define segment(a) ((DWORD)a >> 16)
22 #define offset(a) ((DWORD)a & 0xffff)
24 #define setword(a,b) *(BYTE*)(a) = b & 0xff; \
25 *((BYTE*)(a + 1)) = (b>>8) & 0xff;
27 #define setdword(a,b) *(BYTE*)a = b & 0xff; \
28 *((BYTE*)a + 1) = (b>>8) & 0xff; \
29 *((BYTE*)a + 2) = (b>>16) & 0xff; \
30 *((BYTE*)a + 3) = (b>>24) & 0xff;
32 #define getword(a) (WORD) *(BYTE*)a + \
33 (*((BYTE*)a + 1) << 8)
35 #define getdword(a) (DWORD) (*(BYTE*)a + \
36 (*((BYTE*)a + 1) << 8) + \
37 (*((BYTE*)a + 2) << 16) + \
38 (*((BYTE*)a + 3) << 24))
40 /* dos file attributes */
42 #define FA_NORMAL 0x00 /* Normal file, no attributes */
43 #define FA_RDONLY 0x01 /* Read only attribute */
44 #define FA_HIDDEN 0x02 /* Hidden file */
45 #define FA_SYSTEM 0x04 /* System file */
46 #define FA_LABEL 0x08 /* Volume label */
47 #define FA_DIREC 0x10 /* Directory */
48 #define FA_ARCH 0x20 /* Archive */
50 /* extended error codes */
53 #define InvalidFunction 0x01
54 #define FileNotFound 0x02
55 #define PathNotFound 0x03
56 #define AccessDenied 0x05
57 #define InvalidHandle 0x06
58 #define MCBDestroyed 0x07
59 #define OutOfMemory 0x08
60 #define MCBInvalid 0x09
61 #define DataInvalid 0x0d
62 #define InvalidDrive 0x0f
63 #define CanNotRemoveCwd 0x10
64 #define NotSameDevice 0x11
65 #define NoMoreFiles 0x12
66 #define WriteProtected 0x13
67 #define UnknownUnit 0x14
68 #define DriveNotReady 0x15
69 #define UnknownCommand 0x16
71 #define BadRqLength 0x18
72 #define SeekError 0x19
73 #define UnknownMedia 0x1a
74 #define SectorNotFound 0x1b
75 #define OutOfPaper 0x1c
76 #define WriteFault 0x1d
77 #define ReadFault 0x1e
78 #define GeneralFailure 0x1f
79 #define ShareViolation 0x20
80 #define LockViolation 0x21
82 #define NoNetwork 0x49
83 #define FileExists 0x50
84 #define CanNotMakeDir 0x52
88 #define EC_Temporary 0x02
89 #define EC_AccessDenied 0x03
90 #define EC_AppError 0x04
91 #define EC_SystemFailure 0x06
92 #define EC_NotFound 0x08
93 #define EC_MediaError 0x0b
94 #define EC_Exists 0x0c
95 #define EC_Unknown 0x0d
97 /* Suggested actions */
100 #define SA_Abort 0x04
101 #define SA_Ignore 0x06
102 #define SA_Ask4Retry 0x07
106 #define EL_Unknown 0x01
108 #define EL_Network 0x03
109 #define EL_Memory 0x05
111 #endif /* __MSDOS_H */