Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | 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.  
  20.     pop edi
  21.     pop esi
  22.     mov eax, [to]
  23.         ret
  24. endp
  25.