🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.intel
Article #1570

80186 programming question

#1570
From: coltoff
Date: Tue, 03 Feb 1987 21:44
24 lines
1512 bytes
I am currently writing code for a 80186 board I designed and have
a question relating to interrupts. When the End Of Interrupt is
issued the interrupt controller priority mask will get set to the
priority of the next lowest level, if there is an interrupt pending,
or all 1's if no interrupt is pending. If I have the following code

	spl5();	/* set mask to 5 */
	  *
	  *
	  *
	spl7();	/* set mask back to 7 */

I have no guarantee that some interrupt won't cause the mask to
change back to 7 before I want it to. Now I may be a hardware jock but it
doesn't seem intuitive to me to have my interrupt handler have to
save my mask for me and then restore it when it exits. In fact I
can say it's wrong to do that since the handler doesn't easily know
if another interrupt is pending. Is this really the way the 80186 PIC
works or is my manual wrong? If it does work this way how does one
write code for the example above? Thanks in advance.

	- Joel Coltoff
	{sdcrdcf,psuvax1,seismo}!burdvax!coltoff
Technical Details
Message-ID: <2992@burdvax.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!ucla-cs!sdcrdcf!burdvax!coltoff

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!ucla-cs!sdcrdcf!burdvax!coltoff
From: coltoff@burdvax.UUCP
Newsgroups: comp.sys.intel
Subject: 80186 programming question
Message-ID: <2992@burdvax.UUCP>
Date: Tue, 3-Feb-87 16:44:41 EST
Article-I.D.: burdvax.2992
Posted: Tue Feb  3 16:44:41 1987
Date-Received: Thu, 5-Feb-87 03:51:50 EST
Organization: System Development Corp., Paoli, PA
Lines: 24
Keywords: interrupts, priority mask