Extended Instructions
4-152
16-Bit MSP430X CPU
SXTX.A
Extend sign of lower byte to address-word
SXTX[.W]
Extend sign of lower byte to word
Syntax
SXTX.A
dst
SXTX.W
dst
or
SXTX
dst
Operation
dst.7
→
dst.15:8, Rdst.7
→
Rdst.19:8 (Register Mode)
Description
Register Mode:
The sign of the low byte of the operand (Rdst.7) is extended into the bits
Rdst.19:8.
Other Modes:
SXTX.A: the sign of the low byte of the operand (dst.7) is extended into
dst.19:8. The bits dst.31:20 are cleared.
SXTX[.W]: the sign of the low byte of the operand (dst.7) is extended into
dst.15:8.
Status Bits
N:
Set if result is negative, reset otherwise
Z:
Set if result is zero, reset otherwise
C:
Set if result is not zero, reset otherwise (C = .not.Z)
V:
Reset
Mode Bits
OSCOFF, CPUOFF, and GIE are not affected.
Example
The signed 8-bit data in EDE.7:0 is sign extended to 20 bits: EDE.19:8. Bits
31:20 located in EDE+2 are cleared.
SXTX.A
&EDE
; Sign extended EDE −> EDE+2/EDE
Figure 4−59. Sign Extend SXTX.A
15
8 7 6
0
19
16
20
31
0
0
......
S
19
16
15
8 7 6
0
19
16
S
19
16
SXTX.A Rdst
SXTX.A dst
Содержание MSP430x4xx Family
Страница 1: ...MSP430x4xx Family 2007 Mixed Signal Products User s Guide SLAU056G ...
Страница 2: ......
Страница 6: ...vi ...
Страница 114: ...3 76 RISC 16 Bit CPU ...
Страница 304: ...5 20 FLL Clock Module ...
Страница 340: ...7 8 Supply Voltage Supervisor ...
Страница 348: ...8 8 16 Bit Hardware Multiplier ...
Страница 372: ...9 24 32 Bit Hardware Multiplier ...
Страница 400: ...10 28 DMA Controller ...
Страница 428: ...13 10 Basic Timer1 ...
Страница 466: ...15 24 Timer_A ...
Страница 522: ...17 30 USART Peripheral Interface UART Mode ...
Страница 544: ...18 22 USART Peripheral Interface SPI Mode ...
Страница 672: ...23 12 Comparator_A ...
Страница 692: ...24 20 LCD Controller ...
Страница 746: ...26 28 ADC12 ...