Finding the type of floppy that the OS is on.
Posted: Tue Jul 16, 2002 11:00 pm
Hi, I am currently working on an os, and I would like the os to reconize the type of disk that it is on...
I was looking through the Bios Interrupts and found an interrupt that gets the disks parameters.. here is how it looks
DISK - GET DRIVE PARAMETERS (PC,XT286,CONV,PS,ESDI,SCSI)
AH = 08h
DL = drive (bit 7 set for hard disk)
ES:DI = 0000h:0000h to guard against BIOS bugs
Return:
CF set on error
AH = status (07h)
CF clear if successful
AH = 00h
AL = 00h on at least some BIOSes
BL = drive type (AT/PS2 floppies only)
CH = low eight bits of maximum cylinder number
CL = maximum sector number (bits 5-0)
high two bits of maximum cylinder number (bits 7-6)
DH = maximum head number
DL = number of drives
ES:DI -> drive parameter table (floppies only)
What I want to know I guess is how to use this to get the type of disk. Below I have listed the possible codes for BL:
Values for diskette drive type:
01h 360K
02h 1.2M
03h 720K
04h 1.44M
05h ??? (reportedly an obscure drive type shipped on some IBM machines).
2.88M on some machines (at least AMI 486 BIOS)
06h 2.88M
10h ATAPI Removable Media Device
Any help appriciated...
I was looking through the Bios Interrupts and found an interrupt that gets the disks parameters.. here is how it looks
DISK - GET DRIVE PARAMETERS (PC,XT286,CONV,PS,ESDI,SCSI)
AH = 08h
DL = drive (bit 7 set for hard disk)
ES:DI = 0000h:0000h to guard against BIOS bugs
Return:
CF set on error
AH = status (07h)
CF clear if successful
AH = 00h
AL = 00h on at least some BIOSes
BL = drive type (AT/PS2 floppies only)
CH = low eight bits of maximum cylinder number
CL = maximum sector number (bits 5-0)
high two bits of maximum cylinder number (bits 7-6)
DH = maximum head number
DL = number of drives
ES:DI -> drive parameter table (floppies only)
What I want to know I guess is how to use this to get the type of disk. Below I have listed the possible codes for BL:
Values for diskette drive type:
01h 360K
02h 1.2M
03h 720K
04h 1.44M
05h ??? (reportedly an obscure drive type shipped on some IBM machines).
2.88M on some machines (at least AMI 486 BIOS)
06h 2.88M
10h ATAPI Removable Media Device
Any help appriciated...