English
Language : 

45111 Datasheet, PDF (127/184 Pages) List of Unclassifed Manufacturers – 14-DAY MONEY BACK GUARANTEE
13 Appendix C: SX Instruction Set
CLR dest
Clear dest
1) CLR
2) CLR
3) CLR
Command
fr
W
!WDT
Words
1
1
1
Cycles
1 (4)
1 (4)
1 (4)
Affects
fr, Z
W, Z
TO, PD
Coding
0000 011f ffff CLR fr
0000 0100 0000 CLR w
0000 0000 0100 CLR wdt
Operation: dest is cleared to 0. Z is set to 1 in command #1 and #2 while TO and PD are set to 1 in command #3.
Prescaler is also cleared in command #3, if assigned.
CLRB dest_bit
Command
1) CLRB op.bit
Words
1
Operation: dest_bit is cleared to 0.
Cycles
1 (4)
Affects
op.bit
Clear dest_bit
Coding
0100 bbbf ffff CLRB op.bit
CLZ
Command
1) CLZ
Words
1
Operation: The Z flag is cleared to 0.
Cycles
1 (4)
Affects
Z
Clear zero
Coding
0100 0100 0011 CLZ
CSA op1, op2
Compare op1 to op2 and skip if above
Command
1) CSA fr, #literal
2) CSA fr1, fr2
Words
3
3
Cycles
3 or 4 (skip)
(12 or 16)
3 or 4 (skip)
(12 or 16)
Affects
W, C, DC, Z
W, C, DC, Z
Coding
1100 kkkk kkkk MOV W, #lit^$FF
0001 110f ffff ADD W, fr
0111 0000 0011 SC
0010 000f ffff MOV W, fr1
0000 100f ffff MOV W, fr2-W
0110 0000 0011 SNC
Operation: op1 is compared to op2. If op1 is greater than op2, the following instruction word is skipped. W is left
holding the result of op1 + ~op2 in command #1 and op2 - op1 in command #2. If CARRYX is specified, c
affects the result. Insert a CLC before command #1 and an STC before command #2 to avoid strange results.
Note:
Only one word is skipped by this instruction. To avoid strange results, make sure that any instruction
following CSA is a single-word instruction.
SX-Key/Blitz Development System Manual 2.0 • Parallax, Inc. • Page 127