Inline assembler (pragma aux) problem with Watcom 10.6 
Author Message
 Inline assembler (pragma aux) problem with Watcom 10.6

I am in the process of porting my Borland-based code to Watcom 10.6.  Part
of the code was implemented in Borland inline asm like this:

typedef long Fixedpoint;
Fixedpoint FixedMultiply(Fixedpoint M1, Fixedpoint M2) {
        Fixedpoint result;
        asm mov         eax, [M1]
        asm mov         ebx, [M2]
        asm imul        ebx
        asm shrd        eax, edx, 16
        asm mov         [result], eax
        return result;

Quote:
}

Now I am porting this to Watcom using the #pragma aux support like this:

extern Fixedpoint FixedMultiply(Fixedpoint M1, Fixedpoint M2);

#pragma aux FixedMultiply = \
        parm [eax] [ebx]       \
        ".386"                   \
        "imul      ebx"             \
        "shrd      eax, edx, 16"    \
        value   [eax]            \
        modify  exact [eax,ebx,edx];

which results in an error:
...Error! E028:(col 15) expecting ']' but found 'eax'.  
The error message refers to the parm statement.  I have read the help file
on this topic (a bit light on the documentation in this area IMHO) and
found this to be no help.  What is wrong with this code?  I've tried
several obvious changes, but nothing seems to matter.

Thanks for any help or doc pointer.  Mike

-----------------------------------------------------------------------



Sat, 25 Sep 1999 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Mixed-Language PROBLEMS - MS FORTRAN 5.00/Watcom 10.6 and PDS 7.1

2. Eiffel/S 1.3 with Watcom C 10.6

3. Who supports Watcom C/C++ 10.6

4. Watcom C++ 10.6 and Clipper 5.2e

5. WATCOM 10.6 (Win98)

6. Best GUI front end for Watcom 10.6?

7. Use IMSL Fortran library with Watcom Fortran 10.6?

8. OS/2 PM and Watcom 10.6 Fortran

9. Difficulty compiling for QNX 4.25, Watcom 10.6

10. Linking tcl and tk .libs with Watcom 10.6 compiler

11. Tcl/Tk and Watcom C/C++ 10.6

12. porting inline Watcom asm to MSVC inline asm

 

 
Powered by phpBB® Forum Software