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

SBUF = mychar; TI = 0; // is there a preferred sequence?

Is there a preferred sequence?

SBUF = mychar;
TI   = 0;

// or

TI   = 0;
SBUF = mychar;

Parents
  • I prefer

    if (_testbit_ (TI)) SBUF = mychar; and
    if (_testbit_ (RI)) mychar = SBUF;

    The _testbit_ routine produces a JBC instruction in the generated program code to simultaneously test the bit b and clear it to 0.

Reply
  • I prefer

    if (_testbit_ (TI)) SBUF = mychar; and
    if (_testbit_ (RI)) mychar = SBUF;

    The _testbit_ routine produces a JBC instruction in the generated program code to simultaneously test the bit b and clear it to 0.

Children
No data