TIP: Click on subject to list as thread! ANSI
echo: cis.os9.6809.coco
to: Kevin Darling 76703,4227 (X)
from: Kevin Darling 76703,4227
date: 1991-08-01 10:35:37
subject: #11570-#Timer Thoughts

#: 11571 S10/OS9/6809 (CoCo)
    01-Aug-91  10:35:37
Sb: #11570-#Timer Thoughts
Fm: Kevin Darling 76703,4227
To: Kevin Darling 76703,4227 (X)



  "which of the [SWI2] user SVCs ranging from $70 to $7F [can be used?]"

Umm, probably any of them.  Q: why not just use driver-specific statcalls? And
speaking of the driver...

  "The [driver interrupt service] code itself will not be able to reread the
IRQ tell-tale flags since the CoCo3's GIME resets 'em once they are read the
first time, right?  We must assume OS9 can do this on its own with the
flip/flag bytes in the F$IRQ packet, right?  And is the 12-bit timer register a
"readable" register?  What I'm getting at is that we don't have any way to
ensure the timer interrupted, do we, as a double-check?"

No, it can't re-read the GIME IRQ flags... which is why Clock stores a copy of
them at D.IRQS ($00AF) in the Direct Page variables (see my book, or check the
source for anyone's Clock module).  From that copy it's easy to tell if the
timer caused an interrupt.

In fact, since there is no other indicator, you should use the D.IRQS variable
address as the fake address of your "status register" in a F$IRQ setup packet. 
I've done this before (it's durned clever too, I might add :-).

IRQPacket fcb 0,$20,255 flip,mask,priority

DrivInit
 ldd  #D.IRQS       use GIME irq flag bits copy as
 leax IRQPacket,pc    "status register" with
 leay IRQCode,pc      bit 5 is the "irq" bit
 OS9  F$IRQ
 ...

IRQCode
 lda  D.IRQS        acknowledge timer irq tken care of
 anda #^$20
 sta  D.IRQS
 ...



There is 1 Reply.

SOURCE: compuserve via textfiles.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.