Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Depends on what do you mean by "work" here, which is a very vague term. One can argue that assembly doesn't teach you how computers work either because it "abstracts away" how transistors do their job. The point is: Depending on how deep you want to go in your understanding of the underlying system, there is always a level of abstraction that you have to settle on before building your knowledge on top of it.

Turns out that using C as the programming language for your project puts you at a very balanced spot in the abstraction hierarchy, where you don't have to learn processor specific instructions (well, not all of them) while requiring you to fully understand the "programmer's model" of the target processor. Keep in mind that learning C syntax alone doesn't do jack shit. You HAVE to be able to make full use of the tooling that a C toolchain provides. That means you need to learn things like memory layout (linker scripts, injecting code at a particular memory address / ISRs / faults and handlers), boot process (startup scripts, stack setup / data-segment initialization), kernel/user-mode and what not. So yeah, C is THE best language to learn your target system because of the level of optimization of the abstraction of the hardware that it provides you. Your code may be getting translated from a standard C architecture to the specific machine architecture; nobody's stopping you from learning how that process takes place. You could choose to learn the exact process, which C provides you complete tools for, or you could choose to ignore that process and let your compiler do its job. The beauty lies in the many possible levels of control.



I can get all of that from languages like Basic, Pascal or Ada, while enjoying safer code.

https://www.mikroe.com/compilers

https://www.ptc.com/en/products/developer-tools/apexada




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: