Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

AL-Balqa Applied University

Faculty of Engineering Technology

Department of Electrical Engineering

Microprocessor 8086 & Assembly Language

Mohammad AL_Sotari

1
Lab 1:

Student Name: ‫دانه عماد الربيحات‬


Student Number: 32115330075
Submission date:

2
1-

Write the following program that multiplies the two values

Enter the value of the registers AX , BX After executing the


program

AX
H L
03 20
BX
H L
00 04

3
2-

Write program that does the following

AL =6

BL =8

Swap between AL and BL contents

* 8086EMU PROGRAM CHECK THE STATUS OF REGISITERS, AND FLAGS

Org 100H
MOV Al,6
MOV Bl,8
XCHG AL,BL
HLT

REGISITERS:

AX
H L
00 08
BX
H L
00 06

FLAGS :

AF= 0 CF=0 ZF=0 SF=0 PF=0 OF=0

4
3-

- This program adds two data specified by the variables and data .the
result of the addition must be stored in another variable called sum
?

ORG 100H
MOV AL , DATA1
MOV BL , BATA2
ADD AL,BL
MOV SUM,AL
HLT
BATA1 DB 2
DATA2 DB 4
SUM DB ?

5
4

Using emu8086 program, write program in assembly language that


perform the following tasks, showing the contents of the affected
register, memory locations and flags:

a. Initialize AX and SI registers with the immediate value 1520h and


0300h respectively
b. Save the immediate value 3040h at the data segment memory
location addressed by SI
c. Add the word contents at the data segment memory location
addressed by SI to AX with the sum stord at the AX register.

ORG 100H
MOV AX , 1520H
MOV SI,0300H
MOV [SI],3040H
ADD AX , [SI]
HLT

FLAGS: CF=0 ZF=0 SF=0 OF=0 PF=1 AF=0 IF=1 DF=0

You might also like