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