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 to represent a register in C51?

Hi,
How to represent a register in C51? for example, "inc R0 of register bank 1"?

Parents
  • In C, you wouldn't normally bother about specific registers. That's one of the things the compiler does for you.

    If you do need to reference a register, I'd just use the fact that the registers also appear in the data space and use their absolute address.

    U8 data RegBank1R0 _at_ 0x08;
    
    RegBank1R0++;
    

Reply
  • In C, you wouldn't normally bother about specific registers. That's one of the things the compiler does for you.

    If you do need to reference a register, I'd just use the fact that the registers also appear in the data space and use their absolute address.

    U8 data RegBank1R0 _at_ 0x08;
    
    RegBank1R0++;
    

Children