Skip to main content
Add contents of two memory locations
Add contents of two memory locations
- LXI H, 2500H : "HL Points 2500H"
- MOV A, M : "Get first operand"
- INX H : "HL Points 2501H"
- ADD M : "Add second operand"
- INX H : "HL Points 2502H"
- MOV M, A : "Store the lower byte of result at 2502H"
- MVI A, 00 : "Initialize higher byte result with 00H"
- ADC A : "Add carry in the high byte result"
- INX H : "HL Points 2503H"
- MOV M, A : "Store the higher byte of result at 2503H"
- HLT : "Terminate program execution"
Comments
Post a Comment