English
Language : 

45111 Datasheet, PDF (132/184 Pages) List of Unclassifed Manufacturers – 14-DAY MONEY BACK GUARANTEE
13 Appendix C: SX Instruction Set
IREAD
Read instruction at MODE:W into MODE:W
Command
1) IREAD
Words
1
Cycles
4 (16)
Affects
MODE, W
Coding
0000 0100 0001 IREAD
Operation: The instruction or value at the 12-bit location MODE:W is read and stored into the MODE:W bits. This
instruction can be used to read values in tables created with the DW directive. Use the MODE and MOV
instructions to read and write from the mode register.
JB
src_bit, addr9
1) JB
Command
op.bit, addr9
Words
2
Cycles
2 or 4 (jump)
(8 or 12)
Operation: If src_bit is set, a jump to addr9 is executed.
Affects
PC
Jump if src_bit is set
Coding
0110 bbbf ffff SNB op.bit
101k kkkk kkkk JMP addr9
JC
addr9
1) JC
Command
addr9
Words
2
Cycles
2 or 4 (jump)
(8 or 12)
Affects
PC
Operation: If the carry flag is set, a jump to addr9 is executed.
Jump if carry
Coding
0110 0000 0011 SNC
101k kkkk kkkk JMP addr9
JMP dest
Jump to dest
1) JMP
2) JMP
3) JMP
Command
addr9
W
PC+W
Words
1
1
1
Cycles
3 (8)
3 (8)
3 (8)
Affects
PC
PC
PC, C, DC, Z
Coding
101k kkkk kkkk JMP addr9
0000 001f ffff JMP w
0001 111f ffff ADD PC, W
Operation: Jump to address in dest. The lower 9 bits of the literal addr9 are moved into the program counter in
command #1. W is moved into the program counter in command #2. W+1 is added to the program
counter in command #3. Bit 9 of the program counter is cleared in command #2 and #3, so the jump
destination will be in the first 256 words of any 512-word page. This instruction is useful for jumping
into lookup tables comprised of RETW instructions, or jumping to particular routines. The flags are set
as in an ADD instruction for command #3. If CARRYX is specified, c affects the result of command #3. Insert
a CLC before command #3 to avoid strange results.
Page 132 • SX-Key/Blitz Development System Manual 2.0 • Parallax, Inc.