INSTRUCTION DESCRIPTIONS
MOTOROLA INSTRUCTION SET DETAILS A - 99
Explanation of Example: This example illustrates the use of the ENDDO instruction to
terminate the current DO loop. The value of the loop counter (LC) is compared with the
value in the Y1 register to determine if execution of the DO loop should continue. Note
that the ENDDO instruction updates certain program controller registers but does not
automatically jump past the end of the DO loop. Thus, if this action is desired, a JMP
instruction (i.e., JMP NEXT as previously shown) must be included after the ENDDO
instruction to transfer program control to the first instruction past the end of the DO loop.
Condition Codes:
The condition codes are not affected by this instruction.
Instruction Format:
ENDDO
Opcode:
Instruction Fields:
None
Timing: 2 oscillator clock cycles
Memory: 1 program word
MR CCR
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LF DM T** S1 S0 I1 I0 S L E U N Z V C
23 16 15 8 7 0
000000000000000010001100
ENDDO End Current DO Loop ENDDO