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

Cat 2

This document outlines the examination for an Assembly Language Programming course taken in 2022/2023. It provides instructions for three questions: [1] Analyzing the legality of various MOV statements and determining the value of AX after a series of instructions; [2] Determining the hexadecimal values after a series of MOV instructions involving defined variables; [3] Translating a C++ expression to assembly language. Students must complete all questions in a group of three and submit a PDF version by the deadline.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
109 views3 pages

Cat 2

This document outlines the examination for an Assembly Language Programming course taken in 2022/2023. It provides instructions for three questions: [1] Analyzing the legality of various MOV statements and determining the value of AX after a series of instructions; [2] Determining the hexadecimal values after a series of MOV instructions involving defined variables; [3] Translating a C++ expression to assembly language. Students must complete all questions in a group of three and submit a PDF version by the deadline.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

UNIVERSITY EXAMINATIONS: 2022/2023

EXAMINATION FOR THE DEGREES OF BACHELOR OF SCIENCE IN


APPLIED COMPUTING/ BACHELOR OF BUSINESS INFORMATION
TECHNOLOGY
BSD 1308: ASSEMBLY LANGUAGE PROGRAMMING
FULLTIME/ PART TIME/DISTANCE LEARNING

DATE: NOVEMBER, 2022 TIME: 1 WEEK

INSTRUCTIONS: QUESTION ONE IS COMPULSORY, CHOOSE TWO OTHER


QUESTIONS

QUESTION ONE (20 Marks) Compulsory

Use the following variable definitions for the questions below

.data
var1 dw 0
var2 dw 6
var3 db 5

a) Show whether the following MOV statements are legal or illegal, explain the illegal mov
instructions: (10 Marks)
i). mov ax,bx
ii). mov var2,al
iii). mov ax,bl
iv). mov bh,4A6Fh
v). mov dx,3
vi). mov var1,bx
vii). mov al,var3
viii). mov cs,0
ix). mov ip,ax
x). mov var1,var2
xi). mov ds,1000h
xii). mov ds,es
b) What will AX equal after the following instructions have executed? (4 Marks)
.code
mov ax, array1
inc ax
Add ah, 1
Sub ax, array1

.data
Array1 dw 10h, 20h
Array2 dw 30h, 40h

Use the following variable definitions for the questions below

.data

var1 SBYTE -4,-2,3,1


var2 WORD 1000h,2000H,3000h,4000h
var3 SWORD -16, -42
var4 DWORD 1, 2,3,4,5

c) What will be the hexadecimal value of the destination operand after each of the following
instructions execute in sequence? (2 Marks)
i). Mov al, var1
ii). Mov ah, [var1+3]
d) What will be the value of the destination operand after each of the following instructions
execute in sequence (2 Marks)
i). Mov ax,var2
ii). Mov ax, [var2+4]
iii). Mov ax, var3
iv). Mov ax, [var3-2]
e) Translate the following C++ expression to assembly language (2 Marks)
i). X(Y*4)+3

Instructions
1. Attempt all the questions. Show all your workings where applicable.
2. Work in a group of 3 students (Max). No individual assignments will be marked.
3. UPLOAD ON MOODLE a pdf version of your typed work (not images of handwritten
text) as per the scheduled deadline. No unnecessary extension will be granted to any
students.

You might also like