User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Assembly section within the Software Development category of DaniWeb, a massive community of 391,860 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,571 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Assembly advertiser:
Views: 2103 | Replies: 1
Reply
Join Date: Aug 2005
Location: Cologne, Germany
Posts: 99
Reputation: sDJh is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 8
sDJh sDJh is offline Offline
Junior Poster in Training

Help GetKey via Interrupt or I/O

  #1  
Aug 16th, 2005
Hello everybody,
I just signed up, 'cause I looked through the internet over days to find a solution for the BASIC function GetKey(). It simply returns the Scancode of a key pressed by the user or 0 by default (if no key was pressed).

I found the well known BIOS Interrupt Int 16h but both functions AX=1 and AX=0 stop the execution of my programm and wait 'til a key is pressed.

So I regarded some codes with I/O exchanges, and I sat down for a few hours to read the scancode from port 60 and translate it into an ASCII-character. Well, this works fine by now, except that
1) everytime I press a key I hear a *beap* from the motherboard (I guess)
2) after a while typing in a text the programm becomes really, really slow - I guess that there's an overflow in writing to/reading from the ports (the same sort of lack of speed as I experienced when I first wrote a network-game in UDP)

How may solve that problem?
Thanks a lot for your replies!
Simon
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2005
Location: Cologne, Germany
Posts: 99
Reputation: sDJh is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 8
sDJh sDJh is offline Offline
Junior Poster in Training

Re: GetKey via Interrupt or I/O

  #2  
Aug 17th, 2005
I found the solution for myself. I put the function ID in AL and not AH as BIOS expect me to do. Working now the way as I want to =)
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Assembly Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Assembly Forum

All times are GMT -4. The time now is 6:42 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC