this post was submitted on 28 Dec 2025
396 points (95.6% liked)
Programmer Humor
33307 readers
143 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
- If the mod doesn't find it funny, you're banned. Ha-ha!... For real: do not use the community for "statements". There are other places for such content. Keep it chill and funny.
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
You're just describing more components that are written in C and assembly.
My point is that assembly isn't strictly required. You can do memory-mapped reads and writes from C all you want, which is enough for plenty of I/O: storage, serial, sensors, GPIOs.... You can build quite a few things with these without touching system registers.
I'm not saying we should abolish assembly. Just that it isn't a universal requirement.
My point is that there's still gonna be some somewhere. You're just trying to handwave it away because somebody else wrote it.
Not necessarily. Let's say that...
_entry(), with a linker script to take care of its memory placement.You can compile only your C source file that defines
_entry()and interrupt vectors, then flash the resulting firmware. No assembly involved, no external linkage, and no stdlib required.Yes, and this is ignoring interrupts, access privileges, thread stacks ... what's the C equivalent of the MSR and MRS instructions?
Again, those aren't universally required. You can make an embedded device that reads the ambient light levels and turns on an LED when it's dark without thread stacks, privileges, or interrupts. Don't make your system more complicated than it needs to be.
Turning on an LED when it's dark doesn't require a microcontroller, let alone a Cortex-M. You can accomplish that with analog electronics.
Anyway, you're moving the goalposts all over the place. What happened to the RTOS kernel from earlier?
Not moving the goalposts at all, you're just missing the forest for the trees. The main point is that there are plenty of use cases that can use pure C with no assembly. I went with a simple example because I thought you'd have an issue with more complex examples like sending a notification over SMS via modem or providing a serial interface for sensor data.
I don't feel like arguing for the sake of arguing, though, and I feel like we're in a pedantry spiral, so I'll leave the conversation at that. Hope you enjoy your day.
You're the one who decided to start splitting hairs. Flounce on away.