View Single Post
Old 10 November 2021, 20:20   #4
mcgeezer
Registered User
 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
I would probably have used eor.b #1,d0

As an aside I tend to have to do this a lot in my stuff, so I always opt to use a frame counter when doing it.

Code:
loop:
  WAIT_FOR_FRAME

  addq.l #1,FRAME_COUNTER

  move.l FRAME_COUNTER,d0
  and.l #1,d0
  beq  do_something
  bra  do_something else

  bra loop

I really would look to learn the inner workings of 68k. When I was younger I didn't pay any attention to status flags, I also didn't pay attention to detail on not, neg and particularly the effects of ext. The set instructions are all useful too.

Last edited by mcgeezer; 10 November 2021 at 22:47. Reason: thanks jotd for pointing out silly code error
mcgeezer is offline  
 
Page generated in 0.04493 seconds with 11 queries