I have been given an end of term project to write an assembly code to read the MBR and save it to floppy. I think I managed to read it with INT 13h in DOS in a virtualBox machine. The machine has only one hard disk with one partition with XP installed. When I read the MBR and print it, it gives me a whole lot of junk and amongst the junk it says: Invalid partition table. Error loading operating system... just like in this website: http://mbr.adamsatoms.com But my system boots fine. Did I read the MBR correctly. Is it really the MBR? Why does this happen? This is part of my code for reading if it helps:
mov dx,80h
mov cx,1
mov bx,ds
mov es,bx
mov bx,offset result
mov ax,0201h
int 13h
Thanks in advance.