I am trying to understand the movement of the rbp
value.
I understand that rbp
is the base pointer of the stack that I am working on.
I have a declaration of:
var_1= dword ptr -3
push rbp
move rbp, rsp
< some code >
mov [rbp+var_1], 1
I am lost on following the value of [rbp+var_1]
in this case.
Later, I have a sequence of comparisons of that value:
test eax, eax
jnz short loc_12C0
mov [rbp+var_1], 0
loc_12C0:
cmp [rbp+var_1], 0
jnz new_location
In trying to follow the logic of this assembly code, I have watched several youtube videos and referenced this post but I do not understand it.
Could somebody please trace the value of the [rbp+var_1]
expression, and explain to me what it is equal to?