We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
i still have problem in the code
i think it is startup.a51 and fix but still proble when run on cpu if it does not do what i say in code
when i build it gives a message
** error C138 interupt can not recieive or return a value
but i do not interupt i do not clik the stop build button
the proj is needed and i now worry big in my pants
plz send code
Post your code
"error C138 interupt can not recieive or return a value"
That message is probably trying to tell you that you have defined your interrupt function with a parameter and/or a return value.
#include <stdio.h>
int main( integer argc, char ***argv[] ) interrupt 10 { ilv( 12 , 7); // chek the list
initibit( 11 ); // ???
// while (argc<>0) compiler thinks is bad
while (argc); { initibit( argv[ argc ] };
argc := argc - 1; }
printf( "program complete %d\a" , argc);
return 0
}
but i do not interupt then what is this int main( integer argc, char ***argv[] ) interrupt 10
Erik
i say already again
i do not clik the stop build button!!!
the code txes to pc. i think interrupt is for sbuf
sbuf sends to pc not comopiler
i thinking is big bug in compiler !!!!????
"when i build it gives a message
** error C138 interupt can not recieive or return a value"
The first thing to do when you get such a message is to read its description in the Manual:
"Description: An interrupt function was defined with one or more formal parameters or with a return value. Interrupt functions may not contain invocation parameters or return values." http://www.keil.com/support/man/docs/c51/c51_c138.htm
So, let's have a look at your code:
int main( integer argc, char ***argv[] ) interrupt 10
The interrupt keyword defines the funcion to be an interrupt function: http://www.keil.com/support/man/docs/c51/c51_le_interruptfuncs.htm
Clearly your code gives the function both a return value and some parameters, and you can't do that - just as the message says!
"the proj is needed and i now worry big in my pants"
Yes, I'm afraid you do have a very big worry here indeed! You clearly have a lot of basic study to do about embedded programming in general and the Keil tools in particular...
"i say already again i do not clik the stop build button!!!"
It's not talking about you interrupting the build process!
The concept of Imterrupts is absolutely basic to just about all computers - they go by the name of "IRQ" on PCs (short for "interrupt request")
www.8052.com/tutflow.phtml
If you don't understand this now, you have a very long way to go to complete your project!
:=0
"i thinking is big bug in compiler !!!!????"
No - just a big hole in your understanding
"trying to tell you that you have defined your interrupt function with a parameter and/or a return value"
Not just any old parameter - but a Variable Argument List!!
AND a return value!!
:-0
i have little problem in my code but it is now late!
you have email i send code you fix my code
You have a HUGE problem, not in your code per se, but in your understanding of the basic concepts using C51 and the '51.
"you fix my code" will not help you any, until you have the basic concepts understood there is no hope.
why you do not help???
i know programms very good nad learned programing at colege but have little error in code
you do not know how to fix???
you think me stupid or not good programer???
i send you code for you to fix plz
"why you do not help???"
You don't need more help beyond what you've already been told. Go back and read the posts. Then go back and read them again, and again, and again, ...
Then fix your code.
What environment has a main that takes the following parameter types???
int main( integer argc, char ***argv[] )
A huge number of stars on that argv parameter...
"A huge number of stars on that argv parameter..."
A veritable pant-filling number of stars!
there is no problem with the stars
compile has no errors for the starts!!!
why you not gve good help???
has any people help now plz?