forked from KolibriOS/kolibrios
merge mem.inc to dll.inc
place dll.inc in /programs delete all the other dll.inc and mem.inc files correct some programs to use common dll.inc git-svn-id: svn://kolibrios.org@3014 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -11,7 +11,7 @@ TRUE = 1
|
||||
|
||||
include '../../../../../proc32.inc'
|
||||
include '../../../../../macros.inc'
|
||||
include '../dll.inc'
|
||||
include '../../../../../dll.inc'
|
||||
|
||||
include '../../libio/libio.inc'
|
||||
include '../../libimg/libimg.inc'
|
||||
@@ -137,55 +137,6 @@ draw_window:
|
||||
invoke gfx.close, [ctx]
|
||||
ret
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
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
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
|
||||
s_header db 'Image Viewer (test app)', 0
|
||||
|
Reference in New Issue
Block a user