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;