* interrupt handling and COM port
@ 1998-11-04 0:00 Kris Hermans
1998-11-05 0:00 ` Jerry van Dijk
0 siblings, 1 reply; 3+ messages in thread
From: Kris Hermans @ 1998-11-04 0:00 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* interrupt handling and COM port
@ 1998-11-04 0:00 Kris Hermans
0 siblings, 0 replies; 3+ messages in thread
From: Kris Hermans @ 1998-11-04 0:00 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: interrupt handling and COM port
1998-11-04 0:00 interrupt handling and COM port Kris Hermans
@ 1998-11-05 0:00 ` Jerry van Dijk
0 siblings, 0 replies; 3+ messages in thread
From: Jerry van Dijk @ 1998-11-05 0:00 UTC (permalink / raw)
Kris Hermans (kris.hermans@cs.kuleuven.ac.be) wrote:
: 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.
GNAT for DOS does not support interrupt handling due to the real/protected
mode complexities. However, interrupt handling can be done using the
underlying DJGPP library. See my homepage (http://stad.dsl.nl/~jvandyk)
for an example program and interrupt package.
Jerry.
--
-- Jerry van Dijk | email: jdijk@acm.org
-- Leiden, Holland | member Team-Ada
-- Ada & Win32: http://stad.dsl.nl/~jvandyk
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1998-11-05 0:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-11-04 0:00 interrupt handling and COM port Kris Hermans
1998-11-05 0:00 ` Jerry van Dijk
-- strict thread matches above, loose matches on Subject: below --
1998-11-04 0:00 Kris Hermans
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox