kolibrios-fun/programs/games/mblocks/branches/mblocks_C--/memory.h--
2008-03-18 15:04:20 +00:00

36 lines
480 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
}