8051 microcontroller programming:Tutorial-Using DB in Keil

DB is a very useful function, data tables can be stored directly into the ROM along with the program.
Data stored in the ROM can be accessed by the instruction MOVC.
Sample Program is given below.
  ORG 00H
  DB 30H
  MOV DPTR,#0000H
  MOVC A,@A+DPTR
  MOV DPTR,#2000H
  MOVX @DPTR,A
  END  

Comments

Popular posts from this blog

8051 microcontroller programming:Tutorial-Fibonacci series in assembly with Keil

8051 microcontroller programming: Interfacing with push button and displaying the button pressed using Keil