🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #3191

Re: CIA Resource Allocation

#3191
From: Daniel S. Riley
Date: Sun, 08 Apr 1990 14:59
27 lines
1881 bytes
In article <10670@netcom.UUCP> mcmahan@netcom.UUCP (Dave Mc Mahan) writes:
>I have been experimenting with using the OpenResource() call to obtain use
>of the CIA-B resource.  It appears that there is no CloseResource() call.
>This function call is referenced in my RKM 1.1 manuals in the OpenResource()
>description, but my linker can't find it, and it doesn't have an entry in
>my RKM manual.  Is there such a thing?  

Nope.  OpenResource() just returns a pointer to the resource, it does not
give you exclusive access.  There's a GetMiscResource() that does allocate,
but the only miscellaneous resources are the serial and parallel bits and
port (4 misc resources total).  For the CIA's, you get exclusive access
by using AddICRVector(), which fails if the interrupt bit you try to
allocate is already in use.

Recommended reading includes the AmigaMail article by Adam Levin and
Paul Higginbottom on a timer program using the CIA resource.  Slightly
modified versions of this code by Karl Lehenbauer and Pete Yadlowsky
have been posted to Usenet in the last year or so.

>Lastly, OpenResource() returns a pointer of a structure of type Library.
[...]
>Where is the Library structure declared?

Try exec/libraries.h.

-Dan Riley (riley@tcgould.tn.cornell.edu, cornell!batcomputer!riley)
-Wilson Lab, Cornell University
Technical Details
Message-ID: <10067@batcomputer.tn.cornell.edu>
Path: arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!mailrus!iuvax!cica!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!rpi!batcomputer!riley
References: <10670@netcom.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!mailrus!iuvax!cica!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!rpi!batcomputer!riley
From: riley@batcomputer.tn.cornell.edu (Daniel S. Riley)
Newsgroups: comp.sys.amiga.tech
Subject: Re: CIA Resource Allocation
Message-ID: <10067@batcomputer.tn.cornell.edu>
Date: 8 Apr 90 14:59:33 GMT
References: <10670@netcom.UUCP>
Reply-To: riley@tcgould.tn.cornell.edu (Daniel S. Riley)
Organization: Cornell Theory Center, Cornell University, Ithaca NY
Lines: 27