home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / QFOS2.ZIP / QFRESH.C < prev    next >
C/C++ Source or Header  |  1990-12-06  |  489b  |  27 lines

  1. /* qfresh.c
  2.  *
  3.  * change memory refresh
  4.  */
  5.  
  6. short _far _pascal DosPortAccess(int, int, int, int);
  7. void _far _pascal QFSET(int n);
  8.  
  9. void main(int ac, char **av)
  10.     {
  11.     int n = 0;
  12.  
  13.     /* Gain access to ports */
  14.     if (DosPortAccess(0, 0, 0x41, 0x43) != 0)
  15.         {
  16.         puts("QFRESH: can't access system ports\n");
  17.         return;
  18.         }
  19.     if (ac == 2)
  20.         n = atoi(av[1]);
  21.     if (n != 0)
  22.         QFSET(n);
  23.     else
  24.         puts("usage: qfresh n    (suggestion: n >= 70)");
  25.     DosPortAccess(0, 1, 0x41, 0x43);
  26.     }
  27.