gpt4 book ai didi

assembly - 在 x86 汇编语言中获取变量的位置

转载 作者:行者123 更新时间:2023-12-02 05:10:56 25 4
gpt4 key购买 nike

在x86汇编语言中,是否可以确定变量在内存中的位置?

在这里,我试图找到 X 在内存中的位置,以便我可以找到存储在紧跟其后的地址处的值。

.686p
.model flat,stdcall
.stack 2048

.data
X byte "1234"

ExitProcess proto, exitcode:dword
.code
start:

mov ah, X;
;now how can I obtain the location of X in memory?

invoke ExitProcess, 0
end start ;what does the end statement do?

最佳答案

使用 lea 指令,类似于:

lea edx, byte ptr x

关于assembly - 在 x86 汇编语言中获取变量的位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15491652/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com