WDK-build 添加Listing file type:assembly,Machine Code,and Source
依照VS6样式,Listing file type:assembly,Machine Code,and Source
sources文件中:
TARGETNAME=first
TARGETTYPE=DRIVER
SOURCES=first.c
TARGETPATH=obj
USER_C_FLAGS = /FAs
MSC_OPTIMIZATION = /Od /Oi
TARGETLIBS = $(SDK_LIB_PATH)\ws2_32.lib # the only new line...
/////////////////////////////sources/////////////////////////////////////////////////////
TARGETNAME=hello # your program name (it'll compile to "hello.exe")
TARGETTYPE=PROGRAM # PROGRAM means that it will be a normal executable program
# other common choices for TARGETTYPE are: DYNLINK, LIBRARY, DRIVER
UMTYPE=console # usermode target type CONSOLE. this is a 32bit user-mode console app
# the other common choice for UMTYPE is: WINDOWS (gui app)
UMENTRY=main # default entry point shoudl be "main"
# other choices for UMENTRY are: WINMAIN, WMAIN, ...
USE_MSVCRT=1 # use the multithreaded runtime library
USER_C_FLAGS = /FAs # compiler flags (/FAs = produce a .asm file as well)
# reading the .asm file is a good way to learn assembly
MSC_OPTIMIZATION = /Od /Oi # optimization flags (/Od = disable all optimization)
# i normally disable all optimization for debugging purposes
SOURCES=hello.c # the name of the source file
看书看原版,原汁原味。
不会英文?没关系,硬着头皮看下去慢慢熟练,才会有真正收获。
没有原书,也要网上找PDF来看。
网上的原版资料多了去了,下载东西也到原始下载点去看看。
你会知其所以然,呵呵。
***********************************************/