Source program :
- LDA 2200H
- MOV E, A
- MVI D, 00 : Get the first number in DE register
pair
- LDA 2201H
- MOV C, A : Initialize counter
- LX I H, 0000 H : Result = 0
- BACK: DAD D : Result = result + first number
- DCR C : Decrement count
- JNZ BACK : If count 0 repeat
- SHLD 2300H : Store result
- HLT : Terminate program execution
|
0 Comments