comp.lang.ada
 help / color / mirror / Atom feed
* Meridian Ada and IBM PC serial ports
@ 1991-01-21 14:01 Markus Kuhn
  1991-01-22 17:07 ` Michael Feldman
  0 siblings, 1 reply; 3+ messages in thread
From: Markus Kuhn @ 1991-01-21 14:01 UTC (permalink / raw)


I am developing an (public domain) application with Meridian
Open Ada 4.1 (was AdaZ) with lots of pre-emptive tasking
and access to the serial ports (an OSI system!).

As the PC ports have only a 1 byte buffer, the software has
to respond quite fast (faster than 18,2 times/sec) on an
interrupt that indicates that a byte has been received.
I think, the fastest solution is to set the port's interrupt
on a small procedure that reads out the byte and puts it in
a FIFO queue. But when this procedure is called by the interrupt,
where can I get the required values in registers like DS, BP, ...?
The interrupt might occur at any time, so my procedure needs
to establish it's own environment in order to access the FIFO
(a task local variable).

Turbo Pascal allows to declare a special interrupt version
of a procedure. That's exactly what I need in Meridian Ada.
(Unfortunately Turbo knows no tasking :-( )

Can this problem also be solved with Meridian's interrupt
entry mechanism? Somebody wrote here a few weeks ago that this
would be to slow.

Thanks for any hint.

Markus Kuhn, Germany
CS student
(nobody important)
mskuhn@faui09.informatik.uni-erlangen.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Meridian Ada and IBM PC serial ports
  1991-01-21 14:01 Meridian Ada and IBM PC serial ports Markus Kuhn
@ 1991-01-22 17:07 ` Michael Feldman
  1991-01-23  3:12   ` Steven V. Case
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Feldman @ 1991-01-22 17:07 UTC (permalink / raw)


In article <mskuhn.664466478@faui09> mskuhn@faui09.informatik.uni-erlangen.de (Markus Kuhn) writes:
>I am developing an (public domain) application with Meridian
>Open Ada 4.1 (was AdaZ) with lots of pre-emptive tasking
>and access to the serial ports (an OSI system!).
>
>Can this problem also be solved with Meridian's interrupt
>entry mechanism? Somebody wrote here a few weeks ago that this
>would be to slow.
>
I assume you have access to the AdaZ documentation. Their DOS Environment
Library has a package called Interrupt. Gives you direct access to the
DOS interrupts without using the "right" Ada way to do it, which is the
interrupt entry. Looks similar to what you're used to in TP.

I have no idea what the comparative timings are. There is a commonly-held
view that ANYTHING done with the Ada tasking constructs MUST be much
slower than doing it "the old way" without tasking. This seems to be true
sometimes, but not always.

I'd be VERY interested in seeing a comparative implementation of (a
simple version) of your program, done both ways. I think the net would be
interested as well. If you can get this working, we'd all appreciate your
posting the code. Try something simple first.


---------------------------------------------------------------------------
Prof. Michael Feldman
Department of Electrical Engineering and Computer Science
The George Washington University
Washington, DC 20052
202-994-5253
mfeldman@seas.gwu.edu
---------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Meridian Ada and IBM PC serial ports
  1991-01-22 17:07 ` Michael Feldman
@ 1991-01-23  3:12   ` Steven V. Case
  0 siblings, 0 replies; 3+ messages in thread
From: Steven V. Case @ 1991-01-23  3:12 UTC (permalink / raw)


In article <2583@sparko.gwu.edu>, mfeldman@seas.gwu.edu (Michael Feldman) writes:
> In article <mskuhn.664466478@faui09> mskuhn@faui09.informatik.uni-erlangen.de (Markus Kuhn) writes:
> >I am developing an (public domain) application with Meridian
> >Open Ada 4.1 (was AdaZ) with lots of pre-emptive tasking
> >and access to the serial ports (an OSI system!).
> >
> >Can this problem also be solved with Meridian's interrupt
> >entry mechanism? Somebody wrote here a few weeks ago that this
> >would be to slow.
> >
> I assume you have access to the AdaZ documentation. Their DOS Environment
> Library has a package called Interrupt. Gives you direct access to the
> DOS interrupts without using the "right" Ada way to do it, which is the
> interrupt entry. Looks similar to what you're used to in TP.

Sorry, but the DOS Environment Library does not help here.  The Interrupt
package provides 'calls' to the interrupt vectors.  The original post was
looking for information on how to implement their own handler to respond
to calls to the interrupt vectors.

As it turns out, the 4.0 version of Meridian Ada does not appear to support
user implemented interrupt handlers for the RS-232 interrupts.  I don't know
if the 4.1 version will provide the capability.  I am (im)patiently waiting
for my upgrade.  As soon as it arrives I will port my 4.0 code over and 
see what happens.

-- 
  ____  ____        Steve Case - HQG526           email: case@shamash.cdc.com
 / ___||___ \       Control Data Corporation      AT&T : (612) 853-3345
| |___  ___| |      3101 East 80th Street                 
 \____||____/       Bloomington, MN 55425

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1991-01-23  3:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1991-01-21 14:01 Meridian Ada and IBM PC serial ports Markus Kuhn
1991-01-22 17:07 ` Michael Feldman
1991-01-23  3:12   ` Steven V. Case

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox