You are on page 1of 5

Experiment No.

5
Name of student Arjun Dhote
Class Roll No 75
Section A
Course name Microprocessors and
Peripherals Lab
Course Code ET2366
Date of Performance 24/04/2022
Date of Submission 27/04/2022
Experiment No.5

Aim:- Write a Programme to find number of negative data byte in a block. The length of block is 13 at C240H.

The block starts at C241H. Place number of data bytes at C230H.

Apparatus:- 8085 Microprocessor Kit, Simulator Software

Program:-

Memory locations Mnemonic Opcodes Comments


C000H,C001H,C002H LDA C240H 3A,40,C2 Content of C240H
load in Accumulator
C003H MOV C,A 4F Move the content of
Accumulator to
Register C
C004H,C005H MVI B,00H 06,00 Load data of 00H to
Register B
C006H,C007H MVI A,7FH 3E,7F Load data of 7FH to
Accumulator
C008H,C009H,C0AH LXI H,C241H 21,41,C2 C241H is stored in HL
pair
C00BH L2: CMP M BE Compare memory
with Accumulator
C00CH,C00DH,C00EH JNC L1 D2,10,C0 Jump to L1 if carry is
not generated
C00FH INR B 04 Increment content of
B by 1
C010H L1: INX H 23 Location pointed by
HL pair is increment
by 1
C011H DCR C 0D Decrement content
of C by 1
C012H,C013H,C014H JNZ L2 C2,0B,C0 Jump to L2 if Z=0
C015H MOV A,B 78 Move content of B to
Accumulator
C016H,C017H,C018H STA C230H 32,30,C2 Content of
Accumulator is
stored in C230H
C019H RST 1 CF Stop

Input data:-

MEMORY LOCATION DATA ENTER


C240H 05H
C241H 98H
C242H DCH
C243H 03H
C244H 01H
C245H 07H
Result:-

C230H=02H
Simulator Output:-

Screenshot of notebook page:-

You might also like