title: How can a Bootloader written in x86 Assembly be written to a USB Flash drive and support both BIOS and UEFI?
body: <p>Recently I have written a bootloader in x86 Assembly. The bootloader does not do anything special right now, but I am planning to load my own kernel with this bootloader. I am able to write the bootloader to my FAT32 formatted USB Flash drive and it will be loaded by the BIOS correctly.</p>
  
  <p>How can I make the USB Flash drive bootable by both BIOS and UEFI?</p>