in keil software

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • prowave
    New Member
    • Sep 2007
    • 1

    in keil software

    [code=c]
    #include<stdio. h>
    #include<reg52. h>
    void main()
    {
    int bit1, z=0;;

    SCON = 0x50;
    TMOD |= 0x20;
    TH1 = 0xFA;
    TR1 = 1;
    TI = 1;
    PCON |= 0x80;


    printf("enter bit to set ? \n ");

    scanf("%d", &bit1);

    z = z | (1 << bit1);

    printf("z=%x \n", z);




    }
    [/code]
    could not see the printf statement.wat is the error in the code?
    Last edited by sicarie; Sep 24 '07, 12:42 PM. Reason: Code tags
  • Meetee
    Recognized Expert Contributor
    • Dec 2006
    • 928

    #2
    Do you get any error while compiling? Please post them.

    Comment

    Working...