www.pudn.com > tftp.rar > COPY512.ASM


;; 
;;     This product contains: 
;;              "Restricted Materials of IBM" 
;;              (c) Copyright IBM Corp. 1987 
;;              All Rights Reserved 
;;              Licensed Materials-Property of IBM 
;; 
;;     See Copyright Instructions, G120-2083 
;; 
;; 
 
;   
        include ..\..\include\dos.mac 
; 
;  Copyright 1984 by the Massachusetts Institute of Technology 
;  See permission and disclaimer notice in file "notice.h" 
; (c) 1986 Copyright IBM Corp.; See file  for permissions 
; 
; copy512(source, destination) copy rapidly 512 bytes. 
; 
_TEXT      SEGMENT 
        PUBLIC  _copy512 
_copy512: 
        push    bp 
        mov     bp,sp 
 
        push    si 
        push    di 
        push    es 
 
        mov     cx,ds           ; set up destination segment 
        mov     es,cx 
        mov     cx,256          ; 512 bytes is 256 words 
        mov     si,4[bp]        ; get the address of the source 
        mov     di,6[bp]        ; and the destination 
 
        repnz   movsw            ; now do move 
 
        pop     es 
        pop     di 
        pop     si 
        pop     bp 
        ret 
; 
        _TEXT      ENDS 
        END