2
我正在运行一些MASM32示例(来自www.masm32.com),并且我注意到在我的命令行框中控制台输出为空(程序编译,链接和运行但没有输出。在win32上没有使用MASM与程序组装的控制台输出
.486 ; create 32 bit code
.model flat, stdcall ; 32 bit memory model
option casemap :none ; case sensitive
include \masm32\include\windows.inc ; always first
include \masm32\macros\macros.asm ; MASM support macros
include \masm32\include\masm32.inc
include \masm32\include\gdi32.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
includelib \masm32\lib\masm32.lib
includelib \masm32\lib\gdi32.lib
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib
.code ; Tell MASM where the code starts
start: ; The CODE entry point to the program
print chr$("Hey, this actually works.",13,10)
exit
end start ; Tell MASM where the program ends
有一个'print'宏? – cHao 2011-12-30 02:08:14
Dopey我,用错误的批处理文件来构建示例(使用build,bat,应该使用buildc.bat)。 – 2011-12-30 02:20:17
确实有一个打印宏,它非常方便。 :-) – 2011-12-30 12:52:43