Programming of Microprocessors (CSCT3201)
Computer Science - COS
Semester: Second Semester
Level: 300
Year: 2018
1
REPUBLIC OF CAMEROON THE UNIVERSITY OF BAMENDA
Peace-Work-Fatherland P.O. Box 39 Bambili
Second Semester Examinations
School: HTTTC Department: Computer Science Option: FCS Level: 200
Course Code: CSC228 Course Title: Programming of microprocessors
Lecturer: Dr. DADA Jean-Pierre Credit Value: 2
Date: Time: 1:30 hour Start Time: End Time:
Exercise 1: (38 marks) This a program written by a student:
MVI B, 79H ; (1)
MOV A, B ; (2)
STA 0002H ; (3)
ANI 0FCH ; (4)
MOV C, A ; (5)
STA 0004H ; (6)
HLT ; (7)
1) Explain each line code listed on the program (14 marks)
2) Convert in binary, the hexadecimal numbers 79h and FCh (4 marks)
3) AND 79H and FCH and convert the result in base 16 (4 marks)
4) What is the content of the C register at the end of this program? (2 marks)
5) Give the content of the A register at the end of this program (2 marks)
6) Give the content of the address 0002H at the end of this program in base 10 (4 marks)
7) Give the content of the address 0004H at the end of this program in base 10 (4 marks)
8) How do you insert a comment in assembly language? (2 marks)
9) What do you think this program does? (2 marks)
Exercise 2: (22 marks). Read the program below and fill the vacuum spaces in the figure (indicated by a
square box)
Exercise 2 (10 marks): Write a program able to: Copy the data 13H in accumulator A; Send the content
of A to the memory address 0018H; Copy the data 08H in accumulator A; Send the content of A to the
memory address 0005H; Load A with the content of address 0005H; Copy the content of A into B;
Load A with the content of address 0005H; Add the contents of B and A; Sent the result in the memory
address 0007H; Close the program
www.schoolfaqs.net