Welcome to Dream.In.Code
Getting Help is Easy!

Join 136,299 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,437 people online right now. Registration is fast and FREE... Join Now!




How can i make a PAssword program in TASM?

 
Reply to this topicStart new topic

How can i make a PAssword program in TASM?, tasm

ara1026
25 Aug, 2008 - 01:34 AM
Post #1

New D.I.C Head
*

Joined: 5 Aug, 2008
Posts: 6

QUOTE(ara1026 @ 25 Aug, 2008 - 02:25 AM) *

CODE
.model small
.stack 100h
.data
        USRNM   DB"Enter Username:$"
        PWRD    DB "Enter Password:$"
        Ara     DB 30h
        ULIT    DB 30h
        E       DB "Username and Password did not match!$"
        PASSACC DB"Username and Password Accepted!$"
.Code

start:
        mov ax,1h
        mov ds,ax

ULIT2:  mov ax,2h
        int 10h
        mov ah,2h
        mov dx,0405h
        int 10h
        mov ah,9h
        mov dx,offset USRNM
        int 21h
        mov ah,1h
        int 21h
        cmp al,61h
        int 21h
        cmp al,74h
        int 21h
        cmp al,75h
        int 21h
        cmp al,73h
        int 21h
        jle OK
        ULIT1:  jne ULIT2
        ERR1:    mov cx,20
                int 21h
                cmp al,1fh
                jle PASSWORD
        OK:     inc Ara
        PASSWORD:       mov ah,2h
                        mov dx,650h
                        int 10h
                        mov ah,9h
                        mov dx,offset PWRD
                        int 21h
                        mov ah,1h
                        int 21h
                        cmp al,43h
                jne ERR2
                int 21h
                cmp al,4fh
                jne ERR2
                int 21h
                cmp al,41h
                jne ERR2
                int 21h
                cmp al,52h
                jne ERR2
                int 21h
                cmp al,43h
                jne ERR2
                int 21h
                cmp al,1fh
                jle OK2
                ERR2:   mov cx,20h
                        int 21h
                        cmp al,1fh
                        jle OKNBA
                        loop ERR2
                OK2:    inc Ara
                OKNBA:  cmp Ara,32h
                        je OKNA
                        inc ULIT
                        mov ah,2h
                mov dx,080ah
                int 10h
                mov ah,9h
                mov dx,offset E
                int 21h
                cmp ULIT,3
                jne ULIT1
                mov ah,4ch
                int 21h
                ret
                OKNA:   mov ah,2h
                mov dx,080ah
                int 10h
                mov ah,9h
                mov dx,offset PASSACC
                int 21h
                int 20h
end   start



i hope anyone will reply asap...

tnx!!!

god Bless!!



something like..you will enter a 3 letter password,then if it isn't correct it will say," Sorry! password is not Correct!
or else if it is correct it'll say,"Your Password is Correct!!"

hope anyone can help me...[font=Courier New]

User is offlineProfile CardPM
+Quote Post

kapax
RE: How Can I Make A PAssword Program In TASM?
25 Aug, 2008 - 11:13 AM
Post #2

New D.I.C Head
*

Joined: 2 Jul, 2008
Posts: 39



Thanked: 1 times
My Contributions
Do you have to use TASM?
A 32bit assembler code, written with MASM32 or MASM would be much easier to read and understand. And it would also be faster.
User is offlineProfile CardPM
+Quote Post

ara1026
RE: How Can I Make A PAssword Program In TASM?
28 Aug, 2008 - 02:08 AM
Post #3

New D.I.C Head
*

Joined: 5 Aug, 2008
Posts: 6

QUOTE(kapax @ 25 Aug, 2008 - 12:13 PM) *

Do you have to use TASM?
A 32bit assembler code, written with MASM32 or MASM would be much easier to read and understand. And it would also be faster.


it has to be in tasm eh..

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 06:07AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month