|Page 1 of 1|
|Author:||rkarimi [ Tue Jan 25, 2011 8:51 pm ]|
|Post subject:||task #19|
I want to use task #19 of trap #15 for writing Tetris game. I have a problem in reading the state of Arrow keys from keyboard. I use an infinite loop as below:
if.b D1 <ne> #0 then.s *if Right arrow pressed
*code for moving right
until.l D1 <ne> #0 do
but it executes the code for moving right infinitely, by pressing the key just one time. would you please tell me where the problem is?
|Author:||profkelly [ Wed Jan 26, 2011 2:45 pm ]|
Your code works as expected when I run it. It loops until I press the right arrow key.
|Page 1 of 1||All times are UTC|
|Powered by phpBB® Forum Software © phpBB Group