vscode搭建汇编开发环境
开发示例
新建hello.asm
输入下列代码
data segment ;数据段string db 'helloworld$'data endscode segment ;代码段assume cs:code,ds:datastart:mov ax,data ;获取段基址mov ds,ax ;将段基址送入寄存器mov dx,offset stringmov ah,9int 21hmov ah,4chint 21hcode endsend start
后记(重要)
改用MASMplus
非常好用!!!!!
示例代码
.386.model flat,stdcalloption casemap:noneinclude windows.incinclude user32.incincludelib user32.libinclude kernel32.incincludelib kernel32.lib;数据段.dataszCaption db "好一个汇编",0szText db "hello world",0;代码段.codestart:INVOKE MessageBox,NULL,addr szText,addr szCaption,MB_OKINVOKE ExitProcess,NULLend start
运行结果
可得到hello.exe文件


运行结果
