gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Beginners > Why can't I do inline C in ASM?

#10328 - Lord Graga - Tue Sep 02, 2003 3:15 pm

Sorry... I just had to ask that question...

It's a joke :P

Got it?

I shouldn't have posted this, but I decided to do it anyways, feel free to remove it if you are a moderator..

#10329 - NEiM0D - Tue Sep 02, 2003 4:09 pm

It's an interesting one, nonetheless.

#10330 - Lord Graga - Tue Sep 02, 2003 4:13 pm

Thank you ;)

#10337 - tepples - Tue Sep 02, 2003 7:54 pm

Why hasn't any popular C compiler introduced support for inline C within assembly?

Because a C module is defined as a set of functions.

Because C doesn't know which registers not to preserve.

Because you can write the C code, compile it to assembly language source code (GCC users use the -S switch), and paste it into the assembly source code file.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.