Bchg - Motorola DSP56000 Manual

24-bit digital signal processor
Hide thumbs Also See for DSP56000:
Table of Contents

Advertisement

BCHG

Operation:
D[n]
C;
D[n]
D[n]
D[n]
C;
D[n]
D[n]
D[n]
C;
D[n]
D[n]
D[n]
C;
D[n]
D[n]
D[n]
C;
D[n]
D[n]
D[n]
C;
D[n]
D[n]
D[n]
C;
D[n]
D[n]
Description: Test the n
result in the destination location. The state of the n
condition code register. The bit to be tested is selected by an immediate bit number from
0–23. This instruction performs a read-modify-write operation on the destination location
using two destination accesses before releasing the bus. This instruction provides a test-
and-change capability which is useful for synchronizing multiple processors using a
shared memory. This instruction can use all memory alterable addressing modes.
Example:
:
BCHG
#$7,X:<<$FFE2
:
Before Execution
X:$FFE2
SR
A - 40
INSTRUCTION DESCRIPTIONS
Bit Test and Change
th
bit of the destination operand D, complement it, and store the
;test and change bit 7 in I/O Port B DDR
X;$FFE2
$000000
$0300
INSTRUCTION SET DETAILS
Assembler Syntax:
BCHG
#n,X:ea
BCHG
#n,X:aa
BCHG
#n,X:pp
BCHG
#n,Y:ea
BCHG
#n,Y:aa
BCHG
#n,Y:pp
BCHG
#n,D
th
bit is stored in the carry bit C of the
After Execution
$000080
SR
$0300
BCHG
MOTOROLA

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dsp56k

Table of Contents