Example
; Swap the contents of VarA and VarB if VarB is higher then VarA:
MOV
AL,@VarA
MOV
AH,@VarB
CMP
AH,@AL
MOV
@VarA,AH,HI
MOV
@VarB,AL,HI
; AL = VarA, XAR2 points to VarB
; AH = VarB, XAR2 points to VarA
; Compare AH and AL
; Store AH in VarA if higher
; Store AL in VarB if higher
MOV loc16, AX, COND
6-171
Need help?
Do you have a question about the TMS320C28x and is the answer not in the manual?