You are on page 1of 5

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

4007 11 LXI D,5010 Initialize DE register pair with starting


address 5010
4008 10

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

400E 13 INX D Increment the memory pointer by 1


400F 03 INX B Increment the memory pointer by 1

4010 7D MOV A,L Copy the data from L register to A register

4011 FE CPI 08 Compare the immediate data with A register

4012 08
4013 C2 JNZ LOOP Check for zero flag
4014 0A
4015 10
4016 76 HLT

MULTIBYTE ADDITION :

INPUT :

ADDRESS DATA ADDRESS DATA

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:

Thus an 8085 assembly language program is written for performing multibyte


addition.

You might also like