hello world but not in 32bit x86 but in amd64 for amd64 platform
Dan Nelson
dnelson at allantgroup.com
Wed Aug 17 14:55:11 GMT 2005
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 at allantgroup.com
More information about the freebsd-hackers
mailing list