Table of Contents
Subtract content of one memory location from another and store the result in third memory location
Subtract the contents of memory location 4001H from the memory location 2000H
and place the result in memory location 4002H.
For this program we have change the address from 4001, 2000 and 4002 to 0700, 07001 and 0702 respectively.
You will find explanation below the code.
0700 10
0701 20
LDA 0700 # A = 10 || B = N.A. || 0700 = 10 || 0701 = 20
MOV B A # A = 10 || B = 10 || 0700 = 10 || 0701 = 20
LDA 0701 # A = 20 || B = 10 || 0700 = 10 || 0701 = 20
SUB B # A = 10 || B = 10 || 0700 = 10 || 0701 = 20
STA 0702 # A = N.A. || B = N.A. || 0700 = 10 || 0701=20 || 0702 = 10
HLT
LDA 0700 – A 24 bits (3 bytes) command which will load content of memory location 0700 in register A i.e. Accumulator.
MOV B A – A 8 bits (1 byte) command which will copy and load data of Accumulator to register B.
LDA 0701 – This command will load content of memory location 0701 in register A i.e. Accumulator.
SUB B – A 8 bits command which will subtract the data of B register from Accumulator.
STA 0702 – A 24 bits command which will store data of accumulator in memory location 0702.
HLT – This command is use to put microprocessor on halt.
8085 Program to subtract content of one memory location from another and save the result in separate 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 |
