0% found this document useful (0 votes)
15 views

Mpmc Manual Gr22

Uploaded by

P Praveen Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Mpmc Manual Gr22

Uploaded by

P Praveen Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 92

MICROPROCESSORS AND

MICROCONTROLLERS LAB
Manual

Department of
ELECTRICAL AND ELECTRONICS ENGINEERING

GOKARAJU RANGARAJU
Institute of Engineering and Technology
(Autonomous)
GOKARAJU RANGARAJU
Institute of Engineering and Technology
(Autonomous)

CERTIFICATE

This is to certify that it is a bonafide record of practical work

done by Mr./Ms. ___________________________,

Reg No. __________________ in the

“MICROPROCESSORS AND MICROCONTROLLERS

LABORATORY” in I-Semester of III-year during 20__

to 20__.

Internal Examiner External Examiner


Signature Signature

Head of the Department


Signature
MICROPROCESSORS AND MICROCONTROLLERS
LABORATORY
Index
Exp
Experiment Name Date Signature
No.
8 AND 16 BITARITHMETIC OPERATIONS

a) Write an ALP program to perform 8 Bit arithmetic operations using MASM software and
8086.

AIM: -
To write an assembly language program for Addition of two 8-bit numbers.

COMPONENTS & EQUIPMENT REQUIRED: -

Quantity (in
S.No Device Range / Rating
No’s)
1 8086 microprocessor kit/Win862 with 1
PC
2 Keyboard 1
3 RPS +5v 1

PROGRAM FOR TWO 8-BIT NUMBERS:

A) ADDITION

i) Software

MOV AL, 43
MOV BL, 11
ADD AL, BL
INT 03

ii) Hardware

MEMORY OP-CODE LABLE MNEMONIC COMMENTS


LOCATION OPERAND
MOV AL,43
MOV BL,11
ADD AL,BL
INT 3

Observation Table

Input Output
Register Data Register Data
AX 4343 AX
BX 1111
B) SUBTRACTION

8 Bit Subtraction

AIM: -
To write an assembly language program for subtraction of two 8-bit numbers.

COMPONENTS & EQUIPMENT REQUIRED: -

Quantity (in
S.No Device Range / Rating
No’s)
1 8086 microprocessor kit/Win862 1
with PC
2 Keyboard 1
3 RPS +5v 1

PROGRAM:
i) Software

MOV AL, 43
MOV BL, 11
SUB AL, BL
INT 03

ii) Hardware

MEMORY OP-CODE LABLE MNEMONIC COMMENTS


LOCATION OPERAND
MOV AL,43
MOV BL,11
SUB AL,BL
INT 03

Observation Table

Input Output
Register Data Register Data
AX 4343 AX 3232
BX 1111
C) MULTIPLICATION

8 Bit Multiplication

AIM: -
To write an assembly language program for multiplication of two 8-bit numbers.

COMPONENTS & EQUIPMENT REQUIRED: -

S.No Device Range / Rating Quantity (in No’s)

1 8086 microprocessor kit/Win862with 1


PC
2 Keyboard 1
3 RPS +5v 1

PROGRAM:

i) Software
MOV AL, 43
MOV BL, 11
MUL BL
INT 03

ii) Hardware

MEMORY OP-CODE LABEL MNEMONIC COMMENTS


LOCATION OPERAND
MOV AL,43
MOV BL,11
MUL BL
INT 3

Observation Table

Input Output
Register Data Register Data
AX 4343 AX EA73
BX 1111 DX 047B
D) DIVISION

i) 8 bit division

AIM:-
To write an assembly language program for division of two 8-bit numbers.

COMPONENTS & EQUIPMENT REQUIRED: -

Quantity (in
S.No Device Range / Rating
No’s)
1 8086 microprocessor kit/Win862 1
with PC
2 Keyboard 1
3 RPS +5v 1

PROGRAM
i) Software

MOV AL, 10
MOV BL, 02
DIV BL
INT 03
ii) Hardware

MEMORY OP-CODE LABEL MNEMONIC COMMENTS


LOCATION OPERAND
MOV AL,10
MOV BL,02
DIV BL
INT 3

Observation Table

Input Output
Register Data Register Data
AX 4343 AX 0003
BX 1111 DX 03F2

RESULT:
b) Write an ALP program to perform 16 Bit arithmetic operations using MASM software and
8086.
AIM: -
To write an assembly language program for addition of two 16-bit numbers.

COMPONENTS & EQUIPMENT REQUIRED: -

Quantity (in
S.No Device Range / Rating
No’s)
1 8086 microprocessor kit/Win862 1
with PC
2 Keyboard 1
3 RPS +5v 1

ADDITION:

i) Software
MOV AX, 4343
MOV BX, 1111
ADD AX, BX
INT 03

ii) Hardware

MEMORY OP-CODE LABLE MNEMONIC COMMENTS


LOCATION OPERAND
MOV AX,4343
MOV BX,1111
ADD AX,BX
INT 3

Observation Table

