Skip to content

Latest commit

 

History

History
97 lines (64 loc) · 2.51 KB

instructions.md

File metadata and controls

97 lines (64 loc) · 2.51 KB

Process to execute Assembly code on 8086

Starting DOSBox

Search windows for DOSBox and launch it.

image

DOSBox starts with this screen

image

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

image

Start Creating, Assembling, Linking and Debugging assembly program files

EDIT

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

image

ASSEMBLE

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

image

Just press enter for the inputs asked by MASM Ojbect files cannot be executed directly, they have to be linked with the necessary libraires

LINKING

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

image

DEBUGGING

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

image

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