Lecture 8: Data Representation 3.8-3.11 of textbook (CS:APP) Sec 7 of x86-64 textbook supplement Sample code used in lecture to illustrate arrays and pointers, structs, and unions sum.c -- sum elements of an array point.c -- point example for structs list.c -- linked list example for structs exp.c -- expression examples for unions Compiled for x86-64 sum.c is compiled two ways, to see different optimization levels; sum1.s uses lower level of optimization than sum2.s -------------------------------------------------- gcc -O1 -S -o sum1.s sum.c gcc -O1 -o sum1 sum.c gcc -O2 -S -o sum2.s sum.c gcc -O2 -o sum2 sum.c gcc -O2 -S point.c gcc -O2 -S list.c gcc -O2 -o list list.c gcc -O2 -S exp.c --------------------------------------------------