MS-DOS and mounting assembly language MASM-- build environment VirtualBox

First, the preparatory work

1. Download and install Oracle VM VirtualBox

2, MS-DOS6.22 download the installation file (recommended to MSDN's official website to download)

It is recommended to download the English version 6.22, the download is a self-extracting EXE file format, after decompression can be found in the directory <DISKS> folder, the folder contains 1.22UPG # (1-4), 1.44UPG # (1 -3), two different sizes floppy disk image file, my guess is compatible with both the floppy disk to the specifications of the year, because the same content, you can choose one of the following during the installation process.

3, download the MASM package

4, download and install WinImage (or similar software available for Linux command line to create the desired floppy disk image)

Two, MS-DOS installation

1, create a compatible MS-DOS virtual machine, as shown below:

How much memory MS-DOS greatest support I have not found, but the program is running under 16-bit program, the maximum addressable capacity of 64M, so for the time being to set the memory to 64M should meet the operational requirements, as the back of the hard disk size may be due to people It varies.

2, the previously downloaded MS-DOS floppy disk and loaded into the image 1.44UPG1.IMG start the system, as shown below:

If all goes as follows to enter the installation interface.

3, then press Enter to installation error, from the previous UPG file name is not difficult to see that this image is used to upgrade, but we can still make it with a new installation, press F3 twice to enter the command line mode, turn enter fdisk, format, setup execution, interaction among all program encountered enter to execute in the end, if all goes well, will return to the second step of the interface, we can now press enter to proceed with the installation.

4, various settings installation process if no special requirement may default options, last seen interface is shown below:

这里提示的含义是安装过程需要 一张卷标为<UNINSTALL>的空白软盘,我猜想是用来存放安装的日志,我们可以用WinImage创建所需的镜像文件,要注意不是将镜像的文件名改为<UNINSTALL>,而是在创建映像时找到Change Lable项进行更改。

5、上面的步骤完成后可在虚拟机窗口的设备-分配软驱里将空白镜像载入并继续安装,期间会多次要求切换软盘,按照提示的要求进行加载即可,最后移除所有软盘镜像重启完成安装。

三、MASM的安装

1、与MS-DOS不同的是我们需要自己将所下载的文件制作成光盘镜像,这里我们再次用到WinImage,依次将masm611下的各DISK#(1-5)目录下内容制作成软盘镜像文件。

2、将所制作的DISK1载入虚拟机软驱,MS-DOS下输入A:进行磁盘切换,然后输入SETUP进入安装界面,如下图:

按Enter继续安装即可。

3、遇到下图界面,应选择第二项<MS-DOS/Microsoft Windows>进行安装。

4、安装完成后可用命令切换至C:\MASM611\BIN目录下运行MASM -H命令,如下图则表示安装成功:

 5、如果我们要在其他目录下运行MASM命令需要添加环境变量,以我目前的水平还不知道MS-DOS下是否可以设置永久生效的环境变量,目前我是每次开机依靠下面的脚本进行添加:

  1. @ECHO OFF
  2. SET INCLUDE=\MASM611\INCLUDE
  3. SET LIB=\MASM611\LIB
  4. SET PATH=C:\MASM611\BIN;%PATH%
  5. ECHO ON

将上面代码保存为masm2path.bat,每次重新开机后运行一下。

至此一个老爷车的汇编环境已经搭建完成,文中如有不当之处,请指正!

Guess you like

Origin blog.csdn.net/Quarrie/article/details/82111057