Omron CP1E-E@@D@-@ Computer Hardware User Manual


 
2 Instructions
2-216
CP1E CPU Unit Instructions Reference Manual(W483)
COM/COML
Applicable Program Areas
Operands
Operand Specifications
Flags
Function
COM
COM(029) reverses the status of every specified bit in Wd.
Wd
Wd: 1 0 and 0 1
Note When using the COM instruction, be aware that the status of each bit will change each cycle in which the
execution condition is ON.
COML
COML(614) reverses the status of every specified bit in Wd and Wd+1.
(Wd+1, Wd
)(Wd+1, Wd)
Note When using the COML instruction, be aware that the status of each bit will change each cycle in which the
execution condition is ON.
Instruction Mnemonic Variations
Function
code
Function
COMPLEMENT COM @COM 029
Turns OFF all ON bits and turns ON all OFF bits in
Wd.
DOUBLE COMPLEMENT COML @COML 614
Turns OFF all ON bits and turns ON all OFF bits in
Wd and Wd+1.
Symbol
COM COML
Area Step program areas Subroutines Interrupt tasks
Usage OK OK OK
Operand Description
Data type Size
COM COML COM COML
Wd Word WORD DWORD 1 2
Area
Word addresses Indirect DM addresses
Constants CF Pulse bits TR bits
CIO WR HR AR T C DM @DM *DM
Wd OK OK OK OK OK OK OK OK OK --- --- --- ---
Name Label Operation
Error Flag P_ER OFF
Equals Flag P_EQ ON when the result is 0.
OFF in all other cases.
Negative Flag P_N ON when the leftmost bit of R is 1.
OFF in all other cases.
COM(029)
Wd
Wd: Word
Wd: Word
COML(614)
Wd