• Please review our updated Terms and Rules here

How to Low Level Format an IBM XT with orig XEBEC controller

billdeg

Technician
Joined
Nov 18, 2003
Messages
3,885
Location
Landenberg, PA USA
This drove me crazy, trying to find a way to low-level format an IBM XT 5160 20 MB harddrive with an original XEBEC hard drive controller. Someone else will be glad to find this post...

c/r = "Hit the enter key"

A:>Debug c/r
-
-I 322 c/r
-I 321 c/r
-O 322 0 c/r
-I 321 c/r
-O 320 04 c/r
-O 320 00 c/r Note: This is the value for Drive C. Substitute
20 if formatting Drive D.
-O 320 00 c/r
-O 320 00 c/r
-O 320 05 c/r
-O 320 07 c/r Note: Before you hit this carriage return, be sure
you have typed the correct value shown in
the previous note for drive C or D.

Drive light should come on at this point and the controller will
begin doing a low-level format on the drive. [It takes hours, a good time to re-watch Lord of the Rings...]

When the drive has been formatted, the drive select light will
go out and you will be returned to the - prompt.

-I 321 c/r
-I 320 c/r
-Q

And you should now be back at the DOS prompt. At this point you
should enter FDISK, set the partition, and perform your high level
format.

[thanks Marvin Johnson of classiccmp and http://www.uncreativelabs.net/textfiles/drives/XEBEC.DOC]
 
There's more elegant method by using INT 13 function 7:

Code:
;---INT 13-----------------------------
; INPUT:
;	AH = HARD DISK COMMAND
;
;	AH = 00	RESET DISK (DL=80H,81H)/DISKETTE
;	AH = 01 READ THE STATUS OF THE LAST DISK OPERATION INTO AL
;		NOTE: DL < 80H - DISKETTE
;		      DL > 80H - DISK
;	AH = 02 READ THE DESIRED SECTORS INTO MEMORY
;	AH = 03 WRITE THE DESIRED SECTORS FROM MEMORY
;	AH = 04 VERIFY THE DESIRED SECTORS
;	AH = 05 FORMAT THE DESIRED TRACK
;	AH = 06 FORMAT THE DESIRED BAD TRACK
;	AH = 07 FORMAT THE DRIVE STARTING AT THE DESIRED TRACK
;	AH = 08 RETURN THE CURRENT DRIVE PARAMETERS
;	AH = 09 INITIALIZE DRIVE PAIR CHARACTERISTICS
;		INT 41 POINTS TO DATA BLOCK
;	AH = 0A READ LONG
;	AH = 0B WRITE LONG
;		READ AND WRITE LONG ENCOMPASS 512+4 BYTES ECC
;	AH = 0C SEEK TO DESIRED TRACK
;	AH = 0D ALTERNATE DISK RESET (SEE DL)
;	AH = 0E READ SECTOR BUFFER
;	AH = 0F WRITE SECTOR BUFFER
;	AH = 10 TEST DRIVE READY
;	AH = 11 RECALIBRATE
;	AH = 12 CONTROLLER RAM DIAGNOSTIC
;	AH = 13 DRIVE DIAGNOSTIC
;	AH = 14 CONTROLLER INTERNAL DIAGNOSTIC
;
; REGISTERS USED FOR HARD DISK OPERATIONS
;	AL - NUMBER OF SECTORS (MAX RANGE 1-80H,
;				FOR LONG 1-79H)
;	   - INTERLEAVE VALUE FOR FORMAT COMMANDS
;	CL - SECTOR NUMBER (1-17, NOT VALUE CHECKED)
;	     HIGH 2 BITS OF CYLINDER NUMBER ARE PLACED
;	     IN THE HIGH 2 BITS OF THE CL REGISTER
;	CH - CYLINDER NUMBER (0-1023, NOT VALUE CHECKED)
;	DL - DRIVE NUMBER (80H-81H FOR DISK, VALUE CHECKED)
;	DH - HEAD NUMBER (0-7 ALLOWED, NOT VALUE CHECKED)
;	ES:BX - ADDRESS OF BUFFER FOR READS AND WRITES,
;		(NOT REQUIRED FOR VERIFY)
;
; OUTPUT:
;	AH = STATUS OF CURRENT OPERATION
;	CY = 0 SUCCESSFUL OPERATION (AH=0 ON RETURN)
;	CY = 1 FAILED OPERATION (AH HAS ERROR CODE)
;
;   IF DRIVE PARAMETERS WERE REQUESTED
;	CL = MAX USEABLE VALUE FOR SECTOR NUMBER AND
;		CYLINDER NUMBER HIGH BITS
;	CH = MAX USEABLE VALUE FOR CYLINDER NUMBER
;	DL = NUMBER OF CONSECUTIVE ACKNOWLEDGING DRIVES
;		ATTACHED (0-2)
;	DH = MAX USEABLE VALUE FOR HEAD NUMBER
 
duration of low level format

duration of low level format

My XT is currently into the 20th hour...how long is the low level format supposed to last? I have an IBM XT 20 MB drive.
 
Re: duration of low level format

Re: duration of low level format

billdeg said:
My XT is currently into the 20th hour...how long is the low level format supposed to last? I have an IBM XT 20 MB drive.

I have formatted larger drives in much less time.
 
how many licks...

how many licks...

I have aborted the low level format. I may try it again, or swap out the current drive with another same drive.
 
A 10 or 20MB hard should format within an hour .. I just did it a few weeks ago on the 5150 & 5161 combo I received.

The Xebec controller doesn't have an onboard BIOS extension to do the formatting, so you have to use this assembly language routine. It's sending commands to registers on the Xebec directly, programming it in its native language. Check for a typo - if you screwed up you told it to do something else besides a low level format.

Int 13 Function 7 is not going to cut it .. that's a high level format, not a low level format. Two different animals. Might as well just use the DOS format command. The low level format is controller specific and not part of any standard BIOS or DOS interrupt.
 
I stand corrected ... INT 13 on a machine that old does indeed do a low level format, not a high level format. My mistake ..




Mike
 
So, once users were not supposed to low level format disks anymore, did they reuse this interrupt hook for high level format and similar calling interface for programs that relied on the hard disk should get formatted in some way? :)
 
Back
Top