Do an ALP programming to arrange numbers in decending order.
ORG 0000H
MOV R4,#05H
AGAIN:MOV DPTR,#9000H
MOV R3,#05H
BACK: MOVX A,@DPTR
MOV B,A
INC DPTR
MOVX A,@DPTR
MOV R1,A
CJNE A,B,TARGET
TARGET:
JC NOEXCHANGE
MOV A,B
MOVX @DPTR,A
MOV A,R1
DEC DPL
MOVX @DPTR,A
INC DPTR
NOEXCHANGE:
DJNZ R3,BACK
DJNZ R4,AGAIN
END
Comments
Post a Comment
if you have any doubts,please let me know