home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / ansi / string / memmove.s < prev    next >
Encoding:
Text File  |  1995-03-28  |  432 b   |  34 lines

  1. /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
  2.     .file "memmove.s"
  3.     .globl    _memmove
  4. _memmove:
  5.     pushl    %ebp
  6.     movl    %esp,%ebp
  7.     pushl    %esi
  8.     pushl    %edi
  9.     movl    8(%ebp),%edi
  10.     movl    12(%ebp),%esi
  11.     movl    16(%ebp),%ecx
  12.     jecxz    L2
  13.     cld
  14.     cmpl    %esi,%edi
  15.     jb    L3
  16.  
  17.     std
  18.     addl    %ecx,%esi
  19.     addl    %ecx,%edi
  20.     decl    %esi
  21.     decl    %edi
  22. L3:
  23.     rep
  24.     movsb
  25.  
  26. L2:
  27.     cld
  28.     popl    %edi
  29.     popl    %esi
  30.     movl    8(%ebp),%eax
  31.     leave
  32.     ret
  33.  
  34.