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 - the following form of the auxiliary pragma specifies that arguments are http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
The following form of the auxiliary pragma specifies that arguments are
passed in the reverse order.

+--------------------------------------------------------------------------+
|      #pragma aux sym parm reverse [;]                                    |
|                                                                          |
+--------------------------------------------------------------------------+

where
    description

sym
    is a function name.

Normally, arguments are processed from left to right.  The leftmost
arguments are passed in registers and the rightmost arguments are passed on
the stack (if the registers used for argument passing have been exhausted).
Arguments that are passed on the stack are pushed from right to left.

When arguments are reversed, the rightmost arguments are passed in registers
and the leftmost arguments are passed on the stack (if the registers used
for argument passing have been exhausted).  Arguments that are passed on the
stack are pushed from left to right.

Reversing arguments is most useful for functions that require arguments to
be passed on the stack in an order opposite from the default.  The following
auxiliary pragma demonstrates such a function.


     #pragma aux rtn parm reverse [];

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