Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!sunybcs!tim From: tim@sunybcs.UUCP Newsgroups: comp.sys.ibm.pc Subject: Re: Need help with Hayes 1200B software reset. Message-ID: <1942@sunybcs.UUCP> Date: Thu, 15-Jan-87 16:53:59 EST Article-I.D.: sunybcs.1942 Posted: Thu Jan 15 16:53:59 1987 Date-Received: Fri, 16-Jan-87 07:28:35 EST References: <2541@ecsvax.UUCP> <1047@sphinx.UChicago.UUCP> Reply-To: tim@gort.UUCP (Timothy Thomas) Distribution: na Organization: SUNY/Buffalo Computer Science Lines: 67 >I have also tried this 17 different ways with no success. If >anyone knows how, please post it. Ok, since you asked. Here is a small program a friend of mine wrote to do this because we both had problems with our modems not paying attention all the time. Thanks goes to markj at the same address as mine. If somebody doesnt have a C compiler, and can not translate it into another language, let me know and I will send you a uuencoded version of sethayes.exe Program follows my signature. -------- ____________ ____/--\____ \______ ___) ( _ ____) "Damn it Jim!, __\ \____/ / `--' I'm a programmer not a Doctor!" ) `|=(- \------------' Timothy D. Thomas SUNY/Buffalo Computer Science UUCP: [decvax,dual,rocksanne,watmath,rocksvax]!sunybcs!tim CSnet: tim@buffalo, ARPAnet: tim%buffalo@CSNET-RELAY ------cut here-------cut here------cut here-------cut here---------- /*** *** sethayes.c - Mark D. Johnson July 1, 1985 V1.0 *** *** A short program to force my Hayes 1200b to pay attention *** to communication programs other than Smartcom II. Performs *** a software reset directly on the UART registers. Modem must *** be COM1 for the reset to work. *** *** Special thanks to TDT for his assistance in research. ***/ showregs() /* print UART register values */ { int x1,x2,x3,x4,x5,x6,x7; /* register holders */ x1 = inp(0x3f8); x2 = inp(0x3f9); x3 = inp(0x3fa); x4 = inp(0x3fb); x5 = inp(0x3fc); x6 = inp(0x3fd); x7 = inp(0x3fe); printf("%d %d %d %d %d %d %d\n",x1,x2,x3,x4,x5,x6,x7); } main () /* perform software reset on COM1 port */ { int i; /* do nothing variable */ printf("before reset: \n"); showregs(); /* show values before */ outp(0x3fc,4); /* set reset bit */ for (i = 0; i < 32000; i++); /* waste time - necessary for reset */ outp(0x3fc,3); /* init values needed */ printf("\nfinal setting:\n"); showregs(); /* show values after */ }