Solved

int 16h without wait for keypress

Posted on 1998-05-26
1
412 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

HOW TO: Upload an ISO image to a VMware datastore for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5) using the vSphere Host Client, and checking its MD5 checksum signature is correct.  It's a good idea to compare checksums, because many installat…
A safe way to clean winsxs folder from your windows server 2008 R2 editions
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

705 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

18 Experts available now in Live!

Get 1:1 Help Now