Program To Add A Block Of Data In 8085

Question By: Shankar Pal

How to solve this problem:- A block of data is stored from memory location 4501H and onwards. The length of the block is stored at memory location 4500H. Write an Assembly Language Program to find the sum of the block of data. Store the two byte result form memory location 4600H.

Answer:

LXI H:4500H;

MOV B,M;

MVI A,00H;

MVI C,00H;

LABEL2:INX H;

ADD M;

JNC: LABEL1

INR C;

LABEL1: DCR B;

JNZ: LABEL2;

LXI H:4600H;

MOV M,A;

INX H;

MOV M,C;

RST 1;

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.