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
On 07-Oct-98, Olle Hedman wrote:
>Hmm.. Why is it feeling like no-one else want to help exept me :)
>//Olle
Yah, well, I suppose I could say something here aswell..:
>James Matthews wrote:
>>
>> > 1st Question:
>> > How do I go about acknowledging 2 key presses at once like up-right or
>> > down-left...
First of all, you have to use direct input. If both keys are in the same
group (same value written to port 1 in the first place) it's easy; write that
byte, do an "in a,(1)", and then mask out the bits you want to check. Every
key corresponds to one bit in the byte, and zero means that the key is
pressed (sorry, Olle... =)). Anyway, if the two keys are not in the same
group it is in fact easier! Just check for the first key, and if it was
pressed, check for the second key aswell. If both keys are pressed then the
keyboard port will ofcourse say so.
>> > I think Bill Nagel did this is penguins... but there is no code..
Ever heard of disassembling?
Linus
References: