'Hello World' in ARM64 Assembly
If you’re looking for ‘Hello, World!’ for 32-bit ARM, check out my previous post: ‘Hello World’ in ARM Assembly.
The structure of a minimal ‘Hello World!’
Our aim is to translate the following ‘Hello, World!’ C app to ARM64 assembly:
#include <unistd.h>
void main() {
const char msg[] = "Hello, ARM!\n";
write(0, msg, sizeof(msg));
exit(0);
}
Beyond defining the main function entry point and our ‘Hello, World!’ message, the bulk of this program just invokes a couple of syscalls1 that do all the real work: write to write data to a file descriptor, and exit to request the OS terminate the program.
peterdn.com