home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c010 / 1.ddi / FLILIB3.ZIP / FLISRC3.ZIP / COPYSTRU.ASM < prev    next >
Encoding:
Assembly Source File  |  1990-08-29  |  768 b   |  44 lines

  1. ;copystru.asm - contains i86_even_copy.
  2.  
  3.     dosseg
  4.     .model    large
  5.     .code
  6.  
  7.  
  8. ;i86_even_copy(source, dest, count)
  9. ;Copy count bytes from source to dest.    Count must be even as copy is 
  10. ;done 16 bits at a time.  Zero counts will trash memory.
  11.     PUBLIC _i86_even_copy
  12. ;copy 
  13. _i86_even_copy PROC far
  14.     push    bp
  15.     mov    bp,sp
  16.     push di
  17.     push ds
  18.     push es
  19.     push si
  20.     push cx
  21.  
  22.     mov    ax,[bp+6+2]    ;s seg
  23.     mov ds,ax
  24.     mov    si,[bp+4+2]    ;s offset
  25.     mov ax,[bp+10+2]  ;d seg
  26.     mov es,ax
  27.     mov di,[bp+8+2]  ;d offset
  28.     mov cx,[bp+12+2]  ;count
  29.     shr cx,1
  30.  
  31.     cld
  32.     rep movsw
  33.  
  34.     pop cx
  35.     pop si
  36.     pop es
  37.     pop ds
  38.     pop di
  39.     pop    bp
  40.     ret    
  41. _i86_even_copy ENDP
  42.  
  43. END
  44.