home *** CD-ROM | disk | FTP | other *** search
/ BURKS 2 / BURKS_AUG97.ISO / BURKS / SOFTWARE / LIBS / PMC101.ZIP / LIBSRC.ZIP / MEMMOVE.ASM (.txt) < prev    next >
Assembly Source File  |  1994-07-13  |  802b  |  50 lines

  1. .386p
  2. locals
  3.  
  4. public  MEMMOVE
  5.  
  6. _TEXT           segment byte public use32 'CODE'
  7. assume  cs:_TEXT
  8.  
  9. MEMMOVE:
  10.         push esi edi
  11.  
  12.         mov edi,[esp+4+8+08h]
  13.         mov esi,[esp+4+8+04h]
  14.         mov ecx,[esp+4+8+00h]
  15.  
  16.         mov edx,ecx
  17.         cmp edi,esi
  18.         jb short @@01
  19.         jz short @@00
  20.  
  21.         std
  22.         lea esi,[esi+ecx-001h]
  23.         lea edi,[edi+ecx-001h]
  24.         and ecx,3
  25.         rep movsb
  26.         mov ecx,edx
  27.         shr ecx,2
  28.         sub edi,3
  29.         sub esi,3
  30.         rep movsd
  31.         cld
  32.         jmp short @@00
  33.  
  34. @@01:
  35.         cld
  36.         shr ecx,2
  37.         rep movsd
  38.         mov ecx,edx
  39.         and ecx,3
  40.         rep movsb
  41.  
  42. @@00:
  43.         mov eax,[esp+4+8+08h]
  44.         pop edi esi
  45.         ret 0ch
  46.  
  47. _TEXT           ends
  48. end
  49.  
  50.