home *** CD-ROM | disk | FTP | other *** search
/ Black Art of 3D Game Programming / Black_Art_of_3D_Game_Programming.iso / source / msc / chap_17 / qcpy.asm < prev    next >
Assembly Source File  |  1995-03-29  |  645b  |  34 lines

  1.  
  2. ; this function performs a memory copy from source to destination using 32
  3. ; bit moves
  4.  
  5. .MODEL MEDIUM,C                 ; use medium memory model C function names
  6.  
  7. .CODE                           ; begin the code segment
  8.  
  9. PUBLIC fquadcpy                 ; export function name to linker
  10.  
  11.  
  12. fquadcpy PROC FAR C USES ds, dest:DWORD, source:DWORD, count:DWORD
  13.  
  14. .386
  15.  
  16. cld             ; clear the direction of movement
  17.  
  18. lds si, source  ; point ds:si at source
  19. les di, dest    ; point es:di at destination
  20.  
  21. mov ecx,count   ; move into ecx number of words
  22. rep movsd       ; move the data
  23.  
  24. ret
  25.  
  26. fquadcpy ENDP
  27.  
  28. END
  29.  
  30.  
  31.  
  32.  
  33.  
  34.