NOT.W

NOT.W

Binary Inversion of a 16-Bit Operand

NOT.W

 

in Memory (BMU)

 

Operation

Assembler Syntax

 

~(R) → (R)

NOT.W (Rn)

 

~(SP–u5)(SP–u5)

NOT.W (SP–u5) {0 u5 < 64,W]

~(SP+s16) → (SP+s16)

NOT.W (SP+s16) {–215s16 < 215,W}

~(a16) → (a16)

NOT.W (a16) {0 a16 < 216,W}

Description

These operations read from memory, invert the retrieved value, and write the new value back to the same memory address, resulting in two memory accesses.

The absolute addresses, offsets, and address register values must be word-aligned.

NOT.W (Rn)

Replaces the contents of a memory address pointed to by an address register (Rn) with its complement. This instruction is assembler-mapped to BMCHG.W #$FFFF,(Rn). The full mask is enabled.

NOT.W (SP–u5)

Replaces the contents of a memory address pointed to by the active stack pointer (SP) minus a 5-bit unsigned immediate value with its complement. This instruction is assembler-mapped to BMCHG.W #$FFFF,(SP–u5). The full mask is enabled.

NOT.W (SP+s16)

Replaces the contents of a memory address pointed to by the active stack pointer (SP) offset by a 16-bit signed immediate value with its complement. This instruction is assembler-mapped to

BMCHG.W #$FFFF,(SP+s16). The full mask is enabled.

NOT.W (a16)

Replaces the contents of a memory address pointed to by a 16-bit unsigned absolute address with its complement. This instruction is assembler-mapped to BMCHG.W #$FFFF,(a16). The full mask is enabled.

Status and Conditions that Affect Instruction

Register Address

Bit Name

Description

SR[18]

EXP

Determines which stack pointer is used when the stack pointer is an

 

 

operand. Otherwise, the instruction is not affected by SR.

Status and Conditions Changed by Instruction

None.

A-338

SC140 DSP Core Reference Manual

Page 652
Image 652
Freescale Semiconductor SC140 Not.W, Binary Inversion of a 16-Bit Operand, Memory BMU Operation Assembler Syntax