Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. format ELF
  2.  
  3. ;include "proc32.inc"
  4. section '.text' executable
  5. public malloc
  6. public free
  7. public realloc
  8.  
  9. align 4
  10. malloc:
  11.  
  12.         mov eax,68
  13.         mov ebx,12
  14.         mov ecx,[esp+4] ;size
  15.         int 0x40
  16.  
  17.         ret 4
  18.  
  19. align 4
  20. free:
  21.  
  22.         mov eax,68
  23.         mov ebx,13
  24.         mov ecx,[esp+4]
  25.         int 0x40
  26.  
  27.         ret 4
  28.  
  29. align 4
  30. realloc:
  31.  
  32.         mov ebx,20
  33.         mov eax,68
  34.         mov ecx,[esp+4]
  35.         mov edx,[esp+8]
  36.         int 0x40
  37.  
  38.         ret 8
  39.