In a university lab, we are using a TI6713 processor for signal processing purposes. I have often found myself in a position where I need to do an action based on a flag bit located in one of the 32-bit registers. Some of these flags trigger interrupts when they are changed, whereas some do not.
So far I have been able to do my work by shifting left and right till the bit of interest is the least significant and sign extended. For example:
SHL A0, 14, A0 ;Shift the 17th bit 14 times left
SHR A0, 31, A0 ;Shift the bit 31 times right
[A0] B LOOP ;Branch if it's not 0
where A0 contains the flag bit 17. The problem with this is that I need to alter the register, or use more registers (which might already be in use). Also the amount of shifting I have to do has to be calculated, and although it's fairly straightforward, I'm usually in no state of mind to perform it. The instruction guide is vast, and so far I have not been able to find an instruction that fits my needs.
Is there a better/more robust way to perform this task?