Freescale Semiconductor SC140 OR.W #u16,Rn, OR.W #u16,SP-u5, OR.W #u16,SP+s16, OR.W #u16,a16

Models: SC140

1 760
Download 760 pages 48.94 Kb
Page 658
Image 658

OR.W

OR.W Bitwise OR on a 16-Bit Operand in Memory (BMU) OR.W

Operation

Assembler Syntax

 

 

 

#u16 ⏐ (R) → (R)

OR.W #u16,(Rn) {0

u16

< 216}

 

 

#u16 ⏐ (SP–u5)(SP–u5)

OR.W #u16,(SP–u5)

{0 u16 < 216} {0 u5 < 64,W]

#u16 ⏐ (SP+s16) → (SP+s16)

OR.W

#u16,(SP+s16)

{0

u16 < 216}

{–215

s16 < 215,W}

#u16 ⏐ (a16) → (a16)

OR.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.

OR.W #u16,(Rn)

Performs a bitwise inclusive OR of an immediate unsigned word with the contents of a memory address pointed to by an address register (Rn). It then stores the result in that memory address. This instruction is assembler-mapped to BMSET.W #u16,(Rn) with the immediate value.

OR.W #u16,(SP–u5)

Performs a bitwise inclusive OR of an immediate unsigned word with the contents of a memory address pointed to by the active stack pointer (SP) minus an unsigned 5-bit offset. It then stores the result in the memory address. This instruction is assembler-mapped to BMSET.W #u16,(SP–u5) with the immediate value.

OR.W #u16,(SP+s16)

Performs a bitwise inclusive OR of an immediate unsigned word with the contents of a memory address pointed to by the active stack pointer (SP) plus by a signed 16-bit offset. It then stores the result in the memory address. This instruction is assembler-mapped to BMSET.W #u16,(SP+s16) with the immediate value.

OR.W #u16,(a16)

Performs a bitwise inclusive OR of an immediate unsigned word with the contents of a 16-bit absolute memory address. It then stores the result in the memory location. This instruction is assembler-mapped to BMSET.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.

A-344

SC140 DSP Core Reference Manual

Page 658
Image 658
Freescale Semiconductor SC140 specifications OR.W #u16,Rn, OR.W #u16,SP-u5, OR.W #u16,SP+s16, OR.W #u16,a16