Emu8086 is an 8086 microprocessor emulator and disassembler. It permit to assemble, emulate and debug 8086 programs (16bit/DOS). Although this program was made for Windows, it works fine on GNU/Linux (with the help of Wine).
The problems are that Emu8086 can opens only one file at time, and that I dislike its text editor… I used an other editor
for writing my program and then I opened the main file of my project in Emu8086 every time I wanted to
compile it. That's boring and repetitive, so I made a build environment that uses the standard make
command for
building my program. It is easy to use and efficient as we will see.
For building your program you will need:
On Debian and Ubuntu you can install those dependencies with the following command (as root):
apt-get install build-essential wine
For running your application, you will need to install:
On Debian and Ubuntu you can install DOSBox with the following command (as root):
apt-get install dosbox
For compiling your program, the first step is to put the following makefile in your source directory.
You can customize it a little, by changing the PROGRAM_NAME
or the PROGRAM_EXT
2).
#The program name (8 char max) PROGRAM_NAME = myprog #The program ext (com or exe, lowercase) PROGRAM_EXT = com all: clean program program: ./buildenv/build.sh $(PROGRAM_NAME) $(PROGRAM_EXT) clean: rm -f $(PROGRAM_NAME).$(PROGRAM_EXT) rm -f $(PROGRAM_NAME).sh buildenv: wget -c "http://download.flogisoft.com/files/various/emu8086/emu8086-buildenv_1.0.tar.gz" tar -xzf emu8086-buildenv_1.0.tar.gz rm -f emu8086-buildenv_1.0.tar.gz cd buildenv/ && ./makeenv.sh
Then, you have to make the build environment (only the first time). This can be done with the following command:
make buildenv
Finally, you can compile your program:
make
If the build was successful, two files are created in your source folder:
myprog.com
or myprog.exe
- This is your application. It can be executed on *DOS or on a 32 bit Windows.myprog.sh
- This is a Bash shell script for GNU/Linux that launch your application in DOSBox.So for launching your application you can type this command:
./myprog.sh