Subversion Repositories Kolibri OS

Rev

Rev 704 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 704 Rev 711
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
typedef struct
-
 
102
{   unsigned    attr;
-
 
103
    unsigned    flags;
-
 
104
    unsigned    cr_time;
-
 
105
    unsigned    cr_date;
-
 
106
    unsigned    acc_time;
-
 
107
    unsigned    acc_date;
-
 
108
    unsigned    mod_time;
-
 
109
    unsigned    mod_date;
-
 
110
    unsigned    size;
-
 
111
    unsigned    size_high; 
-
 
112
} FILEINFO;
-
 
113
 
100
 
114
 
-
 
115
unsigned init_heap(void);
-
 
116
void *user_alloc(unsigned size);
-
 
117
unsigned user_free(void *);
-
 
118
 
-
 
119
int create_file(const char *name);
-
 
120
int get_fileinfo(const char *name,FILEINFO* pinfo);
-
 
121
int read_file (const char *name,void *buff, unsigned offset, unsigned count,unsigned *reads);
Line 101... Line 122...
101
unsigned init_heap(void);
122
int write_file(const char *name,const void *buff,unsigned offset,unsigned count,unsigned *writes);
102
 
123
 
103
#pragma aux init_heap =   \
124
#pragma aux init_heap =   \
104
            "mov EAX, 68" \
125
            "mov EAX, 68" \
105
            "mov EBX, 11" \
126
            "mov EBX, 11" \
106
            "int 0x40"    \
127
            "int 0x40"    \
Line 107... Line -...
107
            value [EAX] \
-
 
108
            modify [ EBX ];
-
 
109
 
-
 
110
void *user_alloc(unsigned size);
-
 
111
 
128
            value [EAX] \
112
void *user_alloc(unsigned size);
129
            modify [ EBX ];
113
 
130
 
114
#pragma aux user_alloc = \
131
#pragma aux user_alloc = \
115
            "mov EAX, 68" \
132
            "mov EAX, 68" \
116
            "mov EBX, 12" \
133
            "mov EBX, 12" \
Line 117... Line -...
117
            "int 0x40"    \
-
 
118
            parm [ ECX ] value [EAX] \
-
 
119
            modify [ EBX ];
134
            "int 0x40"    \
120
 
135
            parm [ ECX ] value [EAX] \
121
unsigned user_free(void *);
136
            modify [ EBX ];
122
 
137
 
123
#pragma aux user_free =   \
138
#pragma aux user_free =   \
124
            "mov EAX, 68" \
139
            "mov EAX, 68" \
Line -... Line 140...
-
 
140
            "mov EBX, 13" \
-
 
141
            "int 0x40"    \
-
 
142
            parm [ ECX ] value [EAX] \
-
 
143
            modify [ EBX ];
-
 
144
 
-
 
145
#pragma aux create_file  = \
-
 
146
            "push 0"           \
-
 
147
            "push 0"           \ 
-
 
148
            "mov [esp+1], eax" \
-
 
149
            "push 0"           \
-
 
150
            "push 0"           \
-
 
151
            "push 0"           \
-
 
152
            "push 0"           \
-
 
153
            "push 2"           \
-
 
154
            "mov ebx, esp"     \  
-
 
155
            "mov eax, 70"      \
-
 
156
            "int 0x40"         \
-
 
157
            "add esp, 28"      \      
-
 
158
            parm [EAX] value [EAX] \
-
 
159
            modify [ EBX ];
-
 
160
 
-
 
161
#pragma aux get_fileinfo  = \
-
 
162
            "push 0"           \
-
 
163
            "push 0"           \ 
-
 
164
            "mov [esp+1], eax" \
-
 
165
            "push ebx"         \
-
 
166
            "push 0"           \
-
 
167
            "push 0"           \
-
 
168
            "push 0"           \
-
 
169
            "push 5"           \
-
 
170
            "mov ebx, esp"     \  
-
 
171
            "mov eax, 70"      \
-
 
172
            "int 0x40"         \
-
 
173
            "add esp, 28"      \      
-
 
174
            parm [EAX] [ebx] value [EAX] \
-
 
175
            modify [ EBX ];
-
 
176
 
-
 
177
#pragma aux read_file  = \
-
 
178
            "push 0"           \
-
 
179
            "push 0"           \ 
-
 
180
            "mov [esp+1], eax" \
-
 
181
            "push ebx"         \
-
 
182
            "push edx"         \
-
 
183
            "push 0"           \
-
 
184
            "push ecx"         \
-
 
185
            "push 0"           \
-
 
186
            "mov ebx, esp"     \  
-
 
187
            "mov eax, 70"      \
-
 
188
            "int 0x40"         \
-
 
189
            "test esi, esi"    \
-
 
190
            "jz skip"          \
-
 
191
            "mov [esi], ebx"   \
-
 
192
     "skip:"                   \       
-
 
193
            "add esp, 28"      \      
-
 
194
            parm [EAX] [EBX] [ECX] [EDX] [ESI] value [EAX] \
-
 
195
            modify [ EBX ];
-
 
196
 
-
 
197
#pragma aux write_file  = \
-
 
198
            "push 0"           \
-
 
199
            "push 0"           \ 
-
 
200
            "mov [esp+1], eax" \
-
 
201
            "push ebx"         \
-
 
202
            "push edx"         \
-
 
203
            "push 0"           \
-
 
204
            "push ecx"         \
-
 
205
            "push 3"           \
-
 
206
            "mov ebx, esp"     \  
-
 
207
            "mov eax, 70"      \
-
 
208
            "int 0x40"         \
-
 
209
            "test esi, esi"    \
-
 
210
            "jz skip"          \
-
 
211
            "mov [esi], ebx"   \
125
            "mov EBX, 13" \
212
     "skip:"                   \       
126
            "int 0x40"    \
213
            "add esp, 28"      \      
127
            parm [ ECX ] value [EAX] \
214
            parm [EAX] [EBX] [ECX] [EDX] [ESI] value [EAX] \
128
            modify [ EBX ];
215
            modify [ EBX ];