DISTANCE LEARNING CENTRE
Ahmadu Bello University, Zaria
BSc. Computer Science (200 Level)
2022 January Semester Examination (WEEKDAY GROUP)
Course Code & Title: COSC 204 – Organization and Programming Language
Instruction: Answer any four (4) questions.
Time Allowed: 2 Hours
1a. What is the hexadecimal representation of the decimal number 246? (4.5 Marks)
b. What is a signed binary number? (4 Marks)
c. What is a machine cycle? (4 Marks)
2a. What instruction is used to perform data transfer in an 8086 assembly language program?
Give an example of how to use this instruction. (3 Marks)
b. Show how to write a multi-line comment in an 8086 assembly language. (2 Marks)
c. Write a complete 8086 assembly language program that adds two 32 bits positive
numbers. (7.5 Marks)
3a. What is a Directive in assembly language? (4.5 Marks)
b. Consider the data definition below and answer the questions that follow
1. .data byte1 BYTE 10,20,30
2. array1 WORD 30 DUP(?),0,0
3. array2 WORD 5 DUP(3 DUP(?))
4. array3 DWORD 1,2,3,4
5. digitStr BYTE "12345678",0
i. What is the type of array1?
ii. What is the length of array2?
(5 Marks)
c. What is a maskable interrupt? (3 Marks)
4a. What is a nested procedure? (3 Marks)
b. Write and describe the format for a procedure in Assembly Language (6.5 Marks)
c. What is an Algorithm? (3 Marks)
5a. What is the function of the OR instruction in assembly language? Write the syntax for the
OR instruction. (3 Marks)
b. What condition sets the zero flag? (2 Marks)
c. Write a complete Assembly Language program to demonstrate the usage of a Jump If
Carry instruction. (7.5 Marks)
6a. Translate the following high level programming conditional statement into Assemble
Language. (8.5 Marks)
If( op1 > op2 )
X = 1;
else
X = 2;
b. Describe the LOOPZ. Write down the syntax for LOOPZ. (4 Marks)