0% found this document useful (0 votes)
466 views5 pages

Dr. Mahalingam College of Engineering and Technology Pollachi - 642003

This document contains a lab manual for a Microprocessors lab course. It provides instructions for an experiment on string manipulation operations in assembly language using an 8085 microprocessor. The experiment involves: (1) Writing a program to move a string of 16-bit data from the data segment to the extra segment. (2) Writing a program to compare two strings and store either an 'AAH' or 'DDH' value depending on whether the strings are equal or not. Pseudocode and assembly language programs are provided for both parts of the experiment.

Uploaded by

api-19951707
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
466 views5 pages

Dr. Mahalingam College of Engineering and Technology Pollachi - 642003

This document contains a lab manual for a Microprocessors lab course. It provides instructions for an experiment on string manipulation operations in assembly language using an 8085 microprocessor. The experiment involves: (1) Writing a program to move a string of 16-bit data from the data segment to the extra segment. (2) Writing a program to compare two strings and store either an 'AAH' or 'DDH' value depending on whether the strings are equal or not. Pseudocode and assembly language programs are provided for both parts of the experiment.

Uploaded by

api-19951707
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 5

MCET/BEC/LM/

Dr. Mahalingam College of Engineering and


Technology
Pollachi – 642003

Department of Electronics and Communication Engineering

BCS207 - MICROPROCESSORS LAB

LAB MANUAL

ACTIVITY NAME OF FACULTY DESIGNATION SIGNATURE


PREPARED
Ms. N.SUGIRTHAM LECTURER
BY
APPROVED PROF.K.R.RADHA
HOD/ECE
BY KRISHNAN

ISSUED BY MR/ISO
SUBJECT : BCS207 MICROPROCESSORS LAB
(Regulation 2007)
SEMESTER : II
BRANCH : BSc Computer Technology

INDEX

S.No. LIST OF EXPERIMENT PAGE NO


1 Study of Microprocessor – 8085

2 Addition of two 8 bit numbers

3 Addition of two 16 bit numbers

4 Subtraction of two 8 bit numbers

5 BCD Subtraction

6 8 bit Multiplication

7 BCD Multiplication

8 8 bit Division

9 Block Move and Reversing an array of Elements

10 Ascending Order and Descending Order

11 Traffic Signal Controller

12 Study of Microprocessor – 8086

13 16 bit addition and 16 bit Subtraction

14 Multiplication and Division

15 String manipulation operations

16

17

18
Ex.No.15
STRING MANIPULATION OPERATIONS
Aim:
(a) To write an assembly language program to move a string of 16-BIT data
from locations in data segment to locations in extra segment.
(b) Program to compare whether two strings of data are equal. If so, store
AAH at location 5000h, if not store DDH

Specifications:

Algorithm:
1.Load the current value in CX register
2.Store the destination address in DI register
3.Store the source address in SI register
4.Repeat movsw this component used to repeat above 3 steps up to count value equal
to zero
5.HLT the program

Program:

MOV CX, COUNT


MOV DI,OFFSET OF DESTINATION
MOV SI, OFFSET OF SOURCE
REP MOVSW
HLT

Procedure:
1.Key in the code from the address specified
2.Enter the count value
3.Execute the program and check the result
Algorithm:
1.Load the count value in CX register
2.Add registers of string 1 located in DI register
3. Add registers of string 2 located in SI register
4.Compare the content of SI and PI register repeat until above values are equal or
count become zero.
5.If z=1 continue to next step, else go to next step 8
6.Move ‘AA’H value in memory location
7.Jump step 9
8. Move ‘DD’H value in memory location
9.HLT the program

Program:
MOV CX, COUNT
MOV DI, OFFSET OF STRING 1
MOV SI, OFFSET OF STRING2
REPE CMPB
JNZ LOOP
MOV [5000H], AAH
JMP END
LOOP: MOV [5000H], DDH
END: HLT

Procedure:

1.Key in the code from the address specified


2.Enter the count value
3.Execute the program and check the result

Result:
Thus program to move a string of 16-BIT data from locations in data segment
to locations in extra segment and program to compare whether two strings of data are
equal is written and executed.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy