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