Rev 1568 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1568 | Rev 3014 | ||
---|---|---|---|
Line 15... | Line 15... | ||
15 | 15 | ||
Line 16... | Line 16... | ||
16 | include '../../../../../proc32.inc' |
16 | include '../../../../../proc32.inc' |
17 | include '../../../../../macros.inc' |
17 | include '../../../../../macros.inc' |
18 | include '../../libio/libio.inc' |
18 | include '../../libio/libio.inc' |
19 | include '../dll.inc' |
19 | include '../../../../../dll.inc' |
Line 20... | Line 20... | ||
20 | 20 | ||
Line 21... | Line 21... | ||
21 | yy dd 20 |
21 | yy dd 20 |
22 | 22 | ||
Line 273... | Line 273... | ||
273 | 273 | ||
Line 274... | Line 274... | ||
274 | _f_path db '/rd/1/lib',0 |
274 | _f_path db '/rd/1/lib',0 |
275 | _f_mask db '*ini*',0 |
275 | _f_mask db '*ini*',0 |
Line 276... | Line -... | ||
276 | - | ||
277 | ;----------------------------------------------------------------------------- |
- | |
278 | proc mem.Alloc size ;///////////////////////////////////////////////////////// |
- | |
279 | ;----------------------------------------------------------------------------- |
- | |
280 | push ebx ecx |
- | |
281 | mov eax,[size] |
- | |
282 | lea ecx,[eax+4+4095] |
- | |
283 | and ecx,not 4095 |
- | |
284 | mcall 68,12 |
- | |
285 | add ecx,-4 |
- | |
286 | mov [eax],ecx |
- | |
287 | add eax,4 |
- | |
288 | pop ecx ebx |
- | |
289 | ret |
- | |
290 | endp |
- | |
291 | - | ||
292 | ;----------------------------------------------------------------------------- |
- | |
293 | proc mem.ReAlloc mptr,size;/////////////////////////////////////////////////// |
- | |
294 | ;----------------------------------------------------------------------------- |
- | |
295 | push ebx ecx esi edi eax |
- | |
296 | mov eax,[mptr] |
- | |
297 | mov ebx,[size] |
- | |
298 | or eax,eax |
- | |
299 | jz @f |
- | |
300 | lea ecx,[ebx+4+4095] |
- | |
301 | and ecx,not 4095 |
- | |
302 | add ecx,-4 |
- | |
303 | cmp ecx,[eax-4] |
- | |
304 | je .exit |
- | |
305 | @@: mov eax,ebx |
- | |
306 | call mem.Alloc |
- | |
307 | xchg eax,[esp] |
- | |
308 | or eax,eax |
- | |
309 | jz .exit |
- | |
310 | mov esi,eax |
- | |
311 | xchg eax,[esp] |
- | |
312 | mov edi,eax |
- | |
313 | mov ecx,[esi-4] |
- | |
314 | cmp ecx,[edi-4] |
- | |
315 | jbe @f |
- | |
316 | mov ecx,[edi-4] |
- | |
317 | @@: add ecx,3 |
- | |
318 | shr ecx,2 |
- | |
319 | cld |
- | |
320 | rep movsd |
- | |
321 | xchg eax,[esp] |
- | |
322 | call mem.Free |
- | |
323 | .exit: |
- | |
324 | pop eax edi esi ecx ebx |
- | |
325 | ret |
- | |
326 | endp |
- | |
327 | - | ||
328 | ;----------------------------------------------------------------------------- |
- | |
329 | proc mem.Free mptr ;////////////////////////////////////////////////////////// |
- | |
330 | ;----------------------------------------------------------------------------- |
- | |
331 | mov eax,[mptr] |
- | |
332 | or eax,eax |
- | |
333 | jz @f |
- | |
334 | push ebx ecx |
- | |
335 | lea ecx,[eax-4] |
- | |
336 | mcall 68,13 |
- | |
337 | pop ecx ebx |
- | |
338 | @@: ret |
- | |
339 | endp |
- | |
340 | 276 | ||
341 | ;--------------------------------------------------------------------- |
277 | ;--------------------------------------------------------------------- |
342 | ;--- ÄÀÍÍÛÅ ÏÐÎÃÐÀÌÌÛ ---------------------------------------------- |
278 | ;--- ÄÀÍÍÛÅ ÏÐÎÃÐÀÌÌÛ ---------------------------------------------- |
Line 343... | Line 279... | ||
343 | ;--------------------------------------------------------------------- |
279 | ;--------------------------------------------------------------------- |