Extended Instructions
4-117
16-Bit MSP430X CPU
ANDX.A
Logical AND of source address-word with destination address-word
ANDX[.W]
Logical AND of source word with destination word
ANDX.B
Logical AND of source byte with destination byte
Syntax
ANDX.A
src,dst
ANDX
src,dst or ANDX.W
src,dst
ANDX.B
src,dst
Operation
src .and. dst
→
dst
Description
The source operand and the destination operand are logically ANDed. The
result is placed into the destination. The source operand is not affected. Both
operands may be located in the full address space.
Status Bits
N:
Set if result is negative (MSB = 1), reset if positive (MSB = 0)
Z:
Set if result is zero, reset otherwise
C:
Set if the result is not zero, reset otherwise. C = (.not. Z)
V: Reset
Mode Bits
OSCOFF, CPUOFF, and GIE are not affected.
Example
The bits set in R5 (20-bit data) are used as a mask (AAA55h) for the
address-word TOM located in two words. If the result is zero, a branch is taken
to label TONI.
MOVA
#AAA55h,R5
; Load 20-bit mask to R5
ANDX.A
R5,TOM
; TOM .and. R5 -> TOM
JZ
TONI
; Jump if result 0
...
; Result > 0
or shorter:
ANDX.A
#AAA55h,TOM
; TOM .and. AAA55h -> TOM
JZ
TONI
; Jump if result 0
Example
A table byte pointed to by R5 (20-bit address) is logically ANDed with R6.
R6.19:8 = 0. The table pointer is auto-incremented by 1.
ANDX.B
@R5+,R6
; AND table byte with R6. R5 + 1
Содержание 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 ...