bobb@tekfdi.UUCP (Robert Bales) (12/11/86)
I have a few questions on resources. I think most of the problem is that, according to the "Amiga Programmer's Manual" (Sybex), which must have been written at about the same time as the RKM, resources were not fully defined. If anyone points out that the following information is indeed in the RKM, I will take my lumps, apologize, and go away and read it. What I want to do is create another protocol for the parallel port. I know how to do what I want; I have quickly checked it out using PEEK and POKE in BASIC. When it came time to do it in C, I thought I would similarly have to ignore the "right way to do things" and play directly with the hardware. However, I discovered the "cia resource" and the "misc resource" and that's where puzzlement set in. The cia resource library allows attaching interrupt routines to CIA (aka 8250, aka parallel port, etc.) bits. Fine. And according to the RKM the misc resource "manages the serial and parallel port register bits." But the only documented functions allocate and free a micellaneous resource. Is there a way to control the register bits without using absolute addresses? ( I found a structure in "ciabase.i" which has no corresponding "ciabase.h." Topic/question 2: The allocate/free routines referred to above require a unit number. Unit numbers are talked about in connection with devices; they seem to be known only to the operating system. Perhaps are the unit numbers the defines such as MR_SERIALPORT in resources/misc.h? Topic/question 3: (This will probably be easy for anyone who has done assembly language programming on the Amiga. I've done only C, although I've done considerable assembly on the 6800 and 6502.) There is no base pointer for the misc resources library, as it is for assembly language resouces. Then how does the proper pointer get into A6? Does OpenResource() put it there? Then do I have to call the resource library routines just after the call to OpenResource(), before I do anything else which changes A6? Am I asking the right questions? :-) Thanks, Bob Bales Tektronix, Inc. I help Tektronix make their instruments. They don't help me make my opinions.