我尝试修改传递给C程序中的汇编函数的一些参数。 我已经在x86程序集中尝试过它,但在x64中它似乎不再有效。从C程序调用的Intel x64汇编函数如何修改参数传递的参数
section .text
global f
f:
push rbp
mov rbp, rsp
;[rbp+8] bitmap beginning address (unsigned*) ?
;[rbp+12] bitmap width (int*) ?
;[rbp+16] bitmap height (int*) ?
;[rbp+20] current X pos (double*) ?
;[rbp+24] current Y pos (double*) ?
mov rax, [rbp+12]
mov rcx, [rax]
inc rcx
mov [rax], rcx
mov rsp, rbp
pop rbp
ret
x86_64的具有 – technosaurus
X86-64使用寄存器不同的调用约定比86(如果需要的话堆栈)来传递参数。您需要查看调用约定的[64位System V ABI](http://www.x86-64.org/documentation/abi.pdf)。 –
那么,那些偏移量对我来说看起来不是'64位':( –