Instruction Set
3-69
RISC 16−Bit CPU
SXT
Extend Sign
Syntax
SXT
dst
Operation
Bit 7 −> Bit 8 ......... Bit 15
Description
The sign of the low byte is extended into the high byte as shown in Figure 3−19.
Status Bits
N: Set if result is negative, reset if positive
Z: Set if result is zero, reset otherwise
C: Set if result is not zero, reset otherwise (.NOT. Zero)
V: Reset
Mode Bits
OSCOFF, CPUOFF, and GIE are not affected.
Figure 3−19. Destination Operand Sign Extension
15
8
7
0
Example
R7 is loaded with the P1IN value. The operation of the sign-extend instruction
expands bit 8 to bit 15 with the value of bit 7.
R7 is then added to R6.
MOV.B
&P1IN,R7
; P1IN = 080h:
. . . . . . . . 1000 0000
SXT
R7
; R7 = 0FF80h:
1111 1111 1000 0000
Summary of Contents for MSP430x1xx
Page 1: ... 2005 Mixed Signal Products User s Guide SLAU049E ...
Page 6: ...vi ...
Page 18: ...1 6 Introduction ...
Page 36: ...2 18 System Resets Interrupts and Operating Modes ...
Page 112: ...3 76 ...
Page 130: ...4 18 Basic Clock Module ...
Page 152: ...5 22 Flash Memory Controller ...
Page 160: ...6 8 Supply Voltage Supervisor ...
Page 168: ...7 8 Hardware Multiplier ...
Page 192: ...8 24 ...
Page 200: ...9 8 Digital I O ...
Page 234: ...11 24 Timer_A ...
Page 260: ...12 26 Timer_B ...
Page 291: ...13 31 USART Peripheral Interface UART Mode ...
Page 314: ...14 23 USART Peripheral Interface SPI Mode ...
Page 346: ...15 32 USART Peripheral Interface I2C Mode ...
Page 358: ...16 12 Comparator_A ...
Page 386: ...17 28 ADC12 ...
Page 418: ...18 32 ADC10 ...
Page 432: ...19 14 DAC12 ...