Event Instruction B9
Divide Immediate | Variable = Variable ÷ ImmediateValue (high 32bit)
Divides Variable 1's Value by Variable 2's Value and gives the remainder as the result.
So if VAR1's Value was 0018 and VAR2's Value was 0006, the result (saved to VAR1) would be 0000.
If VAR1's Value was 0019 and VAR2's Value was 0006, the result (saved to VAR1) would be 0001.
Can be used after Random to essentially generate a random number along a specific range - from 0 to one number less than VAR2's Value.
Variable 1 : Half-Word (hex)