Solved

int 16h without wait for keypress

Posted on 1998-05-26
1
423 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

690 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