Well, I think that the first command was right -- you created the file system, but the second was not -- writing to the first sector you destroyed MBR and its partition table. After that drive became unbootable.
To change
file system boot sector you have to 'dd' your FAT12 code to the first sector of an
active partition, not the
drive itself. To find offset, where active partition begins you may use linux's fdisk.
For now, I think that you have to repartition your drive with fdisk, create file system using mkfs (or just format it under Windows), find where active partition begins and 'dd' your FAT12 code to this sector.
After that, I think you will able to boot from the drive and to test your code
.