You are on page 1of 26

20BIT0056

Dhruv Chawla

ITE1001 – Assessment – 5
1. Write an ALP for adding two 16 bit numbers 0122H, 0127H stored in
registers B and C respectively.

Code:

Output:

1. MOV instructions
2. ADD instruction
2. Write an ALP for adding two 8 bit numbers 02H, 1BH stored in registers B
and C.

Code:

Output:

1. MOV instructions
2. ADD instruction
3. Write an ALP for subtracting two 8 bit numbers stored in registers.

Code:

Output:

1. Result > 0
1. MOV instructions
2. SUB instruction
2. Result < 0
1. MOV instructions

2. SUB instruction
4. Write an ALP for storing the 16 bit data in memory address 1000 and 1001.
Then perform addition of these two numbers and store the result in the
memory address 1003.

Code:

Output:

1. MOV instructions into memory


2. Calculation of sum in AL

3. MOV of sum into memory


5. Write an ALP for performing multiplication and division of 2 16 bit numbers.

Code:

Output:
1. Multiplication
1. MOV instructions
2. IMUL instruction

2. Division
1. MOV instructions
2. IDIV instruction
6. Write an ALP for transferring a block of ten 16 bit data from memory
address starting at 1000 to a memory location 3000.

Code:

Output:
1. Setting up memory
2. Moving memory
7. Write an ALP to display 13 numbers of the fibonacci series in a memory
location.

Code:

Output:
8. Write an ALP to find the largest number in a list of 10 numbers stored in a
Memory location starting from 2000H.

Code:

Output:
1. Setting up memory
2. Finding largest number
9. Write an ALP to find the smallest number in a list of 10 numbers stored in a
memory location starting from 3000H.

Code:

Output:
1. Setting up memory
2. Finding smallest number
10.Write an ALP to sort a list of 10 numbers stored in a memory location in
ascending order.

Code:
Output:
1. Setting up memory
2. Result of sorting
11.Write an ALP to sort a list of 10 numbers stored in a memory location in
descending order.

Code:
Output:
1. Setting up memory
2. Result of sorting

You might also like