Amount line code about 300. So that, you could help me by indicate some ebook step by step to solve this case. If anyone can help me to convert,i'm very happy. Plz mail victorvn2003@yahoo.com MJ, Many thanks.
Sorry, C251 -> C2051
There are attempts at tools to do this task called "decompilers". (Ask Google about them.) I've never used one professionally, and am not convinced they're really industrial-strength tools. The source code produced (that I've seen) tends to be not significantly more readable than the assembler code, especially when presented with optimized code to decompile. (For instance, you'll get a fairly literal translation of the common subexpression elimination as function calls with automatically generated names about as informative as "?CO?COM047".) If you have the assembler source, and that's good quality, then you should have documentation on the inputs, outputs, and purpose of a function. In some cases it will be easier to code a corresponding function in C than to scrutinize the assembler to translate it. If you're trying to reverse engineer a product with nothing but the disassembled binary, then you have to figure out what the sections of code actually do first. As Andy says, that's just plain hard work. No tool can generate informative function and variable names that match the purpose of the code just from the binary image, and so recasting a DJNZ loop into a do/while probably won't add much understanding.