Showing posts with label 8051 program to increment the contents of the location. Show all posts
Showing posts with label 8051 program to increment the contents of the location. Show all posts

Thursday, 10 November 2016

Write a program to load a byte in memory location 9000H & increment the contents of the location




MOV DPTR, #9000H           /* LOAD DPTR WITH 9000H

MOV A, #48H                       /* LOAD ACC WITH 48H

MOVX @DPTR, A              /* COPY A INTO MEMORY LOCATION 9000H

INC A                                    /*  A=A+1 = 49H

MOVX @DPTR, A              /* LOAD 49H INTO EXTERNAL MEMORY 9000H