You are on page 1of 7

University of Gondar ጎንደር ዩኒቨርስቲ

Institute of Technology ቴክኖሎጂ ኢንስቲትዩት


ጎንደር ኢትዮጵያ
Gondar, Ethiopia

Assignment I: Microcomputers & Interfacing


Target Group: 4th year Communication Engineering (Section 02) & Control Engineering

Instructions:
 Try all questions neatly, illegible and ambiguous answers will be unmarked.
 Copying will result on cancelation of your result/mark.

Part I: Descriptive Questions


Instruction: Do all the ‘M’ parts and choose another 4 questions from the ‘C’ parts
1. What is the difference between microcomputer and Microprocessor? (C)
2. What is the difference between Microprocessor and Microcontroller? (C)
3. Compare and Contrast 8085 and 8086 Microprocessors. (C)
4. Explain the internal architecture of 8086 Microprocessor. (C)
5. What is pipelining? (M)
6. Explain the register organization of 8086 Microprocessor. (C)
7. How physical address is generated in 8086 Microprocessor. (M)
8. Draw the organization of Microcomputer neatly (C)
9. What are the features of Intel 8086 Microprocessor? (C)
10. Discus the representations of memory address
11. Reason out why data bus is bidirectional and address buss is unidirectional in 8086
Microprocessor? (M)
12. What is procedure, and discuss the difference between far and near procedures. (M)
13. What is the difference between near and far jumps. (C)
14. Discus all types of jump instructions used in 8086 Microprocessor. (C)
15. Write the operations performed by the 8086 Microprocessor CALL instruction. (M)
16. Explain the use of the following prefixes: a) REP, b) REPE (C)
17. Discuss 3 (other than the above ones) types of string manipulation instructions. (M)

Prepared by: Tigabu Yaya December: 2019


University of Gondar ጎንደር ዩኒቨርስቲ
Institute of Technology ቴክኖሎጂ ኢንስቲትዩት
ጎንደር ኢትዮጵያ
Gondar, Ethiopia

Part II: Miscellaneous Questions


1. Justify the difference between the instructions; INC BYTE PTR and INC WORD PTR ,
having the codes bellow

A) B)

I. On the above codes, locate the memory addresses where F2 H & FF H are to be
stored.
II. What will be the value of Zero Flag (ZF) in both cases after line number 05 is
executed?
III. What are the respective values to be stored on the addresses 5000:2000 and
5000:2000 in both codes after line number 05 is being executed?
IV. Would the above codes result in different output from its earlier one in case line
number 4 is changed into, MOV [SI], 1234H in both A & B?
V. If lines number 04 in both codes (A&B) are replaced with; MOV [SI], 1234H, What
would be the respective values to be stored on the addresses 5000:2000 and
5000:2000 after line number 05 is being executed in both codes.

2. What is the difference between the following instructions, and identifying their respective
addressing modes?

A) MOV CX, 437AH and MOV CX, [437AH]


B) MOV BL, 437AH and MOV BL, DS:BYTE PTR[437AH]

3. If DS = 5000 H and SI = 2000 H;

A) Show the logical address


B) Calculate the physical address
C) Calculate the lower range of the data segment
D) Calculate the upper range of the data segment

Prepared by: Tigabu Yaya December: 2019


University of Gondar ጎንደር ዩኒቨርስቲ
Institute of Technology ቴክኖሎጂ ኢንስቲትዩት
ጎንደር ኢትዮጵያ
Gondar, Ethiopia

4. Find the sum and flag values for AF, SF, ZF, CF, OF, PF after adding 5439H and 456AH
5. Please trace this program manually and answer the following questions:

I. Calculate the lower range and upper ranges of the segment


II. What is the value of SP on the first entry of the source code,
just before line number is get executed?
III. After line number 07 is get executed, locate the memory
addresses where 6F & D9 are being stored, what will be the
value of SP?
IV. After line number 08 is get executed, locate the memory
addresses where 4E and B5 are being stored, what will be
the value of SP?
V. After line number 09 is being executed, what will be value
of BX and SP ?
VI. After line number 10 is being executed what will be the
values of AX and SP registers?

5. Please trace this program manually and answer the following questions:

I. Calculate the lower range and upper ranges of the two


segments
II. After line number 07 is get executed, locate the memory
addresses where 12 H & 34 are being stored, in which
segment?
III. After line number 08 is get executed, locate the memory
addresses where 56 H and 78 H are being stored, in which
segment are those addresses located?
IV. After line number 09 is get executed, locate the memory
addresses where 28 H and 43 H are being stored, in which
NB: To answer this question, you segment are those addresses located?
have to understand the instructions, V. After line number 10 is get executed, locate the memory
LEA, LDS and LES covered on addresses where 59 H and 67 H are being stored, in which
chapter 3 pages; 79, 80, and 81 segment are those addresses located?
VI. After line number 11 is being executed what will be the
values of CX register?
VII. After line number 12 is being executed what will be the
values of BX and DS registers?
VIII. After line number 13 is being executed what will be the
values of DX and ES registers?

Prepared by: Tigabu Yaya December: 2019


University of Gondar ጎንደር ዩኒቨርስቲ
Institute of Technology ቴክኖሎጂ ኢንስቲትዩት
ጎንደር ኢትዮጵያ
Gondar, Ethiopia

6. Given that;

After the following instructions are executed, what will be the value of the registers AX,
BX, CX, and DX? DS is a segment register for all instructions.

