home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c065 / 2.ddi / CLIB2.ZIP / H_SCOPY.ASM < prev    next >
Encoding:
Assembly Source File  |  1990-06-07  |  1.6 KB  |  48 lines

  1. ;[]-----------------------------------------------------------------[]
  2. ;|      H_SCOPY.ASM -- struct copy routine                           |
  3. ;|                                                                   |
  4. ;|      Turbo-C Run Time Library        Version 3.0                  |
  5. ;|                                                                   |
  6. ;|      Copyright (c) 1987,1988,1990 by Borland International Inc.   |
  7. ;|      All Rights Reserved.                                         |
  8. ;[]-----------------------------------------------------------------[]
  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. _TEXT           SEGMENT BYTE PUBLIC 'CODE'
  16.                 ASSUME  CS:_TEXT
  17.  
  18.                 public  SCOPY@
  19.                 public  F_SCOPY@
  20.                 public  N_SCOPY@
  21.  
  22. N_SCOPY@:
  23.                 pop     es              ;fix up far return
  24.                 push    cs
  25.                 push    es
  26. SCOPY@:
  27. F_SCOPY@:
  28.                 push    bp
  29.                 mov     bp,sp
  30.                 push    si
  31.                 push    di
  32.                 push    ds
  33.                 lds     si,dword ptr 6[bp]
  34.                 les     di,dword ptr 10[bp]
  35.                 cld
  36.                 shr     cx, 1
  37.                 rep     movsw
  38.                 adc     cx, cx
  39.                 rep     movsb
  40.                 pop     ds
  41.                 pop     di
  42.                 pop     si
  43.                 pop     bp
  44.                 retf    8
  45.  
  46. _TEXT           ENDS
  47.                 END
  48.