Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Aug 2005 09:55:10 -0500
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Alain De Vos <alain_devos@yahoo.com>
Cc:        hackers@freebsd.org
Subject:   Re: hello world but not in 32bit x86 but in amd64 for amd64 platform
Message-ID:  <20050817145510.GD26422@dan.emsphone.com>
In-Reply-To: <20050817122049.29529.qmail@web52009.mail.yahoo.com>
References:  <20050817122049.29529.qmail@web52009.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Aug 17), Alain De Vos said:
> The AMD64 platform is currently a  Tier 1 FreeBSD platform,
> but what I currently look for is a 
> "Hello World" assembly program written in 64bit assembly 
> which I can compile and run on my FreeBSD,AMD64 platform
> Sadly enough I was unable to find such a very basic program :-)
> 
> Could you inform me if there exist somewhere such a program
> cfr the 32bit hello world example in
> Chapter 11 
> x86 Assembly Language Programming
> FreeBSD Developers' Handbook

The procedure should be the same no matter what architecture you are
using.  Just use AMD64 assembly...

You can also generate an assembly hello-world program yourself:

$ cat << EOF > test.c
int main(void)
{
  write(1, "Hello world\n", 12);
  return 0;
}
EOF
$ gcc -S test.c
$ cat test.s


-- 
	Dan Nelson
	dnelson@allantgroup.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050817145510.GD26422>