🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #1691

Re: IRQ lines?

#1691
From: david nugent
Date: Fri, 27 Jul 1990 05:47
33 lines
1868 bytes
In <90206.194111TOMIII@MTUS5.BITNET> TOMIII@MTUS5.BITNET (Thomas Dwyer III) writes:

> Is it possible for a program to detect which IRQs are being used and
> which are not?  It would be nice to have a program tell me which IRQs
> are available when I install various cards in our machines here.

Quite easily.

You read the Programmable Interrupt Controller's interrpt enable mask;
any bit NOT set means that the corresponding IRQ is active.

So, for a PC machine with 8 IRQ levels, you would simply read it with an

	in  AL,20H
	
However, this doesn't mean that a particular IRQ is "available" for use
any another device.  It only means that the PIC has been programmed with
that IRQ active, which indicates that there is software in the system
servicing it.  There may well be add-on cards in your system configured
to use an IRQ, but they don't happen to be active at the time you read
the PIC.

Printer and communications ports are a good example of that.  They may
well be configured to run on a particular IRQ, but since MS-DOS doesn't
use them "interrupt driven" it doesn't activate the IRQ.  Placing another
card on your system which requires use of that IRQ may well cause a
clash.

-- 

        Fidonet: 3:632/348   SIGnet: 28:4100/1  Imex: 90:833/387
               Data:  +61-3-885-7864   Voice: +61-3-8266711
 Internet/ACSnet: david@csource.oz.au    Uucp: ..!uucet!munnari!csource!david
Technical Details
Message-ID: <660@csource.oz.au>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!tut.cis.ohio-state.edu!purdue!ames!uhccux!munnari.oz.au!csource!david
References: <90206.194111TOMIII@MTUS5.BITNET>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!tut.cis.ohio-state.edu!purdue!ames!uhccux!munnari.oz.au!csource!david
From: david@csource.oz.au (david nugent)
Newsgroups: comp.os.msdos.programmer,comp.sys.ibm.pc.programmer
Subject: Re: IRQ lines?
Message-ID: <660@csource.oz.au>
Date: 27 Jul 90 05:47:51 GMT
References: <90206.194111TOMIII@MTUS5.BITNET>
Reply-To: david@csource.oz.au
Organization: Unique Computing Pty Ltd, Melb, Aust.
Lines: 33