[AD] Re: Win32 asmlock.s to C

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Evert Glebbeek wrote:
On Tuesday 12 April 2005 20:29, Matt Witherspoon wrote:

It would be much easier to simply inline the asm into a MSVC .c file.

I don't think anyone is doing this, so feel free to have a look at it.

Out of curiousity, how much actually needs to be asm? From what I'm gathering while reading, it's just how some paramters are passed to certain functions (on registers instead of the stack), correct? If that's the case, then shouldn't it be easy to write a small wrapper that contains inline asm for doing just that, while leaving the rest of the file as C?

So you'd basically do:
special_caller(call_this_func, func_parameters...);

Though this also raises the question.. if a pure-C implementation that passes the parameters on the stack can work, though the asm version passes on registers, why pass on registers at all in the asm version? Why not make it pass on the stack regardless?




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/