home *** CD-ROM | disk | FTP | other *** search
- /*------------------------------------------------------------------*/
- /* ╡{ªí└╔ªW║┘: wat37.c */
- /*------------------------------------------------------------------*/
- #include <stdio.h>
- #include <dos.h>
- #include <conio.h>
-
- #define INTERRUPT 0x1c
-
-
- void (__interrupt __far *pre_handler)();
-
- int counter=0;
-
- void interrupt handler(void)
- {
- _disable();
- counter++;
- _enable();
- pre_handler();
- }
-
- void main()
- {
- pre_handler = _dos_getvect(INTERRUPT);
- _dos_setvect(INTERRUPT, handler);
- while (counter < 100)
- printf("counter ñº¡╚¼░ %d\n",counter);
- _dos_setvect(INTERRUPT, pre_handler);
- }
-
-