Parent


IBM Fixed Disk Adapter  -  Low-Level Format Via DEBUG


WARNING:   The 'Step 1 - Low-level formatting' procedure below works for the IBM Fixed Disk Adapter, the hard drive controller supplied in the IBM 5160 (XT).
It won't necessarily work for other types of XT-class controllers.


We will split this into two distinct steps (operations):
1.  Low-level format
2.  Zero data in first sector

Step 2 is not optional.

The reason for step 2 is because of the low-level format code within the BIOS of the IBM Fixed Disk Adapter.  Unlike most low-level format code, when creating sectors, it does not write data in those sectors such that the end result is predictable.  As a result, after this type of low-level format, FDISK may not be able to cope with what data is in the first sector (the MBR).  By zeroing the data in the first sector, we ensure that FDISK will be able to cope with the contents of the first sector.

Below, I show the segment as 'xxxx'.  That is because the segment that DEBUG.COM uses varies.  If I was to show the segment that I saw, some people would worry because the segment displayed to them was different.


Step 1  -  Low-level formatting

Boot from a DOS boot disk that contains DEBUG.COM

Execute DEBUG.  DEBUG will present a dash ("-") prompt.  When you see that prompt, enter the following commands (shown in brown):

- a 100
xxxx:0100 mov ax,705
xxxx:0103 mov cx,1
xxxx:0106 mov dx,80
xxxx:0109 int 13
xxxx:010B int 3
xxxx:010C                <----- at this line just press the [ENTER] key - this will return DEBUG's dash prompt
- g=100

Low-level formatting will start.  You will see the hard drive's access light turn on, and stay on for the duration of the format.
Low-level formatting will take a few minutes.  When it ends, DEBUG will display the CPU registers and CPU flags, then return the dash prompt.


Step 2  -  Zero data in first sector

At DEBUG's dash prompt, enter the following commands (shown in brown):

- f cs:1000 1200 00           (comment: this sets 512 bytes starting at address 1000h to zero)
- a 100
xxxx:0100 mov ah,0
xxxx:0102 mov dl,80
xxxx:0104 int 13
xxxx:0106 mov ax,301
xxxx:0109 mov bx,1000
xxxx:010C mov cx,1
xxxx:010F mov dx,80
xxxx:0112 int 13
xxxx:0114 int 3
xxxx:0115                <----- at this line just press the [ENTER] key - this will return DEBUG's dash prompt
- g=100

Shortly after the "g=100" line is entered, DEBUG will display the CPU registers and CPU flags, then return the dash prompt.

Exit from DEBUG by entering a Q at DEBUG's dash prompt.