English
Language : 

45111 Datasheet, PDF (126/184 Pages) List of Unclassifed Manufacturers – 14-DAY MONEY BACK GUARANTEE
13 Appendix C: SX Instruction Set
CJE op1, op2, addr9
Compare op1 to op2 and jump if equal
Command
1) CJE fr, #literal, addr9
Words
4
Cycles
4 or 6 (jump)
(16 or 20)
2) CJE fr1, fr2, addr9
4
4 or 6 (jump)
(16 or 20)
Affects
W, C, DC, Z
W, C, DC, Z
Coding
1100 kkkk kkkk MOV W, #lit
0000 100f ffff MOV W, fr-W
0110 0100 0011 SNZ
101k kkkk kkkk JMP addr9
0010 000f ffff MOV W, fr2
0000 100f ffff MOV W, fr1-W
0110 0100 0011 SNZ
101k kkkk kkkk JMP addr9
Operation: op1 is compared to op2. If op1 is equal to op2, a jump to addr9 is executed. W is left holding the result of
op1 - op2. If CARRYX is specified, c affects the result. Insert an STC before command to avoid strange results.
CJNE op1, op2, addr9
Compare op1 to op2 and jump if not equal
Command
1) CJNE fr, #literal, addr9
Words
4
Cycles
4 or 6 (jump)
(16 or 20)
2) CJNE fr1, fr2, addr9
4
4 or 6 (jump)
(16 or 20)
Affects
W, C, DC, Z
W, C, DC, Z
Coding
1100 kkkk kkkk MOV W, #lit
0000 100f ffff MOV W, fr-W
0111 0100 0011 SZ
101k kkkk kkkk JMP addr9
0010 000f ffff MOV W, fr2
0000 100f ffff MOV W, fr1-W
0111 0100 0011 SZ
101k kkkk kkkk JMP addr9
Operation: op1 is compared to op2. If op1 is not equal to op2, a jump to addr9 is executed. W is left holding the
result of op1 - op2. If CARRYX is specified, c affects the result. Insert an STC before command to avoid strange
results.
CLC
Command
1) CLC
Words
1
Operation: The C flag is cleared to 0.
Cycles
1 (4)
Affects
C
Clear carry
Coding
0100 0000 0011 CLC
Page 126 • SX-Key/Blitz Development System Manual 2.0 • Parallax, Inc.