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

sbit as a routine parameter

Is is possible to have a routine with an sbit as a parmeter?

Parents
  • Or you could use self-modifying code to generate instructions for sbit access.

    Actually, since the '51 doesn't have indirect access to SFRs, any such routine would have to either use self-modifying code, or contain a switch() construct with a case each for every single sbit you want to access. In the latter case, you might as well set up an enum type for the argument, listing them all.

    But the better answer would be: "Don't do that!"

Reply
  • Or you could use self-modifying code to generate instructions for sbit access.

    Actually, since the '51 doesn't have indirect access to SFRs, any such routine would have to either use self-modifying code, or contain a switch() construct with a case each for every single sbit you want to access. In the latter case, you might as well set up an enum type for the argument, listing them all.

    But the better answer would be: "Don't do that!"

Children