TECHNICAL UNIVERSITY OF KENYA
FACULTY OF APPLIED SCIENCES AND TECHNOLOGY
SCHOOL OF COMPUTING & INFORMATION TECHNOLOGY
UNIVERSITY SEMESTER EXAMINATION SERIES
THIRD YEAR EXAMINATIONS FOR THE DEGREE OF
BACHELOR OF TECHNOLOGY IN COMPUTER TECHNOLOGY
ECSI 3108: ASSEMBLY LANGUAGE PROGRAMMING
TIME: 2 Hours
Instructions to candidates:
This paper consists of FIVE Questions.
Answer Question ONE [30 Marks] and any other TWO Questions [20 Marks Each].
Write your college number on the answer sheet.
This paper consists of 3 printed pages
Candidates should check the question paper to ascertain that all the pages are
printed as indicated and that no questions are missing.
© The Technical University of Kenya Examinations
Page 1 of 3
QUESTION ONE (30 MARKS) COMPULSORY
a) Distinguish between the three levels of programming languages [3 Marks]
b) Write an assembly language program to add two 8-bit hexadecimal numbers stored at
memory locations 09C4 and 09C5 and store the result in at 09C6 [4 Marks]
c) Explain the three special programs that are used to convert a program from the human
instructions [3 Marks]
d) Explain the following terminologies as used in Assembly programming with an example in
each case [4 Marks]
i. General Purpose Registers
ii. Program counter
e) Describe four classifications of 8085 processor instructions [4 Marks]
f) Explain the sections of the assembly language programming [4 Marks]
g) Write a program in assembly language to exchange the 16-bit data [4 Marks]
h) Given that the value 05h is stored in register B and the value 6h is stored in register C, write
an assembly language that will calculate the totals of the two values and store the results in
the accumulator [4 Marks]
QUESTION TWO (20 MARKS)
a) Explain the role of five flags used in assembly programming language [10 Marks]
b) Outline the five steps in writing an assembly language program [5 Marks]
c) Explain the following microprocessor instructions as used in assembly language
programming [5 Marks]
i. CMP B
ii. STAX B
iii. INR A
iv. INR M
v. SPHL
QUESTION THREE (20 MARKS)
a) Describe four types of addressing modes used in assembly programming with an example
illustration of each mode [8 Marks]
b) Distinguish between “an instruction” and “an instruction set” as used in assembly
programming languages [4 Marks]
c) Draw a well labeled architecture of a 8085 microprocessor [8 Marks]
Page 2 of 3
QUESTION FOUR (20 MARKS)
a) Write an assembly programming language to perform the multiplication of two 8 bit numbers
using 8085 [10 Marks]
b) The 8085 instruction set is classified into three groups according to word size. Explain with
examples the three classes [6 Marks]
c) Write an assembly program to multiply a number by 8 [4 Marks]
QUESTION FIVE (20 MARKS)
a) In assembly programming, a segmented memory divides the memory into groups of
segmented sections. Explain any three sections of a memory segments [6 Marks]
b) Write an assembly language program to subtract the contents of memory location 4001H
from the memory location 200H and place the result in memory location 4002H [6 Marks]
c) Write a program to fine the 2’s complement of the number stores at memory location 2500H
and store at memory location 2503H and store the complemented number at memory location
2505H [4 Marks]
d) Outline four comparisons (Dissimilarity ) between the 8085 and 8086 microprocessors using
the tables provided [4 Marks]
Comparison by 8085 8086
Size
Cost
Instruction queue
Pipelining
Page 3 of 3