Sunday 29 January 2012

Check a number is Armstrong or not-Masm program

printmsg macro msg
mov ah,09h
lea dx,msg
int 21h
endm

printnum macro reg
mov dl,reg
add dl,30h
mov ah,02h
int 21h
endm



data segment
n dw ?
p dw 00
rem dw ?
z dw ?

cr db,0dh,"$"
msg1 db "Enter a number(Ex:0123)$"
msg2 db 0ah,0dh,"Armstrong$"
msg3 db 0ah,0dh,"Not Armstrong$"
msg4 db 0ah,0dh,"$"
data ends

code segment
assume cs:code,ds:data
start:
mov ax,data
mov ds,ax


printmsg msg1

mov ah,01h
int 21h
mov ah,00
sub al,30h
mov dx,1000
mul dx
mov n,ax
mov ah,01h
int 21h
mov ah,00
sub al,30h
mov dh,100
mul dh
add ax,n
mov n,ax
mov ah,01h
int 21h
sub al,30h
mov ah,00
mov dh,10
mul dh
add ax,n
mov n,ax
mov ah,01
int 21h
sub al,30h
mov ah,00
add ax,n

mov n,ax
mov z,ax
mov cl,04

l2:
mov ax,n
mov dh,10
div dh
mov rem,al
mov al,ah
mov ch,ah
mov ah,00
mul ch
mul ch
add ax,p
mov p,ax
mov ax,rem
mov n,ax
dec cl
cmp cl,00
jne l2


mov dx,p
cmp z,dx
je l3
l4:
printmsg msg3
jmp skip
l3:
printmsg msg2








skip:mov ah,04h
int 21h
code ends
end start



Masm program to find prime numbers upto a limit

printmsg macro msg
mov ah,09h
lea dx,msg
int 21h
endm

printnum macro reg
mov dl,reg
add dl,30h
mov ah,02h
int 21h
endm

calcnum macro regx
mov ax,regx
mov dh,100
div dh
mov num,ah
aam
mov dh,al
printnum ah
printnum dh
mov al,num
aam
mov dh,al
printnum ah
printnum dh
endm

data segment
num dw ?
i dw 02
j dw ?
n dw ?

msg1 db "Enter a limit$"
msg2 db 0ah,0dh,"Prime nos:$"
msg3 db 0ah,0dh,"$"
data ends

code segment
assume cs:code,ds:data
start:
mov ax,data
mov ds,ax

printmsg msg1

mov dh,02
mov ah,01h
int 21h
mov ah,00
sub al,30h

mov cl,10
mul cl
mov n,ax
mov ah,01h
int 21h
mov ah,00
sub al,30h

add ax,n
inc ax
mov n,ax

printmsg msg2


mov ah,00
mov cx,n
l3:
cmp cx,i
je l1

mov j,02
mov ax,i
mov dh,02
div dh
mov bl,al
l6:cmp j,bl
jnc l2
l7:mov ax,i
mov dl,j
div dl
cmp ah,00
je l9
inc j
jmp l6

l2:
jz l7
printmsg msg3
calcnum i
l9:inc i
jmp l3

l1:mov ah,04h
int 21h
code ends
end start

Factorial of a number-Masm program

printmsg macro msg
mov ah,09h
lea dx,msg
int 21h
endm

printnum macro reg
mov dl,reg
add dl,30h
mov ah,02h
int 21h
endm

calcnum macro regx
mov ax,regx
mov dh,100
div dh
mov num,ah
aam
mov dh,al
printnum ah
printnum dh
mov al,num
aam
mov dh,al
printnum ah
printnum dh
endm

data segment
num dw  ?
msg1 db "Enter a number$"
msg2 db 0ah,0dh,"Factorial:$"
msg3 db 0ah,0dh,"$"
data ends

code segment
assume cs:code,ds:data
start:
mov ax,data
mov ds,ax

printmsg msg1

mov ah,01h
int 21h

sub al,30h
mov ah,00


mov cl,al
mov ch,00
mov ax,0001


l1:
mul cx

dec cl
cmp cl,01
jne l1


mov bx,ax
printmsg msg2
calcnum bx


mov ah,04h
int 21h
code ends
end start

Saturday 28 January 2012

Opera's Turbo - Enable turbo for slow connections

                                                                                                                                                     
We know about the browser opera.Here is a small property of opera. New opera browser has a new technology known as Turbo. If you have slow internet connection then use turbo for an average speed.If you enable turbo then opera will compress the images and graphics elements in the pages.So web pages will load fastly.

Note:Turbo button is in the status bar. Enable it for speed up your browsing.

Friday 13 January 2012

Removable disk shotcuts in desktop-windows trick

You know in linux when you plug a pendrive ,its shotcut will appear in the desktop. That shotcut will automatically removed when you eject the pendrive.This is also possible in windows through the use of a simple software.
                                                                            
Just download and  install it. It will autometically start at startup.
Try and enjoy.

Download link.

Wednesday 4 January 2012

The Ultimate webcam software-Youcam

Cyberlink's YOUCAM is a super webcam software.Provides many fun  features and effects.Also gives facilities for chatting,video conferencing,work,play etc.

Other features
1)Use new Face Login to access online sites like Facebook and eBay.
2)100s of fun features like Augmented Reality, avatars, interactive effects, and gadgets.
3)Record super smooth HD videos
4)Upload your webcam videos straight from YouCam to Youtube.
5) Advanced facial tracking technology


                                                                                            
                                                                     
To download Youcam use this  link

Twitter Delicious Facebook Digg Stumbleupon Favorites More