This isn't specific to assembly, but if you want to find out whether a bit is set, the process is a right shift, then AND 1, then test the value. So let's say you want to get the 5th bit from the LSB. First you to a right shift by 5. Then you take the result AND 1. If the result of that is 1, the bit is set, if it's 0, then the bit is not set.
No comments:
Post a Comment