<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: helloworld code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Sat, 17 May 2008 19:09:25 GMT</pubDate>
    <description>DZone Snippets: helloworld code</description>
    <item>
      <title>Hello assambler</title>
      <link>http://snippets.dzone.com/posts/show/3949</link>
      <description>The canonical Hello World program in assambler.&lt;br /&gt;&lt;br /&gt;Compile it with:&lt;br /&gt;nasm -f elf hello.s&lt;br /&gt;ld -s -o hello hello.o&lt;br /&gt;&lt;br /&gt;Helloworld is a function. It uses the write system call to print to stdout (file descriptor 1).&lt;br /&gt;&lt;br /&gt;This is written in NASM (Intel) syntax, hence it will not work with gas, tasm or masm. It was written for Linux. The details may vary on other platforms.&lt;br /&gt;&lt;br /&gt;Download NASM for free at http://nasm.sourceforge.net/&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;section .data&lt;br /&gt;  hello: db "Hello world!",10&lt;br /&gt;  hellolen: equ $ - hello&lt;br /&gt;&lt;br /&gt;section .text&lt;br /&gt;  global _start&lt;br /&gt;&lt;br /&gt;_start:&lt;br /&gt;  call helloworld&lt;br /&gt;&lt;br /&gt;  mov eax,1 ; start exit procedure&lt;br /&gt;  mov ebx,0&lt;br /&gt;&lt;br /&gt;  int 80h&lt;br /&gt;&lt;br /&gt;helloworld:&lt;br /&gt;  mov eax,4 ; 4 is the code for the write system call&lt;br /&gt;  mov ebx,1 ; 1 is the fd for stdout&lt;br /&gt;  mov ecx,hello ; the address of the string&lt;br /&gt;  mov edx,hellolen ; the length of the string&lt;br /&gt;&lt;br /&gt;  int 80h ; trigger an interrupt; this should be 21h for DOS&lt;br /&gt;&lt;br /&gt;  ret&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Wed, 02 May 2007 18:40:17 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/3949</guid>
      <author>scvalex (Alexandru Scvortov)</author>
    </item>
    <item>
      <title>Mono - Hello World</title>
      <link>http://snippets.dzone.com/posts/show/3494</link>
      <description>using System;&lt;br /&gt;&lt;br /&gt;class HelloWorld&lt;br /&gt;{&lt;br /&gt; public static void Main()&lt;br /&gt; {&lt;br /&gt;  Console.WriteLine("Hello World !!!");&lt;br /&gt; }&lt;br /&gt;}</description>
      <pubDate>Mon, 12 Feb 2007 05:44:43 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/3494</guid>
      <author>whitetiger ()</author>
    </item>
    <item>
      <title>C++ - Hello World</title>
      <link>http://snippets.dzone.com/posts/show/2004</link>
      <description>&lt;code&gt;&lt;br /&gt;/*&lt;br /&gt; * &lt;br /&gt; * Semplice esempio di Hello World !!!&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;#include &lt;iostream&gt;&lt;br /&gt;&lt;br /&gt;using namespace std;&lt;br /&gt;&lt;br /&gt;int main(int argc, char *argv[])&lt;br /&gt;{&lt;br /&gt;	cout &lt;&lt; "Hello World !!!" &lt;&lt; endl; // endl equivale ad un \n&lt;br /&gt;	&lt;br /&gt;	return 0;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Wed, 10 May 2006 02:14:20 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/2004</guid>
      <author>whitetiger ()</author>
    </item>
  </channel>
</rss>
