Skip to content

Commit

Permalink
PE-2011-5-10
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed May 10, 2011
1 parent bb09318 commit 50ae9d1
Show file tree
Hide file tree
Showing 15 changed files with 70 additions and 0 deletions.
2 changes: 2 additions & 0 deletions PE/assembly/asm/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ml /coff /Zi /c win32.asm
link /subsystem:windows /DEBUG win32.obj
47 changes: 47 additions & 0 deletions PE/assembly/asm/win32.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; Sample code for < Win32ASM Programming 2nd Edition>
; by 罗云彬, http://asm.yeah.net
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; Test.asm
; 编程环境测试代码
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; 使用 nmake 或下列命令进行编译和链接:
; ml /c /coff Test.asm
; rc Test.rc
; Link /subsystem:windows Test.obj Test.res
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.386
.model flat,stdcall
option casemap:none
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; Include 文件定义
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
include windows.inc
include user32.inc
includelib user32.lib
include kernel32.inc
includelib kernel32.lib
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; 数据段
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.const

szCaption db '恭喜',0
szText db '当您看到这个信息的时候,您已经可以编译Win32汇编程序了!',0

;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; 代码段
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.code
start:
invoke MessageBox,NULL,offset szText,offset szCaption,MB_OK
; call delta
;delta:
; pop ebp
; sub ebp, delta
; ret
invoke ExitProcess,NULL
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
end start
Binary file added PE/assembly/asm/win32.exe
Binary file not shown.
Binary file added PE/assembly/asm/win32.ilk
Binary file not shown.
Binary file added PE/assembly/asm/win32.obj
Binary file not shown.
Binary file added PE/assembly/asm/win32.pdb
Binary file not shown.
7 changes: 7 additions & 0 deletions PE/assembly/c++/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include <windows.h>
#include <stdio.h>

int main ()
{
printf ("win32 debug ok.");
}
Binary file added PE/assembly/c++/main.exe
Binary file not shown.
Binary file added PE/assembly/c++/main.ilk
Binary file not shown.
Binary file added PE/assembly/c++/main.obj
Binary file not shown.
Binary file added PE/assembly/c++/main.pdb
Binary file not shown.
5 changes: 5 additions & 0 deletions PE/assembly/c++/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cl /c /Zi main.cpp
link /subsystem:windows /DEBUG


/Zi ����ѡ��dz���Ҫ������windbg�޷����ԡ�
Binary file added PE/assembly/c++/vc90.pdb
Binary file not shown.
7 changes: 7 additions & 0 deletions PE/assembly/c/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include <windows.h>
#include <stdio.h>

int main ()
{
printf ("win32 debug ok.");
}
2 changes: 2 additions & 0 deletions PE/assembly/c/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cl main.c
link /subsystem:windows /DEBUG

0 comments on commit 50ae9d1

Please sign in to comment.