Found 557 Articles for Microprocessor

8086 program to reverse 16 bit number using 8 bit operation

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

1K+ Views

In this program we will see how to reverse a 16-bit number using 8-bit operation.Problem StatementWrite 8086 Assembly language program to reverse a 16-bit number which is stored at location 2000 and 2001, using 8-bit operations.Discussion8086 has 8-bit operation for rotation. For 16-bit number, we are taking the bytes from 2000 and 2001. Then rotate each byte with ROL instruction. After that put the numbers in reverse form to reverse the bytes. Like the content of 2000 will be stored at 2001 after reverse, and content of 2001 will be stored at 2000 after reverse.InputAddressData……2000AB2001CD…… Flow Diagram ProgramOutputAddressData……2000DC2001BA……          

8086 program to print the table of input integer

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

711 Views

In this program we will see how to generate table of an integer.Problem StatementWrite 8086 Assembly language program to generate a table of input integer. The number is stored at 500H, and the table will be stored at 600 onwards.DiscussionTable generation is basically the multiplication table creation. We are taking the number and initialize the counter as 0. In each step increasing the counter by 1, and multiply it with the number, then store it into the memory address. When counter becomes 0A (10 in decimal), then it stops.InputAddressData……5004…… Flow Diagram ProgramOutputAddressData……60004601086020C6031060414605186061C607206082460928……         

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

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

347 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

8K+ 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

734 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

2K+ 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

3K+ 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

447 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

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