Hacker News new | ask | show | jobs
by tomjen3 4862 days ago
You have never written embedded code, or code to deal with low level hardware in drivers?

I haven't either, but I imagine ASM would be required here.

1 comments

I've written code for GameBoy Advance which has no OS, just magic memory addresses, and didn't need any assembly. Even hblank interrupts could be implemented in C.
A typical reason to use assembly these days is for instructions the compiler doesn't output (for instance specialized instructions which are only useful for a kernel).

GCC's extended assembly at least (which clang/LLVM also support), allows one to specify constraints for asm() statements that let the compiler respect dependencies etc.