0% found this document useful (0 votes)
85 views

Addition of Two 16 Bit Numbers

This program adds two 16-bit numbers stored in memory locations 4500 and 4501. It clears the carry flag, loads the first addend into the accumulator, adds the second addend, and stores the sum in the destination memory. It repeats this for the second byte, incrementing the destination pointer after each store. If no carry, it jumps to the label L2, otherwise it increments the counter and stores it as the final result.

Uploaded by

anandhkr
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views

Addition of Two 16 Bit Numbers

This program adds two 16-bit numbers stored in memory locations 4500 and 4501. It clears the carry flag, loads the first addend into the accumulator, adds the second addend, and stores the sum in the destination memory. It repeats this for the second byte, incrementing the destination pointer after each store. If no carry, it jumps to the label L2, otherwise it increments the counter and stores it as the final result.

Uploaded by

anandhkr
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

ADDITION OF TWO 16 BIT NUMBERS PROGRAM ADDRESS LABLE MNEMONICS & OPERAND CLR C MOV DPTR, #4500 MOV

R0,#00 MOV A,#65 ADD A,#54 MOV X@ DPTR,A MOV A,#89 ADDC A,#87 INC DPTR MOV X@ DPTR,A INC DPTR JNC L1 INC R0 MOV A,R0 MOV X@ DPTR,A SJMP L2 OPCODE

L1: L2:

You might also like