Input Output
Register Data Register Data
AX 4343 AX
BX 1111
SUBTRACTION:

AIM: -
To write an assembly language program for subtraction of two 16-bit numbers.

COMPONENTS & EQUIPMENT REQUIRED: -

Quantity (in
S.No Device Range / Rating
No’s)
1 8086 microprocessor kit/Win862 1
with PC
2 Keyboard 1
3 RPS +5v 1

PROGRAM:
i) Software

MOV AX, 4343


MOV BX, 1111
SUB AX, BX
INT 03

ii) Hardware

MEMORY OP-CODE MNEMONIC COMMENTS


LOCATION OPERAND
MOV AX,4343
MOV BX,1111
SUB AX,BX
INT 03

Observation Table

Input Output
Register Data Register Data
AX 4343 AX 3232
BX 1111
C) MULTIPLICATION

AIM: -
To write an assembly language program for multiplication of two 16-bit numbers.

COMPONENTS & EQUIPMENT REQUIRED: -

S.No Device Range / Rating Quantity (in No’s)

1 8086 microprocessor kit/Win862with 1


PC
2 Keyboard 1
3 RPS +5v 1

PROGRAM:

i) Software
MOV AX, 4343
MOV BX, 1111
MUL BX
INT 03

ii) Hardware

MEMORY OP-CODE LABEL MNEMONIC COMMENTS


LOCATION OPERAND
MOV AX,4343
MOV BX,1111
MUL BX
INT 3

Observation Table

Input Output
Register Data Register Data
AX 4343 AX EA73
BX 1111 DX 047B
D) DIVISION

AIM:-
To write an assembly language program for division of two 16-bit numbers.

COMPONENTS & EQUIPMENT REQUIRED: -

Quantity (in
S.No Device Range / Rating
No’s)
1 8086 microprocessor kit/Win862 1
with PC
2 Keyboard 1
3 RPS +5v 1

PROGRAM
i) Software
MOV AX, 0080
MOV BX, 0008
DIV BX
INT 03
ii) Hardware

MEMORY OP-CODE LABEL MNEMONIC COMMENTS


LOCATION OPERAND
MOV AX,0080
MOV BX,0008
DIV BX
INT 3

Observation Table

Input Output
Register Data Register Data
AX 4343 AX 0003
BX 1111 DX 03F2

RESULT:
PRE LAB QUESTIONS:
1. How many bit 8086 microprocessor is?
2. What is the size of data bus of 8086?
3. What is the size of address bus of 8086?
4. What is the max memory addressing capacity of 8086?
5. Which are the basic parts of 8086?

POST LAB QUESTIONS:

1. How to move data from one register to other

2. To swapping the data what type register used

3. What are the advantages of maximum mode


PROGRAMS TO SORT NUMBERS

a) Write an ALP program to perform ascending order using 8086

AIM:-
Write an assembly language Program to sort the given numbers in ascending order

COMPONENTS & EQUIPMENT REQUIRED: -

Quantity (in
S.No Device Range / Rating
No’s)
1 8086 microprocessor kit/win 862 1
with PC
2 Keyboard 1
3 RPS +5v 1

PROGRAM:

i) Software

MOV AX,0000H
MOV CH,0004H
DEC CH
UP1 : MOV CL, CH
MOV SI, 2000H
UP: MOV AL,[SI]
INC SI
CMP AL,[SI]
JC DOWN
XCHG AL,[SI]
DEC SI
MOV [SI], AL
INC SI
DOWN: DEC CL
JNZ UP
DEC CH
JNZ UP1
INT 3
ii) Hardware

MEMORY OP-CODE LABEL MNEMONIC COMMENTS


LOCATION OPERAND
MOV AX, 0000
MOV CH, 0004
UP1:
DEC CH
UP:
MOV CL, CH
MOV SI,2000
MOV AL,[SI]
INC SI
CMP AL,[SI]
JC DOWN
DOWN:
XCHG AL,[SI]
DEC SI
MOV [SI],AL
INC SI
DEC CL
JNZ UP
DEC CH
JNZ UP1
INT 03

Observation Table:

Input Output
MEMORY LOCATION Data MEMORY LOCATION Data

2000 2000
2001 2001
2002 2002
2003 2003

RESULT:
b) Write an ALP program to perform descending order using 8086

AIM:-
Write an assembly language Program to sort the given numbers in descending order

COMPONENTS & EQUIPMENT REQUIRED: -

Quantity (in
S.No Device Range / Rating
No’s)
2 8086 microprocessor kit/Win862 1
with PC
Keyboard 1
3 RPS +5v 1

PROGRAM:

i) Software

MOV AX,0000
MOV CH,0004
DEC CH
UP1 : MOV CL, CH
MOV SI, 2000
UP: MOV AL,[SI]
INC SI
CMP AL,[SI]
JNC DOWN
XCHG AL,[SI]
DEC SI
MOV [SI],AL
INC SI
DOWN: DEC CL
JNZ UP
DEC CH
JNZ UP1
INT 3
ii) Hardware

