title: Where to find the source code for a PC MBR Bootloader?
body: <p>Preferably well comment and with some associated docmentation and a Makefile.</p>
  
  <p>Just for clearity, that's the less than 512 bytes (512 bytes - partition table) of machine code that gets loaded by the Bios and is responsible for chaining to the secondary bootloader in your boot partition.</p>
  
  <p>Edit:
  Both David's and bdonlan's answers look promising.
  The minimal Dos link goes to a Debian source package for the MBR, but the commented Windows 2000/XP MBR looks like it has more detailed comments.</p>