Micro processor Lab Manual / Add Contents Of A Given List ALP

Program Name

Write a Assembly Language Program for Add Contents Of A Given List .
Theory
Instruction Mnemonic Operand Comments
LXI H,8100 Load contents of 8100 to HL pair.
MVI B,06 Move immediately 6 input value to register B.
MVI A,00 Initialize accumulator to 0, to perform addition.
MVI C,00 Initialize register C to 0.
ADD M Add contents of memory to accumulator, and store carry if any.
JNC Fw Jump if no carry, to INX H.
INR C Increment contents of C by 1 for carry.
INX H Increment contents of HL pair to fetch next input.
DCR B Decrement content of B as one number is added.
JNZ Bk Jump with no zero, to specific address.
STA 8300 Store the result of addition at 8300.
MOV A,C Move contents of C and carry to accumulator.
STA 8301 Store result, i.e. carry at 8301.
HLT Stop.
Program Code


Online compiler for 8085 Microprocess Compiler


Home     Back