RAM Memory Space Allocation in 8051

The 128 bytes of RAM inside the 8051 are assigned the address 00 to 7FH. They can be accessed directly as memory locations and are divided into three different groups as follows −
  • 32 bytes from 00H to 1FH locations are set aside for register banks and the stack.
  • 16 bytes from 20H to 2FH locations are set aside for bit-addressable read/write memory.
  • 80 bytes from 30H to 7FH locations are used for read and write storage; it is called as scratch pad. These 80 locations RAM are widely used for the purpose of storing data and parameters by 8051 programmers.