x86汇编(masm32)-我可以在Windows XP上使用int 21h来打印内容吗? [英] x86 assembly (masm32) - Can I use int 21h on windows xp to print things?

查看:67
本文介绍了x86汇编(masm32)-我可以在Windows XP上使用int 21h来打印内容吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于我的帖子内置宏的替代方法,我想知道是否有可能通过使用 int 21h Windows API?如:

Just wondering, in regards to my post Alternatives to built-in Macros, is it possible to avoid using the StdOut macro by using the int 21h windows API? Such as:

.data
       msg dd 'This will be displayed'
;original macro usage:
invoke StdOut, addr msg
;what I want to know will work
push msg 
int 21h ; If this does what I think it does, it should print msg

这样的事情是否存在(例如使用int 21h进行打印),还是确实存在类似的事情,但不完全是int 21h.还是我完全错了.

Does such a thing exist (as in using int 21h to print things), or does something like it exist, but not exactly int 21h. Or am I completely wrong.

有人可以帮我澄清一下吗?

Could someone clarify this for me?

谢谢

程序

推荐答案

DOS中断不能在Windows上的保护模式下使用.

DOS interrupts cannot be used in protected mode on Windows.

您可以使用 WriteFile Win32 API函数可写入控制台,或改为使用MASM宏.

You can use the WriteFile Win32 API function to write to the console, or use the MASM macro instead.

这篇关于x86汇编(masm32)-我可以在Windows XP上使用int 21h来打印内容吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