You are on page 1of 2

Federal Urdu University of Arts, Science and Technology, Islamabad

Department of Computer Science


Mid-Term Examination Fall 2020

Computer Organization and Assembly Language BS(CS) 3 A Morning


Duration: 5 Hours Total Marks: 30
Date:30 December 2020

Student Name: ___________________________________

Instructions:
 Paper can be solved easily in 1.5 hrs, but you will be given 5 hrs for its submission (Total
time 10:00AM - 3:00PM).
 The file name must contain your name, class, section and subject.

Q 1. a) Find the addressing modes? Discuss if there is any invalid 5 Marks


instruction.
 ADD AX, 3678
 ADD CX, 4
 EA = A + (PC)
 MOV AX, 13
 SUB AL, BL

b) Write a program in assembly language that input numbers from 5 Marks


the user until user press “E”. Program should display total no of
positive and negative no’s entered.

Q 2. a) Write a program in assembly language that creates a calculator 5 Marks


(using Switch structure).

b) Write a program in assembly language that display the following 5 Marks


output using loop:
123454321
1234 4321
123 321
12 21
1 1

Q 3. a) Explain the following instructions. 5 Marks

ST, POP, CLR, SETC, ROLC, SHR, COM, INC, ADDC, SUBB
b) Write a program in assembly language that input total pages of a 5 Marks
book, number of pages a person reads in one day and no of days a
person has read the book. It displays the no of pages that have
been read and the no of pages remaining.

Good Luck

You might also like