<?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>OmanDev &#187; Language</title>
	<atom:link href="http://www.omandev.net/tag/language/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.omandev.net</link>
	<description>Technical, computer related articles and projects.</description>
	<lastBuildDate>Sat, 17 Jul 2010 18:54:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>UPL</title>
		<link>http://www.omandev.net/2008/02/upl/</link>
		<comments>http://www.omandev.net/2008/02/upl/#comments</comments>
		<pubDate>Sun, 10 Feb 2008 15:47:00 +0000</pubDate>
		<dc:creator>Ali AL Lawati</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Language]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://66.147.242.194/~omandevn/wrd1/wordpress/?p=28</guid>
		<description><![CDATA[UPL : &#8220;Universal Programming Language&#8220;, or you can say UPL : &#8220;UPL is Programming Language&#8221;  .
It is an idea that we were thinking of for more than a year, and thanks to Yamani it is slowly coming to the reality.
The Idea 
As was discussed in many blogs few weeks ago, we need to find [...]


Related posts:<ol><li><a href='http://www.omandev.net/2007/10/jcodebase-1-1-beta/' rel='bookmark' title='Permanent Link: JCodeBase 1.1 Beta'>JCodeBase 1.1 Beta</a></li>
<li><a href='http://www.omandev.net/2009/01/why-python/' rel='bookmark' title='Permanent Link: Why Python'>Why Python</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://sourceforge.net/projects/upl/"><span style="font-weight: bold;">UPL </span></a>: &#8220;<span style="font-style: italic;">Universal Programming Language</span>&#8220;, or you can say <span style="font-weight: bold;">UPL </span>: &#8220;<span style="font-style: italic;">UPL is Programming Language</span>&#8221; <img src='http://www.omandev.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>It is an idea that we were thinking of for more than a year, and thanks to Yamani it is slowly coming to the reality.</p>
<p><span style="font-weight: bold;">The Idea </span><a href="http://www1.istockphoto.com/file_thumbview_approve/903223/2/istockphoto_903223_light_bulb_great_idea_icon.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 34px; height: 43px;" src="http://www1.istockphoto.com/file_thumbview_approve/903223/2/istockphoto_903223_light_bulb_great_idea_icon.jpg" border="0" alt="" /></a><br />
As was discussed in many blogs few weeks ago, we need to find good and intelligent ways to teach our children and &#8220;programming children&#8221; (those who are not Childs in real but newbie in programming world) about programming.</p>
<p>Thinking about that we can see (as we think) the two biggest obstacles faced by these two groups are:<br />
(<span style="font-style: italic;">1</span>) <span style="font-weight: bold;">The complex syntax</span>:<br />
come on how many people you know were able to understand the pointer of pointer of a function that takes a reference and a pointer in C++ from the first time <img src='http://www.omandev.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .<br />
(<span style="font-style: italic;">2</span>) <span style="font-weight: bold;">The Language</span>:<br />
by language we do not mean the programming language but the &#8220;English&#8221; language (even though it is becoming the universal language now, still lots of kids have problems in English learning it. (and come on who said programming must be in &#8220;English&#8221;).</p>
<p><span style="font-weight: bold;">What UPL can do about that!</span><br />
Well so what do UPL do exactly?<br />
It is not the direct solution to the problem, but it is one of the keys to the solution. It is a simple engine where you can create your own programming language with your own syntax, and with the human language that you desire.</p>
<p>The current version of UPL support a very simple syntax that is some how look like old quick basic. There is a language file where you can replace any keyword in the (English UPL)  to any other keyword in any other language or any other word in English itself , for example the keyword “Declare” could be changed to “dim” to look like visual basic more, or it can be changed to “Aref” the Arabic word the means declare, or even you can write in Arabic writing, French , Japanese, and like that it gives endless choices of creating your own language.</p>
<p>What happens inside the upl Editor is what ever syntax you are using it will be translated to the <span lang="FR-ML">English up</span><span> and then again the English upl is translated into JAVA</span> (in the current version the algorithim is updated to change any syntax to Java directly)  and finally java file is produced compiled and executed.</p>
<p><span style="font-weight: bold;">the syntax of current English UPL is very simple:</span></p>
<p><a href="http://2.bp.blogspot.com/_O0z0UIqoXjA/R68i8bNngTI/AAAAAAAAABk/VLy8G5Tq3F8/s1600-h/upl1.JPG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img id="BLOGGER_PHOTO_ID_5165385719109615922" style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://2.bp.blogspot.com/_O0z0UIqoXjA/R68i8bNngTI/AAAAAAAAABk/VLy8G5Tq3F8/s320/upl1.JPG" border="0" alt="" /></a><br />
<span style="font-weight: bold;"> </span><br />
<span style="font-weight: bold;"> </span></p>
<p><a href="http://3.bp.blogspot.com/_O0z0UIqoXjA/R68i8rNngUI/AAAAAAAAABs/qRn9sKJXuwg/s1600-h/upl2.JPG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img id="BLOGGER_PHOTO_ID_5165385723404583234" style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://3.bp.blogspot.com/_O0z0UIqoXjA/R68i8rNngUI/AAAAAAAAABs/qRn9sKJXuwg/s320/upl2.JPG" border="0" alt="" /></a></p>
<p><a href="http://sourceforge.net/project/showfiles.php?group_id=210899">download</a></p>
<p>UPL in action(Future)<br />
Well yes it is not in action yet (well it is still alpha, still it don’t have loops,still … , ….,….) but lets talk about future , what UPL can do when it gets into action. So lets see some possible futures for upl:<br />
<span style="font-weight: bold;">1- Engine for creating lots of educational programming language syntax </span>in different human language scripts (English , French, japanease, ….).<br />
<span style="font-weight: bold;"><br />
2- The same engine mentioned before could be use to make programming look more like story writing for kids </span>(I mean after a lot of modifications) a kid will be able to write some kind of story and clicking on run will show him the story happening infront of him ( well we will need to use graphical libraries for doing so).<br />
<span style="font-weight: bold;"><br />
3- Visual animated programming ( <span style="font-style: italic;">ummm imagine this </span>)</span> : a kid opens a software he drags an icon of a hummer with declare written on it then he writes “x=12” , next he will drag an icon of wondering rabbit that have if written between it ears and write “x&gt;10”, and continue programming in this way. We can see this drag and drop will create may be html document, and there will be a translation file from that kind of html into the English upl which will be automatically translated to java and run.</p>
<div class="blogger-post-footer">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
omandev.net English feed</div>


<p>Related posts:<ol><li><a href='http://www.omandev.net/2007/10/jcodebase-1-1-beta/' rel='bookmark' title='Permanent Link: JCodeBase 1.1 Beta'>JCodeBase 1.1 Beta</a></li>
<li><a href='http://www.omandev.net/2009/01/why-python/' rel='bookmark' title='Permanent Link: Why Python'>Why Python</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.omandev.net/2008/02/upl/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Assembly Language &#8211; Shift Instructions</title>
		<link>http://www.omandev.net/2007/08/assembly-language-shift-instructions/</link>
		<comments>http://www.omandev.net/2007/08/assembly-language-shift-instructions/#comments</comments>
		<pubDate>Wed, 15 Aug 2007 23:07:00 +0000</pubDate>
		<dc:creator>Arkan Hadi</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Assembly]]></category>
		<category><![CDATA[Instructions]]></category>
		<category><![CDATA[Language]]></category>
		<category><![CDATA[Parity]]></category>
		<category><![CDATA[Programing]]></category>
		<category><![CDATA[Shift]]></category>

		<guid isPermaLink="false">http://66.147.242.194/~omandevn/wrd1/wordpress/?p=19</guid>
		<description><![CDATA[If you tried to search sites for advanced assembly language tutorials (Intel architecture). you will find that the number of the useful sites is relatively little compared to the other programming languages . therefore, and due to the lack of advanced assembly language tutorials, i am willing to share my humble knowledge in assembly programming [...]


Related posts:<ol><li><a href='http://www.omandev.net/2009/01/popular-posts-of-omandev/' rel='bookmark' title='Permanent Link: popular posts of OmanDev'>popular posts of OmanDev</a></li>
<li><a href='http://www.omandev.net/2009/01/%d8%a3%d9%81%d8%b6%d9%84-%d8%aa%d8%af%d9%88%d9%8a%d9%86%d8%a7%d8%aa-%d9%85%d8%b7%d9%88%d8%b1%d9%88%d8%a7-%d8%b9%d9%85%d8%a7%d9%86/' rel='bookmark' title='Permanent Link: أفضل تدوينات مطوروا عمان'>أفضل تدوينات مطوروا عمان</a></li>
<li><a href='http://www.omandev.net/2008/09/javascript-the-language-for-them-all-jquery-with-gridview-in-asp-net-2-0/' rel='bookmark' title='Permanent Link: JavaScript, the language for them all!! (Jquery with gridview in asp.net 2.0)'>JavaScript, the language for them all!! (Jquery with gridview in asp.net 2.0)</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>If you tried to search sites for advanced assembly language tutorials (Intel architecture). you will find that the number of the useful sites is relatively little compared to the other programming languages . therefore, and due to the lack of advanced assembly language tutorials, i am willing to share my humble knowledge in assembly programming with you all.</p>
<p>if you are not familiar with the term &#8220;Assembly Language Instructions&#8221;, this post is not for you. this post is dedicated to the people who already know the simple instructions of assembly language and want to know more advanced instructions in assembly language.</p>
<p>In this post i will explain the &#8220;Shift Instructions&#8221; ien Assembly Language, how to use it and finally the practical uses of those instructions.</p>
<p>i will explain the shift instructions for Unsigned binary numbers here.</p>
<p><span style="font-weight: bold;"><br />Explaining Shift Instructions:</p>
<p></span>Shift Instructions in assembly language is used to shift the most significant bit (MSB) or the least significant bit (LSB) in binary number (in a register or a variable).</p>
<p>Now you might ask, what is shifting??<br />for example if we have a binary number (e.g. 1111 0000)<br />using the shift instruction we can make 2 decisions:<br />1- if we choose to shift that binary number to the left by one bit the outcome will be (1110 0000)<br />2- if we choose to shift that binary number to the right by one bit the outcome will be (0111 1000)</p>
<p>Now you might ask another question, where did the (MSB) go? and what happened to the (LSB)?<br />well, in the first case the (left shifting) (MSB) (which is &#8220;one&#8221; in this case) went to some kind of temporary location called C-Flag (Carry-Flag), and an additional &#8220;zero&#8221; have been added to the right of the binary number and has become the new (LSB).</p>
<p>the same goes with the second case (right shifting), we took the (LSB) and put it in the C-Flag and then we added a &#8220;zero&#8221; to the left hence, the new (MSB) is &#8220;zero&#8221;.</p>
<p>you can imagine the C-flag as a Box, whenever you remove a bit from a binary number you put that bit in that box before you throw it a way!</p>
<p><span style="font-weight: bold;">Code Explaination for Shift Instructions:</span></p>
<p>i am sure that all programmers now are saying &#8220;WTH does that mean??&#8221;.<br />i am also a programmer and i understand codes better then plain English!!! so, if you didnt understand what i wrote about the shift instruction previously, i am sure that you will understand it in this sections.</p>
<p>lets assume that we have the following binary number in the register DL,<br /><code><br /><span style="font-weight: bold; color: rgb(255, 0, 0);"><br />
<blockquote>mov        DL, 10101111B                      ; equivalent to 175 in decimal<br />shl        DL, 1           ; means shift the binary number in DL to the left by "one" bit </p></blockquote>
<p> </span><br /></code><br />the outcome of the previous instructions will be as follows:<br />1- DL will be equal to &#8220;0101 1110&#8243;    (moved the MSB to the C-flag and added &#8220;zero&#8221; to the right)<br />0101 1110 is equivalent to 94 in decemal.<br />2- C-flag will be equal to &#8220;one&#8221;, because the bit we moved from the binary number was &#8220;one&#8221;.<br />if we keep on repeating the shift instruction (shl &#8211; SHift to the Left) on the same binary number we will get the following results:</p>
<p><span style="font-weight: bold;">Left Shifting:<br /><code><br /></code></span>                            <span style="text-decoration: underline;">Code&#8212;&#8212;&#8212;&#8211;N</span>umber before shifting                                                &#8212;&#8212;&#8212;Number after shifting<br /><span style="font-weight: bold;">shl        DL, 1                 </span>                        &#8212;&#8212;&#8212;&#8211;10101111   (175 decimal)&#8212;&#8212;&#8211;01011110   (94 decimal)<span style="font-weight: bold;"><br /></span><span style="font-weight: bold;">shl        DL, 1                                </span>&#8212;&#8212;&#8212;- 01011110 (94 decimal) &#8212;&#8212;&#8212;10111100 (188 decimal)<br /><span style="font-weight: bold;">shl        DL, 1                               </span>            &#8212;&#8212;&#8212;&#8211;10111100   (188 decimal)                                               &#8212;&#8212;-01111000    ( 120 decimal)<br /><span style="font-weight: bold;">shl        DL, 1                               </span>            &#8212;&#8212;&#8212;&#8211;01111000    ( 120 decimal)                                          &#8212;&#8212;11110000   (240 decimal)</p>
<p>if you keep on going you will naturally get all zeros at the end.<br />Now you might ask &#8220;Why is this guy keep on putting the decimal equivalents???&#8221;<br />if you noticed the pattern you will find that if we shifted a &#8220;zero&#8221; from the left, the number will be <span style="font-weight: bold; font-style: italic;">DOUBLE</span> the number (as in the case in the second and fourth instructions) before shifting, but if we shifted a &#8220;one&#8221; the new number will just be different.</p>
<p><span style="font-weight: bold;"><span style="font-weight: bold;">Right Shifting:<br /><code></code></span></span>Code&#8212;&#8212;&#8212;&#8212;Number before shifting                                            &#8212;&#8212;&#8212;- -Number after shifting<br /><span style="font-weight: bold;">shr        DL, 1                             </span>            &#8212;&#8212;-10101111   (175 decimal)<span style="font-weight: bold;">                            </span>&#8212;&#8212;&#8212;-                     01010111   (87 decimal)<span style="font-weight: bold;"><br /></span><span style="font-weight: bold;">shr        DL, 1                               &#8212;&#8212;-</span>             01010111   (87 decimal)                                                    &#8212;&#8212;&#8212;- 00101011    (43 decimal)<br /><span style="font-weight: bold;">shr        DL, 1                               </span>             &#8212;&#8212;-00101011   (43 decimal)                                                 &#8212;&#8212;&#8212;- 00010101    (21 decimal)<br /><span style="font-weight: bold;">shr        DL, 1                               </span>             &#8212;&#8212;-00010101    ( 21 decimal)                                               &#8212;&#8212;&#8212;- 00001010   (10 decimal)</p>
<p>here the pattern is terribly clear!!! as we shift a bit from the right the number will <span style="font-weight: bold;">always</span> be halved (i.e. divided by two) no matter what bit you shift (&#8220;zero&#8221; or &#8220;one&#8221;) if the number is odd the result after division will be lower rounded (e.g. 175/2 = 87.5) the number will be 87. again obviously if we keep on using right shifting instruction, the number will be halved everytime we use the instruction and naturally we will get all zeros at the end.</p>
<p><span style="font-weight: bold;">Example of using shift instructions:</span></p>
<p>this example will illustrate the importance of the shift instructions. if any of you have taken a course intitled &#8220;Digital Logic&#8221; (which most of you probably took it, because its essential prerequisite to assembly programming) you will be familiar with the terms &#8220;even parity&#8221; and &#8220;odd parity&#8221;. parity refers to the number of &#8220;ones&#8221; in a binary number (e.g. 1101 has &#8220;odd parity&#8221; because the number of &#8220;ones&#8221; in the number is &#8220;odd&#8221;), those are used to verify if a &#8220;message&#8221; sent by a computer has been received correctly in the other side. what happens is, after a message is sent, it transfers through the internet in the form of bits (zeros and ones) so, to verify if the message has been correctly sent and received the number of &#8220;ones&#8221; and whether the parity is odd or even is send along with the message, and when the receiver gets the message the first thing is to check the parity of the received message and compare it with the parity that has been sent by the sender, if they doesnt match then the message is definitely has been altered or some of the bits have been lost while transferring the message.<br />so, this program will check if the parity is &#8220;odd&#8221; or &#8220;even&#8221; in a particular binary number.<br /><code><br />                       </code><br />
<blockquote><span style="font-weight: bold; color: rgb(255, 0, 0);">                    mov         Ax, 0</span><br /><span style="font-weight: bold;"><span style="color: rgb(255, 0, 0);">                                                mov         Cx, 8</span><br /><span style="color: rgb(255, 0, 0);">                                            mov         DL, 10101111B</span><br /><span style="color: rgb(255, 0, 0);">Next:         shl              DL, 1</span><br /><span style="color: rgb(255, 0, 0);"> JC AddOne ; jump if C-flag = 1</span><br /><span style="color: rgb(255, 0, 0);">                                                loop        Next</span><br /><span style="color: rgb(255, 0, 0);">                         JMP        Done</span><br /><span style="color: rgb(255, 0, 0);">AddOne:       inc        Ax                                                          ; increment number of ones</span><br /><span style="color: rgb(255, 0, 0);">                         loop       Next</span><br /><span style="color: rgb(255, 0, 0);">Done:          mov       BL, 2  </span><br /><span style="color: rgb(255, 0, 0);">                         div           BL                                                        ; divide number of ones by 2</span><br /><span style="color: rgb(255, 0, 0);">                         mov        AL, AH</span><br /><span style="color: rgb(255, 0, 0);">                         mov         AH, 0</span><br /><span style="color: rgb(255, 0, 0);">                         call          putDec                                               ; &#8220;0&#8243; if the number is even else </span><span style="color: rgb(255, 0, 0);">&#8220;1&#8243; if the number is odd</span></p>
<p>            </span></p></blockquote>
<p><span style="font-weight: bold;"></p>
<p></span>
<div class="blogger-post-footer">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
omandev.net English feed</div>


<p>Related posts:<ol><li><a href='http://www.omandev.net/2009/01/popular-posts-of-omandev/' rel='bookmark' title='Permanent Link: popular posts of OmanDev'>popular posts of OmanDev</a></li>
<li><a href='http://www.omandev.net/2009/01/%d8%a3%d9%81%d8%b6%d9%84-%d8%aa%d8%af%d9%88%d9%8a%d9%86%d8%a7%d8%aa-%d9%85%d8%b7%d9%88%d8%b1%d9%88%d8%a7-%d8%b9%d9%85%d8%a7%d9%86/' rel='bookmark' title='Permanent Link: أفضل تدوينات مطوروا عمان'>أفضل تدوينات مطوروا عمان</a></li>
<li><a href='http://www.omandev.net/2008/09/javascript-the-language-for-them-all-jquery-with-gridview-in-asp-net-2-0/' rel='bookmark' title='Permanent Link: JavaScript, the language for them all!! (Jquery with gridview in asp.net 2.0)'>JavaScript, the language for them all!! (Jquery with gridview in asp.net 2.0)</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.omandev.net/2007/08/assembly-language-shift-instructions/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
