[comp.sys.amiga] Lattice blink question

amr@dukee.egr.duke.edu (Anthony M. Richardson) (12/14/89)

I've always thought the Amiga shared libraries were a nifty idea and
so I've decided to try and create my own library. Blink (with the
LIB option I believe -- this is mentioned in the blink.readme file
on 5.04) appears capable of doing a lot of the work for me, but the
blink.readme file says to compile all user routines with the -ml option.  
Anyone know what this does? I couldn't find it documented anywhere.

Thanks,
Tony Richardson        amr@dukee.egr.duke.edu

walker@sas.UUCP (Doug Walker) (12/18/89)

In article <596@cameron.cs.duke.edu> amr@dukee.egr.duke.edu (Anthony M. Richardson) writes:
>...but the
>blink.readme file says to compile all user routines with the -ml option.  
>Anyone know what this does? I couldn't find it documented anywhere.

According to Steve Krueger, who implemented the LIB option on BLINK,
the -ml compiler option does the following:

1.  If the __saveds keyword is present on the function definition
    (or if the -y compiler option is used, which does the same
    thing) the global data pointer is loaded into A4 from the
    appropriate offset off of the library base (A6).

2.  It preserves A6 across calls to other resident libraries.

If you are going to use global data in the function, you must
compile with -y or declare the function with __saveds to get
addressability.


  *****
=*|_o_o|\\=====Doug Walker, Software Distiller=======================
 *|. o.| ||
  | o  |//     "READY!   FIRE!   AIM!   (Software under development!)
  ======
usenet: ...mcnc!rti!sas!walker   plink: dwalker  bix: djwalker 

janhen@kunivv1.sci.kun.nl (Jan Hendrikx) (12/19/89)

In article <1382@sas.UUCP> walker@sas.UUCP (Doug Walker) writes:
|If you are going to use global data in the function, you must
|compile with -y or declare the function with __saveds to get
|addressability.
 ~~~~~~~~~~~~~~
You have programmed that ugly 370 too much.... (or 80x86s, perhaps)

|usenet: ...mcnc!rti!sas!walker   plink: dwalker  bix: djwalker 

-Olaf