I know all the normal ways of doing this, what I'm looking for is an article I read a long long time ago that showed how to write some crazy helper functions using inline assembly and __naked functions to return a pair of items.
I've tried googling for it endlessly, but to no avail, I'm hoping someone else knows the article I'm talking about and has a link to it.
No assembly necessary
struct PairOfItems {int item1;double item2;};
struct PairOfItems crazyhelperfunction(void){
struct PairOfItems x = {42, -0.42};
return x;
}
I don't know about the article.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With