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

About C51 bank funtion call ?

Two funtiom.
One is char A(char *str1,char *str1),this funtion is in BANK 6.
main() is in bank 1;

Now main() call A(Astr1,Astr2) have some error. Seem as some parameter has't been pass OK.

How do I can solve it?

  • Now main() call A(Astr1,Astr2) have some error.

    What error!?
    Please be specific!

    How do I can solve it?

    Can't answer that if you don't say what the actual problem is!

  • i meet the same question.

    The error is the function with two

    pointers parameters can't work well,i

    think of the pointer can't be

    transmitted to the function when it is

    called by other banks functions.

  • First, if you are using NOREGPARAMS as a compiler directive, all parameters will be passed in fixed memory locations, not registers. If there are more than three parameters, the remaining parameters are passed in fixed memory locations.

    In the SMALL memory model, this memory may be either internal or external. In COMPACT or LARGE, the parameters are passed in external memory only.

    By using a combination of the listing file(s) and the .M51 map file, you should be able to see where the linker is putting the parameters.