Rev 711 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 711 | Rev 727 | ||
---|---|---|---|
Line 97... | Line 97... | ||
97 | void _stdcall write_text(int x,int y,int color,char* text,int len); |
97 | void _stdcall write_text(int x,int y,int color,char* text,int len); |
98 | 98 | ||
Line 99... | Line 99... | ||
99 | #endif |
99 | #endif |
Line -... | Line 100... | ||
- | 100 | ||
- | 101 | #pragma pack(push, 1) |
|
- | 102 | typedef struct |
|
- | 103 | { |
|
- | 104 | char sec; |
|
- | 105 | char min; |
|
- | 106 | char hour; |
|
- | 107 | char rsv; |
|
- | 108 | }detime_t; |
|
- | 109 | #pragma pack(pop) |
|
- | 110 | ||
- | 111 | #pragma pack(push, 1) |
|
- | 112 | typedef struct |
|
- | 113 | { |
|
- | 114 | char day; |
|
- | 115 | char month; |
|
- | 116 | short year; |
|
- | 117 | }dedate_t; |
|
- | 118 | #pragma pack(pop) |
|
- | 119 | ||
100 | 120 | #pragma pack(push, 1) |
|
101 | typedef struct |
121 | typedef struct |
102 | { unsigned attr; |
122 | { unsigned attr; |
- | 123 | unsigned flags; |
|
- | 124 | union |
|
- | 125 | { |
|
103 | unsigned flags; |
126 | detime_t ctime; |
- | 127 | unsigned cr_time; |
|
- | 128 | }; |
|
- | 129 | union |
|
- | 130 | { |
|
104 | unsigned cr_time; |
131 | dedate_t cdate; |
- | 132 | unsigned cr_date; |
|
- | 133 | }; |
|
- | 134 | union |
|
- | 135 | { |
|
105 | unsigned cr_date; |
136 | detime_t atime; |
- | 137 | unsigned acc_time; |
|
- | 138 | }; |
|
- | 139 | union |
|
- | 140 | { |
|
106 | unsigned acc_time; |
141 | dedate_t adate; |
- | 142 | unsigned acc_date; |
|
- | 143 | }; |
|
- | 144 | union |
|
- | 145 | { |
|
107 | unsigned acc_date; |
146 | detime_t mtime; |
- | 147 | unsigned mod_time; |
|
- | 148 | }; |
|
- | 149 | union |
|
- | 150 | { |
|
108 | unsigned mod_time; |
151 | dedate_t mdate; |
- | 152 | unsigned mod_date; |
|
109 | unsigned mod_date; |
153 | }; |
110 | unsigned size; |
154 | unsigned size; |
111 | unsigned size_high; |
155 | unsigned size_high; |
- | 156 | } FILEINFO; |
|
Line 112... | Line 157... | ||
112 | } FILEINFO; |
157 | #pragma pack(pop) |
113 | 158 | ||
114 | 159 | ||
Line 115... | Line 160... | ||
115 | unsigned init_heap(void); |
160 | unsigned init_heap(void); |
- | 161 | void *user_alloc(unsigned size); |
|
116 | void *user_alloc(unsigned size); |
162 | unsigned user_free(void *); |
117 | unsigned user_free(void *); |
163 | |
118 | 164 | int create_file(const char *name); |
|
Line 119... | Line 165... | ||
119 | int create_file(const char *name); |
165 | int set_file_size(const char *name, unsigned size); |
120 | int get_fileinfo(const char *name,FILEINFO* pinfo); |
166 | int get_fileinfo(const char *name,FILEINFO *info); |
Line 157... | Line 203... | ||
157 | "add esp, 28" \ |
203 | "add esp, 28" \ |
158 | parm [EAX] value [EAX] \ |
204 | parm [EAX] value [EAX] \ |
159 | modify [ EBX ]; |
205 | modify [ EBX ]; |
160 | 206 | ||
Line -... | Line 207... | ||
- | 207 | #pragma aux set_file_size = \ |
|
- | 208 | "push 0" \ |
|
- | 209 | "push 0" \ |
|
- | 210 | "mov [esp+1], eax" \ |
|
- | 211 | "push 0" \ |
|
- | 212 | "push 0" \ |
|
- | 213 | "push 0" \ |
|
- | 214 | "push ebx" \ |
|
- | 215 | "push 4" \ |
|
- | 216 | "mov ebx, esp" \ |
|
- | 217 | "mov eax, 70" \ |
|
- | 218 | "int 0x40" \ |
|
- | 219 | "add esp, 28" \ |
|
- | 220 | parm [EAX] [EBX] value [EAX] \ |
|
- | 221 | modify [ EBX ]; |
|
- | 222 | ||
161 | #pragma aux get_fileinfo = \ |
223 | #pragma aux get_fileinfo = \ |
162 | "push 0" \ |
224 | "push 0" \ |
163 | "push 0" \ |
225 | "push 0" \ |
164 | "mov [esp+1], eax" \ |
226 | "mov [esp+1], eax" \ |
165 | "push ebx" \ |
227 | "push ebx" \ |