#include<stdio.h> #include<reg51.h> void main () { int i; p1=0x0FF; while(1) { for (i=0;i<10000;i++); p1=0x0FF; for (i=0;i<10000;i++); p1=0x00; } } i am getting a syntax error haelp me to resolve this
READ the posting tips for source code.
Then identify the exact error message and line numbering it's complaining about.
"help" implies some effort on your part - so what have you done to resolve the problem?
For a start, you could pay attention to the instructions for posting source code: www.danlhenry.com/.../keil_code.png
What, exactly, was the specific "syntax error" that was reported?
Where, exactly, was it reported?
Look at the message - read it carefully - look at your code; check your 'C' textbook
Check the message description in the Manual: http://www.keil.com/support/man/docs/c51/c51_errors.htm
It's P1 not p1.
View all questions in Keil forum