Bmtstc.w, Bit-masked test a, Operation assembler syntax – Freescale Semiconductor StarCore SC140 User Manual

Page 405

Advertising
background image

BMTSTC.W

SC140 DSP Core Reference Manual

A-91

BMTSTC.W

Bit-Masked Test a

BMTSTC.W

16-Bit Operand in Memory If Clear (BMU)

Description

These operations use an unsigned 16-bit immediate data mask to determine if all selected bits in an
operand are cleared. If all the selected bits are cleared, the T bit is set; if not, the T bit is cleared. The
absolute addresses, offsets, and address register values must be word-aligned.

Operation

Assembler Syntax

if (#u16 & (SP-u5)) == $0000, then 1

→T else 0→T

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

≤ u16 < 2

16

}

{0

≤ u5 < 64,W}

if (#u16 & (SP+s16)) == $0000, then 1

→T else 0→T

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

≤ u16 < 2

16

}

{–2

15

≤ s16 < 2

15

,W}

if (#u16 & (Rn)) == $0000, then 1

→T else 0→T

BMTSTC.W #u16,(Rn){0

≤ u16 < 2

16

}

if (#u16 & (a16)) == $0000, then 1

→T else 0→T

BMTSTC.W #u16,(a16){0

≤ u16 < 2

16

}

{0

≤ a16 < 2

16

,W}

BMTSTC.W #u16,(SP–u5)

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

BMTSTC.W #u16,(SP+s16)

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

BMTSTC.W #u16,(Rn)

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

BMTSTC.W #u16,(a16)

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

Advertising