home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / language / sozoinit / sozoinit.doc next >
Text File  |  1993-10-23  |  2KB  |  32 lines

  1. The file SOZOINIT.S is a startup module for sozobon C that can be
  2. used to start either a desk accessory or a program. In fact, if
  3. a program is written carefully it will work both ways just by changing
  4. its name.
  5.  
  6. This startup module sets a global int called _app to 1 if the program
  7. is being run as an application, or to 0 if it is run as a desk
  8. accessory.
  9.  
  10. This startup module does not call the functions to parse the arcv[]
  11. array, nor does it call _exit() to clean up open file streams. These
  12. things are not necessary for accessories which do not take arguments
  13. or exit. It does set global variables for the basepage pointer and
  14. program size, so arguments can be retrieved and TSR's can easily
  15. exit. A bonus of this startup module is that simple executable files
  16. will be quite small, and there is no need to #include "minimum.h".
  17.  
  18. The sozobon command CC will use the file DSTART.O as the startup module.
  19. I suggest you make a backup copy of the default dlibs version before
  20. you rename SOZOINIT.O to DSTART.O.
  21.  
  22. It is my hope that more people will write desk accessories that also
  23. work as programs. Feel free to pass along this startup module.
  24.  
  25. Samuel Streeper
  26.  
  27. p.s. For a source code example of an accessory that also works as a
  28. program, you might want to look at the Double Vision formatter
  29. also posted to comp.sources. That was actually written in Laser C,
  30. but should work fine with Sozobon and this startup module. (you will
  31. probably have to cast a few (char *)'s to (long)'s)...
  32.