Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!maxim!prc From: prc@erbe.se (Robert Claeson) Newsgroups: comp.dcom.lans Subject: Re: PCNFS and SLIP Keywords: SLIP,PCNFS Message-ID: <1769@hugo.erbe.se> Date: 10 Sep 90 19:45:41 GMT References: <1990Sep04.113032.18935@pemstgt.gtc.de> <1764@hugo.erbe.se> <6609@gaboon.UUCP> Distribution: comp Organization: ERBE DATA AB, Jarfalla, Sweden Lines: 89 On using PC-NFS over SLIP, I wrote: > It is possible to increase the serial port speed on the PC to 38.4 Kbps > with a small program (~10 lines of C code). And Stan Voket (asv@gaboon.UUCP) asked: > I, for one, would be interested in a posting of those 10 lines please. > E-mail is fine, also. Actually, there's a bit more than 10 lines with some cosmetic added. Here it is, raw C code for Microsoft C under messy-dos. No shar file, and no documentation. But as always, you get what you pay for :-) ---------- cut here ---------- /***************************************************************************** * * com38k.c * * Set the specified COM port to 38.4 Kbps. * * Written specifically for Microsoft C 4.0. * * Copyright 1989 Robert Claeson * * This software can be freely distributed and used, as long as * you don't sell it, claims its yours or otherwise attempts to * give credit and/or profit to anybody else than the original * author, Robert Claeson. * *****************************************************************************/ #include #include /* * CPU port numbers to use for COM ports. */ #define COM1_PORT 0x03fb #define COM2_PORT 0x02fb /* * Main function. */ main(argc, argv) int argc; char **argv; { register int portadr; if (argc == 1) portadr = COM1_PORT; else switch (*argv[1]) { case '1': portadr = COM1_PORT; break; case '2': portadr = COM2_PORT; break; default: fprintf(stderr, "Only COM ports 1 and 2 can be specified."); exit(2); } /* * This does... ehr, it's too hard to explain. */ outp(portadr, inp(portadr) | 0x80); outp((portadr -= 3), 3); outp(++portadr, 0); portadr += 2; outp(portadr, inp(portadr) & 0x7f); exit(0); } ---------- cut here ---------- -- Robert Claeson |Reasonable mailers: rclaeson@erbe.se ERBE DATA AB | Dumb mailers: rclaeson%erbe.se@sunet.se | Perverse mailers: rclaeson%erbe.se@encore.com These opinions reflect my personal views and not those of my employer (ask him).