I. Back up the Master Boot Record of the hard disk to a file:
C:/DOS> debug
-A100
1078: 0100 mov ax, 0201; 02 = read, 01 = number of read sectors
1078: 0103 mov BX, 0200; put it at 0200 of the memory after reading
1078: 0106 mov CX, 0001; 00 = track number, 01 = start fan area number
1078: 0109 mov dx, 0080; 00 = 0 head, 80 represents Hard Disk
1078: 010c INT 13; BIOS disk interrupted
1078: 010e INT 20; End
1078: 0110 ^ C
-G = 100; executed from 0100
Program terminated normally; program display
-RcX; The CX register defines the size of the file to be saved.
CX 0000; set the file size
: 300; 300 h = 768 bytes
-N mainboot. dat; stored in the mainboot. dat file
-W; write files
Writing 00300 bytes; program display
-Q; exit debug
2. Restore the Master Boot Record
C:/DOS> debug
-N mainboot. dat; load the backup data file
-L; load
-A100
1078: 0100 mov ax, 0301; 03 = write, 01 = number of sectors
1078: 0103 mov BX, 0200; write from 0200 of the memory
1078: 0106 mov CX, 0001; 00 = track number, 01 = start fan area number
1078: 0109 mov dx, 0080; 00 = 0 head, 80 represents Hard Disk
1078: 010c INT 13; BIOS disk interrupted
1078: 010e INT 20; End
1078: 0110 ^ C
-G = 100; executed from 0100
Program terminated normally
-Q; exit debug
! Note: because the data contains partition tables, After partitioning, the data backed up before the partition cannot be restored. It cannot be used between different hard disks.
------------------------------------------------
Author: Zhang Qing zhangking@263.net
QQ: 9365822
MSN: zhangking@hotmail.com
Personal Homepage: http://www.why100000.com ("100,000 why" computer learning network)
Other Websites: http://sogo99.com (sogou 99 web portal)
Http://neteye.blogchina.com ("mesh" blog China)
2004.11.14