More on assembly

If your reading i386 (IA32) assembly and then look at PPC32 assembly you might have a hard time doing a translation of the code.

The first big thing is 'r0', in the IA32 world its known as 'EAX'. Personally I like r0, its faster to type and easier to remember. Rumor has it when using an IBM PowerPC chip you don't even need to specify the 'r' in your code which makes things a little quicker (Can anyone with a G5 confirm?)

Why so worried about how much I type? well look at my hello world code, its 16 lines long. If I did it in C it would be:

#include <stdio.h>
    printf ("Hello, world!n");

Thats only 5 lines, so every keystroke saved while typing is assembly is a good thing(tm)

Update: I compiled both the assembly and C code versions and here is what I found:

11532 9 Dec 16:58 ctest
11532 9 Dec 17:00 hello

ctest is the executable of the C version of "Hello, world!", and hello is assembly version. As you can see, they are the same size, but I thought that assembly was suppose to be smaller in size than C? Do I need bigger programs to see this?

But even though the files are the same size, "diff" seems to think that they differ. And after running "hexdump" I can easily see that they do in many places so its even more odd that both files came out to the same size.

More to come as I attempt to figure this out... comments more than welcome ^_^;