Addition of two numbers using 8086

Addition of two numbers using 8086

Tags: Addition program using 8086,8086 lab experiments, 8 Bit addition program,8086 Assembly program for addition,
Overall rating
addition-of-two-numbers-8086
16-BIT ADDITION

AIM

To perform 16-bit addition of two 16-bit data and store the result in memory.


THEORY

The first data is brought to Stack index and the second one in any one of the other registers, say B. The addition is done using ADD. The result is then stored at 1520. The ADD instruction affects flags depending on result.


 
ASSEMBLY PROGRAM TO ADD TWO 16 BIT NUMBER

ADDRESS

OPCODE

MNEMONICS

1100

BE 00 15

MOV SI,1500

1103

AD

LODSW

1104

89 C3

MOV BX, AX

1106

AD

LODSW

1107

F7 E3

MUL BX

1109

BF 0 5 15

MOV DI, 1520

110C

89 05

MOV [DI], AX

110E

47

INC DI

110F

47

INC DI

1110

89 15

MOV [DI], BX

1112

CC

INT 3


PROCEDURE

  • Key in the opcodes from the address specified.
  • Enter data at 1500 and 1502 as specified in the Example.
  • Execute the program and check for the result at 1520.

EXAMPLE

The two data to be added are at 1500 and 1502. The result is stored at 1520.
DATA: (1500) = 12     (1501) = 21
(1502) = 12    (1502) = 21
RESULT: (1520 to 1521) = 2441.


RESULT

Thus the Addition of two 16 bit numbers is stored in the resultant memory

Join the World's Largest Technical Community

we respect your privacy.