<?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>Coobird's Blog &#187; Pitacalc</title>
	<atom:link href="http://blog.coobird.net/category/pitacalc/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.coobird.net</link>
	<description>What's going on at coobird.net?</description>
	<lastBuildDate>Sat, 10 May 2008 12:35:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Pitacalc on Projects Section</title>
		<link>http://blog.coobird.net/2007/10/08/pitacalc-on-projects-section/</link>
		<comments>http://blog.coobird.net/2007/10/08/pitacalc-on-projects-section/#comments</comments>
		<pubDate>Mon, 08 Oct 2007 12:57:02 +0000</pubDate>
		<dc:creator>coobird</dc:creator>
				<category><![CDATA[Pitacalc]]></category>

		<guid isPermaLink="false">http://blog.coobird.net/2007/10/08/pitacalc-on-projects-section/</guid>
		<description><![CDATA[Pitacalc has its own section under the Projects at coobird.net! Additional updates may or may not be posted on this blog.]]></description>
			<content:encoded><![CDATA[<p>Pitacalc has its own <a title="pitacalc section" href="http://projects.coobird.net/pitacalc">section </a>under the Projects at <a title="coobird.net link" href="http://coobird.net">coobird.net</a>!</p>
<p>Additional updates may or may not be posted on this blog.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.coobird.net/2007/10/08/pitacalc-on-projects-section/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pitacalc (Part 3)</title>
		<link>http://blog.coobird.net/2007/09/28/pitacalc-part-3/</link>
		<comments>http://blog.coobird.net/2007/09/28/pitacalc-part-3/#comments</comments>
		<pubDate>Fri, 28 Sep 2007 10:42:41 +0000</pubDate>
		<dc:creator>coobird</dc:creator>
				<category><![CDATA[Pitacalc]]></category>

		<guid isPermaLink="false">http://blog.coobird.net/2007/09/28/pitacalc-part-3/</guid>
		<description><![CDATA[As mentioned in the previous post, Pitacalc is able to adjust the number of registers the calculator uses. This register bank resizing feature can be performed by using the rrb instruction. As one can see above, using the reg command, there are ten registers by default. By typing in rrb 5 to perform a register [...]]]></description>
			<content:encoded><![CDATA[<p>As mentioned in the <a title="Pitacalc (Part 2)" href="http://blog.coobird.net/2007/09/27/pitacalc-part-2/">previous post</a>, Pitacalc is able to adjust the number of registers the calculator uses. This register bank resizing feature can be performed by using the <strong>rrb</strong> instruction.</p>
<div style="text-align: center"><img alt="Pitacalc - Resizing the registers" title="Pitacalc - Resizing the registers" id="image19" src="http://blog.coobird.net/wp-content/uploads/2007/09/pitacalc4.PNG" /></div>
<p>As one can see above, using the <code>reg</code> command, there are ten registers by default. By typing in <code>rrb 5</code> to perform a register resize, the subsequent <code>reg</code> command shows there are five registers. The <code>rrb 12</code> and the following <code>reg</code> shows 12 registers. It is possible have anywhere from 1 to 100 registers with Pitacalc.</p>
<p>More features have been added since the last post. The current build, 309, contains new features such as color mode for the console and output in <a target="_blank" title="Wikipedia: HTML" href="http://en.wikipedia.org/wiki/HTML">HTML</a> format.</p>
<p>Pitacalc is not a particularly useful tool that has many uses, but it does demonstrate how a computer performs calculations at the low level. Using Pitacalc is similar to programming a computer to do calculations in <a target="_blank" title="Wikipedia: Assembly language" href="http://en.wikipedia.org/wiki/Assembly_language">assembly language</a>. Although actual computers don&#8217;t work exactly like Pitacalc, having to enter instructions to perform calculations are similar.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.coobird.net/2007/09/28/pitacalc-part-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pitacalc (Part 2)</title>
		<link>http://blog.coobird.net/2007/09/27/pitacalc-part-2/</link>
		<comments>http://blog.coobird.net/2007/09/27/pitacalc-part-2/#comments</comments>
		<pubDate>Thu, 27 Sep 2007 15:52:34 +0000</pubDate>
		<dc:creator>coobird</dc:creator>
				<category><![CDATA[Pitacalc]]></category>

		<guid isPermaLink="false">http://blog.coobird.net/2007/09/27/pitacalc-part-2/</guid>
		<description><![CDATA[There are certain aspects that regular calculators do not have that Pitacalc does. For example, Pitacalc has multiple registers which can be used to store values. These values can be set by using an appropriately named set instruction. By typing specifying the register when performing the set instruction, one can set a value of the [...]]]></description>
			<content:encoded><![CDATA[<p>There are certain aspects that regular calculators do not have that Pitacalc does. For example, Pitacalc has multiple registers which can be used to store values. These values can be set by using an appropriately named <strong>set</strong> instruction.</p>
<p><img align="right" alt="Pitacalc - Setting registers" title="Pitacalc - Setting registers" id="image17" src="http://blog.coobird.net/wp-content/uploads/2007/09/pitacalc3.PNG" />By typing specifying the register when performing the <strong>set</strong> instruction, one can set a value of the register. For example, to set the register <strong>r0</strong> to the value <strong>10</strong>, type <code>set r0 10</code> and press enter. As can be seen on the right, the line after the <code>set</code> instruction is a <strong>0</strong>. This zero is the value stored in the accumilator. <strong>After executing any instruction, the value stored in the accumilator is returned.</strong> This is unaffected by the setting of register <strong>r0</strong>, hence the accumilator stays zero.</p>
<p>To check that register <strong>r0</strong> was set to <strong>10</strong>, we can use the <strong>reg</strong> instruction to show all the registers and their stored values. We can see that <strong>r0</strong> is indeed set to <strong>10</strong>. Another way to check the value of a specific register, just type in the name of the register. Here, typing in <code>r0</code> gives us the value <strong>10</strong>.</p>
<p>Pitacalc also allows renaming of registers. Any practical reasons? Perhaps the following image may illustrate one use:</p>
<p><img alt="Pitacalc - 42" id="image15" src="http://blog.coobird.net/wp-content/uploads/2007/09/pitacalc2.PNG" /></p>
<p>Here, the registers which had the default name of <strong>r0</strong> through <strong>r6</strong> were renamed to words. In this aspect, the registers work a little bit like variables in computer programming.</p>
<p>Renaming a register is performed by the <strong>ren</strong> instruction. By typing the register name to change followed by a new name, a register can be renamed. For example, in the above example, register <strong>r6</strong> was renamed to <strong>Everything</strong>. The instruction executed to perform the rename was <code>ren r6 Everything</code>.</p>
<p>Are ten registers not enough? No need to worry. Unlike a real world calculator, it&#8217;s possible to increase the number of registers with Pitacalc, up to 100. (Even this is an artificial limit that can be changed with minor changes in the program.) We&#8217;ll get into resizing the register bank next time.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.coobird.net/2007/09/27/pitacalc-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pitacalc &#8211; a command line interface calculator</title>
		<link>http://blog.coobird.net/2007/09/27/pitacalc/</link>
		<comments>http://blog.coobird.net/2007/09/27/pitacalc/#comments</comments>
		<pubDate>Thu, 27 Sep 2007 14:32:16 +0000</pubDate>
		<dc:creator>coobird</dc:creator>
				<category><![CDATA[Pitacalc]]></category>

		<guid isPermaLink="false">http://blog.coobird.net/2007/09/27/pitacalc/</guid>
		<description><![CDATA[Pitacalc is a command line interface calculator program. It&#8217;s works like a regular calculator by performing arithmetic operations and having an accumilator that keeps the running total. It also has several registers that can be used to temporarily store values. For those who are interested, the calculator is a Win32 console application, so it should [...]]]></description>
			<content:encoded><![CDATA[<p>Pitacalc is a <a target="_blank" title="Wikipedia: command line interface" href="http://en.wikipedia.org/wiki/Command_line_interface">command line interface</a> calculator program. It&#8217;s works like a regular calculator by performing arithmetic operations and having an accumilator that keeps the running total. It also has several registers that can be used to temporarily store values.</p>
<p>For those who are interested, the calculator is a <a target="_blank" title="Wikipedia: Win32 console" href="http://en.wikipedia.org/wiki/Win32_console">Win32 console application</a>, so it should run on Windows 95 and higher. Maybe even NT 4; not that I&#8217;ve tried.</p>
<p><img align="right" alt="Pitacalc Image 1" title="Pitacalc Image 1" id="image14" src="http://blog.coobird.net/wp-content/uploads/2007/09/pitacalc1.PNG" />Arithmetic operations are performed by typing in instructions. For example, to set the accumilator to <strong>100</strong>, one would type in <code>set 100</code>. To add <strong>200</strong> to that value, one would type in <code>add 200</code>. The result of <strong>300</strong> shows up on the line following the <code>add 200</code> line.</p>
<p>Although the example only shows adding one value to the accumilator, it is possible to add more than one value at a time to the accumilator. For example, by typing <code>sub 100 200</code>, the result of <strong>0</strong> will be returned.</p>
<p>Basically I was writing this calculator as practice programming in <a target="_blank" title="Wikipedia: C" href="http://en.wikipedia.org/wiki/C_(programming_language)">C</a>. After programming in <a target="_blank" title="Java" href="http://java.sun.com">Java</a> fairly exclusively for the past year or so, I thought it was time to brush up on some good ol&#8217; C. Having to juggle around <a target="_blank" title="Wikipedia: Pointer" href="http://en.wikipedia.org/wiki/Pointer_%28computing%29">pointers</a> between functions and calling <a target="_blank" title="Wikipedia: Malloc" href="http://en.wikipedia.org/wiki/Malloc">malloc</a> at every corner was loads of fun. (Please note the sarcasm in the previous sentence.)</p>
<p>Just to add useless features, the program accepts &#8220;scripts&#8221; of instructions to execute. Conversely, the output of the program can be dumped into an external file. I can&#8217;t think of any real use for this feature. Pitacalc has many features that really don&#8217;t have any real purpose.</p>
<p>Over the next few posts, I will introduce the great features (yes, that&#8217;s an overstatement) of Pitacalc. The current version 0.0.1 build 257. I&#8217;ll be adding more features (yes!) so the current version in the future will probably not be build 257.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.coobird.net/2007/09/27/pitacalc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

