Article View: alt.msdos.programmer
Article #34Re: Port 20h
From: Jerzy Tarasiuk
Date: Tue, 03 Nov 1992 17:33
Date: Tue, 03 Nov 1992 17:33
21 lines
1788 bytes
1788 bytes
>>>>> On 2 Nov 92 14:14:03 MDT, sl8nl@cc.usu.edu said: > code. Bear in mind taht this is from some communication routines that I have. > This is one section of the code (from what I can remember off the top of my > head). I'd ask the original programmer, but there is no address. (I have rewritten the code in more compact form to save net bandwidth): outp(0x20,0x11); /* ICW1: cascade, edge triggered, normal */ outp(0x21,0x08); /* ICW2: base int=8, normally */ outp(0x21,0x04); /* ICW3: slave at IRQ2, normal on AT */ outp(0x21,0x03); /* ICW4: auto EOI - no need for out 20,20 * non-buffered mode * no special fully-nested mode */ outp(0x20,0x20); /* OCW: End-Of-Interrupt */ > What exactly does this do? The interrupt won't run without it (although it > should). The actual interrupt also doesn't use a mov al,20h; out 20h,al at the > end of the interrupt. It is almost same as AT or 386 computer BIOS does on initialization of 8259 (I looked BIOS code on two computers here), with one exception: the auto-EOI which is not set by BIOS (XT 8259 programming is *MUCH* different since XT has only one 8259, MUST NOT program cascade mode). The auto-EOI means no need for out 20h,20h on every interrupt.
Technical Details
Message-ID:
<JT.92Nov3183346@fizyk1.fuw.edu.pl>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!fuw.edu.pl!cocos!jtReferences:
<1992Oct27.133937.60159@cc.usu.edu> <BRIAN.92Nov1233658@ganglion.Canada.Sun.COM> <1992Nov2.141403.60314@cc.usu.edu>Show Full Headers
Complete Article Headers
Newsgroups: alt.msdos.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!fuw.edu.pl!cocos!jt From: jt@fuw.edu.pl (Jerzy Tarasiuk) Subject: Re: Port 20h In-Reply-To: sl8nl@cc.usu.edu's message of 2 Nov 92 14:14:03 MDT Message-ID: <JT.92Nov3183346@fizyk1.fuw.edu.pl> Sender: news@fuw.edu.pl Nntp-Posting-Host: fizyk1 Organization: Warsaw University Physics Dept. References: <1992Oct27.133937.60159@cc.usu.edu> <BRIAN.92Nov1233658@ganglion.Canada.Sun.COM> <1992Nov2.141403.60314@cc.usu.edu> Date: Tue, 3 Nov 1992 17:33:46 GMT Lines: 21