FY-2-c Easy 8085 program to Add 16-bit number in memory locations

8085 Program to ADD 16-bit number in memory locations

Add the 16-bit number in memory locations 4000H and 4001H to the 16-bit number
in memory locations 4002H and 4003H. The most significant eight bits of the two
numbers to be added are in memory locations 4001H and 4003H. Store the result in
memory locations 4004H and 4005H with the most significant byte in memory
location 4005H.

 

For following program we have change address to following :

4000->0700,
4001->0701,
4002->0702,
4003->0703,
4004->0704,
4005->0705

 

Number 1=1234
Number 2=3453

0700 34
0701 12
0702 53
0703 34

LHLD 0700
XCHG
LHLD 0702
DAD D
SHLD 0704
HLT


LHLD 0700 : 3 byte instruction, it stands for Load HL pair using Direct addressing. This instruction will load 16-bits data from memory location 0700 to HL pair.

XCHG : 1 byte instruction, stands for exchange. This instruction will exchange data between HL pair and DE pair. Data of H register will swapped with D register and data of L register will swapped with E register.

LHDL : This instruction will load 16-bits data from memory location 0702 to HL pair.

DAD D : 1 byte instruction, it stands for Double ADD. This command will add values of DE pair with values of HL pair.

SHLD 0704 : 3 byte instruction, it stands for Store HL pair using Direct addressing. This command will store 16 bits data from HL pair to 0704 memory location.

HLT – This command is use to put microprocessor on halt.

8085 instructions to add 16 bit number into memory location

Video coming soon…

Click here to check out FYIT OOP practical 

Checkout Other Microprocessor Architecture Practical Program

Checkout Other Microprocessor Architecture Quiz

Microprocessor, microcomputers, and Assembly Language
1 – Best Microprocessor Architecture Quiz on chapter 1
2 – Best Quiz on Microprocessor Architecture chapter 1
Introduction to 8085 Assembly Language Programming
1 – Easy Quiz on 8085 Assembly Language Programming
2 – Easy Quiz on 8085 Assembly Language Programming
Microprocessor Architecture and Microcomputer System
1 – Easy Microprocessor Architecture and Microcomputer System Quiz
8085 Microprocessor Architecture and Memory Interface
1 – Easy quiz on 8085 Microprocessor Architecture and Memory Interfacing
Interfacing of I/O Devices
1 – Easy quiz on 8085 Interfacing of I/O Devices
Introduction to 8085 Instructions
1 – Easy quiz on 8085 Instructions
More coming soon… stay tune
We are aiming to explain all concepts of Microprocessor Architecture in easiest terms as possible.
ITVoyagers-logo
ITVoyagers
Author

Leave a Comment