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 - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

     #pragma aux __stdcall "_*@nnn" \
                parm routine [] \
                value struct struct caller [] \
                modify [eax ecx edx]

Notes:

 1. All symbols are preceded by an underscore character.

 2. All C symbols (extern "C" symbols in C++) are suffixed by "@nnn" where
    "nnn" is the sum of the argument sizes (each size is rounded up to a
    multiple of 4 bytes so that char and short are size 4).  When the
    argument list contains "...", the "@nnn" suffix is omitted.

 3. Arguments are pushed on the stack from right to left.  That is, the last
    argument is pushed first.  The called routine will remove the arguments
    from the stack.

 4. When a structure is returned, the caller allocates space on the stack.
     The address of the allocated space will be pushed on the stack
    immediately before the call instruction.  Upon returning from the call,
    register EAX will contain address of the space allocated for the return
    value.  Floating-point values are returned in 80x87 register ST(0).

 5. Registers EAX, ECX and EDX are not saved and restored when a call is
    made.

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