In: Electrical Engineering
Here I am using 8051 Microcontroller programming
ORG 0000H
MOV DPTR ,#90H ## Here give count as 4
MOVX A,@DPTR
MOV R0,A
INC DPTR ## As it increments load the values in
#91H,#92H,#93H,#94H
MOVX A,@DPTR
DEC R0
BACK:MOV R1,A
INC DPTR
MOVX A,@DPTR
ADD A,R1
DJNZ R0 , BACK
INC DPTR
MOVX @DPTR,A
INC DPTR
MOV A,#00H
JNC UP
ADD A,#02H
UP:MOVX @DPTR ,A
HERE: SJMP HERE
END
output : 02BCH
please give a positive rating.....