Not sure I remember the conventions rightly, but assuming bit 0 is the
least significant bit ...
If you add a 1 to a bit you can, in effect, propagate it to a more significant
position via carry
If you add two bits together the sum is the XORing of the two
You can do both at once in this case by adding 1 to a
Then use & to isolate bit 1 to test it (ie a bitwise AND with 2)
if (a + 1)& 2 then goto __pause_game
__pause_game
produces
.L00 ; if ( a + 1 ) & 2 then goto __pause_game
; complex statement detected
LDA a
CLC
ADC #1
AND #2
BEQ .skipL00
.condpart0
jmp .__pause_game
.skipL00
.
;
.__pause_game
; __pause_game
That ought to be something like what you want
Edited by bogax, Fri Sep 30, 2011 4:50 PM.