Program Flow Control
A
Instruction Set Reference
do until
Syntax:
DO
Function:
Sets up a condition-based program loop. The loop start address is pushed
on the PC stack. The loop end address and the termination condition are
pushed on the loop stack. The end address can be either a label for an
absolute 24-bit program memory address or a PC-relative, 24-bit twos-
complement address. The loop executes until the termination condition
tests true.
Examples:
DO end UNTIL FLAG1_IN;
DO (PC,7) UNTIL AC;
Opcode: (relative addressing)
47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24
0 0 0
0 1 1 1 0
23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RELADDR specifies the end-of-loop address relative to the DO LOOP
instruction address. (The Assembler accepts an absolute address as well; it
converts the absolute address to the equivalent relative address for
coding.) TERM specifies the termination condition.
A – 38
www.BDTIC.com/ADI
<addr24>
UNTIL termination ;
(PC, <reladdr24>)
TERM
RELADDR
{end is a program label}
Need help?
Do you have a question about the ADSP-2106x SHARC and is the answer not in the manual?
Questions and answers