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

error in code

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

Parents Reply Children
  • "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?

  • "compile has no errors for the stars!!!"

    Of course there isn't - it is perfectly valid 'C' syntax.

    Whether it will actually work is an entirely different matter...

    Are you sure that whatever will call main() is really going to pass it an array of pointers-to-pointers-to-pointers...?!

  • "there is no problem with the stars"

    Silly me.

  • "why you not gve good help???"

    You already have good help:

    You have been told what an interrupt is, and it has been explained to you that an interrupt function cannot take parameters, and cannot return a value.
    You have been shown the Manual pages where you can study this further for yourself

    So the answer is simple: you need to remove the parameters and the return value.

    Or maybe main shouldn't be an interrupt function at all...


  • // while (argc<>0) compiler thinks is bad

    Yes, the Keil compiler is unfortunately limited to compiling just C, rather than bits of syntax selected from any other programming language.

    (Posting just for the sake of completeness, I suppose. Or maybe I just don't want to miss out on the dogpile.)

  • And another bit of non-C:

    argc := argc - 1; }
    

  • is this the usual "my wi... eh compiler does not understand me

  • I can not really believe that this can be anything but a hoax, trolling for reactions. The alternative - that it isn't a haox - would require someone in this thread to require help tying the shoes, or changing a light bulb...

    I can only recommend that the OPs threads are ignored, until we see real problems or real questions.

  • my compiler does not understand me

    I've invented a new computer language I call DWIM (Do What I Mean). It takes whatever you type in as source code, uses some advanced new semantic inferencing technology to divine the programmer's intent, and then generates object code to do that job. Not only does this save a lot of time having to read tedious manuals on programming language syntax, implementation features, or data sheets, it also dramatically shortens the debugging cycle, as the compiler just directly generates code for the actual intent on the first pass.

    I've licensed the patents to Keil so that they can develop the compiler. You'll have to ask them about the delivery schedule, though.

  • ?int main( integer argc, char ***argv[] ) interrupt 10
    This will not compile anywhere

    main in an embedded system Looks like this:

    
    void main (void)
    {
      // Initilize stuff here
    
       while(1)
       {
       // loop around here forever
    
    
       }
       // return nothing, where would you go there in no O/S
    }
    <\pre>
    
    interrupt is a special function type it is always void function name (void);
    
    That is what the compiler told you.
    
    By the way
    "i now worry big in my pants" just does not work in english.
    
    
    

  • why you not gve good help???

    You've proven beyond reasonable doubt that you wouldn't recognize good help unless somebody printed it on a sledgehammer and bashed your head in with it.

    Frankly, you have already been given more good help than your attitude deserves.

  • "dramatically shortens the debugging cycle, as the compiler just directly generates code for the actual intent on the first pass."

    This assumes that the programmer actually understood the problem in the first place...

    What you really want is DWIN (Do What I Need) technology - it would bypass the programmer completely, and just do a direct analysis of the problem and generates a solution from there.

    This also cuts out all that tedious requirements analysis, and trying to understand the question...

  • What you really want is DWIN (Do What I Need) technology

    D'oh! DWIM-51 is obsolete even before it ships.

    You could have at least had the decency to let me IPO first.