home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 …ember: Reference Library / Apple Developer Reference Library (December 1999) (Disk 1).iso / pc / what's new / technical documentation / macintosh technotes and q&as / technotes / tn / tn1137.hqx / InterruptDisableLib1.0b2 / TestInterruptDisableLib / TestInterruptDisableLib.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-28  |  883 b   |  35 lines

  1. #include <stdio.h>
  2.  
  3. #include "InterruptDisableLib.h"
  4.  
  5. void main(void)
  6. {
  7.     UInt16 firstExecutionMask;
  8.     UInt16 firstExecutionMask2;
  9.     UInt16 secondExecutionMask;
  10.     UInt16 secondExecutionMask2;
  11.     UInt16 thirdExecutionMask;
  12.     
  13.     printf("Hello Cruel World!\n");
  14.     printf("TestInterruptDisable.c\n");
  15.     
  16.     Debugger();
  17.     
  18.     firstExecutionMask = GetInterruptMask();
  19.     
  20.     firstExecutionMask2 = SetInterruptMask(5);
  21.     
  22.     secondExecutionMask = GetInterruptMask();
  23.     
  24.     secondExecutionMask2 = SetInterruptMask(0);
  25.  
  26.     thirdExecutionMask = GetInterruptMask();
  27.     
  28.     printf("firstExecutionMask   = %d\n", firstExecutionMask);
  29.     printf("firstExecutionMask2  = %d\n", firstExecutionMask2);
  30.     printf("secondExecutionMask  = %d\n", secondExecutionMask);
  31.     printf("secondExecutionMask2 = %d\n", secondExecutionMask2);
  32.     printf("thirdExecutionMask   = %d\n", thirdExecutionMask);
  33.     
  34.     printf("Done.  Press command-Q to Quit.\n");
  35. }