In the third year of the B.Sc. Physics program under TANSCHE, it's really important to learn how microprocessors work. One of the main experiments is with the Microprocessor 8085, which is a popular 8-bit processor. In this experiment, students get to practice basic math operations.
In this blog post, we will talk about the experiment called "Division of Two 8-bit Numbers with the Microprocessor 8085." This hands-on activity helps students understand how the 8085 microprocessor works, including programming and memory tasks. By the end of this experiment, you'll have a good grasp of how the 8085 processes data and performs math operations, giving you a strong base in microprocessor systems.
Microprocessor 8085 program to find the Division of two 8-bit numbers
Aim:
Write an assembly language program to divide two 8-bit numbers using microprocessor 8085.
Apparatus required:
Microprocessor 8085 kit, power supply etc
Program:
Division of two 8-bit numbers
Memory address | Machine code | Labels | Mnemonics | Operands | Comments |
8000 | 21 | LXI | 8501H | Load HL pair with the address 8501 | |
8001 | 01 | ||||
8002 | 85 | ||||
8003 | 46 | MOV | B, M | Copies the content of memory into B | |
8004 | 0E | MVI | C, 00H | Store 00H to C register | |
8005 | 00 | ||||
8006 | 23 | INX | H | Increment HL register pair | |
8007 | 7E | MOV | A, M | Copies the content of memory into accumulator | |
8008 | B8 | BEHIND | CMP | B | Compares the content of memory and register B |
8009 | DA | JC | AHEAD | Jump on carry to 8011 | |
800A | 11 | ||||
800B | 80 | ||||
800C | 90 | SUB | B | Subtract the content of accumulator with register B and store the result in accumulator | |
800D | 0C | INR | C | Increment the register C | |
800E | C3 | JMP | BEHIND | Jump to 8008 | |
800F | 08 | ||||
8010 | 80 | ||||
8011 | 32 | AHEAD | STA | 8503H | Stores the remainder at 8503 |
8012 | 03 | ||||
8013 | 85 | ||||
8014 | 79 | MOV | A, C | Copies the content of C to accumulator | |
8015 | 32 | STA | 8504H | Stores the remainder at 8504 | |
8016 | 04 | ||||
8017 | 85 | ||||
8018 | 76 | HLT | Stop the program |
Example:
Division of two 8-bit numbers
First input location 8501H - FFH
Second input location 8502H - FFH
Result location 8503H - FEH
Result location 8504H - 01H
Procedure:
Result:
The assembly programmes for microprocessor 8085 for division of two 8-bit numbers were written and executed using the microprocessor 8085 kit.
0 Comments
It's all about friendly conversation here : )
I'd love to hear your thoughts!
Be sure to check back again because I do make every effort to reply to your comments here.
Please do not post your website link here.