EOR.W

 

 

 

 

EOR.W

Bitwise Exclusive OR on

EOR.W

 

a 16-Bit Operand in Memory (BMU)

 

Operation

Assembler Syntax

 

#u16 ⊕ (R) → (R)

EOR.W #u16,(Rn){0 u16 < 216}

 

#u16 ⊕ (SP–u5)(SP–u5)

EOR.W #u16,(SP-u5){0 u16 < 216}{0 u5 < 64,W}

#u16 ⊕ (SP + s16) → (SP + s16)EOR.W #u16,(SP+s16){0 u16 < 216}{-215

s16 < 215,W}

#u16 ⊕ (a16) → (a16)

EOR.W #u16,(a16){0 u16 < 216}{0 a16 < 216,W}

Description

These operations read from memory, modify 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.

EOR.W #u16,(Rn)

Performs a bitwise exclusive OR between an immediate unsigned word 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. This instruction is assembler-mapped to BMCHG.W #u16,(Rn) with the immediate value.

EOR.W #u16,(SP–u5)

Performs a bitwise exclusive OR between an immediate unsigned word and the contents of a memory address. Stores the result in the same memory address. The memory address is calculated as the active stack pointer (SP) minus a 5-bit unsigned offset value. This instruction is assembler-mapped to BMCHG.W #u16,(SP–u5) with the immediate value.

EOR.W #u16,(SP+s16)

Performs a bitwise exclusive OR between an immediate unsigned word and the contents of a memory address. Stores the result in the same memory address. The memory address is calculated as the active stack pointer (SP) plus a 16-bit signed offset value. This instruction is assembler-mapped to BMCHG.W #u16,(SP+s16) with the immediate value.

EOR.W #u16,(a16)

Performs a bitwise exclusive OR between an immediate unsigned word and the contents of an absolute memory address. Stores the result in the same memory address. This instruction is assembler-mapped to BMCHG.W #u16,(a16) with the immediate value.

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.

SC140 DSP Core Reference Manual

A-169

Page 483
Image 483
Freescale Semiconductor SC140 specifications Eor.W, Bitwise Exclusive or on