OpenLibrary differences
07-Apr-89 07:45:38
Sb: #42999-OpenLibrary differences
Fm: Jeff Wilbourn 76657,2454
To: David Oldis 72727,2460
The A6 requirement is actually an Amiga convention, any address register
other than A7 or one that the function expects a parameter in would do.
But it's good form to establish a convention for such things to enhance
readability and minimize usage conflicts, so they came up with a useful
calling convention that everybody uses.
I don't have the programmer's manual you mentioned, but it looks like a
confused version of the combination C/Assembler function call format that's
commonly used in the manuals. E.g. the Exec RKM lists that function call
as;
libPtr = OpenLibrary(LibName, Version)
D0 A1 D0
The top line is, of course, the C pseudo-source code that would be used for
this call. It translates into the function call expecting the address of
the library's name in A1 and the minimum library version (usually 0, accept
any version) in D0. It returns with the library base address in D0 if
successful, 0 if failed. In assembler;