The stack, procedures and memory
The stack and the frame a procedure leaves on it, call and ret, lea and the addressing modes, and the sections of the process image. Then the kernel interface that a program uses to do anything outside its own memory: the syscall instruction and its numbers, arithmetic, the bitwise instructions, arrays and structs.
3.1
The stack
push and pop, the layout of the stack at _start, and the 16-byte alignment a call needs
Open
3.2
Procedures
call and ret, a stack frame, and the convention that says who saves a register
Open
3.3
LEA and addressing modes
the addressing modes, lea as an address calculation, and the multiply it does without touching memory
Open
3.4
Memory layout: sections
text, data and bss, why .bss costs nothing in the file, and the process image they build
Open
3.5
Linux syscalls
the syscall instruction, the numbers this course uses, and how a failed call reports its error
Open
3.6
Arithmetic
add and sub, mul and imul with rdx:rax, and div with the divide error it raises
Open
3.7
Bitwise operations
and, or, xor and not, shifts by a constant and by cl, and where each one appears in real code
Open
3.8
Arrays
the layout of an array in memory, indexing with a scaled index, and the bounds the CPU does not check
Open
3.9
Structures
a struct as offsets from one address, equ names for the fields, and a record read field by field
Open