Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!cbmvax!valentin From: valentin@cbmvax.commodore.com (Valentin Pepelea) Newsgroups: comp.sys.amiga.tech Subject: Re: CIA Resource Allocation Message-ID: <10713@cbmvax.commodore.com> Date: 9 Apr 90 14:16:00 GMT References: <10670@netcom.UUCP> Reply-To: valentin@cbmvax (Valentin Pepelea) Organization: Commodore, West Chester, PA Lines: 35 In article <10670@netcom.UUCP> mcmahan@netcom.UUCP (Dave Mc Mahan) writes: > > It appears that there is no CloseResource() call. There's no point having one, since the resource will not ever be expunged. >This function call is referenced in my RKM 1.1 manuals in the OpenResource() >description, but my linker can't find it, It should be in the Exec library. >While we are on the topic, what does OpenResource() do? I thought it would >give me exclusive access to the CIA-B resource. It merely returns a pointer to the CIA resource base, just like OpenLibrary() returns a pointer to a library base. It does not give you exclusive access to anythin. For exclusive access to the parallel or serial devices, you must grab the corresponding resource bits. An example can be found in AmigaMail, the newsletter published by CATS. >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. The include:hardware/cia.h file is all you need. The cia resource base structure is not published because you do not need to use anything inside it; all the entries in there are for the related functions' private use. Valentin -- The Goddess of democracy? "The tyrants Name: Valentin Pepelea may distroy a statue, but they cannot Phone: (215) 431-9327 kill a god." UseNet: cbmvax!valentin@uunet.uu.net - Ancient Chinese Proverb Claimer: I not Commodore spokesman be