Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Daffodil International University

Department of Electrical & Electronic Engineering


Faculty of Engineering
Final Examination, Semester: Fall 2014
Course Code: EEE 327 (DAY)
Course Title: Microprocessor & Interfacing
Level-3, Term-2
Section- A & B
Course Teacher: Saikat Basak (SB)
Time: 2 hours
Full Marks: 40
[N.B. Answer any 4 of the following 5 questions]
1
.

2
.

3
.

4
.

a) Use shift or rotate to count the number of 0 bits in DX, without changing DX.
Put the answer in BX. Write the assembly code.
b) Find out the value stored in BL and ZF, SF, OF, CF, PF for following code:
MOV BL,9FH
MOV CL,2
RCR BL,CL
c) Suppose AX contains 0100h and CX contains FFFFh. Find the result of
multiplication of AX and CX. Also Find CF/OF. ( Both MUL and IMUL)
d) Suppose AX contains 0FFFh. Find MUL AX and IMUL AX. And also find CF.

[3]

a) Suppose AL contains 0ABh. Find MUL AL and IMUL AL. And also find CF.

[3]

b) ADD AX,BX where AX contains FFFFh, BX contains FFFFh. Find the result
stored value in AX. And also find SF, PF, CF, OF.
c) MOV AX,-50. Find the result stored value in AX.
d) INC AL, where AL contains FFh. Find the result stored value in AL.

[3]

a) Set the sign bit of CL while other bits unchanged. Write the assembly code.

[2]

b) Invert the bit3 and bit 10 while preserving the other bits. Write the assembly
code.
c) Clear the sign bit & the least significant bit (LSB) of BL. Write the assembly
code.
d) Invert the sign bit of CX while other bits unchanged. Write the assembly code.

[2]

e)

[2]

Clear the least significant bit (LSB) of DX while other bits unchanged. Write
the assembly code.

a) Find out the value stored in AX, BX and ZF, SF, OF, CF, PF for following code:
MOV BX, 231AH
MOV AX, 0AB2FH
XOR BX,AX
PUSH BX
PUSHF
ADD BX,AX
POPF
POP AX
HLT

[2]

[3]
[2]

[2]
[2]

[2]
[2]

[4]

b)

Find out the value stored in AX, BX and ZF, SF, OF, CF, PF for following code:

[6]

MOV BX, 231AH


MOV AX, 0AB2FH
AND BX,AX
CALL PROC1
PUSH BX
PUSHF
ADD BX,AX
POPF
POP AX
HLT
PROC1 PROC
XOR AX, 0AAABH
NOT AX
RET
5
.

Find out the value stored in AX, BX,CX,DX and ZF, SF, OF, CF, PF for
following code:

MOV AX,0ABCDH
MOV BX,1111H
MOV CX,1234H
MOV DX,5678H
PUSH AX
ADD AX,BX
AND CX,DX
PUSH CX
XOR DX,AX
PUSH DX
PUSHF
CALL PROC1
ADD DX,CX
TEST DX,CX
POPF
JMP L3T2
PUSH AX
ADD AX,BX
AND CX,DX
POP CX
HLT
L3T2:
CALL PROC2
POP CX
POP BX
POP DX
HLT

PROC1 PROC
ADD AX,BX
PUSHF
AND CX,DX
POPF
RET
PROC2 PROC
PUSH AX
ADD DX,CX
TEST DX,CX
OR DX,CX
POP DX
RET

[10]

You might also like