LOOPZ loc16,#16bit
6-128
When any interrupt occurs, the current state of the LOOP bit is saved as ST1
is saved on the stack. The LOOP bit in ST1 is then cleared by the interrupt.
The LOOP bit is a passive status bit. The LOOPZ instruction changes LOOP,
but LOOP does not affect the instruction.
You can abort the LOOPZ instruction within an interrupt service routine. Test
the LOOP bit saved on the stack. If it is set, then increment (by 2) the return
address on the stack. Upon return from the interrupt, this incremented
address is loaded into the PC and the instruction following the LOOPZ is
executed.
Flags and
N
If bit 15 of the result of the AND operation is 1, set N; otherwise, clear N.
g
Modes
Z
If the result of the AND operation is 0, set Z; otherwise, clear Z.
LOOP
LOOP is repeatedly set while the result of the AND operation is 0. LOOP is
cleared when the result is not 0. If an interrupt occurs before the LOOPZ in-
struction enters the decode 2 phase of the pipeline, the instruction is flushed
from the pipeline and, thus, does not affect the LOOP bit.
Repeat
This instruction is not repeatable. If this instruction follows the RPT
instruction, it resets the repeat counter (RPTC) and executes only once.
Example
;
Wait until bit 3 in RegA is set before writing to RegB:
LOOPZ @RegA,#0x0004
; Loop while (RegA AND 0x0004 = 0)
MOV @RegB,#0x8000
; RegB = 0x8000
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...