EC373 Assignment 1
EC373 Assignment 1
1
Write an assembly-level code to perform multiplication and division of two given
numbers, and store the result in two consecutive external memory locations
pointed by a base address present in the Destination Index Register.
Problem No. 1 1
Problem No. 1 2
Assembly Language Code and Description
Address Opcode Mnemonic Comments
MOV AX,
7210H B8 20 07 Initialise data segment address in AX
@DATA
Output
Problem No. 1 3
Problem No. 2
The following infinite series in termed as a Fibonacci series in Mathematics,
where every number in the series is a sum of the preceding two numbers in the
infinite series:
0, 1, 1, 2, 3, 5, 8, 13, 21, 34,……..
Write an Assembly-level code for an 8086-CPU, to generate a Fibonacci
series upto 20-terms. You are required to store the 20-terms as hexadecimal
numbers in consecutive locations within the data-segment of the external
memory.
Problem No. 1 4
Problem No. 1 5
Assembly Language Code and Description
Address Opcode Mnemonic Comments
MOV AX,
7250H B8 20 07 Initialize data segment address in AX
@DATA
Problem No. 1 6
Address Opcode Mnemonic Comments
Output
Problem No. 1 7
Problem No. 3
Write an assembly-language program for 8086-CPU, to compute the factorial
values of the following eight numbers: 1, 2, 3, 4, 5, 6, 7, 8.
Store the eight computed factorial values in successive RAM memory locations,
by alloting atleast two bytes for each computed factorial value.
Problem No. 1 8
Problem No. 1 9
Assembly Language Code and Description
Address Opcode Mnemonic Comments
MOV AX,
7220H B8 20 07 Initialize data segment address in AX
@DATA
Problem No. 1 10
Address Opcode Mnemonic Comments
Output
Problem No. 1 11
Problem No. 4
Consider the following equation from Classical Mechanics, referred to as the Second-
equation of Motion, which is used to calculate the displacement (s) of an object: s = u.t +
(1/2) at2 where, u is the initial velocity of the object, t is time taken and a is the acceleration.
Write a program in EMU-8086 emulator to receive inputs from the user for the parameters,
namely: Initial Velocity, Time and Acceleration. Use the 8086 microprocessor to help you
compute the Displacement (s) value, based on the user inputs. Display the computed
Displacement value in the output terminal of the EMU-8086 emulator.
Problem No. 1 12
Problem No. 1 13
Problem No. 1 14
Problem No. 1 15
Problem No. 1 16
Problem No. 1 17
Problem No. 1 18
Assembly Language Code and Description
Address Opcode Mnemonic Comments
Problem No. 1 19
Address Opcode Mnemonic Comments
Problem No. 1 20
Address Opcode Mnemonic Comments
Problem No. 1 21
Address Opcode Mnemonic Comments
Output
Problem No. 1 22
Problem No. 5
The following table indicates the average temperature recorded at Varanasi (in
degree Celsius) during various days of a year. Write an Assembly level program for an 8086-
CPU, where the temperature numbers for various days are fed to consecutive memory
locations using simple Immediate-addressing-mode based instructions. Develop your program
so as to let the 8086-CPU find out the maximum temperature value from the given data.
Problem No. 1 23
Problem No. 1 24
Assembly Language Code and Description
Address Opcode Mnemonic Comments
Problem No. 1 25
Address Opcode Mnemonic Comments
Problem No. 1 26
Address Opcode Mnemonic Comments
Output
Problem No. 1 27