Solved

int 16h without wait for keypress

Posted on 1998-05-26
1
413 Views
Last Modified: 2011-10-03
I don't know how to make program for keyboard that wont wait for key to be pressed.
prg. that I have : mov ah,0
                            int 16h
That prg. waits until one key is pressed, but I need to run something paralel with this.
0
Comment
Question by:ssdjgru1
1 Comment
 
LVL 2

Accepted Solution

by:
kellyjj earned 200 total points
ID: 1217040
if you only call that code when there is a key actually pressed you should not be waiting.  
If you need other things to be done while waiting for this this is one way of doing it:

while (not done)
begin
   if (vec=2)
   begin
       dosomething;
   end
   if (vec=3)
   begin
       dosomething;
   end
   if (vec=4)
   begin
       dosomething;
   end
   if (vec=5)
   begin
       dosomething;
   end
   if (vec=6)
   begin
       dosomething;
   end

   if keypressed  getKey();  (* this is the assembler code *)
end


This is called Vectorizing.  This will allow you to do other things while you are waiting for a key to be pressed.  Keep in mind that you don't want to get stuck waiting for anything inside that loop.

Hope this helps.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Note: This is the second blog post in a series on email clearinghouses (https://www.xmatters.com/alert-management/blog-email-has-failed-us?utm_campaign=70138000000ydLoAAI&utm_source=exex&utm_medium=article&utm_content=blog-post).   Every month t…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now