Use assembly language program to find the largest element in a given array of N =_06_ h bytes at location 4000h. Store the largest element at location 4062h
ORG 0000H
MOV DPTR,#4000H
MOV R3,#05H
MOVX A,@DPTR
MOV B,A
BACK:INC DPTR
MOVX A,@DPTR
CJNE A,B,TARGET
TARGET:
JC L1
MOV B,A
L1:
DJNZ R3,BACK
MOV A,B
MOV DPTR,#4062H
MOVX @DPTR,A
END
Comments
Post a Comment
if you have any doubts,please let me know