English
Language : 

45111 Datasheet, PDF (131/184 Pages) List of Unclassifed Manufacturers – 14-DAY MONEY BACK GUARANTEE
13 Appendix C: SX Instruction Set
DJNZ dest, addr9
Decrement dest and jump if not zero
Command
1) DJNZ fr, addr9
Words
2
Cycles
2 or 4 (jump)
(8 or 12)
Affects
fr, Z, PC
Coding
0010 111f ffff DECSZ fr
101k kkkk kkkk JMP addr9
Operation: dest is decremented. If the result is not 0, a jump to addr9 is executed. Z will be set to 1 if the result was
0; otherwise, Z will be cleared to 0.
IJNZ dest, addr9
Increment dest and jump if not zero
Command
1) IJNZ fr, addr9
Words
2
Cycles
2 or 4 (jump)
(8 or 12)
Affects
fr, Z, PC
Coding
0011 111f ffff INCSZ fr
101k kkkk kkkk JMP addr9
Operation: dest is incremented. If the result is not 0, a jump to addr9 is executed. Z will be set to 1 if the result was
0; otherwise, Z will be cleared to 0.
INC dest
Increment dest
Command
1) INC fr
Words
1
Cycles
1 (4)
Affects
fr, Z
Coding
0010 101f ffff INC fr
Operation: dest is incremented. Z will be set to 1 if the result was 0; otherwise, Z will be cleared to 0. The MOV
W,++fr command is similar to INC fr, except the result is moved to W, and fr keeps its original contents.
INCSZ dest
Increment dest and skip if zero
Command
1) INCSZ fr
Words
1
Cycles
1 or 2 (skip)
(4 or 8)
Affects
fr
Coding
0011 111f ffff INCSZ fr
Operation: dest is incremented. If the result is 0, the next instruction word will be skipped.
Note:
Only one word is skipped by this instruction. To avoid strange results, make sure that any instruction following
INCSZ is a single-word instruction.
SX-Key/Blitz Development System Manual 2.0 • Parallax, Inc. • Page 131