Home > Back-end >  Using the ASM to save registers
Using the ASM to save registers

Time:10-10

First of all, I admit that I want to ask three questions

Use of BCB6

1. As the title, although not save register test haven't made a mistake, but no promises no problem under other systems
2. Dally with DLL, it seems as if can change the current directory of the main program, real current directory of the main program to read this file will make a mistake, can't solve, copy the DLL project to the main program directory to calculate
3. BCB flirt symbol file is which, so copy it to the main program directory may use OD for similar IDE source level of molesting

CodePudding user response:

Question 1, like eax register ebx, can need not save, the other, whether your code is used, use best push before, before the end of the reduction of the
Question 2, debug DLL, you can DLL export path set is given priority to the directory, so you can
Question 3, want to use other tools to debug, the best in the code, the first placement instruction tag, for example, xor eax, eax. Useless instructions put a few more, then the od search is easy to find, and the breakpoint

CodePudding user response:

The second problem solving, thanks
The third question, still hope can solve
As for your first question, looked at the assembly code, automatically save the ebx, esi, edi three register, but then have a little look not to understand
The first line of code initial a local variable, the corresponding assembly is
Xor edx, edx
Mov local variables, edx
This is too strong, not save directly

CodePudding user response:

A lot of people always think combine language is machine language... But CPU operation instructions are after packaged...

Various compiler compiled results has its error rate... This is the programmer must know the common sense of...

CodePudding user response:

 xor edx, edx "==" mov edx, 0 
Mov local variables, edx
This is too strong, not save directly use the
"=="
C
The local variable=0;

  • Related