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

How covert " C" to assembly

Dear sir;
I had written program with Keil and i dont like to give it to other but i want to give assembly to him that he can compile this assembly code to HEX.
please guide me how can i converted it to assembly for compilng it to hex.
As you mentioned Keil have a project.lst includes C program and assembly but i couldnt
use it for compile to hex.(Do you understand me or not?)
j.majd@engineer.com

  • "I had written program with Keil and i dont like to give it to other but i want to give assembly to him that he can compile this assembly code to HEX."

    Why don't you just supply a Library, then?!

    After all, that's precisely how Keil, et al, let you use their printf, etc, code without having to give you the whole source, isn't it?!

  • "I had written program with Keil and i dont like to give it to other but i want to give assembly"

    If you convert it to assembly, you are still supplying source code, aren't you?

    Why would you trust this "other" with assembler source code, when you don't trust them with 'C' source code?

    Anyhow, if you really want to do this, just look up the SRC directive in the Manual...

  • becuase i have to give him.and because he dont understand assembly language.

  • So give him a Library, then.

  • "So give him a Library, then."

    What part of 'becuase i have to' do you not understand?

  • I am sure Andy understand the message. I am, however, sure that Andy instead of mindlessly answering the question tries to direct the OP towards a better solution.

    It is obvious there are two schools of thought in the answers:
    help the OP to solve the problem the best way
    AND
    let the OP do it his way, be it right, be it wrong

    Erik

  • "What part of 'becuase i have to' do you not understand?"

    That bit's clear - what isn't clear is what it applies to!

    Is it "because I have to give him assembler," or is it "because I have to give him something he won't understand."

    My reading of the original questions is that the requirement is to keep the 'C' source secret, while still allowing this untrustworthy "customer" to build his project - so it's "because I have to give him something he won't understand."
    A Library neets that requirement admirably - So that is a direct answer to the question as I read it.

  • " I am, however, sure that Andy instead of mindlessly answering the question tries to direct the OP towards a better solution."

    Or maybe Andy just misread the question...

    "help the OP to solve the problem the best way
    AND
    let the OP do it his way, be it right, be it wrong"


    Actually, I've given him both - use a Library (best way?) or use SRC (his way)

  • "becuase i have to give him."

    Because you have to give him what, exactly?

    "and because he dont understand assembly language."

    Neither will he understand a Library!

    Dead Horse now well & truly flogged!

  • "I am, however, sure that Andy instead of mindlessly answering the question tries to direct the OP towards a better solution."

    The library suggestion has been made repeatedly and the OP has repeatedly stated that he has to supply source.

    That now being established, please explain how there can be a 'better solution' to direct the OP to?

    "It is obvious there are two schools of thought in the answers:
    help the OP to solve the problem the best way
    AND
    let the OP do it his way, be it right, be it wrong"

    You've missed out the third way:

    Keep telling the OP he is wrong despite knowing nothing about his application or situation. Ignore him when he explains why your solution is inappropriate, just keep insisting he's wrong.

  • "The library suggestion has been made repeatedly and the OP has repeatedly stated that he has to supply source."

    No, he hasn't.
    Maybe it's just a language problem, and he meant to - so I'm just mis-reading it.
    But, as far as I can see, all he has stated is that he needs to supply something that the recipient won't understand.

    "Ignore him when he explains why your solution is inappropriate"

    He has not given any explanation whatsoever of why a Library is inappropriate.

    "... knowing nothing about his application or situation"

    That cuts both ways - without knowing about his situation, we can't say which is better. Maybe a Library is better - he hasn't given any reason to believe otherwise!

  • "No, he hasn't."

    Oh, c'mon. Look at his statement in the context of your questions and I think it's perfectly clear.

  • "Look at his statement in the context of your questions and I think it's perfectly clear."

    No. I disagree.

    All he has said for certain is that he has to give something without giving the 'C' source. It is not clear that assembler is a specifc requirement - it looks very much to me like it was just his first idea...

    Note also that I have answered his specific question - "how to convert 'C' to assembler" - and I have also given him my suggestion that a Library would better achieve his aim of keeping the source secret. And I explained why.

    Given that he's had all this for free, don't you think it would at least be courteous of him to say why a library is not appropriate to his situation?

    After all, this is a Discussion forum - not just a "free answers" shop!