We have a 32 bit register, from 0 to 31. 'pos' could be any position from 0 to 31 on the given register, ie if pos value is say 5, that would mean 5th bit of register.
For example take this instruction "bbs reg1, 5, label1". Consider a set of instruction, label1 being a branch address. If 5th bit on the 32 bit register is 1 then the branch address will be taken, on the other hand if the 5th bit was zero the branch will not be taken instead continuing its current sequence of instructions.
To execute the same instruction in a processor that deos not support bbs we will need multiple instruction, in this case 2 instructions. Suppose mask is a 32bit variable. We need a mask so that the bitwise and of mask and reg will give us 1 or 0 depending on pos and store it in temp. Compare temp value with 0, if true don't take branch, if false take branch to label.