You are on page 1of 1

Department of Computer Science

University of Karachi
Assembly Language Programming
NAME : _____________________________ SEAT NO : ________________________
24-02-09 QUIZ 1 Total marks : 20 - TIME : 30 min
Attempt all questions:
1)Give an instruction with operands that will set the carry flag
___________________________________________________________________________________
2)Give an instruction with operands that will set the overflow flag
___________________________________________________________________________________
3)A processor of 18 bit address bus can support how much maximum memory?
___________________________________________________________________________________
4) For each of the following words identify the byte that is stored at lower memory address and the
byte that is stored at higher memory address in a little endian computer.
a. 1234 b. ABFC
_a.__________________________________b._____________________________________________
5) What are the first and the last physical memory addresses accessible using the
following segment values? Note: Use 12 bit segment offset address register.
a. 100 b. 0FF
_a.__________________________________b._____________________________________________
6) How many segments of 32 KB size, we can have in a processor which supports segment memory
model and have 18 bit address bus.
___________________________________________________________________________________
6) How many segments of 32 KB size, we can have in a processor which supports segment memory
model and have 20 bit address bus.
___________________________________________________________________________________
7) Write a program to calculate the square of 20 by using a loop that adds 10 in
each iteration to the accumulator required number of times.NOTE: Use back side
8) Identify the problems in the following instructions and correct them by
replacing them with one or two instruction having the same effect.
a. mov [02], [ 22] b. mov [wordvar], 20 c. mov bx, al d. mov ax,[si+di+100]
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
9) Give example of base + index Register indirect and Indexed Register Indirect addressing mode.
___________________________________________________________________________________
___________________________________________________________________________________
10) what are the two kinds of flags in Flags register?
___________________________________________________________________________________
11) write a program that exchange the values of two register say AX and BX. You can not use any
other register or memory space. You can not use exchange command.
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________

You might also like