在被窝里看书系列之《Windows PE 权威指南学习》笔记 第一章

来源:互联网 发布:淘宝上买号怎么领取 编辑:程序博客网 时间:2024/04/30 17:43

标题不长不拉风。。。 今天开始看《Windows PE 权威指南》。

 

第一章 easy 了 贴下 软件环境把

开发语言:masm32 v10.0

工作环境:windows xp sp3

编辑器:notepad.exe

调试软件:Ollydbg.exe

静态调试:w32dasm

字节码编辑器:FlexHex

OK  第一章  各个软件安装完毕。

-----------------------------------------------------------

叫我做个hello word..

开工把

MessageBox();

ExitProcess();

就这2API.用汇编的写一遍。。

;-------------------------;功能:第一个程序HelloWorld;作者:pandyer;日期:2012.02.26;-------------------------;.386 不解释..好像以前学的都是386的指令把  flat 内存模式  stdcall 调用约定 书上没说鬼知道是不是这样,我是这么理解的    .386    .model  flat,stdcall    option  casemap:noneinclude windows.incinclude user32.incincludelib  user32.libinclude kernel32.incincludelib  kernel32.lib\;数据段    .dataszText  db  'HelloWorld',0;代码段    .codestart:    invoke MessageBox,NULL,offset szText,NULL,MB_OK    invoke ExitProcess,NULLend start


 

就第一行的那个 386 啊什么的 需要理解一下其他的都知道了。。

然后代码敲完 开始 ML ....

ml -c -coff helloworld.asm

-c 是独立编译  -coff 是生存标准coff目标文件。。 别问我2参数什么意思。。

第三步

link -subsystem:windows helloworld.obj

KO...-subysstem:windows 看字面意思应该是   windows  系统运行。

好了 helloworld.exe 出来了

 

贴个图

 

原创粉丝点击