home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / HARDWARE / DEEPDRAN.ZIP / DEEPDRAN.C next >
Encoding:
C/C++ Source or Header  |  1989-02-08  |  693 b   |  38 lines

  1. /* this routine does a deep drain on the battery */
  2.  
  3. #include <CONIO.H>
  4. #include <STDIO.H>
  5.  
  6. main()
  7.  
  8. {
  9.     unsigned char block;
  10.     unsigned long count;
  11.  
  12.     block = ' ';
  13.  
  14.     printf ("\n\nDeepDrain by Steven Polsky\n\n");
  15.  
  16.     printf ("Deep Draining your laptop battery makes it recharge more completely.\n");
  17.     printf ("Run this program until â–ˆâ–ˆ stops flashing, or press any key to abort.\n\n");
  18.  
  19.     while (! kbhit()) {
  20.         printf ("Deep Draining Battery  %c%c\r", block, block);
  21.  
  22.         if (block == ' ') {
  23.             block = 'â–ˆ';
  24.         }
  25.         else {
  26.             block = ' ';
  27.         }
  28.  
  29.         /* pause */
  30.         for (count = 1; count < 100000; count++) {
  31.         }
  32.     }
  33.  
  34.     printf ("\n\nDeepDrain aborted!\n\n");
  35.  
  36.     return(1);
  37. }
  38.