OR bitwise operand | Variable = Variable OR ImmediateValue
This command compares the individual bits of the value between a Variable and a specific ImmediateValue, and produces a single binary output.
With OR, the resulting bit outputs are set to 1 (TRUE) if either value's bit input is 1. This makes this a good way to enable a specific bit within a byte without changing the rest of the bits.
The bits available within a single byte are:
So, for example, if you want to edit a unit's Battle Stats to add the Control flag (which is bit 0x08), but leave the other flags such as their Team untouched, you would LoadAddress the byte into an editable variable, then OR that variable against a value of 0008: OR(xVARI,x0008). This uses a zero value on every bit except 08, which uses a one value, forcing the output to always have Control flagged, while leaving the rest of the bits from the variable unaltered.
Variable : Half-Word (hex)
Immediate Value : Half-Word (hex)
Value that will be use along with the operand to change the address' value.