Found 475 Articles for 8085

8085 program to find maximum of two 8 bit numbers

Jennifer Nicholas
Updated on 30-Jul-2019 22:30:24

579 Views

In this program we will see how to find the maximum of two numbers.Problem StatementWrite 8085 Assembly language program to find the maximum number of two 8-bit number stored at location 8000H and 8001H.DiscussionThis checking is done by using the CMP instruction. This instruction is very similar to the SUB instruction. The only difference is that it does not update the value of Accumulator after executing. So after comparing, if the CY flag is set, it means that the first number is smaller, and the second one is largerInputFirst inputAddressData......8000FD800123......second inputAddressData......800059800175......Flow DiagramProgramAddressHEX CodesLabelMnemonicsCommentsF00021, 00, 80LXI H, 8000HPoint to the first ... Read More

8085 program to find smallest number between two numbers

Anvi Jain
Updated on 30-Jul-2019 22:30:24

2K+ Views

In this program we will see how to find the smallest of two numbers.Problem StatementWrite 8085 Assembly language program to find the smallest number of two 8-bit number stored at location 8000H and 8001H.DiscussionThis checking is done by using the CMP instruction. This instruction is very similar to the SUB instruction. The only difference is that it does not update the value of Accumulator after executing. So after comparing, if the CY flag is set, it means that the first number is smaller, and the second one is largerInputFirst inputAddressData......8000FD800123......second inputAddressData......800059800175......Flow DiagramProgramAddressHEX CodesLabelMnemonicsCommentsF00021, 00, 80LXI H, 8000HPoint to the first ... Read More

8085 program to find larger of two 8 bit numbers

Vrundesha Joshi
Updated on 30-Jul-2019 22:30:24

3K+ Views

In this program we will see how to find the larger of two numbers.Problem StatementWrite 8085 Assembly language program to find the larger number of two 8-bit number store dat location 8000H and 8001H.DiscussionThis checking is done by using the CMP instruction. This instruction is very similar to the SUB instruction. The only difference is that it does not update the value of Accumulator after executing. So after comparing, if the CY flag is set, it means that the first number is smaller, and the second one is largerInputFirst inputAddressData......8000FD800123......second inputAddressData......800059800175......Flow DiagramProgramAddressHEX CodesLabelMnemonicsCommentsF00021, 00, 80LXI H, 8000HPoint to the first ... Read More

8085 program to find maximum and minimum of 10 numbers

Rishi Rathor
Updated on 30-Jul-2019 22:30:24

1K+ Views

In this program we will see how to find the maximum and minimum number in a block data.Problem StatementWrite 8085 Assembly language program to find the maximum and minimum number in a block often 8-bit numbers.DiscussionIn this program we are taking the first number of the block into register D and E. The D will store the minimum number, and E will store maximum number. In each iteration we will check whether the number is smaller than D or not, if it is smaller, then update D with the new number, and then compare it again with E to check ... Read More

8085 program to check whether the given number is even or odd

Jennifer Nicholas
Updated on 30-Jul-2019 22:30:24

8K+ Views

In this program we will see how to check whether a number is odd or even.Problem StatementWrite 8085 Assembly language program to check whether a number is odd or even.DiscussionThe Odd Even checking is very simple. we can determine one number is odd or even by checking only the LSb. When LSb is 1, the number is odd, otherwise it is even.In this program we are taking a number from memory and then ANDing 01H with it. if the result is nonzero, then the number is odd,  otherwise it is even.Inputfirst inputAddressData......800015......second inputAddressData......80002C......Flow DiagramProgramAddressHEX CodesLabelMnemonicsCommentsF0003A, 00, 80LDA 8000HLoad the number ... Read More

8085 program to find 2's complement of the contents of Flag Register

Anvi Jain
Updated on 30-Jul-2019 22:30:24

332 Views

In this program we will see how to find 2's complement of the content of flag register.Problem StatementWrite 8085 Assembly language program to find 2's complement of the content of flag register.DiscussionWe cannot access the total flag register directly. To use them we have to push the PSW(Accumulator-Flag) into stack, and then pop it to another register pair, then after complementing the LS byte of that register pair, we have to push it again into the stack, and then pop it to PSW  to get it into Flag bits.InputHere we are not putting any input directly. If the flag bits ... Read More

8085 program to find 1's and 2's complement of 16-bit number

Vrundesha Joshi
Updated on 30-Jul-2019 22:30:24

2K+ Views

In this program we will see how to find 1's complement and 2's complement of a 16-bit number.Problem StatementWrite 8085 Assembly language program to find 1's complement and 2's complement of a16-bit number stored in 8000H and 8001H.Discussion8085 has an instruction CMA. This instruction complements the content of Accumulator. For 1's complement CMA instruction is sufficient, and for 2's complement we have to increase the number by 1 after complementing.For 16-bit number, we are taking the number into HL pair, but for complementing we have to copy the numbers to Accumulator from H and L one by one. Then by ... Read More

8085 program to find 1's and 2's complement of 8-bit number

Rishi Rathor
Updated on 30-Jul-2019 22:30:24

6K+ Views

In this program we will see how to find 1's complement and 2's complement of an 8-bit number.Problem StatementWrite 8085 Assembly language program to find 1's complement and 2's complement of a number stored in 8000H.Discussion8085 has an instruction CMA. This instruction complements the content of Accumulator. For 1's complement CMA instruction is sufficient, and for 2's complement we have to increase the number by 1 after complementing.We are taking the number from 8000H and storing the 1's complement at location 8050H, and 2's complement to 8051H.InputAddressData......8000AB......Flow DiagramProgramAddressHEX CodesMnemonicsCommentsF0003A, 00, 80LDA 8000HLoad the number from memoryF0032FCMAComplement the accumulatorF00432, 50, 80STA ... Read More

8085 program to count total even numbers in series of 10 numbers

Anvi Jain
Updated on 30-Jul-2019 22:30:24

860 Views

In this program we will see how to count number of even numbers in a block of elements.Problem StatementWrite 8085 Assembly language program to count number of even numbers in a block of data, where the block size is 10D. The block is starting from location8000H.DiscussionThe Odd Even checking is very simple. we can determine one number is odd or even by checking only the LSb. When LSb is 1, the number is odd, otherwise it is even. In this program we are taking a number from memory and then ANDing01H with it. if the result is nonzero, then the ... Read More

8085 program to count number of once in the given 8-bit number

Vrundesha Joshi
Updated on 30-Jul-2019 22:30:24

778 Views

In this program we will see how to count number of 1's in an 8-bit number.Problem StatementWrite 8085 Assembly language program to count number of 1s in 8-bit number stored atlocation 8000H.DiscussionIn this program we areusing the rotate operation to count the number of 1's. As there are8 different bits in 8-bit number, then we are rotating the numbereight times. we can use RRC or RLC. Here we have used the RRCinstruction. This instruction sends the LSb to MSb also to carryflag. So after each iteration we can check the carry status to getthe count of 1s.If the number is ... Read More

Advertisements