kolibrios/programs/develop/metcc/trunk/libc/mem/memalloc.asm
andrew_programmer e5c041df96 Update Kolibri version of libC library(for usage in TinyC).
Correction of various mistakes in functions of work with files.
For work with files 70 function is used.
Functions for work with memory are changed for use of the new manager of memory. 

git-svn-id: svn://kolibrios.org@610 a494cfbc-eb01-0410-851d-a64ba20cac60
2007-08-24 19:49:07 +00:00

42 lines
576 B
NASM

format ELF
include "proc32.inc"
section '.text' executable
public malloc
public free
public realloc
align 4
proc malloc stdcall, size:dword
mov eax,68
mov ebx,12
mov ecx,[size]
int 0x40
ret
endp
align 4
proc free stdcall, pointer:dword
mov eax,68
mov ebx,13
mov ecx,[pointer]
int 0x40
ret
endp
align 4
proc realloc stdcall, pointer:dword, size:dword
mov ebx,20
mov eax,68
mov ecx,[size]
mov edx,[pointer]
int 0x40
ret
endp