Monday, April 13, 2009

Lab#11a

OBJECT:

To write a program to check the password.

Program:

.model small

.stack 64h

.data

str1 db "Enter Password",0dh,0ah,'$'

str2 db 0dh,0ah,"Access Denied",'$'

str3 db 0dh,0ah,"Access Approved...",'$'

pass db "khusro",0dh,'$'

count=($-pass)

kbarea label byte

max db 32

charsinput db ?

entword db 32 dup(0)

.code

main proc

mov ax,@data

mov ds,ax

mov es,ax

mov ah,9

lea dx,str1

int 21h

lea dx,kbarea

mov ah,0ah

int 21h

lea si,pass

lea di,entword

mov cx,count

repe cmpsb

jcxz match

lea dx,str2

mov ah,9

int 21h

jmp exit

match: lea dx,str3

mov ah,09

int 21h

exit: mov ax,4c00h

int 21h

main endp

end main

Output:

D:\MASM611\BIN>password.exe

Enter Password

khusro

Access Approved...

No comments:

Post a Comment

Note to Watch Movies Online & Download

To Watch Online Movies you must download DivX Web Player from this link
http://www.divx.com/en/software/divx-plus/web-player

For Online Download you must install Internet Download Manager
http://www.4shared.com/file/gBiKH4Ad/idman519.html
The patch is also available
http://www.4shared.com/file/SiMB8Zi6/IDMan.html


For any Questions or Suggestions please comment or mail me

on khusro456@gmail.com

Search

Custom Search

Result