Search windows for DOSBox and launch it.
DOSBox starts with this screen
Type the commands
mount c c:\8086
replace the
c:\8086
with the location of your 8086 binary files
Use
c:
to move to the directory
To create files and edit them we make use of the EDIT
command
EDIT <filename>
Since we are working with assembly program we name the file with a .asm
extension
EDIT <filename>.asm
eg. Editing ADD.asm
To assemble the files we make use of the MASM
command
MASM <filename>.asm
eg. Assembling ADD.asm
This will produce a object file with the extension .obj
Just press enter for the inputs asked by
MASM
Ojbect files cannot be executed directly, they have to be linked with the necessary libraires
To link Object files we make use of the LINK
command
LINK <filename>
This will produce an executable file with the extension .exe
Just press enter for the inputs asked by
LINK
Just providing the filename would be enough, though it is recommended to use the full file name with extension
eg. Linking ADD.obj
We proceed with debugging using the DEBUG
command
DEBUG <filename>.exe
This will start the debug process and asks the user for commands to start debugging
eg. Debugging ADD.exe
The commands are as follows:
Command | Use |
---|---|
T | Executes one instruction and then displays the contents of all registers, the status of all flags, and the decoded form of the instruction that Debug will execute next |
E | Enters data into memory starting at a specified address |
G | Runs the executable file that is in memory, (This will run untill it sees an interrupt) |
Q | Quit the debug menu |