home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 17 / CD_ASCQ_17_101194.iso / dos / prg / sphinx / examples / other / boot.c__ < prev    next >
Encoding:
Text File  |  1993-08-03  |  615 b   |  25 lines

  1. /*
  2.     NAME:  BOOT.C--
  3.     DESCRIPTION:  Simple SPHINX C-- program that cold boots or warm boots
  4.                   your computer.
  5. */
  6.  
  7. ?include "KEYCODES.H--"
  8. ?include "WRITE.H--"
  9. ?include "SYSTEM.H--"
  10.  
  11. byte message = "\nPress: <RETURN> To Cold Boot Your Computer,"
  12.                "\n       <SPACE> To Warm Boot Your Computer,"
  13.                "\n       <ESC> To Abort.\n";
  14.  
  15. main()
  16. {
  17. WRITESTR(#message);
  18. AX = @ BIOSREADKEY();
  19. IF( AX == k_return )
  20.     @ COLDBOOT();   /* insert COLDBOOT code as a macro (because of the '@') */
  21. ELSE IF( AX == k_space )
  22.     @ WARMBOOT();
  23. }
  24.  
  25. /* end of BOOT.C-- */