<?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>ASM | Student Projects</title>
	<atom:link href="https://studentprojects.in/tag/asm/feed/" rel="self" type="application/rss+xml" />
	<link>https://studentprojects.in</link>
	<description>Microcontroller projects, Circuit Diagrams, Project Ideas</description>
	<lastBuildDate>Mon, 14 Mar 2022 13:53:33 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.7</generator>
	<item>
		<title>ASM program to arrange an array of data in ascending order using 8085</title>
		<link>https://studentprojects.in/electronics/microprocessor/asm-program-to-arrange-an-array-of-data-in-ascending-order-using-8085/</link>
					<comments>https://studentprojects.in/electronics/microprocessor/asm-program-to-arrange-an-array-of-data-in-ascending-order-using-8085/#respond</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Mon, 14 Mar 2022 05:56:31 +0000</pubDate>
				<category><![CDATA[Microprocessor]]></category>
		<category><![CDATA[ASM program]]></category>
		<category><![CDATA[8085]]></category>
		<category><![CDATA[ASM]]></category>
		<guid isPermaLink="false">https://studentprojects.in/?p=8714</guid>

					<description><![CDATA[<p>AIM: To write a program to arrange an array of data in ascending order ALGORITHM: Initialize HL pair as memory pointer Get the count at 4200 into C – register Copy it in D – register (for bubble sort (N-1) times required) Get the first value in A – register Compare it with the value</p>
<p>The post <a href="https://studentprojects.in/electronics/microprocessor/asm-program-to-arrange-an-array-of-data-in-ascending-order-using-8085/">ASM program to arrange an array of data in ascending order using 8085</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p><strong>AIM:</strong> To write a program to arrange an array of data in ascending order</p>



<p><strong>ALGORITHM:</strong></p>



<ol><li>Initialize HL pair as memory pointer</li><li>Get the count at 4200 into C – register</li><li>Copy it in D – register (for bubble sort (N-1) times required)</li><li>Get the first value in A – register</li><li>Compare it with the value at next location.</li><li>If they are out of order, exchange the contents of A –register and Memory</li><li>Decrement D –register content by 1</li><li>Repeat steps 5 and 7 till the value in D- register become zero</li><li>Decrement C –register content by 1</li><li>Repeat steps 3 to 9 till the value in C – register becomes zero</li></ol>



<p><strong>PROGRAM:</strong></p>



<pre class="wp-block-code"><code lang="wasm" class="language-wasm">        LXI H,4200
        MOV C,M
        DCR C 
REPEAT: MOV D,C
        LXI H,4201
LOOP:   MOV A,M
        INX H
        CMP M
        JC SKIP
        MOV B,M
        MOV M,A
        DCX H
        MOV M,B
        INX H
SKIP:   DCR D
        JNZ LOOP
        DCR C
        JNZ REPEAT
        HLT</code></pre>



<p><strong>OBSERVATION:</strong></p>



<figure class="wp-block-table"><table><tbody><tr><td><br><strong>Input:</strong></td><td><br>4200</td><td><br>05 (Array Size)</td></tr><tr><td><br></td><td>4201</td><td>05</td></tr><tr><td><br></td><td>4202</td><td>04</td></tr><tr><td><br></td><td>4203</td><td>03</td></tr><tr><td><br></td><td>4204</td><td>02</td></tr><tr><td><br></td><td>4205</td><td>01</td></tr><tr><td><br><strong>Output:</strong></td><td><br>4200</td><td><br>05(Array Size)</td></tr><tr><td><br></td><td>4201</td><td>01</td></tr><tr><td><br></td><td>4202</td><td>02</td></tr><tr><td><br></td><td>4203</td><td>03</td></tr><tr><td><br></td><td>4204</td><td>04</td></tr><tr><td><br></td><td>4205</td><td>05</td></tr></tbody></table></figure>



<p><strong>RESULT: </strong>Thus the given array of data was arranged in ascending order.</p><p>The post <a href="https://studentprojects.in/electronics/microprocessor/asm-program-to-arrange-an-array-of-data-in-ascending-order-using-8085/">ASM program to arrange an array of data in ascending order using 8085</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/electronics/microprocessor/asm-program-to-arrange-an-array-of-data-in-ascending-order-using-8085/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
