> if we do dll's

> how do we ...

> a) call to a function in another segment.

Using a stub in the current code segment...  i.e.

           call _printf
           .
           .

_printf:   call libc_seg:libc_printf
           ret

or

_printf:   mov ax,printf_ordinal
           call libc_seg:libc_entry
           ret
 

> b) which stack does the dll use (if the calling processes then SS != DS
> which bcc appears not to like, if its own then dealing with reentrance may
> be lots of fun if two processes call the same dll)

The far call only changes CS.  DS and SS remain the same, so DS == SS always. 
Any static data needed by the "so" (unix for "dll") has to be located in 
the caller's DS. 

Eric

Reply via email to