IP2022 Users ManualInstruction Set Architecture
www.ubicom.com
129
CSE W,#lit8
Compare W,Literal then Skip if Equal
Operation:
lit8 - W; if result is zero, skip next instruction
Bits affected:
None
Opcode:
0111 0111 kkkk kkkk
Description:
This instruction subtracts the contents of W from
an 8-bit literal and discards the result. W is left
unchanged. If the result is zero (i.e. W and the
literal are equal), the following instruction is
skipped. The STATUS register bits are not
updated.
Cycles:
1
Example:
cse w,#0x1B ;compare W against
;escape char.
jmp normal_char;if equal, jump
;to normal_char
jmp escape_char;else, jump
;to escape_char
This example compares the contents of W with
the ASCII code for the escape character. If W
holds 0x1B, then the escape_char routine is