Keil Logo

Program Memory

Program (CODE) memory is read only; it cannot be written to. Program memory may reside within the 8051 MCU, it may be external, or it may be both, depending upon the 8051 derivative and the hardware design.

  • The 8051 architecture supports up to 64K Bytes of program memory. However, program space can be expanded using code banking.
  • Some devices offer a larger code space.
  • Program code, including all functions and library routines, is stored in program memory.
  • Constant variables may also be stored in program memory.
  • The 8051 executes programs stored in program memory only.
  • Program memory may be accessed from your C programs using the code memory type specifier.


  • Program memory may be accessed indirectly using the MOVC instruction. It may not be accessed directly.
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.