home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / dtx9203 / borhot / sizetest.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-25  |  1.0 KB  |  28 lines

  1. /* ------------------------------------------------------ */
  2. /*                    SIZETEST.C                          */
  3. /*              (c) 1991 Borland International            */
  4. /*                   All rights reserved.                 */
  5. /* ------------------------------------------------------ */
  6. /*            veröffentlicht in DOS toolbox 3'92          */
  7. /* ------------------------------------------------------ */
  8.  
  9. #include <conio.h>
  10. #include <dos.h>
  11.  
  12. /* To compare performance with default values,
  13.    omit these lines                                       */
  14.  
  15. extern unsigned _heaplen = 1024U;       /* default = 0    */
  16. extern unsigned _stklen  = 1024U;       /* default = 4096 */
  17.  
  18. int main (void) {
  19.   unsigned long size = (_SS*16ul + _SP) - _psp*16ul;
  20.  
  21.   cputs("Hello, Borland fans!\r\n");
  22.   cprintf("Approximate image = %lu (0x%lx) bytes\r\n",
  23.           size, size);
  24.   return 0;
  25. }
  26. /* ------------------------------------------------------ */
  27. /*               Ende von SIZETEST.C                      */
  28.