home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
262.lha
/
ACResLib_v1.1
/
readme
< prev
next >
Wrap
Text File
|
1989-06-29
|
3KB
|
60 lines
Version 1.1 ACRESLIB
Program by Al Villarica As1*Software
changes from V1.0
- Improved allocation of registers for parm passing
- Stubs now save registers affected
- LIBID added
- VERSION & REVISION added
This program reads in a source file and creates the necessary files needed
to make it a resident shared library. Shared libraries may be used by
several processes at the same time, so one should be careful when using
static data within functions (or even global variables).
The program uses the PD assembler, although the Metacomco should work.
Lattice's assembler doesn't.
Important: The LibName should be the same as the actual name of the library
file. My program makes sure of this, so don't rename the library. The
LibName shouldn't have any spaces either.
Important2: fd2pragma seems to comment out any function which exceeds
a parameter count of 4. Just fix that before using the pragma file.
Warning: You can't use the pragma file if the parameter count exceeds
6 of any function.
To set the library name, just do:
#define LIBNAME newname.library
in the file with all your library routines.
To set the BaseName, just do:
#define BASE NewBase
This is what you should use as your base when you open the library.
For example, at the start of any program you write, declare
"long NewBase;" and open the library with "NewBase = OpenLibrary(...);"
Instructions:
1) Write the code to be placed in the library, and test it as though
the functions were actually part of the program. Assume mylib.c.
2) ACRESLIB mylib.
3) It should then create:
myliba.a -- which is needed by the library itself (places registers
on the stack before calling the actual c routies)
mylibc.c -- also needed by the library (support functions)
mylib.bat -- batch file to compile the library (you may change
this if you use a different assembler)
mylib.fd -- .fd file which is converted to mylibpragma.h which can
be #include'd (if your routines have 6 parameters or less)
mylibstub.a -- assemble this file and link it with any program that
you want to use with your new library (if your library has
routines with more than 6 parameters). It is better to use the
pragma file.
4) EXECUTE mylib.bat.
5) The program assembles the .a files, converts the .fd files, compiles
the .c files, and links the .o files to make mylib.library.
It then copies the new library to the LIBS: directory.