TBIT loc16,T
TBIT loc16,T
SYNTAX OPTIONS
TBIT loc16,T
Operands
loc16 T Addressing mode (see Chapter 5)
Description
Flags and
TC
Modes
Repeat
Example
; if( VarA.VarB = 1 )
;
; else
;
MOV
ADD
TBIT
SB
TSET
SB
$10:
TCLR
$20:
6-360
Upper 16 bits of the multiplicand register (XT)
Test the bit specified by the four least significant bits of the T register,
T(3:0) = 0...15 of the data value in the location pointed to by the "loc16"
addressing mode. Upper bits of the T register are ignored:
bit = 15 − T(3:0);
TC = [loc16(bit)];
A value of 15 in the T register corresponds to bit 0 (least significant bit). A
value of 0 in the T register corresponds to bit 15 (most significant bit). The
upper 12 bits of the T register are ignored.
If the bit tested is 1, TC is set; if the bit tested is 0, TC is cleared.
This instruction is not repeatable. If this instruction follows the RPT
instruction, it resets the repeat counter (RPTC) and executes only once.
VarC.Bit6 = 1;
VarC.Bit6 = 0;
T,@VarB
@T,#15
@VarA,T
$10,NTC
@VarB,#6
$20,UNC
@VarB,#6
OPCODE
0101 0110 0010 0101
0000 0000 LLLL LLLL
; Load T with bit value in VarB
; Reverse order of bit testing
; Test bit of VarA selected by VarB
; Branch if TC = 0
; Set bit 6 of VarB contents
; Branch unconditionally
;
; Clear bit 6 of VarB contents
;
Test Bit Specified by Register
OBJMODE
RPT
1
−
CYC
1
Need help?
Do you have a question about the TMS320C28x and is the answer not in the manual?