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 - it is possible to force arguments into specific registers. suppose you have http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
It is possible to force arguments into specific registers.  Suppose you have
a function, say "mycopy", that copies data.  The first argument is the
source, the second argument is the destination, and the third argument is
the length to copy.  If we want the first argument to be passed in the
register ESI, the second argument to be passed in register EDI and the third
argument to be passed in register ECX, the following auxiliary pragma can be
used.


     void mycopy( char near *, char *, int );
     #pragma aux mycopy parm [EDI] [ESI] [ECX];

Note that you must be aware of the size of the arguments to ensure that the
arguments get passed in the appropriate registers.

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