NASM Coding: Basics
A NASM program is divided into sections:
section .data ; initialized data
...
section .bss ; uninitialized data
...
section .text ; code
global _start
...
- The data section contains variables that are initialized (= were assigned some initial values.)
- The bss (= block started by symbol) section contains variables that weren't yet initialized; this is basically just memory reservation for later use.
- The text section contains the instructions of the program. The computer starts running the code at a label named
_start
.