You are on page 1of 6

Assembly Language

Lecture#11
Program (Addition Of Two Numbers)
.model small
.stack 100h
.data
Opr1 dw 1234h
Opr2 dw 0002h
.code
Main proc
mov ax, @data
mov ds,ax
mov ax,opr1
mov bx,opr2
add ax,bx
mov dx, offset result
mov [dx],ax
mov ah, 09h
mov dx, offset result
int 21h

mov ah, 4ch


int 21h
MAIN ENDP
END MAIN
Program (multiplication of two numbers)

.model small
.stactk 100h
.data
Opr1 dw 1234h
Opr2 dw 0002h
.code
Main proc
Mov ax, @data
Mov ds,ax
Mov ax, opr1
Mul opr2
Lea dx, prod
Mov [dx],ax
Add dx,2
Mov [dx],dx

Mov ah, 4ch


Int 21

MAIN ENDP
END MAIN
ASSIGNMENT
Q#01: Discuss 21h interrupt & its possible functions.

Q#02: Write the program that check the flag (Debug


program).

Q#03: Write & explain the steps to creating & running a


program with flow chart.

Q#04: What is the purpose of one & two dimension arrays,


explain with their example in assembly language.

Q#05: What is addressing mode & explain its type, write the
example of each mode in assembly language.

You might also like