初学汇编

创建he.asm 文件
.386
.model flat, stdcall
option casemap:none


include c:\radasm\masm32\include\windows.inc
include c:\radasm\masm32\include\kernel32.inc
includelib c:\radasm\masm32\lib\kernel32.lib
include c:\radasm\masm32\include\user32.inc 
includelib c:\radasm\masm32\lib\user32.lib 


.data
Section      db "A",0
Value        db "B",0
Path         db "c:\\ts.ini",0
MsgBoxCaption  db "Iczelion Tutorial No.2",0 
MsgBoxText       db "Win32 Assembly is Great!",0
 
.data?
CommandLines LPSTR ? 


.code
start:
invoke GetCommandLine
mov CommandLines,eax
invoke MessageBox, NULL, CommandLines, addr MsgBoxCaption, MB_OK 
invoke WritePrivateProfileString, addr Section, addr Value, CommandLines, addr Path
invoke ExitProcess,0

end start


命令行编译

ml /c /coff /Cp he.asm
link /SUBSYSTEM:WINDOWS /LIBPATH:c:\radasm\masm32\lib he.obj

运行:

cmd:he.exe  hello   

更多参考:下载RadASM 安装,点击工具栏help-->win32汇编教程

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值