From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8b8de27edbb0829d,start X-Google-Attributes: gid103376,public From: Kris Hermans Subject: interrupt handling and COM port Date: 1998/11/04 Message-ID: <36405C45.81D74935@cs.kuleuven.ac.be>#1/1 X-Deja-AN: 408292033 Cache-Post-Path: marvin!krish@pooky.cs.kuleuven.ac.be Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@belnet.be X-Trace: naxos.belnet.be 910187590 2381 134.58.127.3 (4 Nov 1998 13:53:10 GMT) Organization: KULeuven, dept Computer Science X-Cache: nntpcache 2.3.2.1 (see http://www.nntpcache.org/) Mime-Version: 1.0 NNTP-Posting-Date: 4 Nov 1998 13:53:10 GMT Newsgroups: comp.lang.ada Date: 1998-11-04T13:53:10+00:00 List-Id: Hello, I`m trying to write 2 programs that communicate through a serial line on COM2 (2 PC`s with MS_DOS, I use GNAT310). I believe I can set up the ports correctly, but my problem is to attach an interrupt handler correctly. I use the following construct: protected type Interrupt_Interface(Int_Id: Interrupt_Id) entry Read_N(N: out Natural); entry Write_N(N: in Natural); private entry Done(N: out Natural); procedure Handler; pragma Attach_Handler(Handler, Int_Id); Interrupt_Occurred: Boolean := False; Next_Request: Boolean := True; end Interrupt_Interface; Every time PC1 writes a number to the line, PC2 gets an interrupt and reads the number for further use. The problem is that I don`t know what to use for Int_Id. I don`t think it is predefined in Interrupt.Names Do you know the solution to this or do you have written similar programs in ADA95? I would appreciate it if you mailed it to me. friendly regards, Kris.Hermans@cs.kuleuven.ac.be