[comp.sys.amiga.tech] Custom Libraries: How??

dan-hankins@cup.portal.com (Daniel B Hankins) (02/14/89)

     Okay, I give up.  I have RTFM about ten times now on four different
manuals, and I can't figure it out.

     How do I create a custom library?

     I know about MakeLibrary and AddLibrary and those calls, from the
RKMs.  What I mean is, how can I create a library that resides on disk, and
is loaded when someone first does an OpenLibrary on it?

     I was thinking about building an ARexx library to provide an interface
to Graphics.library, so I can hack around with graphics in ARexx.  If it
turned out not to be too difficult, I might even build ARexx libraries to
interface to all the other standard system libraries.

     So what's the trick?


Dan Hankins

dan-hankins@cup.portal.com (Daniel B Hankins) (02/17/89)

     Okay, let me rephrase the question, now that I know the basics of
creating a library:

     Is there any general technique for creating an Amiga disk-based
library which does not resort to assembler?  For instance, can the jump
vectors be loaded when the library is opened for the first time?

     I'm working in Modula-2, which does not have static initialization of
data structures.  To build a library in Modula-2 without linking to
assembler code, I would have to be able to load the jump vectors when the
library is loaded, and not before.  Is this possible?


Dan Hankins

papa@pollux.usc.edu (Marco Papa) (02/17/89)

In article <14630@cup.portal.com> dan-hankins@cup.portal.com (Daniel B Hankins) writes:
|     Okay, I give up.  I have RTFM about ten times now on four different
|manuals, and I can't figure it out.
|
|     How do I create a custom library?
|
|     I know about MakeLibrary and AddLibrary and those calls, from the
|RKMs.  What I mean is, how can I create a library that resides on disk, and
|is loaded when someone first does an OpenLibrary on it?

The 'old' RKMs have a "skeleton" library, written in assembler (mylib.asm),
at the end of Vol.2.  I am sure these sources are also in the Addison-
-Wesley manuals.

Another example you might want to look at are the sources of midi.library.
These have been posted a while back on usenet (and so you can find them in 
one of the usual places) and arwe on one of the Fish Disks.   This one also
is in assembler.

A while back, Matt Dillon posted on Usenet a "skeleton" library written for 
MANX C, too. All of this should give you a good start.

-- Marco Papa 'Doc'
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
uucp:...!pollux!papa       BIX:papa       ARPAnet:pollux!papa@oberon.usc.edu
 "There's Alpha, Beta, Gamma and Diga!" -- Leo Schwab [quoting Rick Unland]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

darin@nova.laic.uucp (Darin Johnson) (02/18/89)

One of the recent Amiga Transactor's had an article on creating
libraries.  I think it was issue 4 or 5.

Darin Johnson (leadsv!laic!darin@pyramid.pyramid.com)
	Can you "Spot the Looney"?

bryce@cbmvax.UUCP (Bryce Nesbitt) (02/18/89)

In article <14630@cup.portal.com> dan-hankins@cup.portal.com (Daniel B Hankins) writes:
|
|     Okay, I give up.  I have RTFM about ten times now on four different
|manuals, and I can't figure it out.
|     How do I create a custom library?


Find the "sample library" example:

	It's Appendix K in the White RKM Volume 2
	It's Appendix F in the Addison-Wesley RKM: Libraries and Devices

-- 
|\_/|  . ACK!, NAK!, EOT!, SOH!
{O o} .     Bryce Nesbitt
 (")        BIX: bnesbitt
  U	    USENET: cbmvax!bryce@uunet.uu.NET -or- rutgers!cbmvax!bryce
Disclaimer: I'm not an official, and this is not an official opinion.