<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>TECHiE TALKS &#187; Assembly Language</title>
	<atom:link href="http://www.icpep.org/category/programming/assembly-language-programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.icpep.org</link>
	<description>Just another techie stuff</description>
	<lastBuildDate>Wed, 01 Feb 2012 23:59:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>Assembly Language Tutorial</title>
		<link>http://www.icpep.org/assembly-language-tutorial/</link>
		<comments>http://www.icpep.org/assembly-language-tutorial/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 02:32:43 +0000</pubDate>
		<dc:creator>paparts</dc:creator>
				<category><![CDATA[Assembly Language]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.icpep.org/?p=474</guid>
		<description><![CDATA[Here is another Assembly Language Tutorial Sample Program. This program is creating a fixed password to a certain application. This One of the basic examples unlike some of the other programs that passwords can be changed without accessing the source code. But here we created a program that has a fixed password abcdef. It is then displayed as a # when type from the keyboard. When password is correct the background color is the changed and the ASCII characters then [...]]]></description>
			<content:encoded><![CDATA[<p align="justify">Here is another Assembly Language Tutorial Sample Program.  This program is creating a fixed password to a certain application.  This One of the basic examples unlike some  of the other programs that passwords can be changed without accessing the source code.  But here we created a program that has a fixed password abcdef.  It is then displayed as a # when type from the keyboard. When password is correct the background color is the changed and the ASCII characters then is displayed.   A86 is used as the assembler for the program.  Below is a sample output of the program.</p>
<p style="text-align: center;"><img class="size-full wp-image-500 aligncenter" title="password_assemblylanguagetutorial" src="http://www.icpep.org/wp-content/uploads//password_assemblylanguagetutorial.jpg" alt="password_assemblylanguagetutorial" width="500" height="250" /><strong></strong></p>
<p><span id="more-474"></span><br />
<script type="text/javascript"><!--
google_ad_client = "pub-4547412119801593";
/* Assembly Language Tutorial */
google_ad_slot = "4908892565";
google_ad_width = 468;
google_ad_height = 15;
// --></script><br />
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script></p><pre class="crayon-plain-tag"><code>call clear		;clear the screen
call center

mov ah,09h		;display string
lea dx,msg2		;prints Enter password
int 21h

mov bl,3

again:
        mov ah,07		;direct keyboard input
        int 21h
        mov bh,al		;move the input al to bh
        cmp bh,0dh
        je again
        call asterisk
        cmp bh,'a'		;compare bh with J
        je again1		;if equal jump to again
        jne wrong		;if not to wrong

again1:
        mov ah,07
        int 21h
        mov bh,al
        cmp bh,0dh
        je invalid9
        call asterisk
        cmp bh,08h
        je again
        cmp bh,'b'		;compare bh with P
        je again2
        jne wrong
again2:
        mov ah,07
        int 21h
        mov bh,al
        call asterisk
        cmp bh,'c'		;compare bh with h
        je again3
        jne wrong

invalid9:
         call invalid8

 again3:
        mov ah,07
        int 21h
        mov bh,al
        call asterisk
        cmp bh,'d'		;compare bh with I
        je again4
        jne wrong

again4:
        mov ah,07
        int 21h
        mov bh,al
        call asterisk
        cmp bh,'P'		;compare bh with C
        je again5
        jne wrong
again5:
        mov ah,07
        int 21h
        mov bh,al
        call asterisk
        cmp bh,'e'		;compare bh with E
        je again6
        jne wrong
again6:
        mov ah,07
        int 21h
        mov bh,al
        call asterisk
        cmp bh,'f'		;compare bh with s
        je again7
        jne wrong

invalid8:
        call invalid

again7:
        mov ah,07
        int 21h
        mov bh,al
        cmp bh,0dh	;compare the input with the enter key
        je exit
        jne wrong

wrong:
        mov ah,07
        int 21h
        mov bh,al
        call asterisk
        cmp bh,0dh	;compare the input with the enter key
        je invalid
        jne wrong

invalid:
        call clear
        call center
        mov ah,09
        lea dx,msg1	;prints retry password
        int 21h
        dec bl		;decrements bl until 3 attempts
        cmp bl,0
        je invalid2
        jmp again

invalid2:
        call clear
        call center
        mov ah,09		;print password failed!!!
        lea dx,msg3
        int 21h
        int 20h

exit:
        call clear
        call center</code></pre><p><script type="text/javascript"><!--
google_ad_client = "pub-4547412119801593";
/* 665E59Assembly Language Tutorial Sample Program */
google_ad_slot = "8541998060";
google_ad_width = 250;
google_ad_height = 250;
// --></script><br />
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script></p><pre class="crayon-plain-tag"><code>;ASCII program

	mov ax,0600		;setting background
	mov bh, 30h		;color of the attribute
	mov cx,0000h		;where the color starts to point
	mov dx,184fh		;where the color ends to point
	int 10h			

	mov ax,0b800		;location of the screen
	mov es,ax		;location of the screen move to es register
	mov bx,60+(160*4)	;where the title starts to display and move to bx register
	mov si,msg4		;the message move to si register
	mov cx,16		;the numbers of letters that will display

print:

	mov al,b[si]		;the value of si is move to al register
	mov es:[bx],al		;move the value of al to the location of es:[bx]
	inc si			;increment the si
	add bx,2		;add bx by 1 for the attribute
	loop print		;looping
	int 21h			;to terminate the loop

	mov bh,0		;holds the characters
	mov di,160*8		;where the characters will display and move to di register
	mov cx,255		;the number of characetrs that will display

char:
        mov al,bh		;moving bh to the al register
        mov es:[di],al		;move the value of al is move to the location of es:[di]
        inc bh			;increment the bh
        add di,8		;to make 20 columns
        loop char		;looping
	int 20h			;to terminate the loop

msg4:db 'ASCII CHARACTERS'

msg3 db 'PASSWORD INCORRECT!DENIED ACCESS!$'
msg2 db 'PASSWORD: $'
msg1 db 'RETRY: $'

asterisk:			;prints asterisk
        mov ah,09h
        lea dx,ask
        int 21h
        ret

ask db '#$'

clear:			;clear screen
        mov ax,03
        int 10h
center:			;set cursor at the center
        mov ah,02
        mov bh,00
        mov dh,12
        mov dl,33
        int 10h
        ret</code></pre>
<div id="seo_alrp_related"><h2>Posts Related to Assembly Language Tutorial</h2><ul><li><div class="seo_alrp_rl_content"><h3><a href="http://www.icpep.org/php-compare-date/" rel="bookmark">PHP Compare Date</a></h3><p>I was creating a program for a library and that is to have a system that will manage the borrowing of books. I was searching ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.icpep.org/howto-hello-world-in-c/" rel="bookmark">Howto Hello World in C++</a></h3><p>//Printing Hellow World! #include &lt;iostream&gt; int main() { std::cout &lt;&lt; "Hello World! \n"; system("pause"); return 0; } Line begins with //, indicating that the remainder ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.icpep.org/filezilla-saved-passwords/" rel="bookmark">Filezilla Saved Passwords</a></h3><p>Filezilla is an FTP Client used for transferring files from one host to the other or is used to exchange and manipulate files over a ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.icpep.org/bubble-sort-and-graphics-h-in-dev-c/" rel="bookmark">Bubble Sort and Graphics.h in Dev C++</a></h3><p>Lately I have been searching  this post on the net about graphics.h in dev c++ and found few resources about it .  So I decided ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.icpep.org/set-boot-to-cd-rom/" rel="bookmark">Set Boot To CD ROM</a></h3><p>In most computers the first booting device set is the HD0 or your hard disk where your Operating System is installed or in older PC's ...</p></div></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.icpep.org/assembly-language-tutorial/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>

