News for hackers. Stuff that matters.
Re:The Law of Leaky Abstractions (2002) by ufo on Wednesday March 06, 2024 @06:25PM (#39623100)
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.

Re:The Law of Leaky Abstractions (2002) by cloogshicer on Thursday March 07, 2024 @04:23AM (#39626933)
Thank you for explaining!