Resources
Useful all term
- CS 208 Quick Reference, by Aaron Bauer
- CS 208 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 [more files...]
(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 page for this course (only for assignment submission and gradebook)
- Slack invite link
- Download VS Code
- Lab 1: Using VS Code
Unix
- Unix tutorial
- Bash commands, by Ruth Anderson, University of Washington
- Some useful Unix commands, by Tia Newhall, Swarthmore College
C
- C/C++ Standard reference library
- Stanford CS Library C resources
- C resources by Tia Newhall, Swarthmore College
- Duane’s Incredibly Brief Introduction to the C Programming Language, by Duane Bailey, Williams College
- C for Python programmers
- C for Java programmers
- C Programming WikiBook
GDB
- gdb help, handy for the bomb 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
- Compiler Explorer, a great tool to help you learn x86-64 and how C compilers turn C into asm.
- A very useful instruction reference, by Felix Cloutier
- Nice summary from Stanford, “A CS107 joint staff effort (Erik, Julie, Nate)”
- Good (but old) instruction reference by David Evans, University of Virginia
- EFLAGS register reference, Wikipedia
- Official Intel x86 instruction reference as a PDF