This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How do pointers with different store type be organized into RAM?

As we know, most of pointers in 8051 have 3 bytes. One of these bytes indicates the address type(data, xdata and so on) this pointer points to; the other two bytes will be organized the address. But orders of these 3 bytes are different from the other(with different store type).
I want to get the specification. Who can help me?
Thanks a lot.

  • The 3-byte pointers are known as "Generic Pointers"

    It's all in the Manual.

    Quoting from the C51 User's Guide 03.2000, p81:

    "Generic pointers are always stored using three bytes. The first byte is for the memory type, the second is for the high-order byte of the offset, and the third is for the low-order byte of the offset."

    See the table in the Manual for the memory-type byte values and their associated memory types.

    NB: You can save the overhead of that 3rd, memory-type, byte by using "Memory-Specific" pointers.
    See the manual (which is on the CD, which is free!)

    0