The COM (Complement) instruction is used to compute the one's complement (invert) of the value in a General Purpose Register (Rd). The result is stored back in Rd.
Instruction Syntax
COM Rd
Rd: The register whose value will be complemented (inverted).
Must be one of the 32 general-purpose registers: R0–R31.
Example
Valid Instruction:
COM R16
R16: R16 is valid since it is within the register range R0–R31.
Effect: Compute the one's complement (invert the bits) of the value in R16 and store the result back in R16.