AsAssembly · Lesson 2 of 10
Hello, World!
In Python, `print('Hello')` is one line that hides a function call, a string object, stdout buffering, and a syscall. In assembly, you see all of it.
To print text, we make a `write` system call directly to the Linux kernel. A syscall is the mechanism for asking the OS to do something on your behalf — write to stdout, read a file, allocate memory. We load the syscall number into rax and arguments into rdi, rsi, rdx, then execute the `syscall` instruction.
◆ Note
There's no C runtime, no libc, no main(). We link directly with `ld` and the entry point is `_start`. The `db` directive defines a byte sequence. `equ` is a compile-time constant — the assembler computes `len` itself; it's not stored in memory.
There's no C runtime, no libc, no main(). We link directly with `ld` and the entry point is `_start`. The `db` directive defines a byte sequence. `equ` is a compile-time constant — the assembler computes `len` itself; it's not stored in memory.