Hacker News new | ask | show | jobs
by rythie 6067 days ago
It's used in bits of kernel programming - often because there is no other way to do the task.
1 comments

Modern kernels have very little assembly, outside of things like locore. They've heavily abstracted away the things you'd normally write in assembly, like modifying MSRs; also, so much of what you do now is simply memory mapped.

In all of xnu, not counting AES, there are ~17kloc in x86 assembly, most of it in osfmk/i386 --- where no normal developer is ever going to go. There are over 730kloc in C.

I wasn't implying there was a lot, just that sometimes that's the only way.
I'm just saying, even as a kernel dev, you're unlikely to need to write things in assembly.