IBM/Xebec HDD Controller - Low-Level Format Via DEBUG


WARNING: 
 The following procedure is for the IBM/Xebec controllers supplied in the IBM 5160 (XT).
 It won't necessarily work for other types of XT-class controllers.
 In fact, it is known not to work on certain XT-class controllers.


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

The reason for step 2 is because of the low-level format code in the IBM/Xebec controllers. 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.


STEP 1 - LOW-LEVEL FORMAT

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 green):

- 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/flags, then return the dash prompt.


STEP 2 - ZERO DATA IN FIRST SECTOR

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

- 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/flags, then return the dash prompt.

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