🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

CIA Resource Allocation

#3187
From: Dave Mc Mahan
Date: Sun, 08 Apr 1990 06:31
25 lines
1809 bytes
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?  

While we are on the topic, what does OpenResource() do?  I thought it would
give me exclusive access to the CIA-B resource.  Upon multiple runnings of
my program, I find that I can always succesfully allocate the resource.  There
appears to be no exclusivity involved.  Is this correct?  Once I do the
OpenResource() call, do I just go ahead and start programming the chip
registers directly, or should I go through some system calls?  I get a pointer
back from OpenResource(), what do I do with it, besides use it to make the
AbleICR(), AddICRVector(), RemICRVector(), and SetICR() function calls?  Is
there ever a time when OpenResource() will return saying I can't access the
resource?

Lastly, OpenResource() returns a pointer of a structure of type Library.
I can't seem to find a declaration for the Library structure in any of my
include files, but the program still compiles.  Upon further testing, the
Library structure appears to have no length. (I found this out by trying
to increment the pointer returned.  It comes back with the same value)
Where is the Library structure declared?

   -dave
Technical Details
Message-ID: <10670@netcom.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!netcom!mcmahan

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!netcom!mcmahan
From: mcmahan@netcom.UUCP (Dave Mc Mahan)
Newsgroups: comp.sys.amiga.tech
Subject: CIA Resource Allocation
Message-ID: <10670@netcom.UUCP>
Date: 8 Apr 90 06:31:03 GMT
Organization: NetCom- The Bay Area's Public Access Unix System
Lines: 25