|
-
Apr 24th, 2002, 09:45 AM
#1
Thread Starter
New Member
Questions in Assembler - Created a PIANO wheee :)
I have a problem in my piano program -
i want to make a part in my program that is responsible for the color change in the piano keys in such a way that AS LONG AS A KEYBOARD KEY IS PRESSED that piano key that is related to the keyboard key will be BLUE (creating a delay that is reacting to the key press, or something) and the moment the finger is released from the key - it will turn white again.
i dont know how to create such a delay - now im using a fixed delay which is no good at all... sometimes when i press the same key twice fast it doesnt show the blue thing appropiately
besides that i need help in many more things... if someone will be willing to help me - i will appreciate it very much
thank you in advance
amit
-
Apr 24th, 2002, 01:40 PM
#2
Thread Starter
New Member
Help ...
Pleaseee help me !
My project is 'supposed' to be handed over in a week and i have no idea how to solve this !
arhhhhhh
-
Apr 24th, 2002, 01:45 PM
#3
Frenzied Member
at http://board.win32asmcommunity.net/ you'll get a much faster response
-
Apr 26th, 2002, 02:39 AM
#4
New Member
The thing that may help you is to use ports ....
if you know pascal this would be it ... the asm is not much different
Program test_keybp;
begin
repeat
Witeln(port[$60]);
until port[$60] = 1;
end.
this program will loop ..until you press ESC
and write the codes of the key(s) pressed...
you can say :
make_blue;
while port[$60] = xxx do begin
{stay blue, or do something}
end;
return_to_white;
the instruciton in ASM is IN for reading and OUT for writ...
There is a problem with this ...you need to find a way to tell
the comp. that you handled the key change or it will beep ...
like hell..
how to do that I do not know..
sorry for the way I wrote this, no time for decorations
-
Apr 26th, 2002, 02:49 AM
#5
New Member
ups
I forgot, the $60 (60h) is the "place" where the status
of the keyb. is kept... so any change will be noticable by
comparing ...
I will post the code ... as soon as I get my hands on masm
or pascal, tried to do a .com in debug.exe but I love my
self and my self and decided not to.
-
Aug 28th, 2002, 08:26 AM
#6
some port near that tells that you handled it.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|