mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-29 17:59:50 +03:00
e1a0b0c660
- fix 'tl_iterat_perv' - small fix 'tl_mouse' - update 'tl_node_lev_inc' - optimization 'tl_node_lev_dec' 2) add new programm 'PlanetV' git-svn-id: svn://kolibrios.org@1401 a494cfbc-eb01-0410-851d-a64ba20cac60
49 lines
1.2 KiB
PHP
49 lines
1.2 KiB
PHP
;-----------------------------------------------------------------------------
|
|
proc mem.Alloc,size ;/////////////////////////////////////////////////////////
|
|
;-----------------------------------------------------------------------------
|
|
push ebx ecx
|
|
mov ecx,[size]
|
|
;*** add ecx,4
|
|
mcall 68,12
|
|
;*** add ecx,-4
|
|
;*** mov [eax],ecx
|
|
;*** add eax,4
|
|
pop ecx ebx
|
|
ret
|
|
endp
|
|
|
|
;-----------------------------------------------------------------------------
|
|
proc mem.ReAlloc,mptr,size ;//////////////////////////////////////////////////
|
|
;-----------------------------------------------------------------------------
|
|
push ebx ecx edx
|
|
mov ecx,[size]
|
|
or ecx,ecx
|
|
jz @f
|
|
;*** add ecx,4
|
|
@@: mov edx,[mptr]
|
|
or edx,edx
|
|
jz @f
|
|
;*** add edx,-4
|
|
@@: mcall 68,20
|
|
or eax,eax
|
|
jz @f
|
|
;*** add ecx,-4
|
|
;*** mov [eax],ecx
|
|
;*** add eax,4
|
|
@@: pop edx ecx ebx
|
|
ret
|
|
endp
|
|
|
|
;-----------------------------------------------------------------------------
|
|
proc mem.Free,mptr ;//////////////////////////////////////////////////////////
|
|
;-----------------------------------------------------------------------------
|
|
push ebx ecx
|
|
mov ecx,[mptr]
|
|
or ecx,ecx
|
|
jz @f
|
|
;*** add ecx,-4
|
|
@@: mcall 68,13
|
|
pop ecx ebx
|
|
ret
|
|
endp
|