From: Mark Goodwin Newsgroups: comp.os.msdos.djgpp Subject: Using ASM with DJGPP Date: Fri, 25 Jul 1997 10:22:47 -0500 Organization: Cray Research a division of Silicon Graphics, Inc. Lines: 25 Message-ID: <33D8C4C7.41C6@cray.com> NNTP-Posting-Host: fsgi091.cray.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Hello, I am having trouble compiling the following assembler code with DJGPP. Could somebody show me an assembler variation of these two macros that will compile with DJGPP? Much appreciated, Mark Goodwin mgoodwin AT cray DOT com #define fixmul(Result, Fac1, Fac2, Prec) \ { asm { mov eax, Fac1 } \ asm { imul Fac2 } \ asm { shrd eax, edx, 32-Prec } \ asm { mov Result, eax } } #define fixdiv(Result, Num, Denom, Prec) \ { asm { mov eax, Num } \ asm { mov edx, eax } \ asm { sar edx, Prec } \ asm { shl eax, 32-Prec } \ asm { idiv Denom } \ asm { mov Result, eax } }