[comp.lang.ada] Request for info: Character at a time input

wmadden@blackbird.afit.af.mil (Warren J. Madden) (06/09/89)

Recently there was a discussion on how to do one character at a time
input in Ada.  Unfortunately, my machine expired the articles before
I realized I needed them, or if they covered the situation I am in.
If anyone can send me a summary of the info in those articles, or can
help me with the problem below, I would greatly appreciate it.

Description of Problem:

I'm working on a project for school that makes heavy use of Ada tasks.
One task is charged with handling screen output, and another with keyboard
input (though I could combine the two if needed).  Screen output speed
must be fast, but each character typed at the keyboard must be processed,
though not necessarily immediately after it is pressed.  Character input
must be one at a time, since I need screen output to be done between key
presses.

I have tried to implement this on two systems.  On a Unix system running
Verdix Ada, I used the curses package located at the Ada repository.
This ran blazingly fast with just output, but as soon as I asked it to
handle both input and output the thing output slower than I can type.  I
also tried it on a VMS system using Dec Ada, and using a call to the
system QIOW service.  Problem is, when the task that waits for input
hits that service call, it suspends itself and all other tasks in the
program.  The Run-Time Manual says that the package Tasking_Services
provides an interface to the QIO service, which doesn't suspend tasks
other than the one making the call, but I can't figure out how to pass
the right parameters to it for string input and output.

Help!  I'm effectively SOL until I can find a solution to this problem.
My grade depends upon your help.


Thanks in Advance,

Warren J. Madden
wmadden@blackbird.afit.af.mil