Freescale Semiconductor SC140 specifications Bmset.W, Bit Operand in Memory BMU

Models: SC140

1 760
Download 760 pages 48.94 Kb
Page 396
Image 396

BMSET

BMSET.W

Bit-Masked Set a

BMSET.W

 

16-Bit Operand in Memory (BMU)

Operation

Assembler Syntax

 

1

(SP–u5)i(i denotes bits=1

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

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

in #u16)

 

 

1

→ (SP+s16)i (selected bits)

BMSET.W #u16,(SP+s16){0 u16 < 216}{–215s16 < 215,W}

1

→ (Rn)i (selected bits)

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

1

→ (a16)i (selected bits)

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

Description

These operations use an unsigned 16-bit immediate data mask to set selected bits in the destination operand. For each bit i that is set (selected) in the mask, the bit i in the corresponding destination operand’s bit position is set. 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.

BMSET.W #u16,(SP–u5)

Sets selected bits in the contents of a memory address pointed to by the active stack pointer (SP) with an unsigned 5-bit offset.

BMSET.W #u16,(SP+s16)

Sets selected bits in the contents of a memory address pointed to by the active stack pointer (SP) with a 16-bit signed offset.

BMSET.W #u16,(Rn)

Sets selected bits in the contents of a memory address pointed to by an address register (Rn).

BMSET.W #u16,(a16)

Sets selected bits in the contents of a memory address pointed to by an absolute 16-bit address.

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-82

SC140 DSP Core Reference Manual

Page 396
Image 396
Freescale Semiconductor SC140 specifications Bmset.W, Bit Operand in Memory BMU