wrote:
> I overloaded operator+ in a class, and I want to invoke this
> operator in inline assemble like this:
> _asm call operator+
> but it cannot be complied OK. compiler says there are some illegalI
> opcodes, and I'm absolutely sure that all the other codes are OK.
> actually I don't know how to invoke overloaded operator in inline
> assamble, I write this referring to the deassemble code by vc. who can
> tell me how to invoke overloaded operator correctly in inline assemble.
> Thank You Very Much In Advance.
operator + (a,b) is a function like any other so write a small sample
code that uses the operator+ and get your compiler to produce some
assembler output. Look at the actual name of the function called (turn
off optimisation to show the function being called maybe), which will
probably be something long and weird and use that name instead of
operator+,
Unfortunately some compilers change function names in assembler IIRC
so you should check your compiler manual for details.
Also bear in mind that if you have an optimising compiler you will
invariably lose by using assembler

but I guess its fun to see how
the compiler does stuff so go for it...
regards
Andy Little
regards
Andy Little