Today's colleague's machine-free partition table was destroyed, in Baidu for a long time to find this information, I still don't know whether it is wrong, I have no need to trial, my colleagues re-partition the hard disk, huh, huh!
XXXX: XXXX A 100 Compilation Edit Command Directive
XXXX: 0100 MOV AX, 0201 Reads a sector
XXXX: 0103 MOV BX, 0200 read to the current memory 0200
XXXX: 0106 MOV CX, 0002 Cylinder = 0, absolute sector number = 2
XXXX: 0109 MOV DX, 80 head number = 0, drive letter = 80
XXXX: 010C INT 13 disk read and write interrupt
XXXX: 010E INT 3 breakpoint interrupt
XXXX: 010F Enter
XXXX: XXXX G = 100 Performs the above instructions
XXXX: XXXX D 380 Displays the backup primary partition table content (HEX: 1BEH)
Rebuild MBR code:
XXXX: XXXX A 100
XXXX: 0100 MOV AX, 0301 Write a sector
XXXX: XXXX A 106
XXXX: 0106 MOV CX, 0001 Cylinder = 0, absolute sector number = 1
XXXX: XXXX G = 100 Performs the above instructions
You can then adjust the main partition table to see if it is properly written:
XXXX: XXXX A 100
XXXX: 0100 MOV AX, 0201 Reads a sector
XXXX: XXXX G = 100 Performs the above instructions
XXXX: XXXX D 380 Displays the main partition table content (HEX: 1BEH)
For insurance, it is best to back up the MBR content to the floppy disk:
XXXX: XXXX R bx
00
XXXX: XXXX R CX
: 0200 Set the size of the primary partition table is 512 bytes, BX record high bytes, CX record low bytes
XXXX: XXXX N A: /Mbr.dat file named
XXXX: XXXX W 0200 writes the content starting with the memory address 0200 into a floppy disk