A92: Re: Testing Keypresses


[Prev][Next][Index][Thread]

A92: Re: Testing Keypresses




>Hey guys...I'm doing something wrong, can anyone help? :-)
>I'm trying to check to see if a key has been pressed.  The current code is:
>
>tst.b KEY_PRESSED_FLAG
>beq loop
>
>This seems to be an -infinite- loop, so I screwed up.  What -should- I have
>done?


The ONLY way BEQ would be changing the program counter is if the Z (zero)
bit of the CCR is set.  TST sets the Z bit only if the operand is zero.

I would check your KEY_PRESSED_FLAG.  It must not be getting set to a non-
zero state.

====
Aaron Hill (Redmond, WA)
E-Mail: SeracOhw24@msn.com
IRC-Nick: Serac (EF-Net) (was SeracOhw)




Follow-Ups: