

Ask HN: Lower-Level C Learning Resources? - benwills

After dabbling in programming for the last 15-20 years and never imagining I&#x27;d be much of a programmer, something clicked around 9 months ago. I taught myself C and am now writing code many hours a day, and may soon start dipping my toe into the pool of Assembly.<p>I&#x27;m now to the point where great, detailed, thorough resources are becoming particularly useful as I&#x27;m able to better follow them. At the same time, they are becoming more difficult to find.<p>I&#x27;m curious if there are any low-level C programming resources that you consider to be must-haves. My interests have found me in things like... designing hash functions (and writing code that designs highly-optimized hash functions based specific key sets), writing my own TCP&#x2F;IP stack and working with DPDK for faster packet processing and management, GPU programming, OS design, algorithm design, etc.<p>For an idea of what I&#x27;m looking for, some resources I&#x27;ve found most valuable and as frequent references have been the linux kernel code and documentation, TCP&#x2F;IP Illustrated (particularly vol 1, first edition), and Agner Fog&#x27;s work with Assembly.<p>Thanks for any ideas you might have.
======
nkurz
The Intel reference guides are dense, but well worth spending time on, likely
even if you are not writing specifically for Intel chips:
[http://www.intel.com/content/www/us/en/processors/architectu...](http://www.intel.com/content/www/us/en/processors/architectures-
software-developer-manuals.html)

The are the source for many of Agner's excellent materials.

The Software Optimization Reference Manual might be the best starting point:
[http://www.intel.com/content/dam/www/public/us/en/documents/...](http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-
optimization-manual.pdf)

Intel's IACA tool is also well worth exploring:
[https://software.intel.com/en-us/articles/intel-
architecture...](https://software.intel.com/en-us/articles/intel-architecture-
code-analyzer)

It's relatively unknown, likely due to its terrible interface and poor
documentation, but once you get past that, it's invaluable for understanding
how the processor actually executes the instructions you provide it.

------
dottrap
Watch Casey Muratori on Handmade Hero write a video game from scratch with no
3rd party libraries or engines, live on Twitch, 5 nights a week. (All episodes
archived on YouTube.)

He has written his own hash tables, his own software renderer, shown how to
use compiler intrinsics to write SIMD (SSE) and multithreading optimizations.

He wants to show people how computers actually work and things from game
engines to generic UI frameworks shouldn't need to be considered as magical
black boxes.

[https://handmadehero.org](https://handmadehero.org)

------
ejanus
I am currently reading a couple of materials in order to fully understand
lower C. Looks like we should correspond, my email is in my profile.Interest
area: web server and compilers.

------
lsiebert
As I've gone lower level with C and assembly, I've more books, papers, and
specific hardware datasheets for whatever processor or device I'm working on
have been relevant to my interests.

------
lingua_franca
Linux kernel source code

