ASM Code for 8 bit Addition - 8051 - AT89C51


Flowchart:-


Program:-

ORG 0000H
CLR A
MOV DPTR,#2000H
MovX A,@DPTR
MOV R2,A
INC DPTR
MOVX A,@DPTR
ADD A,R2
INC DPTR
INC DPTR
MOVX @DPTR,A
JNC STEP1
MOV A, #01H
MOV DPTR, #2002H
MOVX @DPTR,A
SJMP $
STEP1 : MOV A,#00H
MOV DPTR, #2002H
MOVX @DPTR, A
SJMP $
END

Output:-



For more ASM programs - click here

Popular posts from this blog