Ec 2 Labmanual

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

EXPERIMENT NO.

10
Microprocessor Lab (EC-350)

OBJECTIVE

▪ AIM: TO WRITE AN ALP TO FIND THE SQUARE OF A NUMBER

OPERATORS REQUIRED

8086 microprocessor Kit.


PC with 8086 emulator.

ALGORITHMS

Algorithm :
1. Sore the inputs number at data segment.

2. Save memory for square number.

3. Load number into SI which square root needed.

4. Move that namber in AL.

5. Multiply by itself

6 Store the results at preset memory for square number.

INPUTS DATA
ARRAY DB 08H
SQR DB ?

PROGRAM

• Org 100h
• Jmp start
• ARRAY DB 08H

• SQR DB ?

• X DB 08H ; NUMBER TO BE SQUARED

• SQR DW (?) ; LOCATION TO STORE NUMBER

• LEA SI,X; INITIALIZE DATA SEGMENT

• MOV AL, [SI]

• MUL AL

• LEA DI,SQR

• MOV [DI] , AX ;

• RET

OUTPUTS AFTER EXECUTION


SQUARE NUMBER - ____________

You might also like