A89: Re: User Made Librarys


[Prev][Next][Index][Thread]

A89: Re: User Made Librarys




For making a user made lib, you need to add some lines to the source to make
it a lib.  This:

    xdef    _main
    ...
    ...
    xdef    _library          ;tells the assembler (whatever it is that
determines) that it's a library
    xdef    <yourlib>::0000
    xdef    <yourlib>::0001
    xdef    <yourlib>::0002
    ...
    ...
    ...
    xdef    <yourlib>::000A        ;must be in hex as far as I know

Then having the above as your labels.  Looking at graphlib's source, it has
the following:

...
...
graphlib@000E            ;the defined label for gray2
gray2:
       movem.l d1-d7/a0-a6,-(a7)
       ...
       ...

As far as I know, the label  'gray2' is just for the reader's convenience.
Having that, you then need a <yourlib>.h file.  That is just a file that
says what function is what.  Like the following.  If you where making a
graphlib type lib, you might have:

<yourlib>::0000    EQU    <yourlib>::put_sprite
;    -    -    -    -    -    -    -    -    -    -    -
;        Then here, just describe the parameters of your routine.  Makes
things a lot easier
;        for the person using your lib.
;    -    -    -    -    -    -    -    -    -    -    -

That's for if you're making a DoorsOS program.  I don't know how to do it in
_nostub.  Anyways, I hope this helps you.

Glenn Murphy - littlbit@soundex.org - 59013627 - http://littlbit.soundex.org

"Responsibility, what's that?" - MxPx
----- Original Message -----
From: "Josh 'Gage'" <antgage@apk.net>
To: <assembly-89@lists.ticalc.org>
Sent: Friday, September 22, 2000 11:26 PM
Subject: A89: User Made Librarys


>
> How Do I call user created librarys from C and ASM? if i make it nostub or
> doors does it make a difference?





References: