IP2022 Users ManualInstruction Set Architecture
www.ubicom.com
131
CSNE W,fr
Compare W,fr then Skip if Not Equal
Operation:
fr - W; if result is nonzero, skip next instruction
Bits affected:
None
Opcode:
0100 000f ffff ffff
Description:
This instruction subtracts the contents of W from
the specified data memory location and discards
the result. The data memory location and W are
left unchanged. If the result is nonzero (i.e. W and
the literal are not equal), the following instruction
is skipped. The STATUS register bits are not
updated.
Cycles:
1
Example:
csne w,0x1F0;compare W against
;register 0x1F0
ret
;if equal, return
nop
;else, skip to here
This example compares the contents of W with
the contents of data memory location 0x1F0. If W
and the data memory location hold the same
contents, then the nop instruction is executed,
otherwise the ret instruction is executed.