From: Lars Andersson Newsgroups: comp.os.msdos.djgpp Subject: Watcom->DJGPP inline ASM Date: Wed, 06 May 1998 19:52:44 +0000 Organization: Algonet/Tninet Lines: 36 Message-ID: <3550BF8C.F9DD536D@algonet.se> Reply-To: lars_and AT algonet DOT se NNTP-Posting-Host: kairos.algonet.se 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 Hi, I'm trying to convert the C++ source code for my 3d engine from Watcom C/C++ 10.6 to DJGPP2 and I'm having some problems with inline asm pragmas... The AT&T syntax should be no problem but I don't know how to pass parameters and return values etc... If someone could translate the short pragmas below to DJGPP inline asm for me I'd be grateful... (Please reply by email as well...) /Lars Andersson #pragma aux Fixed_Mul64=\ "imul ebx "\ "shrd eax, edx, 20 "\ parm [eax] [ebx] \ modify [eax edx] \ value [eax]; #pragma aux Fixed_Div64=\ "cdq "\ "shld edx, eax, 20 "\ "sal eax, 20 "\ "idiv ebx "\ parm [eax] [ebx] \ modify [eax edx] \ value [eax]; #pragma aux Float2Int=\ "push eax "\ "fld dword ptr [esp] "\ "fistp dword ptr [esp] "\ "pop eax "\ parm[eax] \ value[eax];