From: asheem@mandrill (Asheem Chandna)
Subject: Handling Interactive Input from the Keyboard Buffer
Date: 8 Apr 88 16:51:29 GMT [thread overview]
Message-ID: <2409@mandrill.CWRU.Edu> (raw)
Hi,
I was wondering if anyone has a working solution, or can perhaps give me a
few pointers, on handling interactive input from the keyboard buffer during
program runs.
I have a large simulation program with many tasks in it. During every time
loop, I want to do a check to see if the user has typed anything from the
keyboard. If he (or she) has, then I want to pull up the user menu. If he
hasn't, then I just want the program to continue WITHOUT waiting for user
input. Since, I'd like to do this every time loop, I'm also looking for a low
overhead way to do it (for e.g., I'd rather not have a delay based time-out on
every loop). So, basically, I'm looking for an elegant way to have the user
interrupt a program run.
Currently, I have a solution which basically uses Asynchronous System Traps
(ASTs) on Digitals VAX/VMS system. If the user types a certain control
sequence, then using ASTs, an entry call is issued to the specified task within
the Ada simulation program. On every loop, that task simply checks the
entry'count to see if the user wants to interrupt the program. While this
solution works, I'd like to use an approach that is simpler, and more portable.
Any help will be greatly appreciated.
Thanks in advance!
Asheem Chandna
Center for Automation &
Intelligent Systems Research
Case Western Reserve University
(216)-368-5118
asheem@mandrill.cwru.edu (asheem@129.22.16.1)
...!{cbosgd,decvax,sun}!mandrill!asheem
reply other threads:[~1988-04-08 16:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox