To Write An 8085 Assembly Language Program For Performing Multibyte Addition
To Write An 8085 Assembly Language Program For Performing Multibyte Addition
AIM :
To write an 8085 Assembly Language Program for performing multibyte
addition.
ALGORITHM :
PROGRAM CODE:
OPCODE
OPERANDS
MNEMONIC
LABEL
ADDRESS
COMMENTS
4000 AF XRA A Clear the Accumulator
4001 21 LXI H,5000 Load the memory pointer with the address
5000
4002 00
4003 50
4004 01 LXI B,6000 Load the memory pointer with the address
6000
4005 00
4006 60
4009 50
400A OA LOOP LDAX B Store the A register with the contents of the
memory
400B 86 ADD M Add the content of the memory with A
register
400C 12 STAX D Store the DE register pair with the contents of
A
400D 23 INX H Increment the HL register pair by 1
4012 08
4013 C2 JNZ LOOP Check for zero flag
4014 0A
4015 10
4016 76 HLT
MULTIBYTE ADDITION :
INPUT :
5000 01 6000 08
5001 02 6001 07
5002 03 6002 06
5003 04 6003 05
5004 05 6004 04
5005 06 6005 03
5006 07 6006 02
5007 08 6007 01
OUTPUT:
ADDRESS DATA
5010 09
5011 09
5012 09
5013 09
5014 09
5015 09
5016 09
5017 09
RESULT: