home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 2 / FFMCD02.bin / new / dev / misc / data2object / d2o.doc < prev    next >
Text File  |  1993-12-21  |  3KB  |  107 lines

  1. NAME
  2.  
  3.     d2o (Short for Data2Object) $VER: 1.1 (1.11.93)
  4.  
  5.  
  6. SYNOPSIS
  7.  
  8.     This program makes an object file out of a text file.
  9.  
  10.  
  11. FUNCTION
  12.  
  13.     Sometimes you want to have a large text file into your code. For
  14.     example a built-in helpfile. d2o gives an easy way to do just that.
  15.     It takes the textfile as an argument an produces a standard object
  16.     file.
  17.  
  18.     An example for in a makefile:
  19.  
  20.     -----------------------------------------------
  21.         OBJ = aMain.o aTextHelp.o
  22.  
  23.         Prog: $(OBJ)
  24.             slink WITH prog.lnk
  25.  
  26.         aTextHelp.o: Prog.Help
  27.             d2o -sTextHelp -oaTextHelp.o Prog.Help
  28.  
  29.         c.o.:
  30.             sc $*
  31.     -----------------------------------------------
  32.  
  33.     So when you change the helpfile Prog.Help, the object file will be
  34.     automaticly created. The helpfile is accessible through the symbols
  35.     pTextHelp and lTextHelpLen. pTextHelp is a text array (TEXT) off the
  36.     helpfile. lTextHelpLen is a LONG and gives the length of the helpfile.
  37.  
  38.     Don't forget to take the following two lines into your program:
  39.  
  40.         extern LONG lTextLen;
  41.         extern TEXT pTtextHelp;
  42.  
  43. INPUTS
  44.  
  45.     d2o [-c] [-s symbol] [-o object[.o]] <input file>
  46.  
  47.     -c 
  48.     
  49.     With the -c option the data will be loaded into chip ram. This is
  50.     nescesary for graphics and sound data.
  51.  
  52.  
  53.     -s
  54.  
  55.     The symbol name is the base name of the generated symbols pText and
  56.     pTextLen. The default basename is 'Text', but it can also be 'Help'.
  57.     This gives the two symbol names pHelp and lHelpLen.
  58.  
  59.  
  60.     -o
  61.  
  62.     If no object name is given, it wil get the name of the inputfile with
  63.     the '.o' suffix. If the inputfile itself has a suffix it will be
  64.     truncated.
  65.  
  66.  
  67. RESULTS
  68.  
  69.     An object file with the following symbols:
  70.  
  71.         TEXT   pText[];     /* Pointer to the text    */
  72.         LONG   lTextLen;    /* Length of the textfile */
  73.  
  74.  
  75. NOTES
  76.  
  77.     It is only tested with slink from SAS, but it should work with other
  78.     linkers to.
  79.  
  80.     d2o takes any file as an input file and stores it in a one large chunk
  81.     of code. So you could also use it for graphic data or any other file.
  82.     However, this is not tested so be warned if it doesn't work.
  83.  
  84.  
  85. ADDRESS
  86.  
  87.                 Matthijs Luger
  88.  
  89.     Internet:   mluger@bio.vu.nl
  90.  
  91.     Fidonet:    2:280/509.4
  92.                 2:280/303.4
  93.  
  94.  
  95. RELEASE
  96.  
  97.     v1.0 (29.9.93)
  98.     --------------
  99.  
  100.         o Initial release.
  101.  
  102.     v1.1 (1.11.93)
  103.     --------------
  104.  
  105.         o Added -c option so data will be loaded into CHIP_RAM.
  106.         o Updated the manual and changed the reference off STRPTR to TEXT.
  107.