Videos: Machine Model: Instruction Set Architecture
slides: machine-model.pdf |
An introduction to instruction sets generally, a demonstration of compiling and disassembling C programs, and an initial foray into the x86-64 instruction set.
- An orientation to assembly and machine code.
- A brief recent history of ISAs, with a particular emphasis on the history behind the x86-64 instruction set.
- A recap of the machine model that drives a typical instruction set.
- A step-by-step demonstration of how to compile, assemble, and disassemble a single C file, which shows the connection between the original C program and its representation as assembly code.
- Continuing the demonstration by linking multiple C files together to produce an executable program.
- Many instructions include a suffix that determines the number of bits that the instruction manipulates. Somewhat redundantly, registers have different names depending on how many bits of the register should be used.In the video, when I say “63 bits” for register names like %rax, that should be “64 bits.”
- Examples of the various forms of operands for many instructions (including data-movement instructions).
- More examples of operand forms, but this time with an example set of register and memory values, so we can compute the resulting argument value.
- The mov, push, and pop instructions.
- Working through assembly examples that use mov and relating the examples back to C programs.
- The add, sub, ..., and lea instructions.
- Working through assembly examples that use arithmetic and relating the examples back to C programs.
- If you’re interesting in reading reference manuals on the x86-64 instruction set, this video provides a few pointers on what to read and how to understand it relative to what we show in the book and slides.