home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_144 / 1.ddi / CLIBSRC.ZIP / N_SCOPY.ASM < prev    next >
Encoding:
Assembly Source File  |  1992-06-10  |  1.2 KB  |  48 lines

  1. ;[]-----------------------------------------------------------------[]
  2. ;|      N_SCOPY.ASM -- near struct copy routine                      |
  3. ;[]-----------------------------------------------------------------[]
  4.  
  5. ;
  6. ;       C/C++ Run Time Library - Version 5.0
  7. ;       Copyright (c) 1987, 1992 by Borland International
  8. ;       All Rights Reserved.
  9.  
  10.                 INCLUDE RULES.ASI
  11.  
  12. ; calls to this routine are generated by the compiler to copy
  13. ; one "struct" value to another
  14. ;
  15. ; On entry:
  16. ;
  17. ;       CX      = Number of bytes to copy
  18.  
  19.  
  20. _TEXT           SEGMENT
  21.                 ASSUME  CS:_TEXT
  22.  
  23.                 public  N_SCOPY@
  24.  
  25. N_SCOPY@:
  26.                 push    bp
  27.                 mov     bp,sp
  28.                 push    si
  29.                 push    di
  30.                 push    ds
  31.                 lds     si,dword ptr 4[bp]
  32.                 les     di,dword ptr 8[bp]
  33.                 cld
  34.                 shr     cx, 1
  35.                 rep     movsw
  36.                 adc     cx, cx
  37.                 rep     movsb
  38.                 pop     ds
  39.                 pop     di
  40.                 pop     si
  41.                 pop     bp
  42.                 ret     8
  43.  
  44. _TEXT           ENDS
  45.                 END
  46.