读书人

汇编学习二

发布时间: 2012-09-29 10:30:01 作者: rapoo

汇编学习2

1. 下载masm32v11r.zip

2.安装

3.写代码

?

.386?? ;定义指令集
.model flat,stdcall ;定义工作模式
option casemap:none

include c:\masm32\include\Windows.inc
include c:\masm32\include\user32.inc
include c:\masm32\include\kernel32.inc
includelib c:\masm32\lib\user32.lib
includelib c:\masm32\lib\kernel32.lib

.data
string db 'Hello,人们!',0
strText db 'MessageBox',0
strCaption db 'MessageB',0

.code

start:

;invoke MessageBox,NULL,offset string,offset strCaption,MB_OK
;invoke ExitProcess,NULL
??
push MB_OK
push offset strCaption
push offset string
push NULL
call MessageBox
push NULL
call ExitProcess??
??? end start

4:编译 ml /c /coff? showD.asm

汇编学习二

汇编学习二

5:link

汇编学习二

汇编学习二

6 执行

汇编学习二

汇编学习二

汇编学习二

?

读书人网 >编程

热点推荐