home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / aztec-c / minroot.c < prev    next >
Encoding:
C/C++ Source or Header  |  1984-10-09  |  1023 b   |  39 lines

  1. Date: Friday, 13 April 1984
  2. From: Jack Bicer
  3. To:   Aztec C Users
  4.  
  5. Someone complained that Aztec C creates a large COM file (compared to what???).
  6. Keep the code below in seperate file, and include it when linking your modules
  7. (order doesn't matter, but before libc.lib). I call this file minroot.c and
  8. minroot.o for source and relocatible versions respectively.
  9. -----------------------------------------------------------------------
  10. Croot()
  11. {
  12.     exit(main());
  13. }
  14.  
  15. exit(code)
  16. {
  17.     boot@();  /* @ sdands for underline character. These keyboards!!! */ 
  18. }
  19.  
  20. badfd()
  21. {
  22.     return -1;
  23. }
  24.  
  25. noper()
  26. {
  27.     return 0;
  28. }
  29. ----------------------------------------------------------------------
  30. The result of the program  "main() { }" (which shows size of the runtime
  31. package) is:
  32.   with minroot.o = 7 sectors --> 896 bytes
  33.   without        =36 sectors -->4608 bytes
  34.   
  35.   But if you use the buffered I/O library (printf does!), then the necesseary
  36.   code gets linked in and the size of the COM file is the same as before.
  37.   
  38.       Jack Bicer
  39.