Peter Mawhorter
Write your questions on the boards.
8(%rdi, %rsi, 4)
scanfscanf
converts text into other types accordingly
%c, integers with
%d, floats with %f, and strings with
%s.scanfscanf and related functionsscanfscanf_s requires arguments to specify buffer sizes, but
is NOT available in C99 (which we’re using in this class)Explorer
link (look at %ebx)
%rbx, %rsp, %rbp, plus
%r12-15%rbp%rbp-4(%rbp) a lotpush → Move stack pointer %rsp down &
store valuepop → Load value & move stack pointer
%rsp upcall → Move %rsp down, store return
address, and jumpret → Load return address into %rip and
move %rsp upleave → Copies %rbp into %rsp
and then pops into %rbpsub, mov, etc. (Anything that stores to
%rsp directly)Stack grows downwards
Starting state
push %rdi # 0x4353
push %rsi # 0xf0
pop %rax
%rsp and/or
push, etc.%rsp₀ points to first slot%rsp points to bottom
mv x86 x86-practice to move
current x86 out of the waycs240 start x86 to start it