Found 409 Articles for Microcontroller

8085 Program to perform bubble sort in ascending order

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

15K+ Views

In this program we will see how to sort a block of bytes in ascending order using bubble sorting technique.Problem StatementWrite8085 Assembly language program to sort numbers in ascending order where n number of numbers are stored in consecutive memory locations starting from 8041H and the value of n is available in memory location 8040H (Using BUBBLE sort).DiscussionIn this program we will arrange the numbers in bubble sorting technique. In this sorting technique, it will be executed in different pass. In each pass the largest number is stored at the end of the list. Here we are taking the numbers ... Read More

8085 Program to perform sorting using bubble sort

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

465 Views

In this program we will see how to sort a block of bytes using bubble sorting technique.Problem StatementWrite8085 Assembly language program to sort numbers in ascending order where n number of numbers are stored in consecutive memory locations starting from 8041H and the value of n is available in memory location 8040H (Using BUBBLE sort).DiscussionIn this program we will arrange the numbers in bubble sorting technique. In this sorting technique, it will be executed in different pass. In each pass the largest number is stored at the end of the list. Here we are taking the numbers from location 8041H ... Read More

8085 Program to convert two-digit hex to two ASCII values

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

217 Views

Now let us see a program of Intel 8085 Microprocessor. This program will convert 8-bit numbers to two digit ASCII values.Problem StatementWrite 8085 Assembly language program where an 8-bit binary number is stored in memory location 8050H. Separate each nibbles and convert it to corresponding ASCII code and store it to the memory location 8060H and 8061H.DiscussionIn this problem we are using a subroutine to convert one hexa-decimal digit (nibble) to its equivalent ASCII values. As the 8-bit number contains two nibbles, so we can execute this subroutine to find ASCII values of them. We can get the lower nibble ... Read More

8085 program to generate Fibonacci sequence

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

5K+ Views

In this program we will see how to generate Fibonacci sequence.Problem StatementWrite 8085 Assembly language program to generate the first ten elements of the Fibonacci sequence using registers only and store them in memory locations 8050H to 8059H. DiscussionThis program will generate the Fibonacci numbers. The Fibonacci numbers follows this relation F(i) = F(i - 1) + F(i - 2) for all i >2 with F(1) = 0, F(2) = 1.InputIn this case we are not providing any input, this program will generate ten Fibonacci numbers.Flow DiagramProgramAddressHEX CodesLabelsMnemonicsComments800021, 50, 80STARTLXI H 8050H Pointer to the OUT-BUFFER8003AFXRA A Clear accumulator and reg. B800447MOV B, ... Read More

8085 program to exchange a block of bytes in memory

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

2K+ Views

In this program we will see how to exchange a block of bytes using 8085.Problem StatementWrite 8085 Assembly language program to exchange a block of data, where block size is given.DiscussionThe data are stored at location 8010H to 8019H and 9010H to 9019H. The location 8000H is holding the number of bytes to exchange.The logic is very simple, The HL and DE register pair is pointing the first and second data block respectively. By taking the data we are just swapping the values of each memory locations. Then repeating this process to swap two blocks completely.InputAddressData......800006......801000801111801222801333801444801555......9010849011639012129013479014489015AD......Flow DiagramProgramAddressHEX CodesLabelsMnemonicsCommentsF00021, 10, 80LXI ... Read More

8085 program for bubble sort

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

2K+ Views

In this program we will see how to sort a block of bytes using bubble sorting technique.Problem StatementWrite 8085 Assembly language program to sort numbers in ascending order where n number of numbers are stored in consecutive memory locations starting from 8041H and the value of n is available in memory location 8040H (Using BUBBLE sort).DiscussionIn this program we will arrange the numbers in bubble sorting technique. In this sorting technique, it will be executed in different pass. In each pass the largest number is stored at the end of the list. Here we are taking the numbers from location ... Read More

8085 Assembly language program to find largest number in an array

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

3K+ Views

In this program we will see how to find the largest number from a block of bytes using 8085.Problem StatementWrite 8085 Assembly language program to find the largest 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 largest 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 search a number in an array of n numbers

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

2K+ Views

In this program we will see how to search an element in an array of bytes using 8085.Problem StatementWrite 8085 Assembly language program to search a key value in an array 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 ... Read More

8085 code to convert binary number to ASCII code

Jennifer Nicholas
Updated on 29-Jun-2020 13:34:04

2K+ Views

Now let us see a program of Intel 8085 Microprocessor. This program will convert binary or hexadecimal number to ASCII values.Problem StatementWrite 8085 Assembly language program to convert binary or Hexadecimal characters to ASCII 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. TheASCII 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 we are providing hexadecimal digit at memory location ... Read More

8085 program to convert 8 bit BCD number into ASCII Code

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

1K+ Views

Now let us see a program of Intel 8085 Microprocessor. This program will convert 8-bit BCDnumbers to two digit ASCII values.Problem StatementWrite 8085 Assembly language program where an 8-bit BCD number is stored in memory location 8050H. Separate each BCD digit and convert it to corresponding ASCII code and store it to the memory location 8060H and 8061H.DiscussionIn this problem we are using a subroutine to convert one BCD digit(nibble) to its equivalent ASCII values. As the 8-bit BCD number contains two nibbles, so we can execute this subroutine to find ASCIIvalues of them. We can get the lower nibble ... Read More

Advertisements