@freddix
From disassembled code, it would be difficult to find the offsets because the interface, while it wouldn't be in a different register each time, would not use the same register for each library to offset from. You'd have to know which register each interface structure was referencing.
Here's kind of how it works in C:
#include "myscreen.h"
#include <protos/exec.h>
#include <protos/intuition.h>
struct Library *libptr;
struct Screen *myscreen;
int main()
{
libptr=iexec->OpenLibrary("intuition.library",51);
if (libptr!=NULL)
{
iintuition=libptr->ObtainInterface("main", ...) // I'm not at my MicroA1-c right now
// you'll have to look up the parameter list for the function call
myscreen=iintuition->OpenScreen(...);
...
iintuition->CloseScreen(myscreen);
iexec->DropInterface(iintuition);
iexec->CloseLibrary(libptr);
return SUCCESS;
}
else
{
return FAIL;
}
}
It's been a while since I've coded for OS4 and this pseudo code won't compile but i hope you get the idea. The iexec pointer variable is the interface to exec.library and iintuition is the interface to intuition.library. The libptr variable points to the library base of intuition.library but is only used to obtain the interface and the interface is used after that.
Normally when importing source code written for AmigaOS 3.x there is a pragma that is either defined at the beginning of the code or from the command line that will hide all of the interface usage behind a bunch of macros so you can call the functions without being aware of the interface stuff going on in the meantime.
Hopefully somebody can point you to a better example than this because I've loaned out my MicroA1-c to DiscreetFX to use in porting Aladdin4d to OS4.