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

HELP!

Dose anybody know the purpose of doing this

void Send_CmdNo(unsigned char command){

  CSX=0;
  RDX=1;
    D_CX=0;
        DBUS=command;
        WRX=0;
        WRX=0;
        WRX=0;
        WRX=1;
  CSX=1;
}

why use WRX=0 3 times b4 WRX=1?
wouldn't that just give you WRX=1?

by the way WRX is just

sbit WRX        = P7^2;

does it mean on the I/O pin the output will send out
0 three times and 1 one time? It performs that fast?

Parents
  • The reason I do this is because I want to give the optimized code as much of a thrasing as possible before it gets released.

    David,

    There's a saying that goes "Premature optimization is the root of all evil." from some guy named Donald Knuth (whoever that is :). I generally follow Eric's sentiment on this one. I start with the optimizer OFF and only turn it on if I find I cannot meet performance requirements without it.

    The real difficulty (and the one I'm sure Erik will mention) is that optimized code is generally more difficult to debug since the source no longer necessarily aligns with the actual assembly code to be executed.

    That said, I don't have quite as great a hatred for the optimizer as Erik. I think one of his main gripes is that there are quite a few sensible optimizations that do not affect debugability that should rightfully be done by the compiler.

    -Jay Daniel

Reply
  • The reason I do this is because I want to give the optimized code as much of a thrasing as possible before it gets released.

    David,

    There's a saying that goes "Premature optimization is the root of all evil." from some guy named Donald Knuth (whoever that is :). I generally follow Eric's sentiment on this one. I start with the optimizer OFF and only turn it on if I find I cannot meet performance requirements without it.

    The real difficulty (and the one I'm sure Erik will mention) is that optimized code is generally more difficult to debug since the source no longer necessarily aligns with the actual assembly code to be executed.

    That said, I don't have quite as great a hatred for the optimizer as Erik. I think one of his main gripes is that there are quite a few sensible optimizations that do not affect debugability that should rightfully be done by the compiler.

    -Jay Daniel

Children
No data