Rev 7520 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
647 | andrew_pro | 1 | format ELF |
2 | |||
3 | ;include "proc32.inc" |
||
4 | section '.text' executable |
||
7520 | siemargl | 5 | public sysmalloc |
6 | public sysfree |
||
7 | public sysrealloc |
||
647 | andrew_pro | 8 | |
9 | align 4 |
||
7520 | siemargl | 10 | sysmalloc: |
6433 | siemargl | 11 | push ebx |
7847 | Boppan | 12 | push ecx |
13 | mov eax,68 |
||
14 | mov ebx,12 |
||
15 | mov ecx,[esp+12] ;size |
||
16 | int 0x40 |
||
17 | pop ecx |
||
6433 | siemargl | 18 | pop ebx |
7847 | Boppan | 19 | ret 4 |
647 | andrew_pro | 20 | |
21 | align 4 |
||
7520 | siemargl | 22 | sysfree: |
6433 | siemargl | 23 | push ebx |
7847 | Boppan | 24 | push ecx |
25 | mov eax,68 |
||
26 | mov ebx,13 |
||
27 | mov ecx,[esp+12] |
||
28 | int 0x40 |
||
29 | pop ecx |
||
6433 | siemargl | 30 | pop ebx |
7847 | Boppan | 31 | ret 4 |
647 | andrew_pro | 32 | |
33 | align 4 |
||
7520 | siemargl | 34 | sysrealloc: |
6433 | siemargl | 35 | push ebx |
7847 | Boppan | 36 | push ecx |
37 | push edx |
||
38 | mov eax,68 |
||
39 | mov ebx,20 |
||
40 | mov ecx,[esp+20] ; size |
||
41 | mov edx,[esp+16] ; pointer |
||
42 | int 0x40 |
||
43 | pop edx |
||
44 | pop ecx |
||
6433 | siemargl | 45 | pop ebx |
7847 | Boppan | 46 | ret 8 |