7. Programs

Prepared by: Tigabu Yaya December: 2019


University of Gondar ጎንደር ዩኒቨርስቲ
Institute of Technology ቴክኖሎጂ ኢንስቲትዩት
ጎንደር ኢትዮጵያ
Gondar, Ethiopia

Part III: Programming Questions

1. Write a program to store two immediate values into respective offset addresses of
0500H & 0600H in 2000H data segment to and add these values and then store the
result at 0700H in the same segment.
2. Write a program to move the contents of the memory location 0500H to register BX
and also to CX. Add immediate byte 05H to the data residing in memory location,
whose address is computed using DS=2000H and offset=0600H. Store the result of the
addition in 0700H. Assume that the data is located in the segment specified by the data
segment register which contain 2000H. (Assume that the immediate values stored in
offset addresses of 0500H & 0600H in 2000H data segment are those immediate values
from question 1.)
3. Write a program to exchange two memory variables using MOV and XCHG
instruction. Can you do it with just XCHG?
4. Write a program for addition of two numbers using directives.
5. Write a program to multiply two unsigned numbers
6. Write a program to calculate factorial of a number.
7. Write a program to generate Fibonacci series.
8. Write a program to demonstrate block transfer
9. Write a program to demonstrate block exchange.
10. Write a program to convert a BCD number (45H) into its ASCII equivalent (3435H).
11. Load a byte string, 14-bytes long, into an offset address starting from 0200H in 7000H
data segment and Move this string to an offset address starting from 0300H in 9000H
extra segment. ( can be solved with 2 ways )
12. Write a procedure named SQUARE that computes 𝑌 = (𝐴𝐿)2 + (𝐴𝐻)2 + (𝐷𝐿)2 ,
assume that Y doesn’t exceed of 16 bit.
13. Write a program to find arithmetic mean of n numbers.
14. Write a program for the addition of a series of 8-bit numbers. The series contains 100
numbers.

Prepared by: Tigabu Yaya December: 2019


University of Gondar ጎንደር ዩኒቨርስቲ
Institute of Technology ቴክኖሎጂ ኢንስቲትዩት
ጎንደር ኢትዮጵያ
Gondar, Ethiopia

15. A program to find out the largest number from a given unordered array of 8-bit
numbers, stored in the locations starting from a known address.
16. A program to find out the number of even and odd numbers from a given series of 16-
bit hexadecimal numbers.
17. Write a program to find out the number of positive numbers and negative numbers from
a given series of signed numbers.
18. Write an assembly language program to arrange a given series of hexadecimal bytes in
ascending order.
19. Decide whether the parity of a given number is even or odd. If parity is even set DL to
00H; else, set DL to 01H. The given number may be a multibyte number.
20. Write a program for the addition of two 3 x 3 matrices. The matrices are stored in the
form of lists (row wise). Store the result of addition in the third list.
21. Write a program to find out the product of two matrices. Store the result in the third
matrix. The matrices are specified as in the above program.
22. Write a program to transpose a matrix.
23. Write a program to multiply two multi byte numbers and store the results as the third
number
24. Repeat the above program using procedure/ subroutine concept
25. Write a program for reversing a given string.
26. Write a program to compare two strings
27. Write a program to read a character from keyboard (with Echo)
28. Write a program to read a character without Echo
29. Write a program to read a string of 10 characters into a buffer from keyboard
30. Write a program to display a character
31. Write a program to display a character string 5 times
32. Write a program demonstrate string input
33. Write a program to convert a Hexadecimal number into its binary equivalent.
34. Write a program find HCF and LCM of two numbers.
35. Write a program to convert ASCII number into decimal digit.
36. Write a program to count the number of 1’s in a given number

Prepared by: Tigabu Yaya December: 2019


University of Gondar ጎንደር ዩኒቨርስቲ
Institute of Technology ቴክኖሎጂ ኢንስቲትዩት
ጎንደር ኢትዮጵያ
Gondar, Ethiopia

37. Write a Program, which takes the input of 4-digit number, and display the sum of square
of digits.
38. Write a program to convert a string in upper case to lower case or lower case to upper
case.
39. Write a program to determine a given string is a palindrome. If 'Yes' output the message
“The given string is a palindrome”. If 'No' output the message “No, it is not a
palindrome”.
40. Write a program to search for a character in a given string and calculate the number of
occurrences of the character in the given string.
41. Write a program, which will produce 2 ms delay.
42. Write a program to display the current system time using DOS INT 21H, function 4CH.
43. Write a procedure, which takes one character from console at 10-second intervals, and
stores each character in one array of characters.
44. Write a procedure, which takes one number from an array, calculates the square and
stores each square number in another array.
45. Write a program to print alphabets from a to z in both the case.
46. Write a program to swap contents of two registers without using the XCHG instruction.
47. Write an assembly language program to count number of vowels in a given string.
48. Write a program that will ask for a temperature in Fahrenheit and display in Celsius.
49. Write a program to exchange the content of memory location
50. Right shift data within 16-bit register
51. Left shift within 16-bit register
52. Write a program to search a character in a string
53. Write a program to compare two strings.
54. Write a program to display string “Electrical and Computer Engineering” for
8086.
55. Read two strings, store them in location STR1 and STR2 check whether they
are equal or not.
56. Write a program to read the current time from the system and display it in the
standard format on the screen.
57.

Prepared by: Tigabu Yaya December: 2019

You might also like