Found 558 Articles for Microprocessor

8086 program to convert binary to Grey code

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

2K+ Views

In this program we will see how to find the gray code from a binary number.Problem StatementWrite 8086 Assembly language program to find the equivalent gray code from a binary number. The number is stored at location 2500 and store the result at 2600.DiscussionTo convert binary to gray code, we have to shift the number one bit to the right, then XOR with the previous number. Thus the gray code will be generated. For a number 2C (0010 1100) the gray code will be 3A (0011 1010)InputAddressData……25002C…… Flow Diagram Program OutputAddressData……26003A……

Subtract content of two ports by interfacing 8255 with 8085 microprocessor

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

384 Views

In this program we will see how to perform subtraction by using ports to take data and send the result into the port.Problem StatementWrite 8085 Assembly language program for interfacing between 8085 and 8255. Here Port A and Port B are holding two values, take the numbers from port A and B, subtract B from A, and send the result at port C.DiscussionThe task is very simple. At first we have to setup the control word register of 8255 chip. After that we will take the input from port A and B, add the content, and send it to port ... Read More

8086 program to find the square root of a perfect square root number

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

807 Views

In this program we will see how to find the square root of a perfect squared.Problem StatementWrite 8086 Assembly language program to find the square root of a perfect squared number. The number is stored at memory address 3000. Finally store the result at memory address 3002.DiscussionFor the perfect square number starting from 0 we are performing square of it, then check whether it is same as the given number or not. If they are same then the current value will be the square root.For a number 51H (81D), we will check 02, 12, 22, ….. , 92. After 92 ... Read More

8086 program to find Square Root of a number

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

2K+ Views

In this program we will see how to find the square root of a number.Problem StatementWrite 8086 Assembly language program to find the square root of a number. The number is stored at memory offset 500. Finally store the result at memory offset 600.DiscussionTo find the square root here at first we are clearing the counter register. In each iteration we are increasing BX register by 2. At first we need BX = 0001. So we are initializing it to FFFFH, after adding 2, it will be 0001H. In each iteration the counter value is increased, and subtract the BX ... Read More

8086 program to find the factorial of a number

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

12K+ Views

In this program we will see how to find the factorial of a number.Problem StatementWrite 8086 Assembly language program to find the factorial of a number stored in memory offset 500. Store the result at 600 and 601 memory offset.DiscussionTo find the factorial of a number n we have to repeatedly multiply the numbers from 1 to n. We can do the same by multiplying the number and decrease it until it reaches 1. So the sequence will beIn this program we are taking the number into counter register then decrease it and multiply, If the result exceeds the range ... Read More

8086 program to find average of n numbers

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

6K+ Views

In this program we will see how to find the average of n numbers in a given series.Problem StatementWrite 8086 Assembly language program to find the average of n numbers stored in a given series starts from memory offset 501. The size of the series is stored at memory offset 500.DiscussionTo do this task we are initializing the Source Index (SI) register to the starting address of the series. We are also taking the series size into CL. The CL will be used as counter. To store add we are using AL register. Initially set AL to 0. In each ... Read More

8086 program to find sum of odd numbers in a given series

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

3K+ Views

In this program we will see how to add odd numbers in a given seriesProblem StatementWrite 8086 Assembly language program to add the odd numbers stored in a given series starts from memory offset 501. The size of the series is stored at memory offset 500.DiscussionTo do this task we are initializing the Source Index (SI) register to the starting address of the series. We are also taking the series size into CL. The CL will be used as counter. To store add we are using AL register. Initially set AL to 0. To check the number is even or ... Read More

8086 program to find sum of Even numbers in a given series

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

1K+ Views

In this program we will see how to add even numbers in a given seriesProblem StatementWrite 8086 Assembly language program to add the even numbers stored in a given series starts from memory offset 501. The size of the series is stored at memory offset 500.DiscussionTo do this task we are initializing the Source Index (SI) register to the starting address of the series. We are also taking the series size into CL. The CL will be used as counter. To store add we are using AL register. Initially set AL to 0. To check the number is even or ... Read More

8086 program to divide a 16 bit number by an 8 bit number

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

11K+ Views

In this program we will see how to divide 16-bit number by an 8-bit number.Problem StatementWrite 8086 Assembly language program to divide 16-bit number stored in memory location offset 501. Divide it with 8-bit number stored in 500H. Also store result at memory offset 600.Discussiont8086 has DIV instruction to perform division. Take the 8-bit number into BL, and 16-bit number into AX. Now divide AX by BL. The result will be stored at AX.We are taking two numbers 24CF / 2D = D1InputAddressData……5002D501CF50224…… Flow Diagram Program OutputAddressData……600D1……

8086 program to multiply two 16-bit numbers

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

9K+ Views

In this program we will see how to multiply two 16-bit numbers.Problem StatementWrite 8086 Assembly language program to multiply two 16-bit number stored in memory location 3000H – 3001H and 3002H – 3003H.DiscussionWe can do multiplication in 8086 with MUL instruction. For 16-bit data the result may exceed the range, the higher order 16-bit values are stored at DX register.We are taking two numbers BCAD * FE2D = 1BADAInputAddressData……3000AD3001BC30022D3003FE…… Flow Diagram Program OutputAddressData……3004693005D03006543007BB……

Advertisements