Device Detection
Posted: Wed Sep 04, 2002 2:07 am
Hi,
Does anyone know how to detect what devices are installed on a system, I know that you can detect up to two floppy disks using CMOS with the following code:
mov al, 0x10
out 0x70, al
cli
in al, 0x71
sti
format of al after this is done
High Nibble = Drive 0
Low Nibble = Drive 1
0000 = No Drive Present
0001 = 5.25" 360KB Drive
0010 = 5.25" 1.2MB Drive
0011 = 3.5" 720KB Drive
0100 = 3.5" 1.44MB Drive
0101 = 3.5" 2.88MB Drive
0110 = 3.5" 2.88MB Drive
Interrupts must be disabled (so I am told) to read this register. Does anyone know of other devices that are detectable through the CMOS or any other place.
Thanks.
PS: Bochs does not handle this properly, it will not crash but it does not return the true value, I had to reset the system and boot with my floppy and it worked properly.
Does anyone know how to detect what devices are installed on a system, I know that you can detect up to two floppy disks using CMOS with the following code:
mov al, 0x10
out 0x70, al
cli
in al, 0x71
sti
format of al after this is done
High Nibble = Drive 0
Low Nibble = Drive 1
0000 = No Drive Present
0001 = 5.25" 360KB Drive
0010 = 5.25" 1.2MB Drive
0011 = 3.5" 720KB Drive
0100 = 3.5" 1.44MB Drive
0101 = 3.5" 2.88MB Drive
0110 = 3.5" 2.88MB Drive
Interrupts must be disabled (so I am told) to read this register. Does anyone know of other devices that are detectable through the CMOS or any other place.
Thanks.
PS: Bochs does not handle this properly, it will not crash but it does not return the true value, I had to reset the system and boot with my floppy and it worked properly.