---

title: "How is C useful for for understanding how computers work?"

description: ""

date: "2024-01-30"

draft: true

---

Read this first [https://irreal.org/blog/?p=12304](https://irreal.org/blog/?p=12304) I'm going to be critiquing it and you should read it and understand what it says first so you can make fun of me for misreading it.

- It's not verilog
- Most C programs written by beginners aren't operating systems
- Most C programs written by beginners aren't using syscalls directly
- C doesn't map cleanly to asm due to UB and compiler optimizations and also because of compiler optimizations

```c
// what x86 asm does this translate to and is it really a clean mapping?
int example(){
    int a = 5;
    int b = something();
    return a;
}
```
