汇编语言学习:使用王爽写的《汇编语言》第三版(编程环境配置)

汇编语言学习

参考书:使用王爽写的《汇编语言》第三版
学习工具(win7 x64): DOSBox 0.74、masm.exe、link.exe、debug.exe。
另外需要一款编辑器,用来编辑源程序,推荐sublime text。需要到这里下载支持汇编语法高亮的插件:https://github.com/Nessphoro/sublimeassembly

目录介绍

学习工具:包含win7 64位下需要的工具:DOSBox 0.74安装包、masm.exe、link.exe、debug.exe
experiment.asm:参考书上面的练习与实验(不全,但需要的代码都在里面)

64位windows7下DOSBox使用方法:

step1:新建文件夹(下面以C:\coding\assembly-language-learning为例)
step2:debug.exemasm.exelink.exe放到C:\coding\assembly-language-learning文件夹下
step3:打开DOSBox。这里可以看到Z:\DOSBox里的虚拟盘,我们采用mount命令将其转变到C:\coding\assembly-language-learning目录下,如果只是用这一次,可以直接在命令行中输入如下命令:

Z:\> mount d C:\coding\assembly-language-learning
Z:\> D:
D:\>

如果是一直使用,则可以修改autoexe,方法如下: 打开DOSBox 0.74 Options,在打开的文件里找到[autoexec](应该在文本的最后位置),向下面那样在末尾添加上面两条命令

[autoexec]
\# Lines in this section will be run at startup.
\# You can put your MOUNT lines here.
mount d c:\coding\assembly-language-learning
D:

step4:接下来在目录C:\coding\assembly-language-learning下编写源程序(假设1.asm)并按照如下方式编译链接并运行或者调试

[autoexec]
D:\>masm 1;		快速编译(省略生成中间文件)
D:\>link 1;		快速链接(省略生成中间文件)
D:\>1.exe		运行可执行程序
D:\>debug 1.exe		debug中进行调试

https://github.com/FriendLey/assembly-language-learning

猜你喜欢

转载自blog.csdn.net/With__Sunshine/article/details/92382508