Resources
Useful all term
- CS208 Quick Reference (by Aaron Bauer)
- CS208 Style Guide
- Using other people's code
A few commands
Here are some commands you will use throughout the term.
- Look at the contents of any file
hexdump -C filename
- Compile a C program
gcc -Wall -Werror -g -o [executable-name] [source-file.c ...](we will add some other command-line options later in the term).
- Compile a C file to an object module (this produces "source-file.o")
gcc -Wall -Werror -g -c source-file.c
- Translate an executable or object module to assembly language
objdump -d obj-module
Getting started
- Moodle for this course (only for homework submission and quizzes)
- Download Visual Studio Code
- using VS Code lab
- Video: using VS Code in CS208
Unix
- Unix tutorial
- Bash commands, Ruth Anderson, University of Washington
- Some useful Unix commands, Tia Newhall, Swarthmore College
C
- Standard reference library for C and C++
- Stanford CS Library C resources
- C resources, Tia Newhall, Swarthmore College
- Duaneās Incredibly Brief Introduction to the C Programming Language, Duane Bailey, Williams College
- C for Python programmers
- C for Java programmers
- C Programming WikiBook
gdb
- gdb help, handy for the zoo and buffer overflow projects
- Two-page x86-64 GDB cheat sheet (pdf, txt)
- Intro to GDB video
- Beej's Quick Guide to GDB (based on the very handy gdb -tui mode)
- Examining Memory
- Extensive Tutorial
- TUI commands
x86_64
- Chapter 7 of Dive Into Systems
- Compiler Explorer: great tool to help you learn x86_64
and how C compilers turn C into asm. For our purposes, I recommend
settings like this:
- Here's a very useful instruction reference (Felix Cloutier)
- Quick reference guide from CMU
- Nice summary from Stanford—"A CS107 joint staff effort (Erik, Julie, Nate)"
- A good (but old) instruction reference from David Evans at the University of Virginia
- Wikipedia has a good EFLAGS register reference
- Official Intel x86 instruction reference. It's a PDF.