PDA

Click to See Complete Forum and Search --> : Questions in Assembler - Created a PIANO wheee :)


FlipMode
Apr 24th, 2002, 09:45 AM
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

FlipMode
Apr 24th, 2002, 01:40 PM
Pleaseee help me !
My project is 'supposed' to be handed over in a week and i have no idea how to solve this !

arhhhhhh

numtel
Apr 24th, 2002, 01:45 PM
at http://board.win32asmcommunity.net/ you'll get a much faster response

Mirza
Apr 26th, 2002, 02:39 AM
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

Mirza
Apr 26th, 2002, 02:49 AM
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.

CornedBee
Aug 28th, 2002, 08:26 AM
some port near that tells that you handled it.