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

Simulator issue with printf?

While using the simulator, the values of i in the serial window are shifted by left 8 bits.

#include "stdlib.h"
#include "stdio.h"
#include "reg51.h"

void main (void)
{
    unsigned char i;
    SCON  = 0x50;
    TMOD |= 0x20;
    TH1   = 221;
    TR1   = 1;
    TI    = 1;

    for (i = 0; i < 8; i++)
    {
        printf("%x\n", i);
    }
}

Parents
  • Stop reading and repsonding to the joker-poster already. Some of you say how busy you are, yet have no problem posting something to make you *feel* smart about yourself.

    Is this a forum about Keil, or your own personal circle jerk forum?

    "the joker-poster" just might understand that to get a diploma you need to do some work and his friend may learn that to get a diploma your code needs to work.

    While the likelyhood of sucn an event may be small, it is still worth the effort.

    Is this a forum about Keil yes it is and part of what it requires to use Keil (study, work) has been discussed in detail above.

    jerk forum? absolutely not, however, if someone seeking advice consider "you must do some work" as coming from a jerk, that is not the "jerk"s problem.

    erik

Reply
  • Stop reading and repsonding to the joker-poster already. Some of you say how busy you are, yet have no problem posting something to make you *feel* smart about yourself.

    Is this a forum about Keil, or your own personal circle jerk forum?

    "the joker-poster" just might understand that to get a diploma you need to do some work and his friend may learn that to get a diploma your code needs to work.

    While the likelyhood of sucn an event may be small, it is still worth the effort.

    Is this a forum about Keil yes it is and part of what it requires to use Keil (study, work) has been discussed in detail above.

    jerk forum? absolutely not, however, if someone seeking advice consider "you must do some work" as coming from a jerk, that is not the "jerk"s problem.

    erik

Children
  • The Circle Jerks are a hardcore punk band formed circa 1979 in Hermosa Beach, California.

    I can not even imagine that you refer to the other definition.

    Now, for something even more interesting, please provide a link to anywhere YOU have actually provided help to anyone in this forum. If you see no reason to provide help, you have no right to criticize the help given whether you like it or not. That you decide to hide behind the name of a clothing company i.e. make jerking anonymous really show how much a man you are.

    Erik