本文介绍了在汇编中写出一个寄存器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这次很简单的问题.我该如何编写屏幕程序集中单个寄存器内容的筛选?我对于只看一个寄存器的值而调用DumpRegs感到有些厌倦.
Fairly simple question this time. How do I write to screen the contents of a single register in Assembly? I'm getting a bit tired of calling DumpRegs just to see the value of one register.
我正在使用x86体系结构,Visual Studio中的MASM和Irvine32.lib.
I'm using x86 architecture, and MASM in Visual Studio, and Irvine32.lib.
推荐答案
Irvines的DumpReg
反复使用Macros.inc
宏:mShowRegister
.可以直接使用.示例:
Irvines's DumpReg
uses repeatedly a macro of Macros.inc
: mShowRegister
. It can be used directly. Example:
INCLUDE Irvine32.inc
INCLUDE Macros.inc
.code
main PROC
mov esi, 0DeadBeefh
mShowRegister ESI, ESI
exit
main ENDP
END main
带有更多选项的文档化宏为 mShow
.示例:
A documented macro with more options is mShow
. Example:
INCLUDE Irvine32.inc
INCLUDE Macros.inc
.code
main PROC
mov esi, 0DeadBeefh
mshow ESI, h
exit
main ENDP
END main
这篇关于在汇编中写出一个寄存器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!