Demo: ARM Take a look at appendix B if you haven't already Midterm review guide Make sure you understand the book up through chapter 10 Register review: eax, ebx, ecx, edx: Main general purpose registers esi, edi: source index and data index, actually general purpose esp, ebp: Stack and base pointer. esp modified automatically Could use ebp as a general purpose register, I guess eip: Instruction Pointer eflags: Flags, set with a lot of operations including cmp The call stack, and functions and such: "call stack" as opposed to "a stack" It's a stalactite Not a stalagmite (the heap is) How big can it be? We could always check... At some point it'll segfault Let's look at a couple functions and see what gcc does: We can practice drawing the stack With and without -fomit-frame-pointer With an inline function With optimization Pointers: Everybody loves pointers! Can we have a function that prints an array as a bar graph? How about pointers to variables? Only works if the variable is in memory! Registers don't have memory addresses on x86 DEC PDP-11 and IT-9900 apparently had them So we can't use write to write data from a register Only from We need to have a pointer for it Example from network programming Where should buffers be? Example: getcwd and get_current_dir_name Did we bring our own coffee mug?