Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
asm:emu8086_buildenv [2011/05/25 11:38]
flozz [Compiling your program with a Makefile] Makefile added
asm:emu8086_buildenv [2011/06/24 11:29]
127.0.0.1 external edit
Line 2: Line 2:
  
 {{ :​asm:​emu8086_4.08_screenshot.png?​320|Emu8086 4.08 screenshot}} {{ :​asm:​emu8086_4.08_screenshot.png?​320|Emu8086 4.08 screenshot}}
-FIXME 
  
 +[[http://​www.emu8086.com/​|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.
 ===== Dependencies ===== ===== Dependencies =====
  
Line 27: Line 33:
 ===== Compiling your program with a Makefile ===== ===== Compiling your program with a Makefile =====
  
-FIXME+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''​ ((The extension depend of your code. 
 +If your code is made for being a flat binary, you have to set this variable to ''​com''​ ; if you have different segments 
 +in your code, you have to set ''​exe''​.)).
  
 <code make Makefile>​ <code make Makefile>​
Line 51: Line 60:
  cd buildenv/ && ./​makeenv.sh  cd buildenv/ && ./​makeenv.sh
 </​code>​ </​code>​
 +
 +Then, you have to make the build environment (only the first time). This can be done with the following command:
 +<​code>​make buildenv</​code>​
 +
 +Finally, you can compile your program:
 +<​code>​make</​code>​
 +
 +
 +
  
 ===== Running your program with DOSBox ===== ===== Running your program with DOSBox =====
  
-FIXME+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:
 +<​code>​./​myprog.sh</​code>​
  
 ===== Debugging ===== ===== Debugging =====
 
asm/emu8086_buildenv.txt · Last modified: 2019/01/15 08:38 by flozz