A92: testing bits of byte


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

A92: testing bits of byte



i need to test the bits of a byte and jump to some place if its one or 
some other place if its zero.
i tried using btst.b but that just caused crashes. i was thinking about 
this instead:

and #%0000001,d0  ; i think this modifies d0?
cmp.b #%0000001,d0 ; (if not this won't work)
bne place2   ; means its zero
bra place1   ; means its one

will that work?  am i using btst wrong?
i tried:
btst.b #1,d0
bne
bra
..
 
does btst change d0?




Follow-Ups: