This code is used to add two 8-bit numbers and the sum is also a 8-bit number. here H-L pair is used to store the two numbers. Usually LXI command is used to load immediate 16-bit data in the register pair designated in the operand
This LXI command is a 3-byte instruction. First byte is used for mnemonics, second byte specifies lower order byte and 3rd byte specifies higher order byte.
Mnemonics Operands Comments
LXI H,2501 H Get address of 1st number in H-L pair.
MOV A,H 1st number in accumlator.
INX H increment content of H-L pair.
ADD M Add 1st and 2nd numbers.
STA 2503 H Store sum in 2503 H.
INX is used to increment the register pair by 1.