Professional Documents
Culture Documents
Experiment No.02
Aim: Write and execute 8086 program
OBJECTIVE/EXPECTED LEARNING:
The objective and expected learning outcomes of this practical are
The student will be able to analyze, specify, design, write and test assembly
language programs of moderate complexity.
APPARATUS:
1 Trainer kit 1
2 Keyboard 1
3 Power supply 1
4 MASM (Microsoft -
Assembler)
ALGORITHM:
a. SMALLEST NUMBER
1. Initialize the memory segment and Store ten numbers in data memory segment.
3. Copy first data from source memory location into register AL.
6. If CF = 1 then go to step 8.
b. LARGEST NUMBER
1. Initialize the memory segment and Store ten numbers in data memory segment.
3. Copy first data from source memory location into register AL.
5. Compare the data of source memory location with the contents of AL.
6. If CF = 0 then go to step 8.
PROGRAM:
a. Using MASM
MOV CL,COUNT
MOV AL,[SI]
UP: INC SI
CMP AL,[SI]
JC L1
MOV AL,[SI]
L1: DEC CL
JNZ UP
MOV SI,OFFSET RESULT
MOV [SI],AL
MOV AH,4CH
INT 21H
CODE ENDS
END START
DATA SEGMENT
NUM DB 01H,05H,06H,07H,08H,02H,09H,04H,03H,10H
COUNT EQU 09H
MOV DS,AX
MOV SI,OFFSET NUM
MOV CL,COUNT
MOV AL,[SI]
UP: INC SI
CMP AL,[SI]
JNC L1
MOV AL,[SI]
L1: DEC CL
JNZ UP
MOV SI,OFFSET RESULT
MOV [SI],AL
MOV AH,4CH
INT 21H
CODE ENDS
END START
CONCLUSION:
1. Write an assembly language for multiplying two 8 bit numbers by using 8085 micro
processor kit.
2. Write an assembly language program for dividing two 8 bit numbers using
microprocessor kit.
3. Write and execute 8086 program to add 10 bytes present at 2000H Store the result
after data
REFERENCES:
https://en.wikipedia.org/wiki/Intel_8086
OBJECTIVE/EXPECTED LEARNING:
The objective and expected learning outcomes of this practical are
The student will be able to analyze, specify, design, write and test assembly
language programs of moderate complexity.
APPARATUS:
1 Trainer kit 1
2 Keyboard 1
3 Power supply 1
4 MASM (Microsoft -
Assembler)
FLOWCHART:
OUTPUT:
a. TRAINER KIT
0101 65
0102 98
0103 2A
0104 4F
0105 64
0106 5D
0107 36
0108 FF
0109 62
010A 34
0105 64
0106 5D
0107 36
0108 FF
0109 62
010A 34
b.MASM Output