Smallest number from a series of number


Aim:-

To find the smallest number from a series of number.


Apparatus:-

Microprocessor kit.

Data:-

7500-03H
7502-86H
7503-58H
7503-75H


 

Memory address

 

Machine code

 

Labels

 

Mnemonics

 

Operands

 

Comments

 

7000

 

21,00,70

 

 

LXI

 

H, 7501H

 

Get address for count in H-L pair

 

7003

 

4E

 

 

MOV

 

C,M

 

Count in resistor C  

 

7004

 

3E, FF

 

 

MVI

 

A, FF

 

Get the ‘FF’ in accumulator

 

7006

 

23

 

loop

 

INX

 

H

 

Address of next of series  

 

7007

 

BE

 

 

CMP

 

M

 

Compare next no. with pre, smallest. Is next no.pre smallest?

 

7008

 

DA,OC,70

 

 

JC

 

AHEAD

 

No, smallest no. is in accumulator .Go to AHEAD

 

700B

 

7E

 

 

MOV

 

A,M

 

Yes get smaller no. in accumulator

 

700C

 

OD

 

AHEAD

 

DCR

 

C

 

Decrement count

 

700D

 

C2, 06, 70,

 

 

JNZ

 

LOOP

 

 

7010

 

32, 50, 74

 

 

STA

 

7450

 

Store result in 7450H

 

7013

 

CF

 

 

HLT

 

 

STOP









                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    


Procedure:-

1)How to enter the program

Esc->S->CR->CR->S.address (7000)->CR
Esc->S->CR->CR->Data (7500)->CR

2) How to execute the program

Esc->Go->CR->CR->S.address->CR

3)How to check the result

S->CR->CR->address (7450)->CR


Result:-

7450-58H

Comments

Popular posts from this blog

Estimation of total chlorophyll by Aron's method

Determination of Stefan's constant

Pre-Emphasis & De-Emphasis Networks