How to use MASM for assembly language on Ubuntu?
Solution 1:
You can try using DOSBox with this guide. These instructions will run in all versions of Ubuntu.
- Download the all files in the masm folder from here.
-
Install dosbox with the following command:
sudo apt install dosbox
Usage
- Write an masm program (e.g. myProgram) in any text editor and save it.
-
Mount the location where the downloaded folder is available (e.g.
~/Downloads
). To mount, launch dosbox and run this command in dosbox:mount c: ~/Downloads/masm
-
Change the current working directory to c.
c:
-
Assemble the code.
masm myProgram;
-
Link the file.
link myProgram;
-
Run the executable.
debug myProgram.exe
Type
-g
and press Enter.Once the output is displayed, enter
q
to quit.