Friday, 11 November 2011

Mupi Lab exam open forum

Dear Friends,
Hope u did well in the practical exam..


pls share ur questions ( pgm & Viva) ...

Lets try to find out its answers...

Regards
Jinesh K J





Tuesday, 8 November 2011

Program to check leap year or not

MOV CX,7D4h ;LOAD YEAR TO CX

MOV AX,CX
MOV BX,04h
DIV BX
CMP DX,0000h
JNE L1

MOV AX,CX
MOV BX,64h
DIV BX
CMP DX,0000h
JNE L0

MOV AX,CX
MOV BX,0190h
DIV BX
CMP DX,0000h
JNE L1

L0:MOV [2000H],01h
HLT

L1:MOV [2000H],00H
HLT

Leap year

How to determine whether a year is a leap year? To determine whether a year is a leap year, follow these steps: If the year is evenly divisible by 4, go to step 2. Otherwise, go to step 5. If the year is evenly divisible by 100, go to step 3. Otherwise, go to step 4. If the year is evenly divisible by 400, go to step 4. Otherwise, go to step 5. The year is a leap year (it has 366 days). The year is not a leap year (it has 365 days).

program to rotate the stepper motor 360 degree if the value in memory location 3000h is FF else rotate 360 degree anti clockwise


mov al,80
out 0026,al
l3:mov cx,32
dec cx
l5:mov al,[3000]
cmp al,ff
jz l8
jmp l9
l8:mov si,1050
jmp l10
l9:mov si,1054
l10:mov bl,04
l2:mov al,[si]
out 0020,al
call l1
inc si
dec bl
jnz l2
jmp l7
l1:mov dx,0a03
l4:dec dx
jnz l4
ret
l7:loop l5
jz l6
l6:hlt

Friday, 4 November 2011

prime or not


MOV DI,02H
MOV CX,[2000H]
MOV BX,CX
L1:INC DI
DEC BX
MOV AX,CX
MOV DX,00H
DIV BX
CMP BX,02H
JNZ L4
JMP L5
L4:CMP DX,00H
JNZ L1
L5:CMP DI,CX
JZ L2
JMP L3
L2:MOV [3000H],01H
HLT
L3:MOV [3000H],00H
HLT

program to find LCM


mov bx,[2002h]
mov cx,[2000h]
mov di,[2002h]
dec di
l1: inc di
mov ax,di
 div cx
 cmp dx,00h
jz l5
jnz l1
l5:mov ax,di
div bx
cmp dx,00h
jz l6
jnz l1
l6:mov [4000h],di
hlt

sorting + sum


mov bl,[3000h]
dec bl  
mov dl,00h
l3:mov cl,bl
mov si,2000h
l1:mov al,[si]
inc si
cmp al,[si]
jb l2
xchg [si],al
mov [si-1],al
l2:loop l1
add dl,[si]
dec bl
jnz l3
add dl,[2000h]
mov [4000h],dl
hlt

string reversal


mov si,2000h
mov di,2004h
mov al,00h
mov bl,00h
l1:mov al,[si]
mov bl,[di]
mov [si],bl
mov [di],al
inc si
dec di
cmp si,di
jb l1
hlt

implement XOR gate without using XOR instruction


mov ax,[3000h]
mov bx,[3002h]
cmp ax,bx
jz l1
mov ax,01h
mov [4000h],ax
hlt
l1:mov ax,00h
mov [4000h],ax
hlt

check even or odd and sort both even and odd in assending order


mov bx,[3000h]
dec bx
l3:mov cx,bx
mov si,2000h
l1:mov al,[si]
inc si
cmp al,[si]
jb l2
xchg al,[si]
mov [si-1],al
l2:loop l1
dec bx
jnz l3
jmp l4
l4:mov cx,[3000h]
mov si.2000h
mov di,4000h
mov bx,02h
l5:mov ax,[si]
div bx
cmp dx,00h
jz l6
jmp l7
l6:mov ax,[si]
mov [di],ax
inc di
inc di
l7:inc si
inc si
loop l5
jmp l8
l8:mov cx,[3000h]
mov si.2000h
mov di,4500h
mov bx,02h
l9:mov ax,[si]
div bx
cmp dx,00h
jnz l10
jmp l11
l10:mov ax,[si]
mov [di],ax
inc di
inc di
l11:inc si
inc si
loop l8
hlt

generate the sequence 1,13,135,1357,..............


mov cl,[2000h]
mov si,3000h
mov al,01h
l1:inc al
mov bl,00h
l2:inc bl
mov [si],bl
inc bl
inc si
cmp al,bl
jnz l2
inc al
loop l1
hlt

Block transfer with sum


mov si,2000h
mov cx,[4000h]
mov di,3000h
mov al,00h
l1:mov bl,[si]
add al,bl
mov [di],bl
inc si
inc di
loop l1
mov [3500h],al
hlt

Thursday, 3 November 2011

MP LAB ANSWER ...

QUESTION
TO GENERATE
1
22
333
4444
55555
.........

SOLUTION
MOV SI,2001H ;INITIAL ADDRESS WHERE SERIES GET SAVED
MOV AL,01H
MOV BL,01H

L1:MOV [SI],AL
INC BL
INC SI
CMP BL,AL
JBE L1

INC AL
MOV BL,01H
CMP AL,[2000H] ;SAVE NO.OF ROWS REQUIRED IN THIS LOCATION
JBE L1

HLT

MP LAB ANSWER ...

QUESTION
TO GENERATE
1
12
123
1234
12345
123456
.......
SOLUTION
MOV SI,2001H ;2001 IS THE INITIAL LOCATION WHERE SERIES GET SAVED
MOV AL,01H
MOV BL,01H

L1:MOV[SI],BL
INC BL
INC SI
CMP BL,AL
JBE L1

INC AL
MOV BL,01H
CMP AL,[2000H] ;SAVE NO. OF ROWS REQUIRED IN LOCATION 2000
JBE L1

HLT

Wednesday, 2 November 2011

MP NEW QUESTIONS

 8086

1.block transfer and sum.
2.block transfer and avg.
3.fibonacci sum.
4.sorting. Find smallest and largest.Also find sum.
5.prime check and square.
6.palindrome + block transfer.
7.matrix addition and subtraction
8. pascal triangle / series gen ( 1,1,2,1,2,3...         , 1,2,2,3,3,3,4,44... etc)

8086 Interfacing Pgms

1. ADC with software SOC
2. Stepper Motor
                 Rotate  in different speed , Clock wise or anti clock wise with angle, Clock wise or anti clock wise with condition,

8051
1.16 bit addition ( input from external mem)
2. 8 bit addition & result in LCD
3. LCD display(row1,2)
4. 2 digit counter with lcd ( the lcd should display counting digit)
5. 8 bit multiplication / division
6. Factorial of a num



...................


ALL THE BEST FOR MP EXAM


EC09 505: S5 ECE (2009-13) Class Toppers

I would like to express my appreciation to following students for their Good Performance in the  Internal Exams (EC09 505: Microprocessors  And Microcontrollers)
held at JECC.

Internal Exam 1
1. KARTHIKA VISWANATH 
2. RONI JOSE GEORGE, NAINY PHILIP, JINU JOSE K.
3. NISHA MENON K.

Internal Exam 2
1. NEETHU U.
2. RONI JOSE GEORGE
3. JINU JOSE K., LAKSHMI R.



Tuesday, 1 November 2011

Online Feed Back Form