English
Language : 

45111 Datasheet, PDF (135/184 Pages) List of Unclassifed Manufacturers – 14-DAY MONEY BACK GUARANTEE
13 Appendix C: SX Instruction Set
MOV dest, src
Move src into dest
Command
1) MOV fr, W
2) MOV fr, #literal
3) MOV fr1, fr2
4) MOV
5) MOV
6) MOV
7) MOV
8) MOV
9) MOV
10) MOV
11) MOV
12) MOV
13) MOV
14) MOV
15) MOV
16) MOV
17) MOV
18) MOV
19) MOV
20) MOV
fr, M
W, fr
W, /fr
W, fr-W
W, ++fr
W, --fr
W, <<fr
W, >>fr
W, <>fr
W, #literal
W, M
M, fr
M, W
M, #literal
!OPTION, fr
!OPTION, W
!OPTION, #literal
21) MOV
22) MOV
23) MOV
!port, fr
!port, W
!port, #literal
Words
1
2
2
2
1
1
1
1
1
1
1
1
1
1
2
1
1
2
1
2
2
1
2
Cycles
1 (4)
2 (8)
2 (8)
2 (8)
1 (4)
1 (4)
1 (4)
1 (4)
1 (4)
1 (4)
1 (4)
1 (4)
1 (4)
1 (4)
2 (8)
1 (4)
1 (4)
2 (8)
1 (4)
2 (8)
2 (8)
1 (4)
2 (8)
Affects
fr
fr, W
fr1, W, Z
fr, W
W, Z
W, Z
W, C, DC, Z
W, Z
W, Z
W, C
W, C
W
W
W
W, M, Z
M
M
W, Z, OPT
OPT
W, OPT
W, Z, !port
!port, (W)
W, !port
Coding
0000 001f ffff MOV fr, W
1100 kkkk kkkk MOV W, #lit
0000 001f ffff MOV fr, W
0010 000f ffff MOV W, fr2
0000 001f ffff MOV fr1, W
0000 0100 0010 MOV W, M
0000 001f ffff MOV fr, W
0010 000f ffff MOV W, fr
0010 010f ffff MOV W, /fr
0000 100f ffff MOV fr-W
0010 100f ffff MOV W, ++fr
0000 110f ffff MOV W, --fr
0011 010f ffff MOV W, <<fr
0011 000f ffff MOV W, >>fr
0011 100f ffff MOV W, <>fr
1100 kkkk kkkk MOV W, #lit
0000 0100 0010 MOV W, M
0010 000f ffff MOV W, fr
0000 0100 0011 MOV M, W
0000 0100 0011 MOV M, W
0000 0101 kkkk MOV M, #lit
0010 000f ffff MOV W, fr
0000 0000 0010 MOV !OPT, W
0000 0000 0010 MOV !OPT, W
1100 kkkk kkkk MOV W, #lit
0000 0000 0010 MOV !OPT, W
0010 000f ffff MOV W, fr
0000 0000 0fff MOV !port, W
0000 0000 0fff MOV !port, W
1100 kkkk kkkk MOV W, #lit
0000 0000 0fff MOV !port, W
Operation: Src is moved into dest. Z will be set if the result is 0; otherwise, Z will be cleared. W is left holding the
source value in command number 2, 3, 4, 18, 20, 21 and 23. C will be cleared if an underflow occurred;
otherwise, C will be set to 1 in command number 7, 10 and 11. DC will be cleared if an underflow
occurred in the lowest nibble; otherwise, DC will be set in command number 7. The value of C will be
shifted into the LSB or MSB of W in command #10 and #11, respectively. C will be set to the previous
MSB or LSB of fr in command #10 and #11 respectively. Command #12 moves the nibble-swapped value
of fr into w. Instructions #6 through #12 are similar to NOT, SUB, INC, DEC, RL, RR and SWAP
instructions, respectively, but have the additional feature of moving the result to W. Only 4 bits are
affected by #17; use #13 followed by #16 to affect 5 bits in the SX48/52. If CARRYX is specified, c affects the result
of command #7. Insert an STC before command #7 to avoid strange results.
SX-Key/Blitz Development System Manual 2.0 • Parallax, Inc. • Page 135