#include /* module rs2329 */ #include #include #include #include #include #include #include #include #include #include #include #include ASYNC ports[3], *port[3]; /* COM1 = port[0], COM2 = port[1], COM3 = port[2] */ /* COM1 is rs232 at address 0x3f8, irq4. COM2 is rs232 at address 0x2f8, irq3. COM3 is rs422 at address 0x290, irq5 via the ICS Model RS422AT-P card. */ unsigned char get3(void); int main(int argc,char **argv){ char inbuf[80]; long i,j; char c; long toLoop; if (comopen()!=0){ fprintf(stdout,"open error\n"); goto errout; } if (argc>1){ sscanf(argv[1],"%ld",&toLoop); } else { toLoop=1000000; } fprintf(stdout,"toLoop:%ld\n",toLoop); fflush(stdout); for (;;){ c=get3(); if (c == '\r')c='\n'; fprintf(stdout,"%c",c); if (c == 'z')break; for (i=0,j=0;i