CompuServe Thread

SAS 6.2 Library Question

3 messages in this thread
#34656From: Martin MurrayMay 6, 1993 7:47 PM
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
#34673From: Doug WalkerMay 8, 1993 1:01 PM
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
#34676From: Martin MurrayMay 8, 1993 10:52 PM
Thanks for that Doug. Jon