Found 558 Articles for Microprocessor

8086 program to generate G.P. series of n numbers

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

254 Views

In this program we will see how to find GP series using 8086.Problem StatementWrite 8086 Assembly language program to find GP series. The limit of the series is stored at 500, First term is stored at 501, and the common ratio is stored at 502.DiscussionGP generation is simple task. We are taking the limit as counter value, the first term is loaded into AL first, then the BL is holding the common ratio r. Now the result is storing memory offset 600 onwards. The AL is placing as it is, then repeatedly multiply BL with AL and store it into ... Read More

8086 program to generate Fibonacci Sequence

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

6K+ Views

Here we will see how to generate Fibonacci sequence using 8086Problem StatementWrite 8086 Assembly language program to generate Fibonacci sequence. The limit of the sequence is stored at location offset 500. The item will be stored from offset 600 onwards.DiscussionTo generate Fibonacci sequence, we are putting the 00H and 01H into memory at first. Then we are taking the limit from location offset 500. The limit is decreased by 2 at first, because 00H and 01H is already present there. Now we are taking number from previous location, then add it with the value of current location, after that storing ... Read More

8086 program to generate AP series of n numbers

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

501 Views

In this program we will see how to find AP series using 8086.Problem StatementWrite 8086 Assembly language program to find AP series. The limit of the series is stored at 500, First term is stored at 501, and the common difference is stored at 502.DiscussionAP generation is simple task. We are taking the limit as counter value, the first term is loaded into AL first, then the BL is holding the common difference d. Now the result is storing memory offset 600 onwards. The AL is placing as it is, then repeatedly add BL with AL and store it into ... Read More

8086 program to find sum of digits of 8 bit number

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

1K+ Views

In this program we will see how to add the digits of an 8-bit number.Problem StatementWrite 8086 Assembly language program to add the digits of an 8-bit number stored in memory address 2000H.DiscussionTo get the digits of an 8-bit number, we can use the masking operation. At first we will mask the upper nibble, and then the lower nibble. After masking the upper nibble, we have to rotate it to the right to make it least significant nibble. Then we can simply add it to the stored nibble to get the sum.InputAddressData……20008A…… Flow Diagram ProgramOutputAddressData……200112……      

8086 program to determine sum of corresponding elements of two arrays

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

2K+ Views

Here we will see how to find sum of two array elements and store result into memory.Problem StatementWrite 8086 Assembly language program to find summation of two arrays stored at 501 onwards and 601 onwards. The size of array is stored at location 500. After calculating the sum results are store result at 501 onwards.DiscussionTo solve this problem, we are taking elements from first array using source register SI, and second array using destination register DI. Repeatedly take elements from SI to AL, then add with the content of DI, and store again into SI address. Thus it is solved.InputAddressData……500055012C5020B5037D5042550521……601BA6024560369604CA60595…… Flow ... Read More

8086 program to determine squares of numbers in an array of n numbers

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

2K+ Views

In this program we will see how to find the squares of n numbers stored in an array.Problem StatementWrite 8086 Assembly language program to calculate square of each numbers stored in an array of size n. The array size is stored at location offset 600, and Numbers are stored at 601 onwards.DiscussionTo solve this problem, we are taking the size of the array into the CL register, and make CH = 00H for counting. Now from each location take the number into accumulator, to make square, we have to multiply it two times. so we are multiplying AL with AL. ... Read More

8086 program to determine product of corresponding elements of two array elements

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

378 Views

Here we will see how to find product of two array elements and store result into memory.Problem StatementWrite 8086 Assembly language program to find product of two arrays stored at 501 onwards and 601 onwards. The size of array is stored at location 500. After calculating product store result at 501 onwards.DiscussionTo solve this problem, we are taking elements from first array using source register SI, and second array using destination register DI. Repeatedly take elements from SI to AL, then multiply with the content of DI, and store again into SI address. Thus it is solved.InputAddressData……500055012C5020B5037D5042550521……6010460212603026040460505…… Flow Diagram ProgramOutputAddressData……501B0502C6503FA504B9505A5……    Read More

8086 program to determine cubes of numbers in an array of n numbers

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

1K+ Views

In this program we will see how to find the cubes of n numbers stored in an array.Problem StatementWrite 8086 Assembly language program to calculate cubes of each numbers stored in an array of size n. The array size is stored at location offset 600, and Numbers are stored at 601 onwards.DiscussionTo solve this problem, we are taking the size of the array into the CL register, and make CH = 00H for counting. Now from each location take the number into accumulator, to make cube, we have to multiply it three times. so we are storing the number temporarily ... Read More

8085 program to find the sum of series of even numbers

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

1K+ Views

In this program we will see how to find the sum of all even numbers.Problem StatementWrite 8085 Assembly language program to find sum of all even numbers stored in an array. The size of the array is stored at location F100; the numbers are stored from memory location F101 onwards. The result will be stored at F150.DiscussionTo check whether a number is odd or even, we can to AND operation. If a number is odd, then it will contain 1 as LSb, for even LSb will be 0. So after AND operation if the result is 0, then it is ... Read More

8085 program to find the element that appears once

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

308 Views

In this program we will see how to find a number who appears only once in an array of elements.Problem StatementWrite 8085 Assembly language program to find a number who appears only once in an array of elements. The size of the array is stored at location F100; the numbers are stored from memory location F101 onwards. The result will be stored at F150.DiscussionThe logic behind this problem is simple. Though it may find some wrong results in some cases. It can find the number if there is only one number which is appeared once, and rest of the numbers ... Read More

Previous 1 ... 6 7 8 9 10 ... 56 Next
Advertisements