MIC-22415 Question Bank For UT-II
MIC-22415 Question Bank For UT-II
Unit Test: II
Name of subject: MICROPROCESSOR
Subject code: 22415 Course: CO
Semester: IV
1. Write any four-bit manipulation instructions of 8086.
TEST AND
This instruction logically ANDs the This instruction logically ANDs the
source with the destination but the result source with the destination and stores the
is not stored anywhere. result in destination.
.
e. g .TEST BL ,CL e.g. AND BL , CL
The result is not saved anywhere. The result is saved in BL register
a db 06h
b db 12h
ends
.code
start:
mov ax,@data
mov ds,ax
mov al,a
mov bl,b
add al,bl
int 3
ends
end start
Ans. The DAA (Decimal Adjust after Addition) instruction makes the result in Packed BCD
from after BCD addition is performed. It works only on AL register.
It checks whether the carry flag is reset or not. If yes, then jump takes place, that is: If CF =
0, then jump.
ADD AL, BL Add two bytes
JNC NEXT If the result within acceptable range, continue
MOV CX,04H
MOV SI ,OFFSET
ARRAY MOV AL,[SI]
UP: INC SI
CMP AL,[SI]
JNC NEXT
MOV AL,[SI]
NEXT: DEC CX
JNZ UP
MOV LARGEST,AL
MOV AX,4C00H
INT 21H
CODE ENDS
END START
11. Differentiate between Procedure and Macros.
Ans.
Ends
.code
Mov ax,@data
Mov ds,ax
Mov AX,a
Mov BX,b
IMul BX
Int 03h
Ends
End
mov ax,no1
div no2
endm
.data
num1 dw 12346666h
num2 dw 2222h
.code
mov ax,@data
mov ds,ax
div1 num1,num2
ends
end