Peter Mawhorter
There’s too much information here for us to understand all at once. But as in other parts of the class, we are honing our dealing-with-information-overload skills:
Apparently this mnemonic is from Geoff Kuenning who I took classes from at HMC
mov copies stuffj* jumps (lots of varieties
like je, jge, etc.)cmp/test compares (to set up for conditional
like je)push and pop stores/reads stacklea stores address in register
(think of &)
Credit to Ben Wood for “Lovely Efficient Arithmetic”
8(%rdi, %rsi, 4)
objdump -d or disas command within
gdb-S flag for gcc to
get a file
-O0 (the default) does no optimization; many
things will be stored on the stack unnecessarily-O3 does lots of optimization; gets stuff done
without the stack where possiblestring_length_aobjdump -d practice.bingdb practice.bin and then
disas string_length_a