News for hackers. Stuff that matters.
Re:I want to compile a C program so simple I can explain all... by a-priori on Tuesday March 16, 2010 @12:39PM (#1196082)
If you really want to write code that you can understand all the way down I suggest starting from as close to bare metal as your level of masochism allows. For me, that's GRUB.

This tutorial walks you through making a kernel image that GRUB can load, and shows how to poke bytes into video memory to print characters to the screen:

http://wiki.osdev.org/Bare_bones

Re:I want to compile a C program so simple I can explain all... by akgerber on Tuesday March 16, 2010 @12:48PM (#1196104)
And then buy an FPGA and bust out some Verilog and write the metal yourself.
Re:I want to compile a C program so simple I can explain all... by VBprogrammer on Tuesday March 16, 2010 @02:05PM (#1196378)
When I was about 14 I found writing a floppy disk boot loader in x86 Assembly to be a good way of learning how a computer really works at the most basic level. Including reading FAT12 to find the start of your next piece of code and even displaying a slash screen!

While a little masochistic I find I still call upon what I learned back then while writing in C and to a lesser extent higher level languages.

Re:I want to compile a C program so simple I can explain all... by wallflower on Tuesday March 16, 2010 @02:27PM (#1196420)
"So I said, "I'll look into this floppy disk." And I started pulling up the datasheet on that chip, and I started coming up with my first ideas of "how do I have that chip get the data to a floppy disk?" And then I came up with this clever little approach. I needed a little bit of logic in here..."

Steve Wozniak, Founders at Work

Amazing full inspiring interview (I have read every interview in JL's book and it is by far my favorite)

http://www.foundersatwork.com/steve-wozniak.html

Re:I want to compile a C program so simple I can explain all... by signa11 on Wednesday March 17, 2010 @11:02AM (#1198687)
which kind of reminds of alan-kay's musing "Hardware is really just software crystallized early"
Re:I want to compile a C program so simple I can explain all... by schemer on Tuesday March 16, 2010 @06:58PM (#1197054)
6.828 gets down to the bare metal. Or close to it.

http://pdos.csail.mit.edu/6.828/2009/