Xref: utzoo alt.msdos.programmer:257 comp.sys.ibm.pc:32533 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cwjcc!gatech!rutgers!shelby!lindy!ralerche From: ralerche@lindy.Stanford.EDU (Robert A. Lerche) Newsgroups: alt.msdos.programmer,comp.sys.ibm.pc Subject: Re: Calling C functions from assembly Message-ID: <4140@lindy.Stanford.EDU> Date: 2 Aug 89 19:04:28 GMT References: <12324@s.ms.uky.edu> <663@megatek.UUCP> Sender: ralerche@lindy.Stanford.EDU (Robert A. Lerche) Reply-To: ralerche@lindy.Stanford.EDU (Robert A. Lerche) Organization: Research Libraries Group Lines: 7 A thing to watch out for when interfacing C and Assembler... the direction flag! Microsoft C's "memcpy" _assumes_ the direction flag is clear (i.e., it doesn't do its own CLD before a REP MOVS). Be sure to clear the direction flag before calling a C routine and clear it if you set it in your own assembler routine -- otherwise havoc can ensue.