如果我们将C中的变量名与汇编语言进行比较,我们可以看到 如下: 在C中: int number = 3; int n; n = number; 在asm中: (在进入 程序之前,ebp指向堆栈顶部。) mov dword ptr [ebp-4],3 mov eax,dword ptr [ebp-4] mov dword ptr [ebp-8],eax C编译器持有一个表来存储变量名,但是在编译成汇编语言的之后,该表将被删除。 在同一个问题中: 我们可以写在这样的汇编语言中: 在asm: ..data 数字dw 3 n dw? b $ b .... ..代码 .... mov ax,number mov n,ax .... 同样的问题是:这两个之间有什么区别 变量名? 在遵守操作码后,它可以像这样执行: .... A10000(mov ax,[ 0000]) A30200(mov [0002],ax) .... 所以,桌子由汇编编译器将被编译为操作码后销毁。 If we compare variable names in C with in assemble language,we can seeas follows:In C:int number = 3;int n;n=number; In asm: (ebp point to the top of stack before going into theprocedure.)mov dword ptr [ebp-4],3mov eax,dword ptr [ebp-4]mov dword ptr [ebp-8],eax The C compiler hold a table to storage the variable names,but aftercompiled to assemble language,the table will be distroyed. In a same question:We can write in assemble language like this:In asm:..datanumber dw 3n dw ?......code....mov ax,numbermov n,ax....the same question is :is there any difference between these twovariable names?After it complied to opcode,it may be executed like this:....A10000 ( mov ax,[0000])A30200 ( mov [0002],ax).... So,the table holded by assemble compiler will be destroyed after itcompiled to opcode. 这篇关于变量名称的长度是否影响已编译的可执行文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-30 18:14