Path: utzoo!attcan!uunet!cs.utexas.edu!swrinde!ucsd!pacbell.com!pacbell!att!mcdchg!laidbak!obdient!vpnet!cgordon From: cgordon@vpnet.chi.il.us (Gordon Hlavenka) Newsgroups: comp.sys.ibm.pc.hardware Subject: Another idea in detecting switches on PC's Message-ID: <26a778ed-3f.1comp.sys.ibm.pc.hardware-1@vpnet.chi.il.us> Date: 20 Jul 90 21:55:04 GMT References: <2064@esunix.UUCP> Lines: 16 >Anyway, I just came across an article in 12 July issue of Electronic >Design that has a circuit using the serial port (yea, I also thought of >that :-) ) and even included a schematic and little (ugh) basic program >to read the port. But did you look at that code? Even for BASIC it's scum. They open the serial port for output. If DSR is not asserted, the program falls into an error trap (!?) otherwise it sets a variable. Somebody must have been using this as a classic "bad example" for a programming class. Oh, well -- it's good entertainment. ---------------------------------------------------------- Gordon S. Hlavenka cgordon@vpnet.chi.il.us Disclaimer: He's lying