home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / System / Stack6000 INIT / Stack6000.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-05-19  |  518 b   |  27 lines  |  [TEXT/KAHL]

  1. /* Stack6000 is a simple, very simple test for 6000 as the default stack size. 
  2.               If it's smaller, it's set to $6000  */
  3.  
  4. #define DfltStack *(long *)(0x0322) 
  5. #define GOODSIZE 0x6000
  6.  
  7. pascal void ShowINIT(short iconID, short moveX);
  8.  
  9. main()
  10. {
  11. /* save all system registers */
  12.     asm {
  13.         movem.l    a1-a5/d0-d7, -(SP)
  14.         }
  15.         
  16.     if(DfltStack<GOODSIZE) {
  17.         DfltStack = GOODSIZE;
  18.         ShowINIT(128,-1); /* did it */
  19.         }
  20.     else ShowINIT(129,-1); /* already there */
  21.     
  22.     asm {
  23.         movem.l    (SP)+, a1-a5/d0-d7        ; restore registers
  24.         }
  25.  
  26. }
  27.