Hacker News new | ask | show | jobs
by ufo 832 days ago
Typically you'd have some assembly functions in a separate file. Compile to an object file and link it, as you'd do with a separate C file.

If you want to insert assembly snippets inside a C function, many C compilers have an inline assembly feature. For simple snippets, the C compiler can figure it out. For more complex things, you there are ways to tell the C compilers which registers you're using, so it does not step on your toes.

1 comments

Thank you for explaining!