I mentioned the SELECTx functions previously. That means SELECT8, SELECT16 and SELECT32. I think I’ll stick to the SELECTx or MOVEx_y to denote that the function have variations for different data types.
In any case, the SELECTx functions. I was on the lookout for bitmask operations and hoping that it would select portions of a variable into another variable. (Naive and stupid, but I wanted them bitmask operations so bad )
So what the SELECTx function does is to pick one or the other of two parameters based on a third parameter. So it is like a C conditional operator.
This is how the SELECTx function works in LMS:
SELECT8( flag, 10, 20, newvar )
And this is how the conditional operator works in C:
newvar = flag ? 10 : 20;
And that’s it.