0% found this document useful (0 votes)
18 views3 pages

ICS 3203 - Assembly Language Programming - January 2021

This document contains instructions for a 3203 Assembly Language Programming exam. It provides 5 questions worth 20 marks each, and students must answer 3 questions including the compulsory Question 1. Question 1 covers differences between ARM and x86 processors, drawing an ARM processor logic diagram, designing an ARM control word, writing instructions for an ARM microwave oven program, and implementing one of its functions. Question 2 involves designing an 8086-based traffic light control system. Question 3 covers 8086 addressing modes and data/instruction formats. Questions 4 and 5 contain additional programming, description, and comparison questions involving various processors and assembly language concepts.

Uploaded by

nyamosiyego
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
18 views3 pages

ICS 3203 - Assembly Language Programming - January 2021

This document contains instructions for a 3203 Assembly Language Programming exam. It provides 5 questions worth 20 marks each, and students must answer 3 questions including the compulsory Question 1. Question 1 covers differences between ARM and x86 processors, drawing an ARM processor logic diagram, designing an ARM control word, writing instructions for an ARM microwave oven program, and implementing one of its functions. Question 2 involves designing an 8086-based traffic light control system. Question 3 covers 8086 addressing modes and data/instruction formats. Questions 4 and 5 contain additional programming, description, and comparison questions involving various processors and assembly language concepts.

Uploaded by

nyamosiyego
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 3

FACULTY OF INFORMATION TECHNOLOGY

BACHELOR OF COMPUTER SCIENCE


END OF SEMESTER EXAMINATION
ICS 3203 Assembly language programming
DATE: 21st JANUARY, 2021 TIME: 2 Hours
INSTRUCTIONS:
i. This paper contains FIVE questions.
ii. You are required to answer THREE questions, that is, QUESTION ONE which is
COMPULSORY and any other TWO questions.
iii. All questions carry equal marks i.e. 20 MARKS each.
QUESTION ONE (20 MARKS)
Understanding the Differences Between ARM and x86 Processing Cores.
ARM and x86 are the two most common processor families on the planet. What are their strengths,
weaknesses, and applications?
For years, ARM (originally Acorn RISC Machines but now Advanced RISC Machines) has been
at the center of modern microprocessors and embedded design. With a focus on low power
consumption and a simple instruction set, mobile devices in particular have hugely benefited from
the processor design.
But a few years ago, Raspberry Pi made its debut, boasting a Broadcom SoC which included a
700MHz ARM core. The ARM core on its own boasted low cost and simplicity.
Intel, for its part, has mainly produced processors aimed at high performance and high throughput
environments, including desktop PCs, laptops, servers, and even supercomputers. But this is no
longer the case as Intel is embracing the mobile/low power market with many mobile processors,
including the Intel Atom series (one of the main processors powering Windows 10 tablets).

The two processor families have many differences, including their processing power, power
consumption, software, and applications.

1
a) Based on the above case, list and describe FIVE main differences between the X86 and the
ARM processors. (5 Marks)

b) Draw and describe the diagram representing a simplified processor logic of the ARM
processor. (4 marks)

c) Develop a 19-bit control word structure that can be used to manage the ARM processor.
(4 marks)

d) Assuming the ARM processor is to be used in a microwave oven, propose an instruction


set that can be used to run it. (4 marks)

e) Based on the instruction set in d) above, write a program to implement one of the most
commonly used functions of the microwave oven. (3 Marks)

QUESTION TWO (20 MARKS)


Suppose you have been selected to be the lead programmer and software design advisor in a team
contracted to develop a traffic light control system for a busy round about in a Kenyan City using
assembly language programming. The team has decided to build the system around 8086
microprocessor. Four sets of traffic lights each with red, yellow and green lights, are to be mounted
in East, North, West and South directions and be flashed accordingly with a delay of 10seconds to
control the traffic. Five situations are defined as follows: sit1=0011_0000_1100b, sit2
=1000_0110_0001b, sit3=0110_1001_1010b, sit4=0100_1101_0011b and all_red=
0010_0100_1001b. Take 10million microseconds=00989680H, the output port for driving the
traffic lights as Port 4 and the traffic lights display module is named “Traffic_Lights.exe”.
a) Identify three apparatus you will require to deliver the project and their uses.
(4 marks)

b) Give FOUR benefits of implementing the traffic lights control system in the City using
assembly language programming. (4 marks)

c) Draw a flow chart to illustrate the steps followed by the program and explain the flow of
the algorithm. (2 marks)

d) Write 8086 Traffic Lights Control Assembly Program for the given case. Remember to
include comments and state any assumptions made. (10 marks)

QUESTION THREE (20 MARKS)


a) Use examples to explain the following types of addressing modes supported by the 8086
microprocessor. In the examples, use the CPU registers AX, BX, SI and DI
as may be applicable.

i. Register addressing mode

2
ii. Immediate
iii. Register indirect
iv. Base plus index
v. Implied addressing mode (10 Marks)

b) Describe the different types of data and instructions formats used with different
microprocessors. (10 Marks)

QUESTION FOUR (20 MARKS)


a) State the contents of the accumulator and the C flag when the following instruction is
executed.

MOV AX, B7H


OR AX, AX
RLC AX,1 (3 Marks)

b) Write a program to perform the following;


Load 1234H in register pair DE
Add 2567H to DE contents
Load register BX with 30H
Load register CX with 39H
Subtract 30H from 39H
Stop (4 Marks)

c) In the process of ISA design, there are three important types of instructions to be
considered, list and briefly describe them. (3 Marks)

d) Briefly describe the 8086-instruction set indicating the differences between it and the
current microprocessors. (6 Marks)

e) Write an assembly language program to perform square and cube of a number.


(4 Marks)

QUESTION FIVE (20 MARKS)


a) With appropriate diagrams, explain the ISA classifications. (4 Marks)

b) Write an assembly program to add two numbers and display the result in decimal.
(4 Marks)
c) Briefly describe five applications of microprocessor systems. (4 Marks)

d) Differentiate between RISC and CISC and how they are related to assembly language
programming. (4 Marks)

e) Write an assembly program to multiply a decimal number by 8 using the shift instruction.
(4 Marks)

You might also like