Note: This program has a certain degree of risk. The old demon has never tried. I hope you will consider it carefully before you act.
If you hadn't tried it yourself, you wouldn't have believed it. If you run the following program, your machine will not boot from the floppy disk. This program only modifies the first hidden sector of the extended DOS partition on your hard disk.
code segment
assume cs:code,ds:code
org 100h
begin:
xor ax,ax
mov dl,80h
int 13h ;复位硬盘
mov ax,201h
mov bx,200h
mov cx,1
mov dx,80h
int 13h ;读主引导扇区到200H
mov cx,ds:[3d0h]
mov [3ceh],0
mov bx,210h
mov ax,301h
int 13h ;写扩展分区首隐藏扇区
int 19h ;快启动
code ends
end begin
The program is very short and you can enter and run it in Debug. After you have translated to. com, save the contents of the first hidden sector of the extended DOS partition of your hard disk before you run it for future recovery.
The author is in the preparation of a hard drive lock program, due to the calculation of errors and accidentally found this. Just because you modify a hidden sector of the hard drive, the machine can not start from the soft drive, never see the data mentioned. The author was surprised at the time.
In order to solve the problem, the author press the Reset key, enter the CMOS settings, the hard drive is not installed, you can boot from the floppy disk, however, the use of INT13h still can not read and write the hard drive, so the damaged sector can not be restored.
The author estimates that the boot process, read the hard disk partition table when the cause of the cycle. The reasons are two points:
1, because only to modify the hard disk a sector, resulting in such a phenomenon, and the sector only records the hard disk partition table some information;
2, in the start-up process, whether from the floppy disk boot or from the hard drive, the final phenomenon is the hard drive light on the first light. Therefore, the swap does not support the hard disk partition of the lower version of the DOS system disk may be able to start, using the 2.0 version of the system disk, it can be set to the CMOS hard disk normal installation of the case to start the machine, although still can not enter the hard drive, but you may use INT13h Read and The first hidden fan of an extended DOS partition that covers the hard disk with normal content in debug restarts the machine successfully.