Sei sulla pagina 1di 24

Write 8086 Assembly language program to add the digits of an 8-bit number stored in memory address

2000H.
Write 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.
Write 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.
Write 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.
Write 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.
Problem Statement
Write 8086 Assembly language program perform modulus of the first array corresponding to the
next array.

Discussion
In this example there are two different arrays. The arrays are stored at location 501 onwards and
601 onwards. The size of these two arrays are stored at offset location 500. We are taking the array
size to initialize the counter, then by using loops we are getting the modulus of the elements one by
one
MOV SI, 500 ;Point Source index to 500
MOV CL, [SI] ;Load the array size into CL
MOV CH, 00 ;Clear Upper half of CX
INC SI ;Increase SI register to point next location
MOV DI, 601 ;Destination register points to 601
L1: MOV AL, [SI] ;Load A with the data stored at SI
MOV AH, 00 ;Clear upper half of AX
DIV [DI] ;Subtract AX by DI
MOV [SI], AH ;Store AH to SI address
INC SI ;SI Point to next location
INC DI ;DI Point to next location
LOOP L1 ;Jump to L1 until the counter becomes 0
HLT ;Terminate the program
Write 8086 Assembly language program to sort the elements in a given array, which is starts from memory
offset 501. The size of the series is stored at memory offset 500.
Write 8086 Assembly language program to find the minimum number in a given array, which is starts from
memory offset 501. The size of the series is stored at memory offset 500. Store the minimum number at
memory offset 600.
Write 8086 Assembly language program to find the largest number in a given array, which is starts from
memory offset 501. The size of the series is stored at memory offset 500. Store the largest number at
memory offset 600.
Write 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.
Write 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.
Write 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.

Write 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.
Write 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.

Write 8086 Assembly language program to subtract two 8-bit BCD number stored in memory address offset
600.
Write 8086 Assembly language program to add content of memory location 2000:500 and 3000:600, and
store the final result at 5000:700.
Write 8086 Assembly language program to add two 8-bit BCD number stored in memory address offset
600.

Potrebbero piacerti anche