Data Move
place the contents of A into the accumulator. Once the Ax content is tested, by using the CMP
instruction, the conditional move can be executed.
If the specified condition being tested is true, then the location pointed to by the “loc16” address-
ing mode or the 8–bit zero extended constant will be loaded with the contents of the specified AX
register (AH or AL): if (COND == true) [loc16] = AX or 0:8bit;
Note: Addressing modes are not conditionally executed. Hence, if an addressing mode performs a
pre or post modification, it will execute regardless if the condition is true or not. This instruction
is not repeatable. If this instruction follows the RPT instruction, it resets the repeat counter
(RPTC) and executes only once.
Flags and Modes
N - If the condition is true, then after the move, AX is tested for a negative condition. The nega-
tive flag bit is set if bit 15 of AX is 1, otherwise it is cleared.
Z - If the condition then after the move, AX is tested for a zero condition. The zero flag bit is set
if AX = 0, otherwise it is cleared.
V - If the V flag is tested by the condition, then V is cleared.
C-Example
; if ( VarA > 20 )
; VarA = 0;
CMP @VarA,#20 ; Set flags on (VarA – 20)
MOVB @VarA,#0,GT ; Zero VarA if greater then
C - 14 C28x - Appendix C - Assembly Programming