task #19
Page 1 of 1

Author:  rkarimi [ Tue Jan 25, 2011 8:51 pm ]
Post subject:  task #19

Hi sir.
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:

move.l   #$25262728,D1
move.w   #19,D0
trap     #15
lsr.l          #8,D1
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 ]
Post subject: 

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