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 >
Text File  |  1989-06-29  |  3KB  |  60 lines

  1. Version 1.1 ACRESLIB
  2. Program by Al Villarica As1*Software
  3.  
  4. changes from V1.0
  5.   - Improved allocation of registers for parm passing
  6.   - Stubs now save registers affected
  7.   - LIBID added
  8.   - VERSION & REVISION added
  9.   
  10.  
  11. This program reads in a source file and creates the necessary files needed
  12. to make it a resident shared library.  Shared libraries may be used by
  13. several processes at the same time, so one should be careful when using
  14. static data within functions (or even global variables).
  15.  
  16. The program uses the PD assembler, although the Metacomco should work.
  17. Lattice's assembler doesn't.
  18.  
  19. Important:  The LibName should be the same as the actual name of the library
  20.   file.  My program makes sure of this, so don't rename the library.  The
  21.   LibName shouldn't have any spaces either.
  22.  
  23. Important2:  fd2pragma seems to comment out any function which exceeds
  24.   a parameter count of 4.  Just fix that before using the pragma file.
  25.   Warning:  You can't use the pragma file if the parameter count exceeds
  26.   6 of any function.
  27.  
  28. To set the library name, just do:
  29.   #define LIBNAME newname.library
  30.   in the file with all your library routines.
  31. To set the BaseName, just do:
  32.   #define BASE NewBase
  33.   This is what you should use as your base when you open the library.
  34.   For example, at the start of any program you write, declare 
  35.   "long NewBase;" and open the library with "NewBase = OpenLibrary(...);"
  36.  
  37. Instructions:
  38.  
  39.   1)  Write the code to be placed in the library, and test it as though
  40.         the functions were actually part of the program.  Assume mylib.c.
  41.   2)  ACRESLIB mylib.
  42.   3)  It should then create:
  43.         myliba.a -- which is needed by the library itself (places registers
  44.           on the stack before calling the actual c routies)
  45.         mylibc.c -- also needed by the library (support functions)
  46.         mylib.bat -- batch file to compile the library (you may change
  47.           this if you use a different assembler)
  48.         mylib.fd -- .fd file which is converted to mylibpragma.h which can
  49.           be #include'd (if your routines have 6 parameters or less)
  50.         mylibstub.a -- assemble this file and link it with any program that
  51.           you want to use with your new library (if your library has
  52.           routines with more than 6 parameters).  It is better to use the
  53.           pragma file.
  54.   4)  EXECUTE mylib.bat.
  55.   5)  The program assembles the .a files, converts the .fd files, compiles
  56.         the .c files, and links the .o files to make mylib.library.
  57.         It then copies the new library to the LIBS: directory.
  58.  
  59.  
  60.