home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / UTILITY / SYSTEM / CLOCK10.ZIP / CLOKDEMO.C < prev    next >
Encoding:
C/C++ Source or Header  |  1990-10-18  |  634 b   |  46 lines

  1. #include <dos.h>
  2. #include <conio.h>
  3. #include "\tc\files\clock.h"
  4.  
  5.  
  6. void interrupt DoTimer();
  7.  
  8. void main()
  9. {
  10.     int x,y;
  11.     char wait;
  12.  
  13. /* Save the old interrupt vector */
  14.     oldint1C = getvect(0x1C);
  15.  
  16.     clrscr();
  17.  
  18.     cputs("Clock x-coordinate: ");
  19.     cscanf("%d",&x);
  20.     cputs("\n\rClock y-coordinate: ");
  21.     cscanf("%d",&y);
  22.  
  23.     ChangeClockPos(x,y);
  24.  
  25.  
  26. /* Set the new interrupt vector */
  27.     setvect(0x1C,DoTimer);
  28.     clrscr();
  29.     cputs("Hit [ESC] to quit");
  30.     x = 1;
  31.     while (x != 27)
  32.         x = getch();
  33.  
  34.  
  35. /* Restore the old interrupt vector */
  36.     setvect(0x1C,oldint1C);
  37.  
  38.  
  39.  
  40. }
  41.  
  42.  
  43. void interrupt DoTimer()
  44. {
  45.     TimerHit();
  46. }