FASM练习代码
2008-03-20 00:03
615 查看
;import 构建
;练习之作..
format PE GUI 4.0
entry _start
;
;data section..
;
section '.data' data readable
lpCaption db 'test',0
lpText db 'hello world',0
;
;code section
;
section '.code' code readable executable
_start:
push 40h
push lpCaption
push lpText
push 0h
call [MessageBox]
push 0h
call [ExitProcess]
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;
;import section
;
section '.import' import data readable writeable
;IMAGE_IMPORT_DESCRIPTOR
dd 0, 0, 0, RVA user32_dll, RVA user_thunk
dd 0, 0, 0, RVA kernel_dll, RVA kernel_thuk
dd 0, 0, 0, 0, 0
; DLL Name
user32_dll db 'user32.dll',0
kernel_dll db 'kernel32.dll',0
; THUNK DATA
user_thunk:
MessageBox dd RVA msg_byname
dd 0
kernel_thuk:
ExitProcess dd RVA process_byname
dd 0
;import_Byname
msg_byname dw 0
db 'MessageBoxA',0
process_byname dw 0
db 'ExitProcess',0
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
相关文章推荐
- 【C代码练习7】判断输入的数是否是素数
- 代码练习,购物车
- 安卓课程练习代码
- JSP页面练习代码(一)
- 【C代码练习14】水仙花数
- Java 基础一些代码练习笔记( GenericFoo<T> 泛型)
- Android菜鸟练习第三十课 代码混淆
- 代码练习----以电脑为例
- 练习代码(四)多态
- 《C++ Primer Plus(第6版)》编程练习代码 Chapter 3
- 批处理随机取值练习代码
- Java 基础一些代码练习笔记(多态2)
- Java 基础一些代码练习笔记(继承+接口+多态)
- python学习第八章函数部分课后练习自己尝试的代码
- 【matlab代码练习9】基于连通域提取感兴趣区域
- Java 基础一些代码练习笔记(ArrayEquals)
- Java 基础一些代码练习笔记(数组复制)
- Java 基础一些代码练习笔记(二分查找)
- 【opencv代码练习10】调用摄像头 + Canny边缘检测