Found 475 Articles for 8085

8085 program to check whether the given 16 bit number is palindrome or not

George John
Updated on 30-Jul-2019 22:30:25

325 Views

In this program, we will see how to check a 16-bit number is a palindrome or not.Problem StatementWrite the 8085 Assembly language program to check a 16-bit number is palindrome or not. The number is stored at location 8000H and 8001H.DiscussionA number is a palindrome if the number and its reversed sequence is the number itself. For example, 5225 is a palindrome, but ABCD is not a palindrome.In this problem, we are taking the number and store it into the HL pair. Then we are performing the reverse operation on L content. If the H and updated L value are ... Read More

8085 program to show masking of lower and higher nibbles of 8-bit number

Chandu yadav
Updated on 30-Jul-2019 22:30:25

3K+ Views

In this program we will see how to lower and upper nibbles are masked in 8085.Problem StatementWrite 8085 Assembly language program to mask the upper and lower nibble of an 8-bit number. The number is stored at location 8000H. Lower and Upper nibbles will be stored at location 8001H and 8002H.DiscussionThe masking is basically ANDing two numbers. When we want to mask the upper nibble of an 8-bit number say 2D (0010 1101), then we will AND with 0F (0000 1111), so we will get 0D (0000 1101). By masking with F0 (1111 0000), the result will be 20 (0010 ... Read More

8085 program to reverse 16 bit number

Arjun Thakur
Updated on 30-Jul-2019 22:30:25

800 Views

In this program we will see how to reverse the digits of a 16-bit number using 8085.Problem StatementWrite 8085 Assembly language program to reverse a 16-bit number stored at location 8000H-8001H. Also, store the result at 8050H – 8051H.DiscussionHere the task is too simple. There are some rotating instructions in 8085. The RRC, RLC are used to rotate the Accumulator content to the right and left respectively without carry. We can use either RRC or RLC to perform this task. In the final result each digit of the H and L are reversed, and also the H and L values ... Read More

8085 program to reverse 8 bit number

Ankith Reddy
Updated on 30-Jul-2019 22:30:25

836 Views

In this program we will see how to reverse the digits of an 8-bit number using 8085.Problem StatementWrite 8085 Assembly language program to reverse an 8-bit number stored at location 8000H. Also, store the result at 8050H.DiscussionHere the task is too simple. There are some rotating instructions in 8085. The RRC, RLC are used to rotate the Accumulator content to the right and left respectively without carry. We can use either RRC or RLC to perform this task.InputAddressData……80004C……Flow Diagram ProgramAddressHEX CodesLabelsMnemonicsCommentsF0003A, 00, 80 LDA 8000HTake the number from memoryF0030F RRCRotate right without carry four timesF0040F RRC F0050F RRC F0060F RRC F00732, 50, 80 STA 8050HStore the result at memoryF00A76 HLTTerminate the ... Read More

8085 program to find minimum value of digit in the 8 bit number

George John
Updated on 30-Jul-2019 22:30:25

355 Views

In this program we will see how to find the minimum digit from a two-digit number.Problem StatementWrite 8085 Assembly language program to find the minimum digit from a two-digit number. The number is stored at location 8000H, store the result at 8050H.DiscussionHere we are performing this task by using masking operation. Each digit takes one nibbles. We are masking the upper nibble by ANDing with 0FH (0000 1111). Store the lower nibble into another register. After that, we are taking the upper nibble. To get it, we are shifting the number to the right four times to convert lower nibble ... Read More

8085 program to find square of a 8 bit number

Chandu yadav
Updated on 30-Jul-2019 22:30:25

3K+ Views

In this program, we will see how to find the square of an 8-bit number.Problem StatementWrite 8085 Assembly language program to find the square of a number The number is stored at location 8000H, store the result at 8050H.DiscussionIn 8085, we cannot perform the multiplication operation directly. We are performing the multiplication by using repetitive addition. To get square of a number, we have to multiply the number with itself.InputAddressData……80000C……Flow Diagram ProgramAddressHEX CodesLabelsMnemonicsCommentsF00021, 00, 80 LXI H, 8000HLoad the number from 8000HF003AF XRA AClear accumulatorF00446 MOV B, MLoad data from memory to BF00586LOOPADD MAdd memory byte with AF00605 DCR BDecrease B by 1F007C2, 05, F0 JNZ ... Read More

8085 program to find nth power of a number

Arjun Thakur
Updated on 30-Jul-2019 22:30:25

622 Views

In this program we will see how to find nth power of a number.Problem StatementWrite 8085 Assembly language program to find nth power of a number. The base is stored at location 8000H, and the exponent is stored at 8001H. Store the result at 8002H.DiscussionIn 8085, we cannot perform the multiplication operation directly. Here we are writing a subroutine to perform the multiplication by using repetitive addition. To perform nth power of a number, we have to multiply the number n times. The n value is used as a counter. If the base is 03H, exponent is 05H, then the ... Read More

8085 program to count the number of ones in contents of register B

Ankith Reddy
Updated on 30-Jul-2019 22:30:25

2K+ Views

In this program, we will see how to count the number of 1’s in an 8-bit number stored in register B.Problem StatementWrite 8085 Assembly language program to count the number of 1s in 8-bit number stored in register B.DiscussionIn this program, we are using the rotate operation to count the number of 1’s. As there are 8 different bits in 8-bit number, then we are rotating the number eight times. we can use RRC or RLC. Here we have used the RRC instruction. This instruction sends the LSb to MSb also to carry flag. So after each iteration, we can ... Read More

8085 program to find the factorial of a number

George John
Updated on 30-Jul-2019 22:30:25

8K+ Views

In this program we will see how to find the factorial of a number.Problem StatementWrite 8085 Assembly language program to find the factorial of an 8-bit number.DiscussionIn 8085, there is no direct instruction to perform multiplication. We need to perform repetitive addition to get the result of the multiplication. In each step we are decreasing the value of B and multiply with the previous value of B. We are repeating these steps until B reaches 1. and B – 1 to 0. Thus the factorial is generated.InputAddressData800005Flow Diagram ProgramAddressHEX CodesLabelsMnemonicsCommentsF00021, 00, 80 LXI H, 8000HLoad the numberF00346 MOV B, MTake number from memory ... Read More

8085 program to multiply two 8 bit numbers using logical instructions

Chandu yadav
Updated on 30-Jul-2019 22:30:25

1K+ Views

In this program we will see how to multiply using logical operators.Problem StatementWrite 8085 Assembly language program to multiply two 8-bit numbers using logical operators.DiscussionWe are assuming the first number is in register B, and second number is in register C, and the result must not have any carry.Here we are multiplying with 04H. We can perform the multiplication by left rotate two times. Assign 06H into B, and 04H into C. Load B to A, then rotate the accumulator two times. Store the result into a specified memory.InputRegisterDataB06C04Flow Diagram ProgramAddressHEX CodesLabelsMnemonicsCommentsF00006, 06 MVI B, 06H F0020E, 04 MVI C, 04H F00478 MOV A, BLoad B ... Read More

Advertisements