[Coco] Interrupt Confusion

jdaggett at gate.net jdaggett at gate.net
Mon Jan 12 15:55:40 EST 2004


Roger

What caused the problem was I thought the reading the contrrol 
register cleared the flags. I went back and reread the spec and sure 
enough I was wrong. Been programming to much with the HC11 
lately. There the interupt flags are cleared on reading the register 
where the flag is. Forgot the PIA is a creature from the Dark 
Lagoon. 

james


On 12 Jan 2004 at 14:21, Roger Taylor wrote:

Date sent:      	Mon, 12 Jan 2004 14:21:30 -0600
To:             	CoCoList for Color Computer Enthusiasts 
<coco at maltedmedia.com>
From:           	Roger Taylor <rtaylor at bayou.com>
Subject:        	Re: [Coco] Interrupt Confusion
Send reply to:  	CoCoList for Color Computer Enthusiasts 
<coco at maltedmedia.com>
	<mailto:coco-
request at maltedmedia.com?subject=unsubscribe>
	<mailto:coco-
request at maltedmedia.com?subject=subscribe>

> At 08:31 AM 1/12/2004 -0500, you wrote:
> >Robert
> >
> >According to the databook I have the Control register is addressed
> >when RS0 and RS1 are both high. It furthter states that bits 6 and 7
> >of the control register are read only bits and are cleared with a
> >read or a RESET. Can you then explain how this equates to an $xx02
> >address? At $xx02 is the either the Data Direction Register or the
> >Peripheral register depending on the state of bit 2 if the Control
> >Register which is acessed at $xx03?
> >
> >james
> 
> 
> When an interrupt occurs, the CR flag(s) will be set and will remain
> set until you clear them (by reading the PDR register, the even
> address below the CR).  Reading the CR flags does just that and
> nothing more.
> 
> You can check the BASIC IRQ servicing code to see proof of this.  I
> probably have the most descriptive 6821 PIA docs around, and I can't
> find a reference to this either.  Actually, it's probably in there,
> but there's so much that I can't easily locate it.  My docs cover all
> of the hardware aspects as well.  I've done so much PIA programming
> that most of this just comes naturally to me without having to resort
> to the specs.  However, there are so many other things possible with
> the PIAs that the CoCos never used, so it's nice to have a 6821
> service guide to go by when you're doing PIA programming.
> 
> 
> ----------
> Roger Taylor
> 
> 
> 
> 
> -- 
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco





More information about the Coco mailing list