Mail Archives: djgpp/1995/06/29/08:12:17
Hi! i've been desperately tryed to convert following source to
djgpp but i'm totally lost!
Can somebody help me?
#include <conio.h>
#include <dos.h>
#ifdef __cplusplus
#define INTARG ...
#else
#define INTARG void
#endif
volatile int counter1,counter2;
void interrupt (*old)(INTARG);
void interrupt my_own(INTARG)
{
counter1++;
old();
}
int main(void)
{
counter1=counter2=0;
old=getvect(0x1C);
setvect(0x1C,my_own);
cprintf("\r\nWaiting");
while(counter1<50)
{
if (counter1!=counter)
{
counter2=counter1;
cprintf(".");
}
}
setvect(0x1C,old);
return(0);
}
Thanks to all, Petri
- Raw text -