Hi Doug. Just a quick question; if I have my own shared library compiled with
all the new wonder-stuff of 6.2 (:-)), what is the easiest way from within that
library to access the library base? Is it safe to just call get_reg(REG_A6)? Or
do I have to OpenLibrary() myself?
Jon Potter
getreg will work OK, but what I generally do is declare the library
base explicitly.
I.E. your prototype says
int myfunc(int x, int y);
your pragma defines "myfunc" as being relative to "mybase" with two
parameters in d0 and d1
You use a LIBPREFIX value of LIB on your SLINK statement
Therefore, you can define your function as
int __asm LIBmyfunc(register __d0 int x, register __d1 int y,
register __a6 struct mylibbase *libbase)
{
}
–Doug