在vs2005下建立vc++的win32 控制台应用程序,设置stdafx.h不必要包含,设置多字符集,设置汇编输出/FAs。编写代码如下:
#include <stdio.h>
int main(int argc, char* argv[])
{
printf("hello world!/n");
return 0;
}
对应的汇编输出为:
; Listing generated by Microsoft (R) Optimizing Compiler Version 14.00.50727.42
TITLE e:/study/tc/t03/t03.cpp
.686P
.XMM
include listing.inc
.model flat
INCLUDELIB MSVCRTD
INCLUDELIB OLDNAMES
PUBLIC ??_C@_0O@OBPALAEI@hello?5world?$CB?6?$AA@ ; `string'
PUBLIC _main
EXTRN __imp__printf:PROC
EXTRN __RTC_CheckEsp:PROC
EXTRN __RTC_Shutdown:PROC
EXTRN __RTC_InitBase:PROC
; COMDAT ??_C@_0O@OBPALAEI@hello?5world?$CB?6