Bubble Sort in 8085 Microprocessor Based on User Choice

Arnab Chakraborty
Updated on 09-Oct-2019 07:00:44

501 Views

Here we will see one 8085 microprocessor program that will help to arrange the numbers in ascending or descending order based on our choice. Sort using bubble sort technique.Problem Statement −Write an 8085 Assembly language program to perform bubble sorting operation on a set of data, and arrange them into ascending or descending order based on choice.Discussion −In this program we are arranging some numbers into ascending or descending order based on some choice. We are storing the choice at location A000H. If the choice value is 00H, then data will be sorted in ascending order, otherwise it will be sorted in ... Read More

Bubble Sort in Ascending Order using 8085 Microprocessor

Arnab Chakraborty
Updated on 09-Oct-2019 06:57:41

605 Views

Here we will see one 8085 program to arrange a block of numbers in ascending order.Problem Statement −Write an 8085 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).Discussion −In 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 to ... Read More

Operation on Two BCD Numbers in 8085 Microprocessor

Arnab Chakraborty
Updated on 09-Oct-2019 06:55:46

465 Views

Here we will see one 8085 program. This program will perform different operations on BCD numbers based on choice.Problem Statement −Write an 8085 Assembly language program to perform some operations on two 8-bit BCD numbers base on our choice.Discussion −In this program we are taking a choice. The choice value is stored at memory location 8000H (named as X). And the BCD numbers are stored at location 8001H and 8002H. We are storing the result at location 8050H and 8051H.Here if the choice is 00H, then it will perform addition, for 01H, it will perform subtraction, and for 02H, it will do ... Read More

Convert 16-bit Binary Number to BCD in 8085 Microprocessor

Arnab Chakraborty
Updated on 09-Oct-2019 06:52:47

725 Views

Here we will see one 8085 Microprocessor program. This program will be used to convert 16-bit binary data to BCD data.Problem Statement −Write an 8085 Assembly language program to convert 16-bit binary data to BCD data. The binary data is stored at location 8000H and 8001H.Discussion −This problem is solved by implementing 16-bit counter. We are storing the 16-bit number at first, then decreasing the numbers one by one, and increasing the decimal value by adjusting the decimal value. To increase the value, we can use the INR instruction, but INR instruction does not affect the carry flag. So here we are ... Read More

Subtraction of Multi-Byte BCD Numbers in 8085 Microprocessor

Arnab Chakraborty
Updated on 09-Oct-2019 06:45:11

520 Views

Here we will see one program that can perform subtraction for multi-byte BCD numbers using 8085 microprocessor.Problem Statement −Write an 8085 Assembly language program to subtract two multi-byte BCD numbers.Discussion −The numbers are stored into memory, and one additional information is stored. It will show us the byte count of the multi-byte BCD number. Here we are choosing 3-byte BCD numbers. They are stored at location 8001H to 8003H, and another number is stored at location 8004H to 8006H. The location 8000H is holding the byte count. In this case the byte count is 03H.For the subtraction we are using the 10’s ... Read More

8085 Program to Alternate D0 Bit with Specified Delay

Chandu yadav
Updated on 07-Oct-2019 13:21:31

391 Views

Now let us see a program of Intel 8085 Microprocessor. In this program we will see how to alternate the D0 bit and send as output.Problem StatementWrite 8085 Assembly language program to alternate D0 bit. And send this as output.DiscussionAlternating D0 bit and sending as output is like generating the square wave. We are adding extra delay in each phase. To generate square wave with 8085, we will rotate 10101010 (AAH) continuously, and send D0 as output. We will mask the accumulator content by 01H. If this is 0, then output will be 0, if it is 1, output will ... Read More

Display Null and Not Null Records Except a Single Specific Value in MySQL

AmitDiwan
Updated on 07-Oct-2019 13:04:54

206 Views

To display NULL records, use IS NULL in MySQL. To ignore a single value, use the != operator , which is an alias of the operator.Let us first create a table −mysql> create table DemoTable (    Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,    PlayerName varchar(40) ); Query OK, 0 rows affected (0.50 sec)Insert some records in the table using insert command −p>mysql> insert into DemoTable(PlayerName) values('Adam'); Query OK, 1 row affected (0.13 sec) mysql> insert into DemoTable(PlayerName) values(NULL); Query OK, 1 row affected (0.14 sec) mysql> insert into DemoTable(PlayerName) values('Sam'); Query OK, 1 row affected (0.13 sec) ... Read More

MySQL Error: Table Name Not Surrounded by Single Quotes

AmitDiwan
Updated on 07-Oct-2019 13:02:44

206 Views

Do not use single quotes. You need to use backticks around the table name match, since it is a reserved name in MySQL. Following is the error that occurs :mysql> select *from match; ERROR 1064 (42000) : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'match' at line 1Let us first create a table and fix the occurrence of the above error using backticks around the reserved word match, used here as table name −mysql> create table `match` (    Id int NOT ... Read More

Fix MySQL Error 1075: Incorrect Table Definition

AmitDiwan
Updated on 07-Oct-2019 12:56:00

13K+ Views

To fix this error, you need to add PRIMARY KEY to auto_increment field. Let us now see how this error occurs −Here, we are creating a table and it gives the same error −mysql> create table DemoTable (    StudentId int NOT NULL AUTO_INCREMENT,    StudentName varchar(40),    StudentAge int ); ERROR 1075 (42000) : Incorrect table definition; there can be only one auto column and it must be defined as a keyTo solve the above error, you need to add PRIMARY KEY with AUTO_INCREMENT. Let us first create a table −mysql> create table DemoTable (    StudentId int NOT ... Read More

Get Nth Weekday of the Month from Date Records in MySQL

AmitDiwan
Updated on 07-Oct-2019 12:51:19

311 Views

We need to find the weekday i.e. week 1 from date 1 to 7, week 2 from date 8 to 14, etc. To get the day, use DAY() function in MySQL. Set the conditions to get the weekday (number) using CASE statement.Let us now see an example and create a table −mysql> create table DemoTable (    AdmissionDate date ); Query OK, 0 rows affected (0.63 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('2019-09-12'); Query OK, 1 row affected (0.20 sec) mysql> insert into DemoTable values('2019-09-06'); Query OK, 1 row affected (0.16 sec) mysql> ... Read More

Advertisements