Re: A83: Re: A Few ASM Questions to all the Gurus out there
[Prev][Next][Index][Thread]
Re: A83: Re: A Few ASM Questions to all the Gurus out there
James Matthews wrote:
>
> > 1st Question:
> > How do I go about acknowledging 2 key presses at once like up-right or
> > down-left...
> > I think Bill Nagel did this is penguins... but there is no code..
>
> Sorry, no idea. Perhaps checking for one, then another using direct input?
>
if both keys are in the same group its simple. just add the two keyvlues
together and check for that value.. it should work. (it works in my mind at
least, havnt tried it :)
I mean.. like this:
;Recuired stuff here for getting direct key-value in 'a'
cp kLeft+kUp
jp z, keys_pressed ;go to ruitine to handle the keypress
or something like that :)
If they are not in the same group you have to do 2 checks right after each other
where he doesnt do the second keytest if not the first was true.. quite simple:
;Recuired stuff here for getting direct key-value in 'a'
cp kLeft
jp nz, notpressed ;skip sekond test if not pressed.
;Recuired stuff here for getting direct key-value in 'a'
cp kUp
jp z, keys_pressed ;go to ruitine to handle the keypress
notpressed:
;-- rest of key-testing here..
Hope that helped..
Hmm.. Why is it feeling like no-one else want to help exept me :)
//Olle
Follow-Ups:
References: