How can I run the code of Masm on Ubuntu? I cannot use Windows as a virtual machine and neither can I use Nasm.
Asked
Active
Viewed 1.0k times
2 Answers
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/masmChange the current working directory to c.
c:Assemble the code.
masm myProgram;Link the file.
link myProgram;Run the executable.
debug myProgram.exeType
-gand press Enter.Once the output is displayed, enter
qto quit.
-
I tried the above one but while linking it is showing **Fatal Error L1903:obj not found** .. – Bilal K Oct 01 '19 at 19:19
-
And if i am trying to include `INCLUDE IRVINE32.inc` then it is showing me error **not found** @karael , @Saxtheowl – Bilal K Oct 01 '19 at 19:24
0
To use masm from your terminal, an easy way is with dosemu
sudo apt install dosemu
cd to where your MASM.EXE is located and execute
dosemu MASM.EXE <code.asm>
I've tried it with MASM 5.1, works perfectly.
Hope I have helped :)
Giorgos Saridakis
- 736
- 1
- 5
- 13