i was writing a program to demonstrate how ports are accessed using c. i am using the parmon (parallel port monitor) to see the counting (see program). but every time i send the program window to the back (using wimdiws98...turbo c for compiling), the program halts and resumes only afer the window is activated again. how do i make te program keep running even if i send its program window to the back?
here's the prog:
Code:#include <stdio.h>
#include <conio.h>
#include <dos.h>
#define base 0x378
void main()
{
unsigned char i=0;
char ch;
clrscr();
printf("Press <ESC> to exit the program");
fflush(stdin);
do
{
outportb (base , i);
i++;
delay (1000);
if (kbhit())
ch=getch();
}while (ch!=27);
printf("\nBYE!!!");
getch();
}