Lab Report 3
Lab Report 3
Lab Report: 03
Class: COMP-261L
Name: Jamal Ahmed Khan
Registration No.: B20F0358CS022
Semester: 3rd
Submitted to: Sir Rafiullah
__________________
Instructor Signature
Lab No. 03
Arithmetic Instructions
Objectives:
Tools/Software Required:
EMU 8086 Tool
:Introduction
ADD instruction adds values exiting in two registers, register and memory, immediate and
.memory, immediate and register
SUB instruction subtracts the contents of operand2 from operand1 and leaves the difference
.in operand1, with operand2 unchanged
Lab Tasks:
Lab Tasks:
Code:
.model small
.stack 100h
.code
main proc
mov ax,1254h
mov bx,0b812h
mov cx,9067h
mov dx,0adc3h
add ax,bx
add cx,dx
add ax,cx
mov di,ax
main endp
end main
Output:
.code
main proc
mov bl,7h
mov bh,7h
mov al,bl
mov ah,bh
mul ah
mov bh,ah
mov al,.5
mul al
main endp
endp main
Output:
main endp
endp main
Output:
Results & Observations:
In this lab we learn about the working of arithmetic instruction and also understand the use of
arithmetic instruction by implementing them.in this lab we learn about ADD, ADC, SUB, SBB,
INC, DEC, NEG, MUL, DIV instruction. We also learn about divisor which we store in small bit
register and dividend store in higher bit for example divisor store in 8 bit and dividend store in
16 bit and same as multiplier and multiplicand.