home *** CD-ROM | disk | FTP | other *** search
- NAME
-
- d2o (Short for Data2Object) $VER: 1.1 (1.11.93)
-
-
- SYNOPSIS
-
- This program makes an object file out of a text file.
-
-
- FUNCTION
-
- Sometimes you want to have a large text file into your code. For
- example a built-in helpfile. d2o gives an easy way to do just that.
- It takes the textfile as an argument an produces a standard object
- file.
-
- An example for in a makefile:
-
- -----------------------------------------------
- OBJ = aMain.o aTextHelp.o
-
- Prog: $(OBJ)
- slink WITH prog.lnk
-
- aTextHelp.o: Prog.Help
- d2o -sTextHelp -oaTextHelp.o Prog.Help
-
- c.o.:
- sc $*
- -----------------------------------------------
-
- So when you change the helpfile Prog.Help, the object file will be
- automaticly created. The helpfile is accessible through the symbols
- pTextHelp and lTextHelpLen. pTextHelp is a text array (TEXT) off the
- helpfile. lTextHelpLen is a LONG and gives the length of the helpfile.
-
- Don't forget to take the following two lines into your program:
-
- extern LONG lTextLen;
- extern TEXT pTtextHelp;
-
- INPUTS
-
- d2o [-c] [-s symbol] [-o object[.o]] <input file>
-
- -c
-
- With the -c option the data will be loaded into chip ram. This is
- nescesary for graphics and sound data.
-
-
- -s
-
- The symbol name is the base name of the generated symbols pText and
- pTextLen. The default basename is 'Text', but it can also be 'Help'.
- This gives the two symbol names pHelp and lHelpLen.
-
-
- -o
-
- If no object name is given, it wil get the name of the inputfile with
- the '.o' suffix. If the inputfile itself has a suffix it will be
- truncated.
-
-
- RESULTS
-
- An object file with the following symbols:
-
- TEXT pText[]; /* Pointer to the text */
- LONG lTextLen; /* Length of the textfile */
-
-
- NOTES
-
- It is only tested with slink from SAS, but it should work with other
- linkers to.
-
- d2o takes any file as an input file and stores it in a one large chunk
- of code. So you could also use it for graphic data or any other file.
- However, this is not tested so be warned if it doesn't work.
-
-
- ADDRESS
-
- Matthijs Luger
-
- Internet: mluger@bio.vu.nl
-
- Fidonet: 2:280/509.4
- 2:280/303.4
-
-
- RELEASE
-
- v1.0 (29.9.93)
- --------------
-
- o Initial release.
-
- v1.1 (1.11.93)
- --------------
-
- o Added -c option so data will be loaded into CHIP_RAM.
- o Updated the manual and changed the reference off STRPTR to TEXT.
-