[comp.sys.amiga] Amiga libraries in MANX C

campbell@hplb29a.UUCP (09/30/87)

I want to

    1) compile some C source files,
    2) link them together to form a dynamically loadable Amiga library,
    3) write, compile and link a C program which calls the library functions,
    4) load the library,
    5) run the program and
    6) do all this with little or no assembly language.

Is this possible with MANX C?  How?  Is the MANX librarian irrelevant?
Thank you for your help.

                            Amiga ignoramus

jimm@mitsumi.UUCP (Jim Mackraz) (10/05/87)

In article <1380002@hplb29a.HPL.HP.COM> campbell@hplb29a.HPL.HP.COM (Neville Campbell) writes:
)I want to
)
)    1) compile some C source files,
)    2) link them together to form a dynamically loadable Amiga library,
)    3) write, compile and link a C program which calls the library functions,
)    4) load the library,
)    5) run the program and
)    6) do all this with little or no assembly language.
)
)Is this possible with MANX C?  How?  Is the MANX librarian irrelevant?
)Thank you for your help.
)
)                            Amiga ignoramus

Yes, it is possible, and you can copy the assembly and C you need from 
an example I have made available called ELib (example library).  It
is tricky at times, but you can do it.  Commodities Exchange does it,
if you have source to that.  Some amount of vudu occurs on the
caller's side, where a C calling sequence (parameters on the stack) is
converted to an Exec Library calling sequence (parameters in registers)
and then back to C style (if you write both the library and its caller
in C) on the library side of the jump table.

Aztec requires also that you set up register A4 properly on entry to
the library.

The manx librarian is properly not part of this process, although you
will probably create a manx (scanned) library full of your C-to-Lib
interfaces, giving a function call like MyLibFunc1(); something to
bind to in your program.

Since you are local, your best bet might be to phone me so I can tell
you where to send your self-addressed stamped mailer with a disk in
it (preferably with some neat stuff on it) so that I will mail you
ELib, Commodities Exchange, DropShadow source, WBDualPF, and whatever
else I stuck on that disk.  Well, what the heck, here's the address
now.  Sending an additional $5 will speed up the turnaround.	;^)

	Jim Mackraz, 4021 Second St., Palo Alto, CA  95054.
	no phone calls at home, please.

-- 
	Jim Mackraz
	Mitsumi Technology, Inc.		408/980-5422
	{amiga,pyramid}!mitsumi!jimm