[comp.sys.ibm.pc.hardware] Another idea in detecting switches on PC's

hcooper@esunix.UUCP (Hardware Support) (07/17/90)

I believe that it was this group that included the PC reading a switch
thread......

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.  

Thought I'd pass this along in case anyone still cares 

cgordon@vpnet.chi.il.us (Gordon Hlavenka) (07/21/90)

>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