0%

汇编程序安装

引子

汇编程序运行需要什么

环境

安装

首先将 DosBoxMasm 下载下来
安装DosBox ,DosBox 就是运行汇编的环境

汇编是个比较古老的东西,Masm 需要在 DosBox上才能运行

所以用它来运行

然后 新建一个 汇编的工程目录 如 :

1
e:/projects/asms/

这个目录以后专门放汇编的程序代码

将编译器放入 这个目录下面

1
e:/projects/asms/masm

如下

挂载

运行DosBox ,挂载asms 目录

1
2
$ mount c e:/projects/asms
$ C:

这样就可以调用

1
$ masm h.asm

编译汇编程序 ,生成 h.obj 文件

1
$ link h.obj

链接obj文件生成EXE文件 h.obj

卸载

1
$ mount -u c

DosBox 自动挂载

DosBox 启动的时候 会有这样一段话

1
2
3
4
5
DOSBox version 0.74
Copyright 2002-2010 DOSBox Team, published under GNU GPL.
---
CONFIG:Loading primary settings from config file C:\Users\cqs\AppData\Local\DOSBox\dosbox-0.74.conf
MIDI:Opened device:win32

只需要修改配置就可以了

内容很多,只需要在最后加上一段就好了

1
2
3
4
5
6
7
8
9
10
11
12
13
...
[ipx]
# ipx: Enable ipx over UDP/IP emulation.

ipx=false

[autoexec]
# Lines in this section will be run at startup.
# You can put your MOUNT lines here.

mount c e:/projects/asms
c:

参考

DOSBOX的安装及ASM文件的编译

系列

欢迎关注我的其它发布渠道