And.w, Bitwise and with 16-bit immediate (bmu), Description – Freescale Semiconductor StarCore SC140 User Manual

Page 359: Operation assembler syntax

Advertising
background image

AND.W

SC140 DSP Core Reference Manual

A-45

AND.W

Bitwise AND with 16-Bit Immediate (BMU)

AND.W

Description

These operations read from memory, modify the retrieved value, and write the new value back to that
memory address, resulting in two memory accesses. The absolute addresses, offsets, and address register
values must be word-aligned.

Operation

Assembler Syntax

#u16

• (R) → (R)

AND.W #u16,(Rn){0

≤ u16 < 2

16

}

#u16

• (SP – u5) → (SP – u5)

AND.W #u16,(SP–u5){0

≤ u16 < 2

16

}{0

≤ u5 < 64,W}

#u16

• (a16) → (a16)

AND.W #u16,(a16){0

≤ u16 < 2

16

}{0

≤ a16 < 2

16

,W}

#u16

• (SP + s16) → (SP + s16)

AND.W #u16,(SP+s16){0

≤ u16 < 2

16

}{–2

15

≤ s16 < 2

15

,W}

AND.W #u16,(Rn)

Performs a bitwise AND on a 16-bit unsigned immediate value and the contents of a memory address,
pointed to by the contents of an address register (Rn). Stores the result in the same memory address.

Note:

This instruction is assembler-mapped to BMCLR.W #~u16,(Rn) where #~u16 is the one’s
complement of #u16.

AND.W #u16,(SP–u5)

Performs a bitwise AND on a 16-bit unsigned immediate value and the contents of a memory address,
pointed to by a 5-bit unsigned offset subtracted from SP. Stores the result in the same memory address. The
address offset must be even.

Note:

This instruction is assembler-mapped to BMCLR.W #~u16,(SP-u5).

AND.W #u16,(a16)

Performs a bitwise AND on a 16-bit unsigned immediate value and the contents of a 16-bit absolute
memory address. Stores the result in the same memory address.

Note:

This instruction is assembler-mapped to BMCLR.W #~u16, (a16).

AND.W #u16,(SP+s16)

Performs a bitwise AND on a 16-bit unsigned immediate value and the contents of a memory address,
pointed to by a 15-bit signed offset added to SP. Stores the result in the same memory address.

Note:

This instruction is assembler-mapped to BMCLR.W #~u16,(SP+s16).

Advertising