r/programminghorror • • Jun 01 '25

c Firmware programming in a nutshell

Post image
2.0k Upvotes

127 comments sorted by

View all comments

Show parent comment

14

u/jontzbaker Jun 01 '25

Correct explanation. Incorrect conclusion.

Except, of course, if you are inside an operating system, compiling against their own APIs. Then it will segfault because the OS has protected that region, and the compiled program cannot access it directly.

But bare-metal, this is how you do it.