1。在gcc产生的汇编中,$0x80498d4表示立即数,而0x80498d4表示内存地址0x80498d4对应的内容。对于lable,比如value,则$value表示value的地址,value表示value的值。设函数func的地址
&func = 0x8048828
这两种调用都是一样的
1) call 0x8048828
2) movl $0x8048828 %edx
call *%edx
2.如果寄存器存的是一个地址,就说这个寄存器是一个指针,加括号表示取这个指针所指的对象
int w = 5;
movl &w %edx //%edx = &w,%edx是一个指针
movl (%edx) %eax //%eax = *&w = w = 5
3.base_address(offset_address, index, size) = base_address + offset_address + index * size
4.movb:取1个字节,movw:取2个字节,movl:取4个字节
5.8个32bit的通用寄存器及其作用
EAX Accumulator for operands and results data
EBX Pointer to data in the data memory segment
ECX Counter for string and loop operations
EDX I/O pointer
EDI Data pointer for destination of string operations
ESI Data pointer for source of string operations
ESP Stack pointer
EBP Stack data pointer
本文介绍了GCC生成的汇编代码中各种符号的意义,包括立即数、内存地址的表示方法及寄存器使用方式。详细解释了如何通过不同的指令来操作内存和寄存器,如mov指令的不同形式以及它们在实际应用中的意义。
2761

被折叠的 条评论
为什么被折叠?



