8 ms·
How did you decide between assembler and C for various parts of the kernel? Some choices are very different from what I would have picked, so I'm curious about
by gmueckl 8mo ago
How did you decide between assembler and C for various parts of the kernel? Some choices are very different from what I would have picked, so I'm curious about your thought process.
- Luka12-dev 8mo agoMy general rule was: Assembly for anything that HAS to be assembly: bootloader, GDT/IDT setup, interrupt handlers, context switching, and port I/O wrappers. C for everything else: window manager, apps, drivers, GUI rendering. Some parts I probably could have done in C with inline assembly but I found writing pure ASM for the low-level stuff helped me understand exactly what was happening at the hardware level. What choices looked different to you? I'd love to hear your perspective always looking to improve!