Hello World in Assembly Language
Our first program will print the classic “hello world” message. Here’s the full source code.
To run the program, save the code in a file called hello-world.asm
and use nasm
and ld
to assemble and link it.
Sometimes we’ll want to debug our programs to see what they’re doing step-by-step. For this, we can use a tool like gdb
.
First, compile the code with debugging symbols and then run it with gdb
:
Now that we can run, build, and debug basic assembly programs, let’s learn more about the language.