<?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:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Fotis' blog</title>
	<atom:link href="http://fotisl.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://fotisl.wordpress.com</link>
	<description>Blooooooog</description>
	<pubDate>Fri, 07 Jul 2006 13:22:08 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
	<language>en</language>
			<item>
		<title>Hardware MP3 Players.</title>
		<link>http://fotisl.wordpress.com/2006/07/07/hardware-mp3-players/</link>
		<comments>http://fotisl.wordpress.com/2006/07/07/hardware-mp3-players/#comments</comments>
		<pubDate>Fri, 07 Jul 2006 11:29:59 +0000</pubDate>
		<dc:creator>Fotis</dc:creator>
		
		<category><![CDATA[Hardware Projects]]></category>

		<guid isPermaLink="false">https://fotisl.wordpress.com/2006/07/07/hardware-mp3-players/</guid>
		<description><![CDATA[Recently i&#8217;ve been searching for hardware mp3 players. What i found is that most of them are based on the STA013 chip from STMicroelectronics and the VS1001 from VLSI Solution. Also the majority is using a PICmicro microcontroller by Microchip or an ATmega microcontroller from Atmel. A list of interesting projects i found is the [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Recently i&#8217;ve been searching for hardware mp3 players. What i found is that most of them are based on the <a href="http://www.st.com/stonline/products/literature/ds/6399/sta013.htm" target="_blank">STA013</a> chip from <a href="//www.st.com" title="STMicroelectronics" target="_blank">STMicroelectronics</a> and the <a href="http://www.vlsi.fi/vs1001/vs1001.shtml" title="VS1001">VS1001</a> from <a href="http://www.vlsi.fi/" title="VLSI Solution" target="_blank">VLSI Solution</a>. Also the majority is using a PICmicro microcontroller by <a href="http://www.microchip.com" title="Microchip" target="_blank">Microchip</a> or an ATmega microcontroller from <a href="http://www.atmel.com" title="Atmel" target="_blank">Atmel</a>. A list of interesting projects i found is the following:</p>
<ol>
<li><a href="http://www.ladyada.net/make/minty/" target="_blank">Minty MP3</a></li>
<li><a href="http://www.pjrc.com/tech/mp3/index.html" target="_blank">PJRC High Capacity MP3 Player Circuit Board Project</a></li>
<li><a href="http://www.mpic3.com/" target="_blank">MPIC3.com - Microchip PIC based MP3 Player Project development boards &amp; code</a></li>
<li><a href="http://www.frankvh.com/mp3player/hwdetails.htm" target="_blank">Homemade USB 2 Harddrive MP3 Player Hardware Details</a></li>
<li><a href="http://www.robs-projects.com/mp3proj/newplayer.html" target="_blank">MP3 Player Schematic and Hardware</a></li>
<li><a href="http://www.myplace.nu/mp3/" target="_blank">yampp - Yet Another MP3 Player</a></li>
<li><a href="http://oxygen.it.net.au/mp3/index.html" target="_blank">OxygenMP3 Hardware MP3 Player</a></li>
<li><a href="http://www.indata.si/grega/megapeg.htm" target="_blank">megaPEG ©grega</a></li>
<li><a href="http://www.geocities.com/SiliconValley/Circuit/3150/" target="_blank">MoP3 project &#8212; MP3 hardware player with HC11</a></li>
<li><a href="http://users.pandora.be/jon/mp3/zplayer.html" target="_blank">Z-Player MP3 project</a></li>
<li><a href="http://pruk2000.free.fr/home.htm" target="_blank">PRuk2000</a></li>
<li><a href="http://home.hetnet.nl/%7Evictorvanacht/" target="_blank">Hardware MP3-player</a></li>
</ol>
<p>Hint: Check out the page <a href="http://ladyada.net/resources/procurement.html" target="_blank">Procuring Electronic Components</a> at Minty MP3&#8217;s site. It has tips on getting free samples <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/fotisl.wordpress.com/28/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/fotisl.wordpress.com/28/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fotisl.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fotisl.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fotisl.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fotisl.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fotisl.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fotisl.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fotisl.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fotisl.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fotisl.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fotisl.wordpress.com/28/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fotisl.wordpress.com&blog=246471&post=28&subd=fotisl&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fotisl.wordpress.com/2006/07/07/hardware-mp3-players/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Thessaloniki calling! (no, not london)</title>
		<link>http://fotisl.wordpress.com/2006/06/26/thessaloniki-calling-no-not-london/</link>
		<comments>http://fotisl.wordpress.com/2006/06/26/thessaloniki-calling-no-not-london/#comments</comments>
		<pubDate>Mon, 26 Jun 2006 12:19:35 +0000</pubDate>
		<dc:creator>Fotis</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">https://fotisl.wordpress.com/2006/06/26/thessaloniki-calling-no-not-london/</guid>
		<description><![CDATA[It&#8217;s been a while since my last post. I&#8217;ve been away from home and i didn&#8217;t have the time to write a post so i&#8217;m back once again with a little proggy!
I&#8217;m from thessaloniki, a city in northen Greece. All greeks know about certain &#8216;mistakes&#8217; we make when we talk and some strange words we [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>It&#8217;s been a while since my last post. I&#8217;ve been away from home and i didn&#8217;t have the time to write a post so i&#8217;m back once again with a little proggy!</p>
<p>I&#8217;m from thessaloniki, a city in northen Greece. All greeks know about certain &#8216;mistakes&#8217; we make when we talk and some strange words we use. So i decided to make a thessalonikia (the way we speak in thessaloniki) translator! It&#8217;s not complete yet but it&#8217;s under development! Since i am going to use regural expressions i decided to write it in perl. So, here it goes!</p>
<p><code></p>
<blockquote><p>
#!/usr/bin/perl</p>
<p>while() {<br />
  s/thessaloniki/saloniki/g;<br />
  s/thessalonikios/salonikios/g;<br />
  s/thessalonikia/salonikia/g;</p>
<p>  s/ o aderfos/ to karntasi/g;<br />
  s/ tou aderfou/ tou karntasiou/g;<br />
  s/ stou aderfou/ stou karntasiou/g;<br />
  s/ ton aderfo/ to karntasi/g;<br />
  s/ ston aderfo/ sto karntasi/g;<br />
  s/ aderfe/ karntasi/g;<br />
  s/ aderfos/ karntasi/g;</p>
<p>  s/ mou (\w*eis)/ me \1/g;<br />
  s/ mou (\w*ei)/ me \1/g;<br />
  s/ mou (\w*w)/ me \1/g;<br />
  s/ sou (\w*eis)/ se \1/g;<br />
  s/ sou (\w*ei)/ se \1/g;<br />
  s/ sou (\w*w)/ se \1/g;</p>
<p>  if (int(rand(10))) {<br />
    $letter = &#8220;&#8221;;<br />
  } else {<br />
    $letter = &#8220;l&#8221;;<br />
  }</p>
<p>  s/la/${letter}la/;</p>
<p>  if (int(rand(20))) {<br />
    $letter = &#8220;&#8221;;<br />
  } else {<br />
    $letter = &#8220;l&#8221;;<br />
  }</p>
<p>  s/lo/${letter}lo/;<br />
  s/le/${letter}le/;</p>
<p>  s/\.\s*Sovara\?/Plaka me kaneis?/g;<br />
  s/\.\s*sovara\?/plaka me kaneis?/g;</p>
<p>  s/(\.\s*)Afou (.*)\./\1\u\2 afou./g;<br />
  s/(\.\s*)afou (.*)\./\1\u\2 afou./g;</p>
<p>  print;<br />
}
</p></blockquote>
<p></code></p>
<p>If you want to add something here leave a comment!</p>
<p><ins datetime="2006-06-28T16:13:42+00:00">Update: Changed placement of afou and made a funny substitution (plaka me kaneis).</ins></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/fotisl.wordpress.com/27/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/fotisl.wordpress.com/27/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fotisl.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fotisl.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fotisl.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fotisl.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fotisl.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fotisl.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fotisl.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fotisl.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fotisl.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fotisl.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fotisl.wordpress.com&blog=246471&post=27&subd=fotisl&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fotisl.wordpress.com/2006/06/26/thessaloniki-calling-no-not-london/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Inline assembly for your c programs</title>
		<link>http://fotisl.wordpress.com/2006/06/12/inline-assembly-for-your-c-programs/</link>
		<comments>http://fotisl.wordpress.com/2006/06/12/inline-assembly-for-your-c-programs/#comments</comments>
		<pubDate>Mon, 12 Jun 2006 15:58:37 +0000</pubDate>
		<dc:creator>Fotis</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">https://fotisl.wordpress.com/2006/06/12/inline-assembly-for-your-c-programs/</guid>
		<description><![CDATA[I got a comment at a previous post about the inline assembly i used and what was that &#8217;strange&#8217; syntax of the asm construct with those &#8216;: :&#8217; so i decided to make a post about this. Inline assembly is to be used only at special cases e.g. using mmx/sse/sse2 instructions to optimize your code [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I got a comment at a previous post about the inline assembly i used and what was that &#8217;strange&#8217; syntax of the asm construct with those &#8216;: :&#8217; so i decided to make a post about this. Inline assembly is to be used only at special cases e.g. using mmx/sse/sse2 instructions to optimize your code or a special instruction like cpuid to get cpu information.<br />
First of all a small introduction. I&#8217;m going to use x86 assembly (another architecture some other time) and the gnu c compiler. It uses the at&amp;t syntax (there is support for intel syntax but it sucks). For all of you who are not familiar with at&amp;t syntax here are some things you must know:</p>
<ul>
<li>Registers<br />
The names of all registers begin with %. So if we want to use the eax register we write %eax.</p>
<li>Immediate operants<br />
All immediate operants begin with $. So 0xdeadbeef becomes $0xdeadbeef.</p>
<li>Indirect memory references<br />
Indirect memory references are done using ( ). So if we want the byte pointed by register esi we use (%esi).</p>
<li>Ordering<br />
The source and destination ordering is:<br />
instruction source, destination<br />
It&#8217;s the reverse of the intel syntax.</p>
<li>Size of operant<br />
For all instructions that can take operants that have variable sizes you must write this size. The sizes are:</p>
<ul>
<li>b - Byte (1 byte)
<li>w - Word (2 bytes)
<li>l - Long (4 bytes)
</ul>
</ul>
<p>For an example showing the above we&#8217;re going to move the value 0xcafebabe to the location pointed by %edi. What we&#8217;re going to use is:<br />
movl $0xcafebabe, (%edi)<br />
After this introduction we&#8217;re getting into the main part of the post, inline assembly. To put inline assembly into one of your programs you must use the &#8220;asm&#8221; construct. WARNING! This is NOT ansi c! Each compiler uses it&#8217;s own constructs and the same compiler may use different ones for different architectures! What i&#8217;m going to show you is only for the gnu compiler and for the x86 architecture. The syntax of the &#8220;asm&#8221; construct is:<br />
asm( assembly code : output operants (optional) : input operants (optional) : globbered registers);<br />
The output operants and input operants consists of a list of the form:<br />
&#8220;constraint&#8221; (variable), &#8220;constraint&#8221; (variable), &#8230;<br />
At the output operants, constraint shows what is going to be placed at the variable and at the input operants where is the variable going to be placed.<br />
The constraints can take the following values:</p>
<ul>
<li>r - any register
<li>a - eax register
<li>b - ebx register
<li>c - ecx register
<li>d - edx register
<li>S - esi register
<li>D - edi register
<li>f - floating point register
<li>t - first floating point register
<li>u - second floating point register
<li>m - memory operant
<li> matching operant
</ul>
<p>Let&#8217;s see some examples now.<br />
First a simple one. We want to put the value of variable kot to the register ebx.<br />
<code></p>
<blockquote><p>
asm(&#8221;movl %0, %%ebx\n&#8221; : : &#8220;m&#8221; (kot));
</p></blockquote>
<p></code><br />
%0 gets substituted with the location of kot and then the value is moved to register ebx.<br />
Now let&#8217;s put the value of koko to lala. Both of them are at some locations at memory and we can&#8217;t use two memory references at the same instruction. So what we are going to do is put the value of koko to eax and then move eax to to lala.<br />
<code></p>
<blockquote><p>
asm(&#8221;movl %%eax, %0\n&#8221; : &#8220;=m&#8221; (lala) : &#8220;a&#8221; (koko));
</p></blockquote>
<p></code><br />
Since we use the &#8220;a&#8221; constraint before putting the assembly instructions the compiler first moves the value of koko to eax. Of course this could be done using two instructions.<br />
<code></p>
<blockquote><p>
asm(&#8221;movl %1, %%eax\n movl %%eax, %0\n&#8221; : &#8220;=m&#8221; (lala) : &#8220;m&#8221; (koko) : &#8220;%eax&#8221; );
</p></blockquote>
<p></code><br />
You should note that since eax changes value inside the instructions we put it in the list of globbered registers.<br />
Some times we need to use the same register for both input and output. So what we do is use matching constraints. In the following example we are going to increase the value of kot by one.<br />
<code></p>
<blockquote><p>
asm(&#8221;incl %0\n&#8221; : &#8220;=a&#8221; (kot) : &#8220;0&#8243; (kot));
</p></blockquote>
<p></code><br />
Some times the compiler while optimizing our code changes the location of the instructions. As an example the compiler could move something we put inside a loop and put it before or after the loop. To instruct the compiler to leave the code to the place we put it we use the volatile keyword. So the above example becomes<br />
<code></p>
<blockquote><p>
asm volatile (&#8221;incl %0\n&#8221; : &#8220;=a&#8221; (kot) : &#8220;0&#8243; (kot));
</p></blockquote>
<p></code><br />
Well, this was a simple introduction. I hope you find it useful. Check the GCC-Inline-Assembly-HOWTO for more info.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/fotisl.wordpress.com/26/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/fotisl.wordpress.com/26/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fotisl.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fotisl.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fotisl.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fotisl.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fotisl.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fotisl.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fotisl.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fotisl.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fotisl.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fotisl.wordpress.com/26/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fotisl.wordpress.com&blog=246471&post=26&subd=fotisl&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fotisl.wordpress.com/2006/06/12/inline-assembly-for-your-c-programs/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Frappistmas and the star</title>
		<link>http://fotisl.wordpress.com/2006/06/10/frappistmas-and-the-star/</link>
		<comments>http://fotisl.wordpress.com/2006/06/10/frappistmas-and-the-star/#comments</comments>
		<pubDate>Sat, 10 Jun 2006 11:42:19 +0000</pubDate>
		<dc:creator>Fotis</dc:creator>
		
		<category><![CDATA[Frappé Cult]]></category>

		<guid isPermaLink="false">https://fotisl.wordpress.com/2006/06/10/frappistmas-and-the-star/</guid>
		<description><![CDATA[
One of the biggest holidays of the frappe cult is the frapistmas, the day when frappe was born. According to the gospel a star showed the way to the holy frappe to three magi. These magi went to the holy kitchen and gave their gifts, coffee, sugar and some straws. Since then every spring we [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><img src="http://fotisl.files.wordpress.com/2006/06/frappestar.jpg" alt="frappestar.jpg" align="left"><br />
One of the biggest holidays of the frappe cult is the frapistmas, the day when frappe was born. According to the gospel a star showed the way to the holy frappe to three magi. These magi went to the holy kitchen and gave their gifts, coffee, sugar and some straws. Since then every spring we celebrate the frappistmas, the born of the frappe!</p>
<p>
Now, from the official frappe cult homepage an exclusive picture of the holy kitchen and the star! A picture that all paparazzi would like to shoot but only we could get hold of it!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/fotisl.wordpress.com/24/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/fotisl.wordpress.com/24/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fotisl.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fotisl.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fotisl.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fotisl.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fotisl.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fotisl.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fotisl.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fotisl.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fotisl.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fotisl.wordpress.com/24/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fotisl.wordpress.com&blog=246471&post=24&subd=fotisl&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fotisl.wordpress.com/2006/06/10/frappistmas-and-the-star/feed/</wfw:commentRss>
	
		<media:content url="http://fotisl.files.wordpress.com/2006/06/frappestar.jpg" medium="image">
			<media:title type="html">frappestar.jpg</media:title>
		</media:content>
	</item>
		<item>
		<title>Playing with the return address</title>
		<link>http://fotisl.wordpress.com/2006/06/07/playing-with-the-return-address/</link>
		<comments>http://fotisl.wordpress.com/2006/06/07/playing-with-the-return-address/#comments</comments>
		<pubDate>Wed, 07 Jun 2006 14:21:05 +0000</pubDate>
		<dc:creator>Fotis</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">https://fotisl.wordpress.com/2006/06/07/playing-with-the-return-address/</guid>
		<description><![CDATA[Try this


#include &#60;stdio.h&#62;
#include &#60;stdlib.h&#62;
void lala(void)
{
  printf(&#8221;Hello world!\n&#8221;);
  exit(0);
}
int main(void)
{
  asm(&#8221;movl %%eax, 4(%%ebp)&#8221; : : &#8220;a&#8221; (lala));
}


Isn&#8217;t it nice?
What we&#8217;re doing here is very simple, just overwritting the return address from main() and changing it to the address of lala(). main() then returns to lala() which calls printf. Nice, isn&#8217;t it? Btw, this [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Try this</p>
<p><code></p>
<blockquote><p>
#include &lt;stdio.h&gt;<br />
#include &lt;stdlib.h&gt;</p>
<p>void lala(void)<br />
{<br />
  printf(&#8221;Hello world!\n&#8221;);<br />
  exit(0);<br />
}</p>
<p>int main(void)<br />
{<br />
  asm(&#8221;movl %%eax, 4(%%ebp)&#8221; : : &#8220;a&#8221; (lala));<br />
}
</p></blockquote>
<p></code></p>
<p>Isn&#8217;t it nice?<br />
What we&#8217;re doing here is very simple, just overwritting the return address from main() and changing it to the address of lala(). main() then returns to lala() which calls printf. Nice, isn&#8217;t it? Btw, this only works for the x86 platform!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/fotisl.wordpress.com/21/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/fotisl.wordpress.com/21/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fotisl.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fotisl.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fotisl.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fotisl.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fotisl.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fotisl.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fotisl.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fotisl.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fotisl.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fotisl.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fotisl.wordpress.com&blog=246471&post=21&subd=fotisl&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fotisl.wordpress.com/2006/06/07/playing-with-the-return-address/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Music and programming</title>
		<link>http://fotisl.wordpress.com/2006/06/05/music-and-programming/</link>
		<comments>http://fotisl.wordpress.com/2006/06/05/music-and-programming/#comments</comments>
		<pubDate>Mon, 05 Jun 2006 01:18:14 +0000</pubDate>
		<dc:creator>Fotis</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">https://fotisl.wordpress.com/2006/06/05/music-and-programming/</guid>
		<description><![CDATA[When i program i always listen to some music. What i have noticed is that there is a relationship between productivity, the type of program (big project or just a simple script), the language i write it and the type of music.
I listen a lot to greek music. My favorite artist is Nikos Makropoulos (&#8217;Ypopto [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>When i program i always listen to some music. What i have noticed is that there is a relationship between productivity, the type of program (big project or just a simple script), the language i write it and the type of music.<br />
I listen a lot to greek music. My favorite artist is Nikos Makropoulos (&#8217;Ypopto to aisthima sou&#8217;, &#8216;Katastasi ektaktou anagkias&#8217; and &#8216;Ypo to miden&#8217; are some of his best songs) but that doesn&#8217;t mean that i don&#8217;t listen to other greek quality singers like Panos Kiamos and Nikos Vertis. All of them are the so called &#8216;dog&#8217; singers (greek expression).<br />
Depending on the mood i also listen to house, reggae, rock and some times even electrofunk. What i can&#8217;t listen to are some types of metal like death metal and goth.<br />
So, let&#8217;s denote productivity as P, the type of program as T with 5 meaning a big project and 1 meaning a simple script, the language as L and type of music as M.<br />
L has the following values:<br />
5: C<br />
3: Assembly (btw, at&amp;t syntax rules, intel sucks <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> )<br />
2: Java, Perl, Shellscript<br />
1: Others (C++, &#8230;)<br />
M has the values:<br />
4: Greek music<br />
2: Other<br />
And the magic equation is</p>
<blockquote><p>
P = (T + L) * M
</p></blockquote>
<p>Some times i feel that the values of the variables can change depending on some other factors (e.g. weather, programming for fun and pleasure or for university, &#8230;) and especially M. Maybe some time i&#8217;ll find a new equation with more variables that gives a better result&#8230;</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/fotisl.wordpress.com/20/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/fotisl.wordpress.com/20/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fotisl.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fotisl.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fotisl.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fotisl.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fotisl.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fotisl.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fotisl.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fotisl.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fotisl.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fotisl.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fotisl.wordpress.com&blog=246471&post=20&subd=fotisl&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fotisl.wordpress.com/2006/06/05/music-and-programming/feed/</wfw:commentRss>
		</item>
		<item>
		<title>C editing with vim</title>
		<link>http://fotisl.wordpress.com/2006/06/03/c-editing-with-vim/</link>
		<comments>http://fotisl.wordpress.com/2006/06/03/c-editing-with-vim/#comments</comments>
		<pubDate>Sat, 03 Jun 2006 19:13:18 +0000</pubDate>
		<dc:creator>Fotis</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">https://fotisl.wordpress.com/2006/06/03/c-editing-with-vim/</guid>
		<description><![CDATA[I believe that the best editor for a programmer is vim. I have used it for quite some time and i found that all those features can make your life really easy. Some settings that may help you are the following.
First some general stuff:


set nocp
set number
set ruler


My coding style is softtabs and each tab is [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I believe that the best editor for a programmer is <a href="http://www.vim.org" target="_blank">vim</a>. I have used it for quite some time and i found that all those features can make your life really easy. Some settings that may help you are the following.<br />
First some general stuff:<br />
<code></p>
<blockquote><p>
set nocp<br />
set number<br />
set ruler
</p></blockquote>
<p></code><br />
My coding style is softtabs and each tab is 2 spaces. So for some help for the indentation i use the following:<br />
<code></p>
<blockquote><p>
set cindent<br />
set expandtab<br />
set shiftwidth=2<br />
set tabstop=2
</p></blockquote>
<p></code><br />
Another very good feature of vim is syntax (for highlighting, folding, etc). The settings i use are:<br />
<code></p>
<blockquote><p>
syntax enable<br />
&#8221; I hate spaces at the end of a line so i want to highlight them.<br />
syntax match Error &#8220;\s\+$&#8221;
</p></blockquote>
<p>For the folding i always use the syntax method. I also made some mappings that help me with fold open/close:<br />
<code></p>
<blockquote><p>
set foldmethod=syntax<br />
syntax sync fromstart<br />
&#8221; Never fold at the beginning<br />
set foldlevelstart=99<br />
map   zo<br />
map   zc<br />
map   zR<br />
map   zM
</p></blockquote>
<p></code><br />
These are my general settings.<br />
Apart from these i use some plugins. A programmer <b>must</b> have the <a href="http://www.vim.org/scripts/script.php?script_id=273" target="_blank">taglist plugin</a>. It is a source code browser for your programs. It creates a window with all functions, variables, macros, etc that you have at your program and you can jump anywhere you want anytime. To use it you must also have the exuberant ctags utility, but you&#8217;re a programmer, you should have it! A mapping that i use is<br />
<code></p>
<blockquote><p>
map  :Tlist
</p></blockquote>
<p></code><br />
that allows me to open the browser at anytime by just pressing F11.<br />
Another plugin that i have installed is the <a href="http://www.vim.org/scripts/script.php?script_id=614" target="_blank">c reference plugin</a>. It has a complete c reference and you can find info about any command and any function at the standard c library by just using some keystrokes. To be honest i never needed it but you may find it usefull <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Finally i would suggest you to get vim7, the latest vim version. It has an autocomplete feature (try typing pri and press Ctrl-p !), it&#8217;s syntax for c is much better and it has many many other improvements.<br />
I think that&#8217;s all. I wrote this while watching an episode from a known tv series where jac^H^H^Hgod saves earth for the fifth time in five days (more to come about this in a new post). If i find something else or if there is a bug i&#8217;ll post again about vim <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><ins datetime="2006-06-04T17:29:01+00:00">Update: As dado1945 pointed out ctrl-p was in vim 6 too, only omni-complete was added. Sorry, i didn&#8217;t know this <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> But the menu was added in vim 7!</ins></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/fotisl.wordpress.com/19/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/fotisl.wordpress.com/19/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fotisl.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fotisl.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fotisl.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fotisl.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fotisl.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fotisl.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fotisl.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fotisl.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fotisl.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fotisl.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fotisl.wordpress.com&blog=246471&post=19&subd=fotisl&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fotisl.wordpress.com/2006/06/03/c-editing-with-vim/feed/</wfw:commentRss>
		</item>
		<item>
		<title>New page about the particle computer</title>
		<link>http://fotisl.wordpress.com/2006/06/02/new-page-about-the-particle-computer/</link>
		<comments>http://fotisl.wordpress.com/2006/06/02/new-page-about-the-particle-computer/#comments</comments>
		<pubDate>Fri, 02 Jun 2006 11:08:16 +0000</pubDate>
		<dc:creator>Fotis</dc:creator>
		
		<category><![CDATA[Sensor Networks]]></category>

		<guid isPermaLink="false">https://fotisl.wordpress.com/2006/06/02/new-page-about-the-particle-computer/</guid>
		<description><![CDATA[I have created a new page about the particle computer and a threads implementation i made. For the moment the threads implementation isn&#8217;t public but you can email me for details about it. If you have worked with particles you can leave a comment and share your experiences.
       ]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I have created a new page about the particle computer and a threads implementation i made. For the moment the threads implementation isn&#8217;t public but you can email me for details about it. If you have worked with particles you can leave a comment and share your experiences.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/fotisl.wordpress.com/12/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/fotisl.wordpress.com/12/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fotisl.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fotisl.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fotisl.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fotisl.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fotisl.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fotisl.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fotisl.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fotisl.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fotisl.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fotisl.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fotisl.wordpress.com&blog=246471&post=12&subd=fotisl&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fotisl.wordpress.com/2006/06/02/new-page-about-the-particle-computer/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The ice cube issue</title>
		<link>http://fotisl.wordpress.com/2006/06/01/the-ice-cube-issue/</link>
		<comments>http://fotisl.wordpress.com/2006/06/01/the-ice-cube-issue/#comments</comments>
		<pubDate>Thu, 01 Jun 2006 12:55:37 +0000</pubDate>
		<dc:creator>Fotis</dc:creator>
		
		<category><![CDATA[Frappé Cult]]></category>

		<guid isPermaLink="false">https://fotisl.wordpress.com/2006/06/01/the-ice-cube-issue/</guid>
		<description><![CDATA[The number of ice cubes you put inside your frappe is another issue at the frappe cult. The writtings of our fathers aren&#8217;t clear about this subject. The official position of our cult is three or four cubes. I personally think four is the best, at least at summer. Also it helps at the ritual [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The number of ice cubes you put inside your frappe is another issue at the frappe cult. The writtings of our fathers aren&#8217;t clear about this subject. The official position of our cult is three or four cubes. I personally think four is the best, at least at summer. Also it helps at the ritual of stiring the frappe and hearing the glack glack sound. This glack glack sound is a very important aspect of our cult and one of the ultimate pleasures. How many ice cubes do you put in your frappe? Help solve one of the main subjects of all our ecumenical councils!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/fotisl.wordpress.com/8/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/fotisl.wordpress.com/8/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fotisl.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fotisl.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fotisl.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fotisl.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fotisl.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fotisl.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fotisl.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fotisl.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fotisl.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fotisl.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fotisl.wordpress.com&blog=246471&post=8&subd=fotisl&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fotisl.wordpress.com/2006/06/01/the-ice-cube-issue/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How much sugar do you put in your frappe?</title>
		<link>http://fotisl.wordpress.com/2006/06/01/how-much-sugar-do-you-put-in-your-frappe/</link>
		<comments>http://fotisl.wordpress.com/2006/06/01/how-much-sugar-do-you-put-in-your-frappe/#comments</comments>
		<pubDate>Thu, 01 Jun 2006 12:41:28 +0000</pubDate>
		<dc:creator>Fotis</dc:creator>
		
		<category><![CDATA[Frappé Cult]]></category>

		<guid isPermaLink="false">https://fotisl.wordpress.com/2006/06/01/how-much-sugar-do-you-put-in-your-frappe/</guid>
		<description><![CDATA[A very important ingredient of a good frappe is the sugar. The frappe cult has no rules about this, anyone is allowed to worship his frappe with the amount of sugar he wants. I personally prefer zero sugar, just plain coffee! So, how much sugar do you put?
       ]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>A very important ingredient of a good frappe is the sugar. The frappe cult has no rules about this, anyone is allowed to worship his frappe with the amount of sugar he wants. I personally prefer zero sugar, just plain coffee! So, how much sugar do you put?</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/fotisl.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/fotisl.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fotisl.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fotisl.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fotisl.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fotisl.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fotisl.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fotisl.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fotisl.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fotisl.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fotisl.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fotisl.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fotisl.wordpress.com&blog=246471&post=7&subd=fotisl&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fotisl.wordpress.com/2006/06/01/how-much-sugar-do-you-put-in-your-frappe/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>