MEMORY OP-CODE LABEL MNEMONIC COMMENTS


LOCATION OPERAND
MOV AX, 0000
MOV CH, 0004
UP1:
DEC CH
UP:
MOV CL,CH
MOV SI,2000
MOV AL,[SI]
INC SI
CMP AL,[SI]
JNC DOWN
DOWN:
XCHG AL,[SI]
DEC SI
MOV [SI],AL
INC SI
DEC CL
JNZ UP
DEC CH
JNZ UP1
INT 3

Observation Table

Input Output
MEMORY LOCATION Data MEMORY LOCATION Data
2000 2000
2001 2001
2002 2002
2003 2003

RESULT:
PRE LAB QUESTIONS:
1. What are the functions of BIU?
2. What are the functions of EU?
3. How many pin IC 8086 is?
4. What IC8086 is?
5. What is the size of instruction queue in 8086?

POST LAB QUESTIONS:

1. How clock signal is generated in 8086


2. What is the maximum internal clock frequency of 8086?
2) A2 3. What is the need for Port
3) 85
4) 54
2. Write an alp program for to sort the given number in descending order?
1) 1E
2) 2A
3) 56
4) 98
PROGRAM FOR STRING MANIPULATIONS OPERATIONS

a) Write an ALP program to insert or delete a byte in the given string.

INSERT A BYTE IN A GIVEN STRING

AIM:-
To write a ALP for insert a new byte in a given string

COMPONENTS & EQUIPMENT REQUIRED: -

Quantity (in
S.No Device Range / Rating
No’s)
8086 microprocessor kit/MASM 1
1
with PC
2 Keyboard 1
RPS +5v 1
3
1

PROGRAM:
i) Software

ASSUME CS: CODE


CODE SEGMENT
START: MOV SI,2000H
MOV DI,3000H
MOV BX,5000H
MOV CX,0005H
CLD
L1: MOV AL,[SI]
CMP AL,[BX]
JZ L2
MOVSB
LOOP L1
JMP L3
L2: MOVSB
MOV BX,7000H
MOV AL,[BX]
MOV [DI],AL
DEC CX
INC DI
REP MOVSB
L3: INT 3
CODE ENDS
END START
ii) Hardware
MEMORY OP-CODE LABEL MNEMONIC COMMENTS
LOCATION OPERAND
MOV SI,2000
MOV DI,3000
MOV BX,5000
MOV CX,0005
CLD
L1: MOV AL,[SI]
CMP AL,[BX]
JZ L2
MOVSB
LOOP L1
JMP L3
MOVSB
L2: MOV BX,7000
MOV AL,[BX]
MOV [DI],AL
DEC CX
INC DI
REP
MOVSB
INT 3
L3:

Observation Table
Input Output
MEMORY Data MEMORY LOCATION Data
LOCATION
2000 3000
2001 3001
2002 3002
2003 3003
2004 3004
5000 3005
7000

RESULT:
DELETE A BYTE IN A GIVEN STRING

AIM:-
To write a alp for delete a byte in a given string

COMPONENTS & EQUIPMENT REQUIRED: -

S.No Device Range / Rating Quantity (in


No’s)
1 8086 microprocessor kit/MASM 1
with PC
2 Keyboard 1
3 RPS +5v 1
1
PROGRAM:
i) Software
ASSUME CS:CODE
CODE SEGMENT
START: MOV SI,2000H
MOV DI,3000H
MOV BX,5000H
MOV CX,0005H
CLD
L1: MOV AL,[SI]
CMP AL,[BX]
JZ L2
MOVSB
LOOP L1
JMP L3
L2: INC SI
DEC CX
REP MOVSB
L3: INT 03H
CODE ENDS
END START
ii) Hardware

MEMORY OP-CODE LABEL MNEMONIC COMMENTS


LOCATION OPERAND
MOV SI,2000
MOV DI,3000
MOV BX,5000
MOV CX,0005
CLD
L1: MOV AL,[SI]
CMP AL,[BX]
JZ L2
MOVSB
LOOP L1
JMP L3
INC SI
L2: DEC CX
REP
MOVSB
INT 3
L3:

Observation Table
Input output
MEMORY Data MEMORY LOCATION Data
LOCATION
2000 3000
2001 3001
2002 3002
2003 3003
2004
5000

RESULT:

PRE LAB QUESTIONS:


1. What do you mean by assembler directives?
2. What .model small stands for?
3. What is the supply requirement of 8086?
4. What is the relation between 8086 processor frequency & crystal Frequency?
5. Functions of Accumulator or AX register?

LAB ASSIGNMENT:

1. Write an alp for insert or delete a byte in a given string with SI memory location is
4000 and DI location is 6000?
2. Write an alp for moving or reversing the given string with the length of the string is 12?

POST LAB QUESTIONS:


1. Which interrupts are generally used for critical events?
2. Which Stack is used in 8086?
3. What is SIM and RIM instructions

You might also like