with your help, i managed to finnaly fix my stupid problems about the keys input...
now there is only one more thing :) lol !
since i have to hand over this work in 2 days (i managed to post pone it, luckily, very luckily) i got this one more problem to fix -

all the keys, produce the same sound !
now, i know how this speaker activation works, and if someone here knows it - i would be happy to get some explanation about it, because no matter what experiments i do with it, each key sounds exactly the same.
the thing is, the program creates a square wave in volts (from 1 binary to 0 binary and back to 1 again) and the frequency of that wave determines the height of the sound.
now if i change the delay between the 'putting of a 1' and the 'putting of 0' it would change the frequency right ?
anyway, once a certain key is pressed, a certain delay value which represents the frequency, is put into bx, which afterwards goes to cx in the sound procedure itself (appears in code below).
here is the piece of code for the sound - anyone can help ?
if you noticed, the change is in the second least important bit, that is the one that goes 0 to 1 and back all the time.

SOUND proc ;start procedure SOUND
mov delayer,100h ;set length of sound
sound2: mov al,4eh ;store 4e in al (1001110 in binary)
out 61h,al ;move that value to adress 61h?
mov cx,bx ;sound frequency from bx to cx
wait1: loop wait1 ;wait an amount of time
mov al,04ch ;store 4c in al (1001100 in binary) out 61h,al ;move that value to adress 61h
mov cx,1000h ;move a delay value to cx
wait2: loop wait2 ;wait a fixed amount of time
dec delayer ;decrease the length of sound
jnz sound2 ;if not reached 0, jump to begin
ret ;return to main program
SOUND endp ;end procedure SOUND
Posted on 2002-05-03 09:03:53 by flipmode
Looks to me like the decrease delayer code is placed wrong. Might just be me however. looks like from what im seeing is that this delayer would affect how long the sound is played and not affect the frequency one bit. The frequency would be changed by setting different values to wait1 and wait2.

Never mind. I was reading it wrong LOL.
Posted on 2002-05-03 09:29:11 by Graebel
mov cx,1000h ;move a delay value to cx

Whats this for? Shouldnt this be umm mov cx, bx again?
Posted on 2002-05-03 09:33:20 by Graebel
"mov cx,1000h ;move a delay value to cx

Whats this for? Shouldnt this be umm mov cx, bx again?"

well, thats what my dumbass friend told me after i explained him my problem, he told me to switch the second 'mov cx,bx' to that

i guess i shouldnt be listening to dumbasses

Posted on 2002-05-03 10:25:31 by flipmode
does anyone out there have a clue what is the problem ?
if you dont know just reply with 'go to hell' or something :)
at least i will know that someone is READING this...

ARGH 24 hours left before i need to hand this over !
Posted on 2002-05-03 13:47:59 by flipmode
If I remember correctly, you can actually ask the timer to do this stuff for you so the processor won't be stuck in a loop doing this itself.

Forgot how to do it though, I'm gonna have to do some research in the really old books I have....
Posted on 2002-05-05 21:59:39 by AmkG