0
LDA 2000h ; Store the no of byte that each number consists of in memory location 2000h.
MOV C A
MOV B A
LXI D 5000h
LXI H 2001h
STC
CMC
LOOP1: MOV A M
SHLD 7000h
LOOP: INX H
DCR C
JNZ LOOP
ADC M
STAX D
LHLD 7000h
LDA 2000h
MOV C A
INX D
INX H
DCR B
JNZ LOOP1
HLT

This is my code for the above mentioned problem. What would be more efficient algorithm to do so?

Soumya Kanti Naskar
  • 1,021
  • 3
  • 16
  • 29

0 Answers0