Crossware

Table of Contents        Previous topic       Next topic       

MICROPROCESSOR INSTRUCTION REFERENCE->BSET

BSET    Test a Bit and Set

Compatibility: 68000, 68010, 68020, CPU32 families


Complement of (<bit no.> Destination) -> Z

1 -> (<bit no.> Destination)

Assembler Syntax:BSET Dn,<ea>
BSET #<data>,<ea>

Dn or #<data> specify the bit no. and <ea> may be data alterable only

Size:    Byte, Long

If <ea> is Data register then #<data> 0 - 31 else #<data> 0 - 7

Tests a bit in the destination operand and sets the Z condition code appropriately.  Then sets the specified bit in the destination operand.  When a data register is the destination, any of the 32 bits can be specified by a modulo 32-bit number.  When a memory location is the destination, the operation is a byte operation, and the bit number is modulo 8.  In all cases, bit zero refers to the least significant bit.

Condition Codes:

N    Not affected
Z    Set if bit tested = 0, else clear
V    Not affected
C    Not affected
X    Not affected

    
Allowable Addressing Modes
    
Dn,<ea>#<data>,<ea>
    
BSETDn,DnBSET#(data),Dn
BSETDn,(An)BSET#(data),(An)
BSETDn,(An)+BSET#(data),(An)+
BSETDn,-(An)BSET#(data),-(An)
BSETDn,(d16,An)BSET#(data),(d16,An)
BSETDn,(d8,An,Xn)BSET#(data),(d8,An,Xn)
BSETDn,(bd,An,Xn) 2BSET#(data),(bd,An,Xn) 2
BSETDn,([bd,An,Xn],od) 1BSET#(data),([bd,An,Xn],od) 1
BSETDn,([bd,An],Xn,od) 1BSET#(data),([bd,An],Xn,od) 1
BSETDn,(xxx).WBSET#(data),(xxx).W
BSETDn,(xxx).L BSET#(data),(xxx).L
Dn,Dn and #(data),Dn are long only; all others are byte only.
       
1   68020 only
2   68020 and CPU32 only