45111 Parallax Inc, 45111 Datasheet - Page 142

MANUAL FOR SX-KEY/BLITZ VER. 2.0

45111

Manufacturer Part Number
45111
Description
MANUAL FOR SX-KEY/BLITZ VER. 2.0
Manufacturer
Parallax Inc
Datasheet

Specifications of 45111

Accessory Type
Manual
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
Parallax microcontroller
For Use With
70002PAR - GUIDE PROG THE SX MICRO -DAUBACH
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
13 Appendix C: SX Instruction Set
SUB
Operation: src is subtracted from dest. C will be cleared to 0 if an underflow occurred; otherwise, C will be set to 1.
SUBB
Operation: Subtracts src_bit from dest. If dest was decremented, Z will be set if the result was zero; else, Z will be
SWAP
Operation: The high- and low-order nibbles of dest are swapped. The MOV W,<>fr command is similar to SWAP
Page 142 SX-Key/Blitz Development System Manual 2.0 Parallax, Inc.
1) SUB
2) SUB
3) SUB
1) SUBB
1) SUBB
1) SWAP fr
Command
Command
Command
dest, src
fr, W
fr1, #literal
fr1, fr2
DC will be cleared to 0 if an underflow occurred in the least-significant nibble. Z will be set to 1 if the
result was 0; otherwise, Z will be cleared to 0. The MOV W, fr-W command is similar to #1, except the
result is moved to W, and fr keeps its original contents. If CARRYX is specified, c is added to the result.
Insert an STC before the first Sub on a register to avoid strange results.
dest, src_bit
fr, op.bit
fr, /op.bit
cleared. This instruction is useful for subtracting the carry from the upper byte of a double-byte value
after the lower byte has been subtracted.
dest
fr, except the result is moved to W, and fr keeps its original contents.
Words
Words
Words
1
2
2
2
2
1
Cycles
Cycles
Cycles
1 (4)
2 (8)
2 (8)
2 (8)
2 (8)
1 (4)
fr, W, C, DC, Z
fr, W, C, DC, Z
fr, C, DC, Z
Affects
Affects
Affects
fr, Z
fr, Z
fr
0000 101f ffff SUB fr, W
1100 kkkk kkkk MOV W, #lit
0000 101f ffff SUB fr, W
0010 000f ffff MOV W, fr
0000 101f ffff SUB fr, W
0110 bbbf ffff SNB op.bit
0000 111f ffff DEC fr
0111 bbbf ffff SB
0000 111f ffff DEC fr
0011 101f ffff SWAP fr
Subtract src_bit from dest
Subtract src from dest
Swap nibbles in dest
Coding
Coding
Coding
op.bit

Related parts for 45111