TBIT loc16,#bit
6-359
TBIT loc16,#bit
Test Specified Bit
SYNTAX OPTIONS
OPCODE
OBJMODE
RPT
CYC
TBIT loc16,#16bit
0100 BBBB LLLL LLLL
X
−
1
Operands
loc16#bit
Addressing mode (see Chapter 5)
Immediate constant bit index from 0 to 15
Description
Test the specified bit of the data value in the location pointed to by the
“loc16” addressing mode:
TC = [loc16(bit)];
The value specified for the #bit immediate operand directly corresponds
to the bit number. For example, if #bit = 0, you will access bit 0 (least
significant bit) of the addressed location; if #bit = 15, you will access bit 15
(most significant bit).
Flags and
Modes
TC
If the bit tested is 1, TC is set; if the bit tested is 0, TC is cleared.
Repeat
This instruction is not repeatable. If this instruction follows the RPT
instruction, it resets the repeat counter (RPTC) and executes only once.
Example
; if( VarA.Bit4 = 1 )
; VarB.Bit6 = 1;
; else
; VarB.Bit6 = 0;
TBIT @VarA,#4
; Test bit 4 of VarA contents
SB $10,NTC
; Branch if TC = 0
TSET @VarB,#6
; Set bit 6 of VarB contents
SB $20,UNC
; Branch unconditionally
$10:
;
TCLR @VarB,#6
; Clear bit 6 of VarB contents
$20:
;
Summary of Contents for TMS320C28x
Page 30: ...1 12...
Page 80: ...This page intentionally left blank 2 50 This page intentionally left blank...
Page 269: ...IN loc16 PA 6 112 MOV AL 0 AL 0 UOUT IORegC AL IOspace IORegC AL 10...
Page 308: ...MAXCUL P loc32 6 151 Saturate MOVL Var64 2 ACC Store result into Var64 MOVL Var64 P...
Page 509: ...SUBL ACC P PM 6 352 SUBL ACC P PM ACC S B 11 M X 4 MOVH Y ACC 5 Store Q15 result into Y...
Page 585: ...This page intentionally left blank 7 32 This page intentionally left blank...