0% found this document useful (0 votes)
84 views6 pages

Lab.1 Assembly Language: RAM Is A Place To Where The Programs Are Loaded in Order To Be Executed. The

The document discusses the 8086 emulator software. It can be used to simulate how a program runs on the 8086 microprocessor. The emulator has an editor to write assembly programs. When a program is run, the emulator displays the running window which shows the microprocessor components in action like registers, memory, instructions, and flags as the program executes step-by-step or continuously. It also explains the basic structure of an assembly language program and defines variables and data types that can be used.

Uploaded by

Radhwan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
84 views6 pages

Lab.1 Assembly Language: RAM Is A Place To Where The Programs Are Loaded in Order To Be Executed. The

The document discusses the 8086 emulator software. It can be used to simulate how a program runs on the 8086 microprocessor. The emulator has an editor to write assembly programs. When a program is run, the emulator displays the running window which shows the microprocessor components in action like registers, memory, instructions, and flags as the program executes step-by-step or continuously. It also explains the basic structure of an assembly language program and defines variables and data types that can be used.

Uploaded by

Radhwan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

University of kufa Lecture: Radhwan H.

Alsagheer
8086 MP_Laboratory Manual 2nd Year 2019-2020
Lab.1
Assembly Language
It is a low level programming language. you need to get some knowledge about
computer structure in order to understand anything. the simple computer model as

RAM is a place to where the programs are loaded in order to be executed. The
system BUS connects the various components of a computer. the CPU is the heart of the
computer, most of computations occur inside the CPU.

The 8086 Emulator


The 8086 emulator is a software which by use it we can see how the program in 8086
microprocessor is run and what happened if this program is run.
After we initialize the software in the computer, double click on the software's icon we see the main
window of the 8086 emulator (see Fig. (1-1)).

1
University of kufa Lecture: Radhwan H. Alsagheer
8086 MP_Laboratory Manual 2nd Year 2019-2020

Fig. (1-1)
Main Window of 8086 Emulator

Click the (Continue…) icon and then click the (New) icon to open the new page (see Fig. (2-1)).

Fig. (2-1)
Main Window of 8086 Emulator

The (Choose Template for New File) window is open to select the file which you want to build it.
There are four type of this files (Com, Exe, Bin, Boot template), now select the (Com Template) file and
click OK (see Fig. (3-1)).

2
University of kufa Lecture: Radhwan H. Alsagheer
8086 MP_Laboratory Manual 2nd Year 2019-2020

Fig. (3-1)
Choose Template for New File Window

Now the emulator open the page which we written the program on it this page is called the 8086 editor
see Fig. (4-1).

Fig. (4-1)
The 8086 Editor

Now after we written your program on the 8086 editor we need to runthis program and see which
component of the 8086 microprocessor is change.
To run the program we click on the (Emulate) icon and the software is turn onthe running window if the
program is no syntax error.Before us going on the running window we must know the importanticons on
the editor window and there are:

1. New: To open a new editor widow.


2. Open: To open program which store on the computer.
3. Samples: To open the sample program.
4. Save: To store the written program on the computer.
5. Compile: To check the syntax error program.
6. Emulate: To turn on the running window
Now we click on the Emulate icon and if the program which we written is no error the running page or
running windows is appear see Fig. (5-1).

3
University of kufa Lecture: Radhwan H. Alsagheer
8086 MP_Laboratory Manual 2nd Year 2019-2020

Fig. (5-1)
The 8086 Emulator-Running Window

Fig. (5-1-A) is called main running window and Fig. (5-1-B) is called theactual source code and this contain
the program which is running in the CPU now and the pointer which is stopped on the instruction
represent the instruction which is running now, above the pointer represents the instruction which is run
before and down the pointer represent the instruction which is don't run yet.

Fig. (6-1)
4
University of kufa Lecture: Radhwan H. Alsagheer
8086 MP_Laboratory Manual 2nd Year 2019-2020
A. Load: To load the (com, exe, bin, boot) files to the CPU.
B. Reload: To reload the same program to the CPU and reset the 8086 registers.
C. Single Step: To run the program step by step.
D. Run: To run all the instruction in the program.
2. Registers: Explain in the last experiment.
3. Memory: The 8086 microprocessor can access 1K bit of the memory.
4. Instruction: This is similar of the Fig. (5-1-B) but it represent the instructions in the memory.
5. Push Bottom Icon:
A. User Screen: To see the screen if we have any printing instruction.
B. Actual Source: To see the actual sources (Fig. (5-1-B).
C. ALU: To see the Arithmetic Logic Unit of the 8986 microprocessor.
D. Stack: To see the stack (Explain in the last experiment).
E. Flag: To see the flag register (Explain in the last experiment).

The general Structure of emulator assembly language consists of

org 100h

.MODEL SMALL

.STACK 100H

.DATA
Variable declaration ( Name Type Initial_Value )
.CODE

MAIN PROC
Code and instruction
MAIN ENDP

END MAIN

ret

Variable declaration
The Variable is a memory location. Syntax for a variable declaration:

Name Type(size) Initial_Value

Variable
Var1 DB 5h
5
Var2 DB ?
Var3 DW 5h 5 0
5
University of kufa Lecture: Radhwan H. Alsagheer
8086 MP_Laboratory Manual 2nd Year 2019-2020
Var4 DW ?
Arrays

Var5 DB 48h, 65h, 6Ch, 6Ch, 6Fh, 00h


You can access the value of any element in array
using square brackets, for example: MOV AL, a[3]

Var6 DW 1000h, 2000h, 3000h

Character Strings
Var7 db 'my nam is hussan $' String Display
DB - stays for Define Byte. DW - stays for Define Word.

Next

You might also like