Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!att!oucsace!csachs From: csachs@oucsace.cs.OHIOU.EDU (Colin Sachs) Newsgroups: comp.sys.ibm.pc Subject: Re: Interrupt to find out what drives you have... Summary: INT 11h will get you that and more! Message-ID: <727@oucsace.cs.OHIOU.EDU> Date: 18 Aug 89 00:40:43 GMT References: <4086@udccvax1.acs.udel.EDU> Distribution: usa Organization: Ohio University CS Dept., Athens Lines: 30 (William Tsai) writes: > I have to write a program which automatically detects the floppy > devices installed in a system. I am not sure if there is a way > besides reading directly from CMOS seup area, and IBM's bios listing > is not clear at all on how to use that routine. INT 11h loads the AX register with information pertaining to peripheral equiptment. The bit settings in AX are: Bit 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 | | | | | | | | | | | | |__| | Current Disk Drive | | | | | | | | | | |__| | Math Coprocessor | | | | | | | | |__| | System board RAM (64K blocks) | | | | | | | | | Initial Video Mode | | | | | |__| | Number of disk drives -1 | | | | | | DMA present? (0 yes, 1 no) | | | | Number of RS232 card in system |__| | Game I/O attached (not used on AT) | Serial printer attached (PC Jr. only) Number of printers attached (source: Peter Norton Programmer's Guide to the IBM PC, Microsoft Press '85) Mask out all the irrelevant bits and interprete the remaining number. -- Colin Sachs - csachs@oucsace.cs.ohiou.edu "I believe in everything; nothing is sacred. I believe in nothing; everything is sacred." -the Chink