First, backup hard disk main boot records in a file:
C: / dos> Debug -a100 1078: 0100 MOV AX, 0201; 02 = read, 01 = read sector number 1078: 0103 MOV BX, 0200; 0200 at memory after reading 1078: 0106 MOV CX , 0001; 00 = Lath number, 01 = start fan area number 1078: 0109 MOV DX, 0080; 00 = 0 head, 80 represents hard disk 1078: 010c INT 13; BIOS disk interrupt 1078: 010E INT 20; end 1078: 0110 ^ C -G = 100; execute the Program Terminated Normally in 0100; program displays the -RCX; the CX register defines the size of the saving files; setting the file size: 300; 300h = 768 bytes - N mainboot.dat; save to file Mainboot.dat - W; write file Writing 00300 BYTES; program displays -Q; exit Debug
Second, restore the main boot record
C: / DOS> Debug -n mainboot.dat; loaded into the backup data file -L; load -a100 1078: 0100 MOV AX, 0301; 03 = Write, 01 = sector number 1078: 0103 MOV BX, 0200; Start 1078: 0106 MOV CX, 0001; 00 = Lath number, 01 = start sector number 1078: 0109 MOV DX, 0080; 00 = 0 head, 80 represents hard disk 1078: 010C INT 13; BIOS disk Interrupt 1078: 010E INT 20; End 1078: 0110 ^ c -g = 100; execute Program Terminated Normally -q from 0100; exiting Debug
! Note: Since the data contains partition tables, after the partition, the data that cannot be backed up before the partition cannot be recovered. You cannot use in different hard drives. ------------------------------------------------ Author: Zhang Qingzhangking@263.net QQ: 9365822 msn: zhangking@hotmail.com Personnel Home: http://www.why100000.com ("100,000 Why" Computer Learning Network) Other Website: http://sogo99.com ("Sogou 99" network portal) http://neteye.blogchina.com ("Meet" Blog China) 2004.11.14