Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ User's Guide - as mentioned in an earlier section, the following pragma defines the calling http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
As mentioned in an earlier section, the following pragma defines the calling
convention for functions compiled by MetaWare's High C compiler.


     #pragma aux HIGH_C "*"                                 \
                        parm caller []                      \
                        value no8087                        \
                        modify [eax ecx edx fs gs];

Note that register ES must also be specified in the "modify" register set
when using a memory model with a non-small data model.  Let us discuss this
pragma in detail.

"*"
    specifies that all function and variable names appear in object form as
    they do in source form.

parm caller []
    specifies that all arguments are to be passed on the stack (an empty
    register set was specified) and the caller will remove the arguments
    from the stack.

value no8087
    specifies that floating-point values are to be returned using 80x86
    registers and not 80x87 floating-point registers.

modify [eax ecx edx fs gs]
    specifies that registers EAX, ECX, EDX, FS and GS are not preserved by
    the called routine.

Note that the default method of returning integer values is used; 1-byte
characters are returned in register AL, 2-byte integers are returned in
register AX, and 4-byte integers are returned in register EAX.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson