Addition of two 8 bit numbers


Aim:-

Addition of two 8-bit numbers.

Apparatus:-

Microprocessor kit.


Data:-

7501-49H
7502-56H

 

Memory address

 

Machine code

 

Mnemonics

 

Operands

 

Comments

 

7000

 

21,01,75

 

LXI

 

H, 7501H

 

Get address of 1st no. in H-l pair

 

7003

 

7E

 

MOV

 

A,M

 

1st no. in the accumulator

 

7004

 

23

 

INX

 

H

 

Increment the content of H-l pair

 

7005

 

86

 

ADD

 

M

 

Add 1st and 2nd number

 

7006

 

32, 03, 75

 

STA

 

7503 H

 

Store sum in 7503 H

 

7009

 

CF

 

HLT

 

 

stop



Procedure:-

1)How to enter the program
Esc->S->CR->CR->S address (7000)->CR->Esc->S->CR->CR->Data->CR

2)How to execute the program
Esc-> Go-> CR->CR->S. address -> CR

3)How to check results
S-> CR->CR->Address (7503)->Result

Result:-
7503=9F H

Comments

Popular posts from this blog

Estimation of total chlorophyll by Aron's method

Determination of Stefan's constant

Pre-Emphasis & De-Emphasis Networks