Alright. I know that in DOS assembly, you can use AND on a register to clear bits by having a binary mask of what you want cleared set to 0 and what you don't want cleared as 1. Then it stores the new number in the same register.
What I want to be able to do in 6502 is use an AND statement on something, use a mask to clear all but one bit. Say I want to look at bit #1 (mask of %00000010). Can I then take that bit I looked at and store its 1 or 0 into something or do I have to use a LSR and store after that?
Basically say I had a variable that had the binary value: %11111101, I loaded that into A and then performed AND with %00000010. Obviously bit #1 is 0. Can I take that 0 and store it without having to use a bunch of CMP statements?
Sorry if this sounds strange, but I tried wording it as best I could.
What I want to be able to do in 6502 is use an AND statement on something, use a mask to clear all but one bit. Say I want to look at bit #1 (mask of %00000010). Can I then take that bit I looked at and store its 1 or 0 into something or do I have to use a LSR and store after that?
Basically say I had a variable that had the binary value: %11111101, I loaded that into A and then performed AND with %00000010. Obviously bit #1 is 0. Can I take that 0 and store it without having to use a bunch of CMP statements?
Sorry if this sounds strange, but I tried wording it as best I could.