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

Calling function from library without lcall.

I have been programming in ASM some project, which, together with the source code will have to transfer to the customer. But this project contains some of the functions source code which I do not want give to customer. I went as follows: i create a library and needed for me function connect to my project with

EXTERN CODE(function name)

, and calling this function by

lcall function name

. But this solution is not best. When i call function from library many times each call using 5 CLK for lcall and 4 CLK fro ret, and this slows the program.
Maybe somebody knows call function from library without lcall and ret instruction. In C++(on PC),example, i using

inline

statement, maybe something similar is ASM(or Ax51).

Thanks for all!.

Parents
  • I know, about macro, but this not suitable, You are right, it implies that the source code for the macro is available.

    About second your proposal:

    You can try and replace instructions in a macro with DB statements to make reverse engineering more difficult. But this way you'll loose the linker's relocation services.
    I'm afraid your options are very limited.
    

    .
    an be due to poor knowledge of English, I not fully understand, could you give me an example please.
    Thanks for the help anyway!

Reply
  • I know, about macro, but this not suitable, You are right, it implies that the source code for the macro is available.

    About second your proposal:

    You can try and replace instructions in a macro with DB statements to make reverse engineering more difficult. But this way you'll loose the linker's relocation services.
    I'm afraid your options are very limited.
    

    .
    an be due to poor knowledge of English, I not fully understand, could you give me an example please.
    Thanks for the help anyway!

Children
  • due to poor knowledge of English, I not fully understand, could you give me an example please

    Basically use instruction opcodes instead of instruction mnemonics. For example, "DB 0x14" instead of "DEC A". Obviously, you will not be able to reference variables by name. You'll have to use hard-coded addresses instead.