From Intellivision Wiki
m (Protected "COMR" ([edit=autoconfirmed] (indefinite) [move=autoconfirmed] (indefinite)))
Latest revision as of 08:10, 4 December 2010
|Instruction Name||Complement Register|
|CP1610 Clock Cycles||6|
|Output Flags||Sign Flag, Zero Flag|
The Complement Register (COMR) instruction creates a ones complement of the value in the specified register, stores the result in the same register, and sets or clears the Sign Flag and Zero Flag according to the results. Note that a ones complement of any 16-bit value is equivalent to the value xor'ed with $FFFF (value^$FFFF).
where: rrr indicates the target register such that: rrr == 000 indicates register R0 rrr == 001 indicates register R1 rrr == 010 indicates register R2 rrr == 011 indicates register R3 rrr == 100 indicates register R4 rrr == 101 indicates register R5 rrr == 110 indicates register R6 rrr == 111 indicates register R7