【问题标题】:How to write to StdOut in Windows and FASM?如何在 Windows 和 FASM 中写入 StdOut?
【发布时间】:2011-08-31 20:39:04
【问题描述】:

这个问题很简单,但我似乎找不到怎么做:如何在 Windows/FASM 中写入 StdOut?

似乎没有任何在线文档。想法?

【问题讨论】:

标签: windows stdout intel fasm


【解决方案1】:

有几个选项...

1) 使用 WinAPI。这要么是WriteConsole,要么是使用文件名为 CON 的 CreateFile,然后使用 WriteFile

2) 像在 c 程序中一样使用 msvcrt 和 printf

【讨论】:

  • 建议的 WinAPI 函数总是不够的。至少对我来说,我必须调用 AttachConsole(-1) 一次,然后才能使用 WriteFile(GetStdHandle(-11), ...) 查看调用我的应用程序的“cmd.exe”中的文本跨度>
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2016-11-03
  • 1970-01-01
  • 2011-11-02
  • 2019-08-21
  • 2011-01-21
  • 1970-01-01
相关资源
最近更新 更多