Two Linux Assembly Hello World Programs

I have two screenshots showing the exact same “Hello World” program using 32 bit and 64 bit Linux system calls in intel assembly language. The names of the registers and the number of the system calls differ slightly but the behavior is exactly the same.

The purpose of a “Hello World” program is more important than you might think at first. It confirms that the assembler is working (in this case FASM), and that the assembly instructions and system calls match the operating system. In my case, I am running Debian Linux on a 64 bit computer which is capable of 64 or 32 bit code. I tend to prefer the 32 bit version because I am used to it. Back in my days of learning programming, there were no 64 bit registers.

Comments

Leave a comment