You are on page 1of 3

PESIT, Bangalore south campus

Hosur Road (1 Km before Electronic city),Bangalore-560100


FIRST TEST
Scheme and solutions MICROPROCESSOR (6TH SEM)
5.8086 microprocessor architecture refer class notes
Block diagram -4M
Explanation -6M
4.Instructions i)call ii) proc & endp iii) cld iv) sahf v) scasw Refer class notes
Explanation plus examples -2M each
6. Memory segmentation and memory organization in 8086 -. Refer class notes
1.
.model small
.stack
.data
str db 50 dup(0)
msg1 db "enter the string in lowercase :$"
msg2 db 10,13,'the string in uppercase :$'
.code
mov ax,@data
mov ds,ax
lea dx,msg1
mov ah,09h
int 21h
call rdkbd
call disp
mov ah,4ch
int 21h
rdkbd proc
lea si,str
mov cl,00
back:mov ah,01h
int 21h
cmp al,0dh
je skip
mov [si],al

10M

inc si
inc cl
jmp back
skip: ret
rdkbd endp
disp proc
lea dx,msg2
mov ah,09h
int 21h
lea si,str
up1:mov dl,[si]
sub dl,20h
mov ah,02h
int 21h
inc si
loop up1
ret
disp endp
end
3. .model small
.stack
.data
arr dw 1111h,2222h,3333h,4444h,5568h,1234h
len db ($-arr)/2
eve dw 10 dup(0)
odd dw 10 dup(0)
.code
mov ax,@data
mov ds,ax
lea si,arr
lea di,eve
lea bx,odd
MOV CL,LEN
UP1:mov ax,[si]
mov dx,ax
shr ax,01
jc oddd
mov [di],dx
ADD DI,0002

10M

jmp dn1
oddd:MOV [BX],DX
ADD BX,0002
DN1:ADD SI,0002
LOOP UP1
MOV AH,4CH
int 21h
end

You might also like