kolibrios-fun/programs/develop/libraries/box_lib/C--/lib/memory.h--
Alexey Teplov ( 5b18f6aea9 bugfix Num,Caps,Scroll Lock & remove in dir libraries
git-svn-id: svn://kolibrios.org@1032 a494cfbc-eb01-0410-851d-a64ba20cac60
2009-02-13 09:04:33 +00:00

37 lines
482 B
Plaintext

#code32 TRUE
dword heap;
inline fastcall dword malloc(dword ECX){
dword size;
#speed
size = ECX;
EAX = 68;
EBX = 11;
$int 0x40;
heap = EAX;
IF (size<=heap)
{
EAX = 68;
EBX = 12;
ECX = size;
$int 0x40;
}
ELSE EAX=-1;
#codesize
}
inline fastcall dword free(dword ECX){
#speed
EAX = 68;
EBX = 13;
$int 0x40;
#codesize
}
inline fastcall dword realloc(dword ECX, EDX){
#speed
EAX = 68;
EBX = 20;
$int 0x40;
#codesize
}