你怎么可以拉从寄存器中的值? [英] How can you pull a value from a register?
本文介绍了你怎么可以拉从寄存器中的值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图找出如何从ASM指令,进入C ++中的变量拉寄存器值。
I'm trying to figure out how to pull a register value from an ASM instruction and into a variable in C++.
例如:MOV DWORD PTR DS:[ESI],EDI
For example: MOV DWORD PTR DS:[ESI],EDI
(假设值EDI认为是一个int)int值= EDI;
(Assuming value EDI holds is an int) int Value = EDI;
推荐答案
取决于你的编译器。搜索内联汇编,您使用的编译器。例如用VC ++
Depends on your compiler. Search for "inline assembly" and the compiler you use. For example with VC++
int32_t x;
_asm mov x, eax;
(可能是__asm)。 GNU使用不同的语法
(might be __asm). GNU uses different syntax
这篇关于你怎么可以拉从寄存器中的值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文