Subversion Repositories Kolibri OS

Rev

Rev 9666 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. format ELF
  2.  
  3. section '.text' executable
  4. include '../../../../../../proc32.inc'
  5.  
  6. public memcpy
  7.  
  8. proc memcpy c, to:dword,from:dword,count:dword
  9.     push    esi
  10.     push    edi
  11.     mov     ecx, [count]
  12.     test    ecx, ecx
  13.     jz      .no_copy_block
  14.     mov     esi, [from]
  15.     mov     edi, [to]
  16.     cld
  17.     rep     movsb
  18. .no_copy_block:
  19.     pop     edi
  20.     pop     esi
  21.     mov     eax, [to]
  22.     ret
  23. endp
  24.