Rev 987 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 987 | Rev 3014 | ||
---|---|---|---|
Line 582... | Line 582... | ||
582 | add esp,4 |
582 | add esp,4 |
583 | clc |
583 | clc |
584 | ret |
584 | ret |
585 | endp |
585 | endp |
Line 586... | Line -... | ||
586 | - | ||
587 | ;----------------------------------------------------------------------------- |
- | |
588 | proc mem.Alloc,size ;///////////////////////////////////////////////////////// |
- | |
589 | ;----------------------------------------------------------------------------- |
- | |
590 | push ebx ecx |
- | |
591 | mov ecx,[size] |
- | |
592 | ;*** add ecx,4 |
- | |
593 | mcall 68,12 |
- | |
594 | ;*** add ecx,-4 |
- | |
595 | ;*** mov [eax],ecx |
- | |
596 | ;*** add eax,4 |
- | |
597 | pop ecx ebx |
- | |
598 | ret |
- | |
599 | endp |
- | |
600 | - | ||
601 | ;----------------------------------------------------------------------------- |
- | |
602 | proc mem.ReAlloc,mptr,size ;////////////////////////////////////////////////// |
- | |
603 | ;----------------------------------------------------------------------------- |
- | |
604 | push ebx ecx edx |
- | |
605 | mov ecx,[size] |
- | |
606 | or ecx,ecx |
- | |
607 | jz @f |
- | |
608 | ;*** add ecx,4 |
- | |
609 | @@: mov edx,[mptr] |
- | |
610 | or edx,edx |
- | |
611 | jz @f |
- | |
612 | ;*** add edx,-4 |
- | |
613 | @@: mcall 68,20 |
- | |
614 | or eax,eax |
- | |
615 | jz @f |
- | |
616 | ;*** add ecx,-4 |
- | |
617 | ;*** mov [eax],ecx |
- | |
618 | ;*** add eax,4 |
- | |
619 | @@: pop edx ecx ebx |
- | |
620 | ret |
- | |
621 | endp |
- | |
622 | - | ||
623 | ;----------------------------------------------------------------------------- |
- | |
624 | proc mem.Free,mptr ;////////////////////////////////////////////////////////// |
- | |
625 | ;----------------------------------------------------------------------------- |
- | |
626 | push ebx ecx |
- | |
627 | mov ecx,[mptr] |
- | |
628 | or ecx,ecx |
- | |
629 | jz @f |
- | |
630 | ;*** add ecx,-4 |
- | |
631 | @@: mcall 68,13 |
- | |
632 | pop ecx ebx |
- | |
633 | ret |
- |