CLICK HERE FOR VARIOUS NEW JOBS 
CLICK HERE FOR VARIOUS EDUCATIONAL NEWS 
CLICK HERE FOR NEW SCHOLARSHIPS 
CLICK HERE FOR ADMISSION NOTICES 
Click And Follow On Google+ To Get Updates
Please Wait 10 Seconds... OR You CanSkip

ADMISSION NOTICES
Scholarships

Scholarship-300x291

BUDGET 2014-15
budget_2014-2015
New Date Sheets
VU SOLVED ASSIGNMENTS
Recent Posts

Posts Tagged ‘VU .CS401 .Computer .Architecture. and. Assembly. Language .Programming .Mid Term. Examination – .November .2004’

VU CS401 Computer Architecture and Assembly Language Programming Mid Term Examination – November 2004

.

CS401 Computer Architecture and Assembly Language

Programming

Mid Term Examination – November 2004

Time Allowed: 90 Minutes

Instructions

Please read the following instructions carefully before attempting any question:

1. The duration of this examination is 90 minutes.

2. This examination is open Handouts.

3. Answer all questions.

a. There is no choice.

b. You will have to answer correctly all questions in this examination to get the

maximum possible marks.

4. Do not ask any questions about the contents of this examination from anyone.

a. If you think that there is something wrong with any of the questions, attempt it to

the best of your understanding.

b. If you believe that some essential piece of information is missing, make an

appropriate assumption and use it to solve the problem.

5. You have been provided with all assembly tools so you can use assembly tools also.

6. Your paper contains 4 questions.

All Coding questions should be answered using the Assembly language syntax.

Total Marks: 60

Questions: 5

Question No. 1

Total

Marks : 10

Write a program named “Countvowels” that counts all occurrences of the vowels in a

source string and then prints the result in the format (vowel, count). For example if the string

is ‘afadefsoieaid’ it should print (a,3) (e,2) (i,2) (o,1) (u,0) on the screen. The program should

take address of the source string as a parameter via stack. Also provide proper comments

against each instruction.

Note: String is assumed to contain only small case legal letters and length of the string is

fixed to 15 characters. Vowel characters include a, e, i, o, u.

Question No. 2

Marks : 10

.

Answer the following questions.

a. What does the symbol [ ] indicate?

b. Explain what the REP prefix does?

c. What is FAR jump?

d. What does the INT 21h accomplish if AH contains 4CH?

e. What is the difference between SUB and CMP instructions?

Question No. 3

Marks : 10

Calculate the first and the last physical memory addresses accessible using each of the

following segment values?

a. FFFF

b. F009

c. 1234

d. 0000

Question No. 4

Find all the errors in the following code and write those errors against each erroneous

instruction.

Marks : 10

Example: push IP ; IP can’t be pushed on the stack.

[0x0100]

jmp start

numarray dw 7, 11, 5, 0, 3, 1, 9, 4, 2, 10

index1 0

index2 dw 0

start:

mov ax 0

mov bx, 0

loop:

cmp ax, 20

je num1

mov bh, ax

mov [ index1 ], [ index2]

mov cx, [ numarray + bx ]

add ax, 2

swap:

add bx, 2

cmp bx, 20

je end

cmp cx, [ numarray + bx ]

jc swap

jmp swap

swap:

mov dx, [ numarray + bx ]

mov [ index2 ], bx

mov bx, [ index1 ]

mov [ bp + bx ], dx

mov bx, [ index2 ]

mov [ numarray + bx ], cx

mov cx, dx

.

jmp start

end:

mov ax, 0x4c00

Question No. 5

Marks : 10

What will be the value of AX after the execution of each of the following instruction? Each

instruction is independent of others.

If AX= 0x44FF and BX= 0x011F

a.

b.

c.

d.

e.

xor ah, bh

ror bx, 2

not ah

and ax, bx

rcl ax, 2 if carry flag = 0

ALL NEW RESULTS
Educational News

Updated Educational News

Categories
POSTS BY DATE
December 2016
M T W T F S S
« Sep    
 1234
567891011
12131415161718
19202122232425
262728293031