Lecture 2: x86 Assembly and Call Stack
- Playlist (length: 51:17)
- Optional: Some students have found these slides from Matthias Vallentin helpful: Normal x86 function call, a crash, a control-flow diversion, and code injection.
This entire lecture is optional and won’t be tested directly on exams, but you may find it useful for Project 1. You can use the sanity check questions to determine which section(s) you want to review.
How many bytes are represented by `0x36`? Why?
The compiler, assembler, linker, and loader are used to execute a C program. Which one is responsible for converting assembly code into machine code?
From lowest address to highest address, what are the four sections of C memory? What is each section used for? Which section grows up during program execution? Which section grows down during program execution?
In x86, what are the registers ebp, esp, and eip responsible for? What do we mean when we say these registers contain pointers?