This is a real challenge, since the OS seems to be designed to
deliberately prevent it (big security hole). Int 13 only works
normally in real mode, before the windows kernel takes over.

Once windows is up and running, it traps int 13 calls and
handles them its own way, not really passing them down
to the BIOS as you would hope.

http://computing.net/programming/www...rum/10875.html

It obviously must be possible to write to the mbr from protected
mode because viruses do it.

http://www.avp.ch/avpve/bootmult/hare.stm

So it's a matter of getting permission. There's probably an existing driver
in the system that can do it. Your prog just needs to know what function
to call, and convince the OS that the call is from a "trusted" program.

Since most users run as admin or an
>admin equiv user, a virus thus has complete control to the system. Writing
>to the MBR is as simple as issuing a CreateFile request
http://lists.virus.org/dshield-0109/msg00276.html