From: "Luiz Fernando" To: Subject: Interrupt problem.... Date: Sun, 11 Apr 1999 14:26:11 -0300 Message-ID: <01be8440$64e8bbe0$LocalHost@aguia> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.71.1712.3 X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 Reply-To: djgpp AT delorie DOT com Hi, How can i convert this old program written for Borland C++ v3.1 compiler to DJGPP ? THe questionis how can i write interrupt-service routines(ISR) using DJGPP ? Do you have any tutorial or source code ? Could you translate the following code to use it with DJGPP compiler ? #include #include #include #include #include #define TIMER_KEEPER_INT 0x1C // holds old com port interrupt handler. void (_interrupt _far *Old_Isr)(); long time =0 ; void _interrupt _far Timer(void) { // increment global time variable time++; } void main(void) { // install our ISR Old_Isr = _dos_getvect(TIME_KEEPER_INT); _dos_setvect(TIME_KEEPER_INT, Timer); // wait for the player to hit a key while(!kbhit()) { _settextposition(0,0); printf("\nThe timer reads:%ld ",time); } // replace old ISR. _dos_setvect(TIME_KEEPER_INT, Old_Isr); } Thanks for the help, Luiz Fernando luisoft AT myway DOT com DOT br