delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/03/02/17:22:56

From: "Luiz Fernando Estivalet" <luisoft AT myway DOT com DOT br>
To: <djgpp AT delorie DOT com>
Subject: Need some help with assembler
Date: Tue, 2 Mar 1999 18:58:15 -0300
Message-ID: <01be64f7$c620f160$LocalHost@aguia>
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.71.1712.3
X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3
Reply-To: djgpp AT delorie DOT com

Hi there,

        i have the following function in assembler (but it was for my old
compiler Borlandc v3.1 16bits).
        i really need it, and i don't know AT&T syntax.
        what thefunction actually does is move double-words from source to
dest. it is much faster than the memcpy routine from C.
        could some one translate it for AT&T format. i don't want a external
ASM file, if it is possible could you translate to a C function

        thanks for your help

luiz fernando



; this function performs a memory copy from source to destination using 32
; bit moves
.MODEL MEDIUM,C                 ; use medium memory model C function names
.CODE                           ; begin the code segment
PUBLIC fquadcpy                 ; export function name to linker

fquadcpy PROC FAR C USES ds, dest:DWORD, source:DWORD, count:DWORD
.386
cld             ; clear the direction of movement
lds si, source  ; point ds:si at source
les di, dest    ; point es:di at destination
mov ecx,count   ; move into ecx number of words
rep movsd       ; move the data
ret
fquadcpy ENDP
END





- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019