Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!uunet!gsm001!mailgsm From: gsm@mailgsm.mendelson.com (Geoffrey S. Mendelson) Newsgroups: comp.os.coherent Subject: Re: Catching COM port interrupts Message-ID: <10580120@mailgsm.mendelson.com> Date: 1 May 91 03:50:37 GMT Sender: news@mailgsm.mendelson.com (GNEWS Version 1.01b2 news poster.) Organization: GNEWS Development Center -- Philadelphia, Pa. Lines: 57 marke@richs118.cpg.trs.reuter.com (Mark Ellis) asks: > >Also, I don't really understand the different device drivers for the com >ports. >According to the manual, each port has corresponding drivers for polled mode or >interrupt driven mode. Well, where to the interrupts go when they occur? It depends. in polled mode the interupts are turned off. They go no where because they never happen. This is the way dos users com ports btw. >Is there any way to catch com port interrupts for reading the com port >when data is present rather than polling the port? I was hoping to find >a signal called "SIGCOM" (BSD like), which would do the trick, or >"select" (also BSD). Perhaps there is some other way I am unfamiliar with? > It's all described very nicely in the device driver manual. Unless you are going to write your own drivers, you never need to get the interupts. If you are going to write your own driver, consider (very seriously) canibalizing the ones in the driver kit. If you are just using the ports and the coherent drivers, here are the relevant facts: com1 uses irq 4 com2 uses irq 3 com3 uses irq 4 com4 uses irq 3 If you are using only two lines try to use 1/2, 3/4, 1/4, 2/3 and the interupt drivers. If you are using four lines use two interupt and two polled. Put high speed devices on the interrupt driven lines, and low speed ones on the polled lines. If you have low volume dial out only lines, use them polled if don't have interupts for them. Some internal modems and serial cards will use irq 2 or 5. If you have one and those interupts are free, you can patch the drivers to use them. Buy the driver manual and read it. It will probably be the best computer education you can get for $40. ------ Copyright (C) 1991, Geoffrey S. Mendelson. All Rights Reserved. Except for usenet followups, may not be reproduced without permsission. ---------------------------------------------------------------------------- | | Computer Software Consulting | | ---------------------------------------------------------------------------- Geoffrey S. Mendelson I've written and debugged almost eight thousand geoffrey@mendelson.com LINES of C code under Coherent in the last two mwcbbs!mailgsm!geoffrey months. :-) (215) 242-8712 And my wife still speaks to me!