Skip to main content

Create Simple Password Program In Assembly

Here's a simple password program written in Assembly language to verify users. Using A86 assembler to compile and run the program. If you want to create your very first assembly, read this post: http://codewall.blogspot.com/2011/06/create-your-first-assembly-program-step.html

Display: version 1



Source Code: version 1
001start: jmp main
002
003 den db 0ah, 0dh, "Access Denied. $"
004 grant db 0ah, 0dh, "Access Granted. $"
005 ent db "Enter Password: $"
006  
007 ctr db 0h
008    
009main proc
010
011  mov ctr,1
012     
013  mov ah,09h
014  lea dx,ent
015  int 21h
016   
017  cmp ctr,1
018  je loop1G
019press: 
020  cmp ctr,2
021  je loop2G
022   
023  cmp ctr,3 
024  je loop3G
025   
026press2: 
027  cmp ctr,2
028  je mislead1
029   
030  cmp ctr,3
031  je loopD
032          
033loop1G:   
034  mov ctr,2
035   
036  mov ah,01
037  int 21h
038   
039  cmp al,"V"
040  je press
041   
042  cmp al,"V"
043  jne press2 
044
045loop2G:
046  mov ctr,3
047   
048  mov ah,01
049  int 21h
050   
051  cmp al,"M"
052  je press
053   
054  cmp al,"M"
055  jne press2
056   
057mislead1:
058  mov ctr,3
059   
060  mov ah,01
061  int 21h
062   
063  cmp al,"M"
064  je press2
065   
066  cmp al,"M"
067  jne press2  
068   
069loop3G:
070  mov ctr,4
071   
072  mov ah,01
073  int 21h
074   
075  cmp al,"G"
076  je dispG   
077
078loopD: 
079  mov ctr,4
080   
081  mov ah,01
082  int 21h
083      
084  cmp al,"G"
085  je dispD
086   
087  cmp al,"G"
088  jne dispD
089       
090dispD:
091 mov ah,09h
092 lea dx,den
093 int 21h
094 int 20h
095
096dispG:
097 mov ah,09h
098 lea dx,grant
099 int 21h
100 int 20h
101
102main endp
103end start

Display: version 2 - using asterisk (*)



Source Code: version 2 - using asterisk (*)
01start: jmp main
02
03 str1 db "password: $"
04    
05main proc
06
07  mov ah,09
08  lea dx,str1
09  int 21h
10   
11press:
12  mov ah,07
13  int 21h
14   
15  mov bl,al
16   
17  mov ah,02
18  mov dl,"*"
19  int 21h
20   
21  cmp bl,0dh
22  jne press
23   
24  int 20h
25
26main endp
27end start

Comments

Popular posts from this blog

Off-Page SEO – 7 Tips On How To Build BackLinks

Well a site cannot get expected traffic without doing seo in the world of completion. After introducing  on page seo . Now come back to introduce off page seo and basics of off page seo. As the word off page seo shows to do seo staying off from own page. Means to optimize a website from other sources. In simple a short we can define it as link building or creating backlinks. Off page seo helps site to get rank in search engines.   Fairly Off page seo is to create and build backlinks from several of ways. Off page seo is a hungriness of backlinks.”There so many ways to do off page seo or creating backlinks but now, let me show you how to build links to your pages: 1. Profile Pages Build Profile Pages in the top Social Media sites like: Google+ Profiles-           https://profiles.google.com            (A Must) Facebook Pages –     ...

August 6, 2017 CSE-PPT Professional Level - List of Passers (REGION XII)

August 6, 2017 CSE-PPT Professional Level  - List of Passers Civil Service Commission Regional Office No. 12 SOURCE: PRC ABALOS, ROMEO III G ABANG, CHRISTIAN MARK B ABAS, AMIRA A ABBA, BRYAN M ABDULADSIS, SAYEED MOHBEN K ABDULSATAR, SAHID M ABEAR, KRIZIA ANDREA Q ABELLON, SHIENA MAE F ABING, MARY SOL T ABOLENCIA, SEAN HOPE C ACIDO, DANIEL CARLO G ACUPAN, NONA MARIE P ADANG, SAIMA D ADELAN, MAILA LOUISA N ADVENTAJADO, CLYDELL S AGAD, LUCILLE ANGELIKKA DC AGAWA, YSA LOU S AGCARAO, APRIL BERNADETH P AGUILAR, RUTH D AGUJA, MARCO D AGURING, FROILAN J AJOC, LOVELL L AKIL, SAGUIRA M ALAMADA, SHAINETRA C ALAMAN, OMAR ADRIANNE P ALBARAN, GLORY GRACE C ALBRANDO, GERALDINE P ALCANTARA, KIMBERLY V ALCOBA, MARY ANN L ALCORDO, QUENNIE N ALDAVE, ANNABELLE JOY B ALLAGA, LOREN F ALLOSO, MERCY FE N ALMOJALLAS, JAN MARIE MAY J ALONZO, CHARMAINE KLAIRE A ALTIZO, ALEN JANE E ALURAN, ELLEN JANE C ALVAREZ, NEALL DOMINICK T AMAN, JOHN PAUL C AMANDE, JOEVEN A AMBAY, ARRIZ PAULA D AMER, ABJUHARY H AMINO, ...

Future Pinoy scientists, a Museum of Natural History

Michael Purugganan, when he was an elementary student at Union Science Elementary School in Malate, used to sneak into the National Science Development Board premises, where he would spend hours in a small museum.  "It just fascinated me. I just wanted to learn more about these things and what these people were doing there," Purruganan told GMA News Online.  "That was really what inspired me to become a scientist," said Purugganan, who is currently the Dean for Science at New York University and a world leader in evolutionary and ecological genomics.   With a new museum in the works, more young Filipinos may be inspired to become scientists. In a couple of years, the Philippines will have its own world class Museum of Natural History, showcasing endemic plants and animals that can be found in the country, according to a report on State of the Nation on January 23. Museums bridge the past and present, but the government believes these can also meet...