CS208 Introduction to Computer Systems Monday, 27 April 2026 + Exam - Possible: 42; High: 40.5; mean: 32; median: 32 - Submit corrections (or not) on paper at beginning of class Wednesday (see web page for instructions) - Exam score = average of original score and corrected score + Recap - register basics - rax(64), eax(32), ax(16), al(8) - roles: rdi (first function parameter) rsi (2nd) rdx (3rd) ... rax (return value), etc. - instruction basics - movq(64), movl(32), movw(16), movb(8) - add - sub - jmp + What to identify when you look at an assembly language function - parameters: number and type? - return value: type? - [soon] stack frame manipulation boilerplate + cmp, test, and jxx - EFLAGS - ZF - SF - CF - What does ADDL do to flags? - CMP and some JXX's - TEST + Addressing modes - $, (), a(b, c, d),... - What the heck is LEA for? + Things to try with Compiler Explorer - https://godbolt.org/ - Let's do some experiments - what does simple arithmetic (+, -, *, /, %, |, ^, &, ~) look like? - what does an if-else look like? - what does a loop look like?