Está en la página 1de 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.

También podría gustarte