OBJECT:
To write a program to check the password by full segment.
PROGRAM:
.model small
.stack 64h
.data
STSEG SEGMENT STACK
DB 64 DUP(?)
STSEG ENDS
DTSEG SEGMENT
str1 db "ENTER PASSWORD",0dh,0ah,'$'
str2 db 0dh,0ah,"ACCESS DENIED",'$'
str3 db 0dh,0ah,"ACCESS APPROVED",'$'
pass db "khusro",'$'
count=($-pass)
kbarea label byte
max db 32h
charsinput db ?
entword db 32 dup(0)
DTSEG ENDS
CDSEG SEGMENT
main proc far
ASSUME CS:CDSEG,DS:DTSEG,SS:STSEG
MOV AX,DTSEG
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,9
INT 21H
EXIT:MOV AX,4C00H
INT 21H
MAIN ENDP
CDSEG ENDS
END MAIN
OUTPUT:
D:\MASM611\BIN>password.exe
Enter Password
khusro
Access Approved...
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...
Subscribe to:
Posts (Atom)
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
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