Found 475 Articles for 8085

8085 Program to multiply two 16-bit binary numbers

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

2K+ Views

Now let us see a program of Intel 8085 Microprocessor. This program will calculate the multiplication of two 16-bit numbers.Problem StatementWrite 8085 Assembly language program to multiply two 16-bit numbers stored at 8000H -8001H and 8002H - 8003H.DiscussionThis program takes the 16 bit data from memory location 8000H – 8001Hand 8002H – 8003H. The 32 bit results are stored at location 8050H– 8053H.Here we have tested with two 16 bit numbers. The results are as follows      1111H × 1111H = 01234321H       1C24H × 0752H = 00CDFF88HInputfirst inputAddressData......800011800111800211800311......second input AddressData......80002480011C800252800307......Flow DiagramProgramAddressHEXCodesLabelsMnemonicsCommentsF00031, 00, 20LXI SP, 2000H   InitializeStack pointerF0032A, 00, ... Read More

8085 Program to multiply two 2-digit BCD numbers

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

2K+ Views

Now let us see a program of Intel 8085 Microprocessor. This program will find the multiplication result of two BCD numbers.Problem StatementWrite 8085 Assembly language program to find two BCD number multiplication. The numbers are stored at location 8000H and 8001H.DiscussionIn this program the data are taken from 8000H and 8001H. The result is stored at location 8050H and 8051H. As we know that 8085 has no multiply instruction so we have to use repetitive addition method. In this process after each addition we are adjusting the accumulator value to get decimal equivalent. When carry is present, we are incrementing the ... Read More

8085 Program to compute LCM

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

2K+ Views

Now let us see a program of Intel 8085 Microprocessor. This program will find the LCM of two8-bit numbers.Problem StatementWrite 8085 Assembly language program to find LCM of two 8-bit numbers stored at location8000H and 8001HDiscussionIn this program we are reading the data from 8000H and 8001H. By loading the number, we are storing it at C register, and clear the B register. The second number is loaded into Accumulator. Set DE as the 2's complement of BCregister. This DE is used to subtract BC from HL pair.The method is like this:let us say the numbers are 25 and 15. ... Read More

8085 Program to check for palindrome

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

3K+ Views

Now let us see a program of Intel 8085 Microprocessor. This program will convert ASCII to binary values.Problem StatementWrite 8085 Assembly language program to check whether a bit pattern is palindrome or not.DiscussionIn this program we are taking the number from location 8000H. The program will return 00H if the number is not palindrome, otherwise it will return FFH.Let the Input is 18H so the binary value is (0001 1000) this is a palindrome. The number 52H(0101 0010) it is not a palindrome.In this problem we are taking the first number into accumulator, then shifting it to the left. When ... Read More

8085 Program to convert an 8-bit binary to BCD

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

9K+ Views

In this program we will see how to convert binary numbers to its BCD equivalent.Problem StatementA binary number is store dat location 800H. Convert the number into its BCD equivalent and store it to the memory location 8050H.DiscussionHere we are taking a number from the memory, and initializing it as a counter. Now in each step of this counter we are incrementing the number by 1, and adjust the decimal value. By this process we are finding the BCD value of binary number or hexadecimal number.We can use INR instruction to increment the counter in this case but this instruction ... Read More

8085 Program to convert a two-digit BCD to binary

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

3K+ Views

In this program we will see how to convert BCD numbers to binary equivalent.Problem StatementA BCD number is stored at location 802BH. Convert the number into its binary equivalent andstore it to the memory location 802CH.DiscussionIn this problem we are taking a BCD number from the memory and converting it to its binaryequivalent. At first we are cutting each nibble of the input. So ifthe input is 52 (0101 0010) then we can simply cut it by masking the number by 0FH and F0H. When the Higher order nibble is cut, thenrotate it to the left four times to transfer ... Read More

8085 Program to convert ASCII to binary

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

3K+ Views

Now let us see a program of Intel 8085 Microprocessor. This program will convert ASCII to binary values.Problem StatementWrite 8085 Assembly language program to convert ASCII to binary or Hexadecimal character values. DiscussionWe know that the ASCII of number 00H is 30H (48D), and ASCII of 09H is39H (57D). So all other numbers are in the range 30H to 39H. The ASCII value of 0AH is 41H (65D) and ASCII of 0FH is 46H (70D), so all other alphabets (B, C, D, E, F) are in the range 41H to 46H.Here the logic is simple. We are checking whether the ASCII ... Read More

8085 Program to find the HCF of two given bytes

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

2K+ Views

In this program we will see how to find the HCF or GCD of two numbers using 8085.Problem StatementWrite 8085 Assembly language program to find the HCF of two numbers stored at memory location 8000H and 8001H.DiscussionThis problem is solved by the Euclidean algorithm to find HCF. This algorithm is very simple.The algorithm steps are as follows −If first number and second number are same, thengo to step 3.Else if first number < second number, then exchange no1 andno2.first-number A, then exchange B and AF00D90SUB B   if B < A, subtract B from AF00EC3, 06, F0JMP LOOP  Jump to LOOPF01148EXGMOV ... Read More

8085 Program to find the smallest number

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

8K+ Views

In this program we will see how to find the smallest number from a block of bytes using 8085.Problem StatementWrite 8085 Assembly language program to find the smallest number from a block of bytes.DiscussionIn this program the data are stored at location 8001H onwards. The 8000H is containing the size of the block. After executing this program, it will return the smallest number and store it at location 9000H.Logic is simple, we are taking the first number at register B to start the job. In each iteration we are getting the number from memory and storing it into register A. ... Read More

8085 Program to perform linear search

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

1K+ Views

In this program we will see how to search an element in a block of bytes using 8085.Problem StatementWrite 8085 Assembly language program to search a key value in a block of data using linear search technique.DiscussionIn this program the data are stored at location 8002H to 8007H. The 8000H is containing the size of the block, and 8001H is holding the key value to search.After executing this program, it will return the address of the data where the item is found and store the address at location 9000H and9001H. If the item is not found, it will return FFFFH.If ... Read More

Advertisements