Tuesday, 20 February 2018

MASM


MASM 8086 Assembler in Ubuntu or Windows 7(x64) using DOSBox

Run MASM 8086 Assembler in Ubuntu or Windows 7(x64) using DOSBox
Here’s how to run 16 bit DOS executables like the MASM assembler or Turbo C compiler in Ubuntu (GNU/Linux) or in 64 bit editions of Windows 7 using DOSBox, a DOS environment emulator. DOSBox is available for Linux as well as Windows.
DOSBox installation
For Ubuntu users (using repository)
Open the terminal and type in the following commands to download and install DOSbox in Ubuntu
sudo apt-get update
sudo apt-get install dosbox
You will find it installed under Applications_Menu->Games->DOSBox Emulator
For other GNU/Linux users
Download DOSbox from
below link.
Open terminal and cd to the directory containing the downloaded tar.gz file. Type in the following commands to build and install :
tar -xzvf dosbox-0.74.tar.gz
cd dosbox-0.74
./configure
make
Check the 
src subdir for the binary.
For Windows users
Download DOSbox from
below.
Run the downloaded .exe file and install it like any other software.
Now that you’ve installed DOSBox, you’ll be able to run any 16bit or 32bit DOS executable inside it.
Download the 8086 MASM Assembler from below. The zip file contains the following files :
masm.exe, tasm.exe, link.exe, bin2hex.exe, exe2bin.exe, td.exe, edit.com and debug.exe
Windows users extract the .zip file into C:\ so that the path C:\8086 contains all the above mentioned files. GNU/Linux users can extract it and place it in say /home/imran/8086
Launch DOSBox and type the following commands :
For Linux users : 
mount c /home/imran/8086
c:
For Windows : 
mount c c:\8086
c:

DOSBox running in Ubuntu
Now the contents of the folder /home/imran/8086 or c:\8086 is mounted as c: drive inside the DOS emulator. You can assemble programs inside DOSBox as you do in your Microprocessor Lab under Windows XP; i.e your usual sequence of commands -
edit file.asm
masm file.asm
link file
debug file.exe
When you are done, type exit to quit DOSBox.
P.S : For GNU/Linux users, there’s an alternative assembler known as the NASM. NASM is considered to be one of the most popular assemblers for GNU/Linux.
Click to Downloads :
DOSBox for Linux : dosbox-0.74.tar.gz
DOSBox for Windows : DOSBox0.74-win32-installer.exe
8086 Assembler : 8086_Assembler.zip

No comments:

Post a Comment