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

AVR’s registers are mapped to address 0. So reading and writing NULL is actually modifying r0.


AVR’s r0 is also a totally normal register, unlike most other RISC which typically have r0 == 0.


Thanks for saving me a search, because I was expecting r0 to be hardcoded to zero.

Sometimes hardware is designed with insufficient input from software folks and the result is something asinine like that. That, or some people like watching the world burn.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: